Skip to main content

Flutter SDK Setup

To integrate AppsOnAir Flutter SDK to your Flutter Apps, follow the below steps

1. Basic Requirements for service usage

i) iOS Requirements​

  • We are supporting iOS 10+ or iPadOS(iPhone, iPad, iPod Touch) to test on
  • A Mac with Xcode 13+

ii) Android Requirements​

- JAVA 11 required
- An Android 5.0+ device or emulator.
- Project using AndroidX.
- compileSDKVersion set to 30 or higher.
- Targets API level 21 (LOLLIPOP) or higher
- Gradle version 7.0+
- Requires Gradle version `7.0+`
- Uses Jetpack (AndroidX), which includes meeting these version requirements:
- `compileSdkVersion` 29 or later
  • Set up a physical device or use an emulator to run your app.
  • Create or login to your AppsOnAir (AoA) Account
  • Goto the your app details page -> App services tab -? API key tab to get your AoA services API Key

2. Add AppsOnAir Gradle Plugin and SDK

Newer versions of Android Studio

When creating a new project from Android Studio Artic Fox (or newer) the allprojects{...} is no longer added in the project level need add in settings.gradle

2.1 open your root build.gradle file, add the following


buildscript {
repositories {
maven { url '' }

allprojects {
repositories {
maven { url '' }

3. Add required code

Add meta-data to the app module's AndroidManifest.xml file under the application tag

    <!-- add meta-data inside application tag -->
<!-- App icon for dialog -->
android:resource="@drawable/app_icon" />

<!-- App name for dialog -->
android:value="app_name" />

Create string.xml file in to android/app/resourse/value and add below code.

<?xml version="1.0" encoding="utf-8"?>
<string name="app_name"> YOUR_APP_NAME </string>

Applicaton icon

Also make sure to add app icon into drawable as app_icon


4. Add the AppsonAir Initialization code and usage

Use of package

 $ flutter pub add appsonair_flutter_sdk

Import it:

Now in your Dart code, you can use:

import 'package:appsonair_flutter_sdk/apps_on_air_service.dart';

First initialize AppsOnAir by using below code

Package use

// set showNativeUI = 'true' to show default native UI
void main() async {
showNativeUI: true);
runApp(const MyApp());

After inialized add below code, After MaterialApp initialization

You can call checkForAppUpdate() at your preference however, we recommend that, call checkForAppUpdate() in initState method as follows:

Package use



Make sure that to call checkForAppUpdate() method after MaterialApp!

for IOS

Don't forgot to install pods! (for iOS)

5. Set Custom UI (Optional step)

If you want to show a custom alert for app updates then set showNativeUI = false in setAppId() method. Now, call checkForAppUpdate method and pass custom widget to show a custom alert for app updates. To use this method where needed, use the same import statement as in the previous step. Use this method as follows:

With custom ui

customWidget: (response) {
///return your widget here
return Container();