GitXplorerGitXplorer
h

flutter_admob_app_open

public
13 stars
11 forks
0 issues

Commits

List of commits on branch master.
Unverified
4183a40b45de83f58963ab50a03c2f2d2edb4348

Upgrade to 1.1.0

ttinistudio committed 3 years ago
Unverified
616e7305cc3c8e77dbe2fb127e499f4ffb15db6c

Upgrade to 1.1.0

ttinistudio committed 3 years ago
Unverified
ab71e922c8997f957ef3b5200501214e0bce2994

Upgrade to 1.1.0

ttinistudio committed 3 years ago
Unverified
8be56107e513fe843b75d5f545bfc8032719041a

Upgrade to 1.1.0

ttinistudio committed 3 years ago
Unverified
23c5d8b3b22f817d0b275a4306d40277e5f8013f

Upgrade to 1.1.0

ttinistudio committed 3 years ago
Unverified
c299d47001fe9a28db2526e69ab37608ec83d2d7

Upgrade to 1.1.0

ttinistudio committed 3 years ago

README

The README file for this repository.

Flutter Admob App Open

pub package

Discontinued

Project discontinued because google mobile ads has support App Open Ads. Please using google plugin. https://pub.dev/packages/google_mobile_ads


Flutter bridge to Admob App Open Beta.

Supports using Admob App Open Beta. See https://developers.google.com/admob/android/app-open-ads for more information about Admob App Open.

drawing

Supported platforms

  • Android
  • iOS

AndroidManifest changes

AdMob 17 requires the App ID to be included in the AndroidManifest.xml. Failure to do so will result in a crash on launch of your app. The line should look like:

<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="[ADMOB_APP_ID]"/>

where [ADMOB_APP_ID] is your App ID. You must pass the same value when you initialize the plugin in your Dart code.

See https://goo.gl/fQ2neu for more information about configuring AndroidManifest.xml and setting up your App ID.

Info.plist changes

Admob 7.42.0 requires the App ID to be included in Info.plist. Failure to do so will result in a crash on launch of your app. The lines should look like:

<key>GADApplicationIdentifier</key>
<string>[ADMOB_APP_ID]</string>

where [ADMOB_APP_ID] is your App ID. You must pass the same value when you initialize the plugin in your Dart code.

See https://developers.google.com/admob/ios/quick-start#update_your_infoplist for more information about configuring Info.plist and setting up your App ID.

Example Usage

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  /// Replace your admob app open ad unit id
  final appAppOpenAdUnitId = FlutterAdmobAppOpen.testAppOpenAdId;


  /// Init MobileAds and more configs
  await MobileAds.instance.initialize().then((value) {
    MobileAds.instance.updateRequestConfiguration(
      //Add more configs
      RequestConfiguration(testDeviceIds: []),
    );
  });

  AdRequestAppOpen targetingInfo = AdRequestAppOpen(
    keywords: <String>['flutterio', 'beautiful apps'],
    contentUrl: 'https://flutter.io',
    nonPersonalizedAds: true,
  );

  /// Init App Open Ads
  await FlutterAdmobAppOpen.instance.initialize(
    appAppOpenAdUnitId: appAppOpenAdUnitId,
    targetingInfo: targetingInfo,
  );


  runApp(MyApp());
}

Pause and Resume

if (condition) {
  FlutterAdmobAppOpen.instance.pause();
} else {
  FlutterAdmobAppOpen.instance.resume();
}

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.