works great for me now , thanks
I called this method on Screen1.initalize, it worked for some time but now it gives me this error.
What can be the problem?
You need to ask a permission when screen Initialize
When Screen1 Initialize
Call Screen1 AskForPermission permission name = android.permission.ACCESS_NETWORK_STATE
Delete old AdmobSdk
extension & use this : com.oseamiya.admobsdks
I have not added this permission in manifest thinking that it will added by default . Later on I read this post but forgot to update the extension. Extension has been updated now.
Now it works thanks
My application consists of 3 screens, do I have to initialize sdk on each screen?
no I tried
You can initialize AdMob once the application starts (Screen1), you also can initialize it in other screens but you don't need to, once is enough.
You can use SetAdUnitId
block to set your ad unit id .
Also, Now AdUnitId is added in designer property.
thank you again. It's very good for me
I'm starting to learn and I couldn't do it anyway, I did everything right.
Could you send me an AIA so I can see the blocks?
Thanks!
POST #11
I am getting this error:
A required meta-data tag in your app's AndroidManifest.xml does not exist. You must have the following declaration within the <application>
element:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Did I miss something? I have followed the steps.
Did you added AdmobSdk
extension ? AdmobSdk
extension fulfill the requirement of this manifest. See :
Also, This extension doesn't work with companion as companion app don't have required manifest. You should compile the application to see the result.
Thanks oseamiya. Actually I tried with the companion. I compiled and it is working perfectly. Very nice job! Thanks a lot!
Very nice extension!
I tried adding a banner ad using this extension, but it doesn't work with an error. How can I make good use of this extension? Please let me know along with the aia file.
Warning phrase : Attempt to invoke virtual method 'android.view.ViewParent com.google.android.gms.ads.AdView.getParent()' on a null object reference
Note: You will not see another error reported for 5 seconds.
aia : admob_test.aia (2.0 MB)
Please look over to the documentation properly.
I checked your aia and I found :
- You have not followed this step. You should create a new extension so that you can add meta-datas in your manifest. Please follow this step.
- Also, You were trying to show the banner ad without loading. You should load a banner ad first, If loading is success then only you can show the ad to view like this.
If you have got any other confusions then you can reply here