B4A Library Admob Interstitial Library

mlc

Active Member
Licensed User
Longtime User
Thanks Jack,

Works perfect, I ported one of my apps, to the new admob and I can show banners and interstitials.
 

Douglas Farias

Expert
Licensed User
Longtime User
where is the lib A referenced library is missing: googleadmobadssdk-6.4.1
i dont found this on android folder *-*
 

Croïd

Active Member
Licensed User
Longtime User
Hi Jack and thank for your lib.

I wanted to know if the 2 permissions are required (obligatory) ?

I have customers, who do not want to install the application for fear of safety.
 

Attachments

  • store.png
    44.9 KB · Views: 211
Last edited:

holdemadvantage

Active Member
Licensed User
Longtime User
Hi, i woud like to know if is there a way to swow admob interstitials at app launch.

This
B4X:
mwAdInterstitial.Initialize("mwadi","ca-app-pub-xxxxxxxxxxxx")
mwAdInterstitial.LoadAd
mwAdInterstitial.Show

Doesn't work on activity create.

Thanks in advance
 

Croïd

Active Member
Licensed User
Longtime User


For me, Interstitial work only if you click a button.

Maybe, use a timer simulator for activity create !
 

Croïd

Active Member
Licensed User
Longtime User
Even for me, any suggestions?

have you tried ? (Currently the store is migrating I can not try)

B4X:
Sub Activity_Create(FirstTime As Boolean)
    ' For example: be careful #AdditionalRes:
  
    mwAdInterstitial.Initialize("Ad", "XXXXXXXXXXX")
    mwAdInterstitial.LoadAd

    Timer1.Initialize("Timer1",1000)
    Timer1.Enabled = True
End Sub

Sub Timer1_tick
If mwAdInterstitial.Status=mwAdInterstitial.Status_AdReadyToShow Then
mwAdInterstitial.Show
    If mwAdInterstitial.Status=mwAdInterstitial.Status_Dismissed Then
 mwAdInterstitial.LoadAd
Timer1.Enabled = false
    End If
End Sub

or if another solution to simulate a click with "sender"
 
Last edited:

holdemadvantage

Active Member
Licensed User
Longtime User
B4X:
Sub Process_Globals

Dim Timerintadmob As Timer

End Sub
Sub Activity_Create(FirstTime As Boolean)


mwAdInterstitial.Initialize("mwadi","ca-app-pub-xxxxxxxxxxxxxxxxx")
mwAdInterstitial.LoadAd
Timerintadmob.Initialize("Timerintadmob",1000)
Timerintadmob.Enabled=True

End sub

Sub Timerintadmob_tick
If mwAdInterstitial.Status=mwAdInterstitial.Status_AdReadyToShow Then
mwAdInterstitial.Show
Timerintadmob.enabled=False
End If
End Sub

This works
 

syncmaster13

Member
Licensed User
Longtime User
Hi
I implemented interstitial ads and during installing my app it asked me for new permission
"Phone calls -- read phone status and identity"
Is this required for showing interstitial ads?

Thank You
 

mmucek

Member
Licensed User
Longtime User
Hi,
Does anyone have an idea how to detect if a user clicks on Ad?

Thank You.
 

MarcoRome

Expert
Licensed User
Longtime User
I think you can probably use it without them. Try taking them out of the XML file and see what happens.

Hi all. Thank's Jack for this fantastic library.
Croid in your file AndroidManifest.xml ( folder object ) you found this code ( more or less )
B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="mobi.mindware.admob"
    android:versionCode="2"
    android:versionName="2.0"
    android:installLocation="internalOnly">
   
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
    <supports-screens android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:anyDensity="true"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <application
        android:icon="@drawable/icon"
        android:label="Admob Interstitial Example">
       
        <meta-data android:name="com.google.android.gms.version"
          android:value="@integer/google_play_services_version"/>
        <activity android:name="com.google.android.gms.ads.AdActivity"
          android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
        <activity
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTop"
            android:name=".main"
            android:label="Admob Interstitial Example"
            android:screenOrientation="unspecified">
            <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
           
        </activity>
    </application>
</manifest>

in particolary this permission:

B4X:
  <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>

if you remove this line:

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

in your application remove "Device ID & Call Information"

(dont forget after modified, check you androidmanifest.xml only for reading )

Bye
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…