FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

autoRegistration: false NOT WORKING Android

Open Lydecker opened this issue 4 years ago • 5 comments

Hi, the autoregistration boolean of the init call: FirebasePushNotificationManager.Initialize(context: this, resetToken: true, autoRegistration: false);

doesn't work on Android the FIRST time the app is installed and launched.

If you delete your app on an android phone, install/deploy the app through Xamarin - and launch it, even with autoRegistration set to false, CrossFirebasePushNotification.Current.OnTokenRefresh is called.

If you quit the app (don't uninstall) and relaunch, then autoRegistration=false is obeyed, and CrossFirebasePushNotification.Current.OnTokenRefresh is only called when CrossFirebasePushNotification.Current.RegisterForPushNotifications(); is called.

Using the Simulator Android API 28 ( Android 9.0) and 3.1.6 for the plugin

Lydecker avatar Apr 11 '20 14:04 Lydecker

@Lydecker Did you find a workaround for this?

15mgm15 avatar Apr 26 '20 17:04 15mgm15

Unfortunately not - are you seeing the same behaviour?

Lydecker avatar Apr 26 '20 18:04 Lydecker

@Lydecker Yeah I am seeing the same behavior, trying to find a workaround

15mgm15 avatar Apr 26 '20 21:04 15mgm15

I had a look at the source code but couldn't see anything glaringly obvious.

There are also separate iOS issues #303 with autoRegistration=false.

Unfortunately I don't think this flag is tested much on new releases - not even the sample project uses it...

Lydecker avatar Apr 28 '20 09:04 Lydecker

@15mgm15 - did you get anywhere with this?

Thanks

Lydecker avatar Jun 02 '20 11:06 Lydecker