Android Question FirebaseAdMob is not used

Robert Valentino

Well-Known Member
Licensed User
Longtime User
If I have the FirebaseAdMob library included B4A Logs say
Library 'FirebaseAdMob' is not used (warning #32)

If I remove the library (de-select it) I get a compiler error

upload_2019-6-2_15-57-56.png


Without blocking the warning anyway to get around this
 

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Did a clear project.
Delete everything related to Firebase AdMob. Define everything?
Didn't even realize I was using anything.

Has something to do with the below code.

The AdvertisingIdClient.Info seems to need Firebase AdMob to compile but the IDE seems to not know it is necessary

B4X:
#if Java
import java.util.concurrent.Callable;
import com.google.android.gms.ads.identifier.AdvertisingIdClient;
import com.google.android.gms.ads.identifier.AdvertisingIdClient.Info;

public static void GetAdvertisingId() {
   BA.runAsync(processBA, mostCurrent, "advertisingid_ready", new Object[] {false, ""}
       , new Callable<Object[]>() {
                   @Override
                   public Object[] call() throws Exception {
                       String id = AdvertisingIdClient.getAdvertisingIdInfo(mostCurrent).getId();
                       return new Object[] {true, id};
                   }
               }); }
#End If
 
Upvote 0
Top