Still need to unregister push each time on android for some reason

This commit is contained in:
Kyle Spearrin 2016-08-27 02:59:34 -04:00
parent 42434229ce
commit c26960380a
2 changed files with 3 additions and 4 deletions

View File

@ -46,13 +46,11 @@ namespace Bit.Android
StartPushService();
var pushNotification = Resolver.Resolve<IPushNotification>();
#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<IAuthService>().IsAuthenticated)
{
pushNotification.Unregister();
pushNotification.Register();
}
}

View File

@ -205,6 +205,7 @@ namespace Bit.App.Pages
if(Device.OS == TargetPlatform.Android)
{
_pushNotification.Unregister();
_pushNotification.Register();
}