Skip to content

Commit

Permalink
Configured AdMob Package
Browse files Browse the repository at this point in the history
  • Loading branch information
christiankyle-ching committed Feb 15, 2021
1 parent 4ecbcc2 commit 9acf403
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 58 deletions.
59 changes: 24 additions & 35 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,49 +1,38 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.nasa_apod">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.nasa_apod">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="NASA's APoD"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
<application android:name="io.flutter.app.FlutterApplication" android:label="NASA's APoD" android:icon="@mipmap/ic_launcher">
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" />

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

</activity>

<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<meta-data android:name="flutterEmbedding" android:value="2" />

<!-- AdMob Application ID -->
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-1880918445827744~7516812574"/>

</application>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:firebase_admob/firebase_admob.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
Expand Down
51 changes: 29 additions & 22 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,21 @@ packages:
name: firebase
url: "https://pub.dartlang.org"
source: hosted
version: "7.3.2"
version: "7.3.3"
firebase_admob:
dependency: "direct main"
description:
name: firebase_admob
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.3"
firebase_analytics:
dependency: "direct main"
description:
name: firebase_analytics
url: "https://pub.dartlang.org"
source: hosted
version: "6.2.0"
version: "6.3.0"
firebase_analytics_platform_interface:
dependency: transitive
description:
Expand All @@ -133,21 +140,21 @@ packages:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.2"
version: "0.5.3"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1"
version: "0.2.1+1"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -173,7 +180,7 @@ packages:
name: flutter_local_notifications_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.0.0+1"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -204,7 +211,7 @@ packages:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.18"
version: "2.1.19"
intl:
dependency: "direct main"
description:
Expand Down Expand Up @@ -274,28 +281,28 @@ packages:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4+4"
version: "0.0.4+8"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
version: "1.0.4"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.4+1"
version: "0.0.4+3"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
version: "1.9.2"
petitparser:
dependency: transitive
description:
Expand All @@ -316,7 +323,7 @@ packages:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.3"
process:
dependency: transitive
description:
Expand Down Expand Up @@ -351,21 +358,21 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.12"
version: "0.5.12+4"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.2+2"
version: "0.0.2+4"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+10"
version: "0.0.1+11"
shared_preferences_platform_interface:
dependency: transitive
description:
Expand All @@ -386,7 +393,7 @@ packages:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+1"
version: "0.0.2+3"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -468,14 +475,14 @@ packages:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+1"
version: "0.0.1+4"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+8"
version: "0.0.1+9"
url_launcher_platform_interface:
dependency: transitive
description:
Expand All @@ -489,14 +496,14 @@ packages:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5+1"
version: "0.1.5+3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+1"
version: "0.0.1+3"
vector_math:
dependency: transitive
description:
Expand All @@ -517,7 +524,7 @@ packages:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.3"
version: "1.7.4+1"
workmanager:
dependency: "direct main"
description:
Expand All @@ -531,7 +538,7 @@ packages:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
version: "0.1.2"
xml:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ dependencies:
wallpaper_manager: ^1.0.10
flutter_local_notifications: 3.0.1+2
firebase_core: "^0.5.2"
firebase_analytics: "^6.2.0"
firebase_analytics: ^6.2.0
firebase_admob: ^0.10.3

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 9acf403

Please sign in to comment.