diff --git a/src/Android/MainApplication.cs b/src/Android/MainApplication.cs index e58ed25a9..38d8eb879 100644 --- a/src/Android/MainApplication.cs +++ b/src/Android/MainApplication.cs @@ -46,13 +46,11 @@ namespace Bit.Android StartPushService(); var pushNotification = Resolver.Resolve(); -#if DEBUG - // When running in debug mode you must unregister the previous instance first or else things wont work + // Must unregister the previous instance first or else things wont work // ref https://github.com/rdelrosario/xamarin-plugins/issues/65 - pushNotification.Unregister(); -#endif if(Resolver.Resolve().IsAuthenticated) { + pushNotification.Unregister(); pushNotification.Register(); } } diff --git a/src/App/Pages/LoginPage.cs b/src/App/Pages/LoginPage.cs index c1fdce5a2..4005e941b 100644 --- a/src/App/Pages/LoginPage.cs +++ b/src/App/Pages/LoginPage.cs @@ -205,6 +205,7 @@ namespace Bit.App.Pages if(Device.OS == TargetPlatform.Android) { + _pushNotification.Unregister(); _pushNotification.Register(); }