-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AdMob: Unable to initialize without Google Play Services #127
Comments
Hi, The C++ library always requires you to pass in the Firebase App. When you initialize Firebase App on Android, you pass in the JNI environment and activity. See the AdMob sample app for an example: |
I try to use Firebase on Amazon devices without Google Play Services. So I can't init Firebase, as I always get annoying dialog "Update Google Play Services". But, according to docs - there is no need for Firebase to use AdMob. And AdMob has special constructor for such cases - see admob.h Looks like you forgot to implement jni-bridge on c++ side to java side. c++ has function, but does not route to java call. It's easy to fix. |
Sorry about that. I do see the Initialize() method you described. It does seem that there is a bug that still looks for the class com.google.android.gms.tasks.Task when you initialize AdMob in that way. Thank you for reporting it, I'll take a look and see what's needed to fix it. |
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Lol, after almost 1.5 year you still did not fix it, are you serious? |
Hi all, We've since deprecated the AdMob SDK and have replaced it with the Google Mobile Ads (GMA) SDK. 've just tested this and I was able to create an instance of the GMA SDK without Google Play Services. If you do encounter this issue still on the GMA SDK, then please open another ticket and we'll look into it further. Thank you! |
Under Android replace:
firebase::admob::Initialize(*app, kAdMobAppID);
with
firebase::admob::Initialize(GetJniEnv(), GetActivity(), kAdMobAppID);
and you get crash, as there is no such method on Android side.
The text was updated successfully, but these errors were encountered: