firebase-android-sdk: "firebase_messaging_auto_init_enabled" flag does not work
Step 1: Describe your environment
- Android device: Samsung S9
- Android OS version: 8.0.0
- Google Play Services version: 17.4.55
- Play Services Base SDK version: 16.1.0
- Firebase Core version: 16.0.7
- Firebase Messaging version: 17.4.0
Step 2: Describe the problem:
As mentioned in the docs to prevent auto-initialization of FCM tokens we may add
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="false"/>
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />
in AndroidManifest.xml. Bt this does not seem to work as token is still being generated automatically when the app starts. This issue (https://github.com/firebase/quickstart-android/issues/467) already exist but it was closed. It strange because it wasn’t solved
Steps to reproduce:
- Add this to manifest.xml
- Run the App
Observed Results:
- Token would still generate without even initializing the firebase messaging again at runtime.
Expected Results:
- Token wouldn’t generate before the call
FirebaseMessaging.getInstance().setAutoInitEnabled(true);
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (11 by maintainers)
Hi @UserSty, sorry to hear you’re still having a problem. For me it is working now and I just wanted to get back to @gsakakihara, since he helped me finding my mistake.