New AdMob Banner and Interstitial ads not working

70 views
Skip to first unread message

Halim Öztürk

unread,
Jul 12, 2014, 4:42:34 PM7/12/14
to google-adm...@googlegroups.com
Hi,

I tried to implement your new ads with that unity package but I couldn't succeed. I followed the instructions from here by the way.

So first of all I want to show my code;

using UnityEngine;
using System.Collections;
using GoogleMobileAds.Api;


public class Reklam : MonoBehaviour
{
        BannerView bannerView ;
        InterstitialAd interstitial;

        // Use this for initialization
        void Start ()
        {
                // Create a 320x50 banner at the top of the screen.
                bannerView = new BannerView (
            "ca-app-pub-692*******/26*****", AdSize.Banner, AdPosition.Top);
                // Initialize an InterstitialAd.
                interstitial = new InterstitialAd ("ca-app-pub-692*******/416******");
                // Create an empty ad request.
                AdRequest request = new AdRequest.Builder ().Build ();
                // Load the banner with the request.
                bannerView.LoadAd (request);
                // Load the interstitial with the request.
                interstitial.LoadAd (request);
               
        }

        void OnGUI ()
        {
                if (GUI.Button (new Rect (150, 300, 200, 75), "Show Banner")) {
                        bannerView.Show ();
                }

                if (GUI.Button (new Rect (150, 400, 200, 75), "Show Interstitial")) {
                        if (interstitial.IsLoaded ()) {
                                interstitial.Show ();
                        }
                }
               
        }
}

Here is my Android Manifest.xml








<?xml version="1.0" encoding="utf-8"?>


<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.Halim.admobdeneme" android:versionName="1.0" android:versionCode="1">


  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />


  <!-- Google Mobile Ads Permissions -->


        <uses-permission android:name="android.permission.INTERNET" />


        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />


  <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">


    <!-- meta-data tag for Google Play services -->


    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>


        <activity android:name="com.unity3d.player.UnityPlayerProxyActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >


    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />


      <intent-filter>


        <action android:name="android.intent.action.MAIN" />


        <category android:name="android.intent.category.LAUNCHER" />


      </intent-filter>


    </activity>


    <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >


    </activity>


    <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >


      <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />


      <meta-data android:name="android.app.lib_name" android:value="unity" />


    </activity>


    <activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >


    </activity>


    <!-- Google Mobile Ads Activity -->


          <activity android:name="com.google.android.gms.ads.AdActivity"


              android:label="@string/app_name"


              android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">


    </activity>


  </application>


  <uses-feature android:glEsVersion="0x00020000" />


  <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />


</manifest>


If it will help here is the screenshot of my project folders


I got device logs and there is something like that

D/PMS     (  714): acquireWL(42d37310): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668035874, Int=300
D/PMS     (  714): releaseWL(42d37310): PARTIAL_WAKE_LOCK  AlarmManager 0x1
V/LightsService(  714): setLight #0: color=#ff4e4e4e
V/LightsService(  714): setLight #0: color=#ff4f4f4f
V/LightsService(  714): setLight #0: color=#ff505050
V/LightsService(  714): setLight #0: color=#ff515151
D/PMS     (  714): acquireWL(42c9d0e0): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668036174, Int=300
D/PMS     (  714): releaseWL(42c9d0e0): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42c87e68): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668036474, Int=300
D/PMS     (  714): releaseWL(42c87e68): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42c78930): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668036774, Int=300
D/PMS     (  714): releaseWL(42c78930): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42c42f40): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668037074, Int=300
D/PMS     (  714): releaseWL(42c42f40): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42c1d870): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668037374, Int=300
D/PMS     (  714): releaseWL(42c1d870): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42ba20e8): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668037674, Int=300
D/PMS     (  714): releaseWL(42ba20e8): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/WifiStateMachine(  714): fetchRssiAndLinkSpeedNative RSSI = -66 abnormalRssiCnt = 0 newLinkSpeed = 72
D/WifiStateMachine(  714): fetchRssiAndLinkSpeedNative mLinkspeedCount = 4, mLinkspeedSum: 288
D/PMS     (  714): acquireWL(42b93908): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668037974, Int=300
D/PMS     (  714): releaseWL(42b93908): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42b5e6e8): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668038274, Int=300
D/PMS     (  714): releaseWL(42b5e6e8): PARTIAL_WAKE_LOCK  AlarmManager 0x1
I/com.dropbox.android.service.CameraUploadService(17422): Starting camera upload scan...
D/PMS     (  714): acquireWL(42b44588): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668038574, Int=300
D/PMS     (  714): releaseWL(42b44588): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42b3f1c0): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668038874, Int=300
D/PMS     (  714): releaseWL(42b3f1c0): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42afbf60): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668039174, Int=300
D/PMS     (  714): releaseWL(42afbf60): PARTIAL_WAKE_LOCK  AlarmManager 0x1
I/com.dropbox.android.service.CameraUploadService(17422): Finished querying providers.
I/com.dropbox.android.service.CameraUploadService(17422): Finished camera upload scan.
D/PMS     (  714): acquireWL(42ad8bd8): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668039474, Int=300
D/PMS     (  714): releaseWL(42ad8bd8): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42ab7b48): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668039774, Int=300
D/PMS     (  714): releaseWL(42ab7b48): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42aae040): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668040074, Int=300
D/PMS     (  714): releaseWL(42aae040): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42a5c128): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668040374, Int=300
D/PMS     (  714): releaseWL(42a5c128): PARTIAL_WAKE_LOCK  AlarmManager 0x1
D/PMS     (  714): acquireWL(42a30a60): PARTIAL_WAKE_LOCK  AlarmManager 0x1 714 1000
V/AlarmManager(  714): sending alarm PendingIntent{432f9e90: PendingIntentRecord{426cf298 com.domobile.applock startService}}, i=null, t=3, cnt=1, w=1668040674, Int=300
D/PMS     (  714): releaseWL(42a30a60): PARTIAL_WAKE_LOCK  AlarmManager 0x1

You can also find full log file on the attachment.


I searched from google a lot but I couldn't find anything for solution. I am dealing with that for 1 week.
Can anybody help me about that ? I can provide additional information if it is necessary.
logcat.txt

Halim Öztürk

unread,
Jul 13, 2014, 4:32:42 PM7/13/14
to google-adm...@googlegroups.com
I solved the problem it is my bad. If you are facing with the same problem make sure that you are doing the below process correctly.

Add the google-play-services_lib folder, located at /extras/google/google_play_services/libproject, into the Plugins/Android folder of your project.



12 Temmuz 2014 Cumartesi 23:42:34 UTC+3 tarihinde Halim Öztürk yazdı:

  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens=<span style="color: #080;" class="styled-by-prettif

...
Reply all
Reply to author
Forward
0 new messages