From 4b8032ba6d75364fbe5a8f4c6884f17de6d16854 Mon Sep 17 00:00:00 2001 From: rb-shahid Date: Mon, 22 Aug 2016 15:23:55 +0500 Subject: [PATCH] add firebase ad --- .idea/.name | 2 +- .idea/compiler.xml | 5 +- .idea/dictionaries/om26er.xml | 7 -- .idea/encodings.xml | 7 +- .idea/gradle.xml | 11 ++- .idea/misc.xml | 58 ++++++++++- .idea/modules.xml | 3 +- .idea/scopes/scope_settings.xml | 5 - .idea/vcs.xml | 7 -- app/app.iml | 97 ++++++++++++++----- app/build.gradle | 7 +- app/google-services.json | 38 ++++++++ app/src/main/AndroidManifest.xml | 1 + .../java/com/byteshaft/neon/MainActivity.java | 7 +- app/src/main/res/layout/activity_main.xml | 15 ++- app/src/main/res/values/strings.xml | 2 + build.gradle | 3 +- gradle/wrapper/gradle-wrapper.properties | 4 +- neon.iml | 8 +- 19 files changed, 217 insertions(+), 70 deletions(-) delete mode 100644 .idea/dictionaries/om26er.xml delete mode 100644 .idea/scopes/scope_settings.xml delete mode 100644 .idea/vcs.xml create mode 100644 app/google-services.json diff --git a/.idea/.name b/.idea/.name index 07730fc..47fd9b9 100644 --- a/.idea/.name +++ b/.idea/.name @@ -1 +1 @@ -Torch \ No newline at end of file +neon \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 217af47..96cc43e 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,7 +1,6 @@ - - - + \ No newline at end of file diff --git a/.idea/dictionaries/om26er.xml b/.idea/dictionaries/om26er.xml deleted file mode 100644 index f838e07..0000000 --- a/.idea/dictionaries/om26er.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - autostart - - - \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml index e206d70..97626ba 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -1,5 +1,6 @@ - - - + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index fe865d3..cd2ead8 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,15 +5,20 @@ + - - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 59436c9..7158618 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,8 +3,60 @@ - + + + + + + + + + + + + + + + - - + + + + + + + 1.8 + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index cc3c3d5..67fdab3 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -6,5 +6,4 @@ - - + \ No newline at end of file diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml deleted file mode 100644 index 922003b..0000000 --- a/.idea/scopes/scope_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index def6a6a..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/app/app.iml b/app/app.iml index 59abc13..121f0a1 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + @@ -12,9 +12,9 @@ - + @@ -32,14 +32,15 @@ + - - - - - - - + + + + + + + @@ -47,6 +48,15 @@ + + + + + + + + + @@ -54,6 +64,7 @@ + @@ -61,34 +72,70 @@ + + + + + + + + + + + - - - + + + + + + + + + + + + + + - - - - + + + + + + - - + + + + + + + + - + + + + - + + + + + - - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 63b24ca..3bab03b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 21 @@ -7,8 +8,8 @@ android { applicationId 'com.byteshaft.neon' minSdkVersion 10 targetSdkVersion 21 - versionCode 2 - versionName '0.9.2' + versionCode 3 + versionName '0.9.3' } buildTypes { release { @@ -30,4 +31,6 @@ dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.byteshaft.ezflashlight:ezflashlight:0.8.5@aar' + compile 'com.google.firebase:firebase-ads:9.0.0' + compile 'com.google.android.gms:play-services-ads:9.0.0' } diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 0000000..40061d8 --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,38 @@ +{ + "project_info": { + "project_number": "898031673742", + "project_id": "firebase-neon" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:898031673742:android:182e3626ab6d1d64", + "android_client_info": { + "package_name": "com.byteshaft.neon" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBrmlgHv4Kpca2s8DJZJLjGVHBfudrXKE0" + } + ], + "services": { + "analytics_service": { + "status": 2, + "analytics_property": { + "tracking_id": "UA-81960997-2" + } + }, + "appinvite_service": { + "status": 1, + "other_platform_oauth_client": [] + }, + "ads_service": { + "status": 1 + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5224903..0616f11 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ package="com.byteshaft.neon" xmlns:android="http://schemas.android.com/apk/res/android" > + diff --git a/app/src/main/java/com/byteshaft/neon/MainActivity.java b/app/src/main/java/com/byteshaft/neon/MainActivity.java index 8d2b124..0d80360 100644 --- a/app/src/main/java/com/byteshaft/neon/MainActivity.java +++ b/app/src/main/java/com/byteshaft/neon/MainActivity.java @@ -22,6 +22,8 @@ import android.widget.Button; import com.byteshaft.ezflashlight.FlashlightGlobals; +import com.google.android.gms.ads.AdRequest; +import com.google.android.gms.ads.AdView; @SuppressWarnings("deprecation") public class MainActivity extends Activity implements Button.OnClickListener { @@ -30,7 +32,6 @@ public class MainActivity extends Activity implements Button.OnClickListener { private static MainActivity sActivityInstance = null; private Helpers mHelpers = null; private RemoteUpdateUiHelpers mRemoteUi = null; - static MainActivity getInstance() { return sActivityInstance; } @@ -54,6 +55,10 @@ protected void onCreate(Bundle savedInstanceState) { mHelpers = new Helpers(this); mSwitcher = (Button) findViewById(R.id.switcher); mSwitcher.setOnClickListener(this); + AdView adView = (AdView) findViewById(R.id.ad_view); + AdRequest adRequest = new AdRequest.Builder() + .setRequestAgent("android_studio:ad_template").build(); + adView.loadAd(adRequest); } @Override diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ec8be05..7e61f13 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,16 +1,29 @@ + tools:context=".MainActivity">