{"action":"created","issue":{"url":"https://api.github.com/repos/rdelrosario/xamarin-plugins/issues/89","repository_url":"https://api.github.com/repos/rdelrosario/xamarin-plugins","labels_url":"https://api.github.com/repos/rdelrosario/xamarin-plugins/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/rdelrosario/xamarin-plugins/issues/89/comments","events_url":"https://api.github.com/repos/rdelrosario/xamarin-plugins/issues/89/events","html_url":"https://github.com/rdelrosario/xamarin-plugins/issues/89","id":178288117,"number":89,"title":"Notification only works on the very first Android install in debug mode?","user":{"login":"jelmarlaunchlabs","id":16910166,"avatar_url":"https://avatars.githubusercontent.com/u/16910166?v=3","gravatar_id":"","url":"https://api.github.com/users/jelmarlaunchlabs","html_url":"https://github.com/jelmarlaunchlabs","followers_url":"https://api.github.com/users/jelmarlaunchlabs/followers","following_url":"https://api.github.com/users/jelmarlaunchlabs/following{/other_user}","gists_url":"https://api.github.com/users/jelmarlaunchlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/jelmarlaunchlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelmarlaunchlabs/subscriptions","organizations_url":"https://api.github.com/users/jelmarlaunchlabs/orgs","repos_url":"https://api.github.com/users/jelmarlaunchlabs/repos","events_url":"https://api.github.com/users/jelmarlaunchlabs/events{/privacy}","received_events_url":"https://api.github.com/users/jelmarlaunchlabs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-21T09:05:50Z","updated_at":"2016-10-12T13:23:23Z","closed_at":null,"body":"I've tried this:\r\n\r\n1. Debug using a device.\r\n2. Start debugging the app push notification works fine (at first).\r\n3. Stop the debugging.\r\n4. Start the debugging again, now push notification does not work anymore, up until app is uninstalled the start the steps written here.\r\n\r\nissue only on Android."},"comment":{"url":"https://api.github.com/repos/rdelrosario/xamarin-plugins/issues/comments/253211899","html_url":"https://github.com/rdelrosario/xamarin-plugins/issues/89#issuecomment-253211899","issue_url":"https://api.github.com/repos/rdelrosario/xamarin-plugins/issues/89","id":253211899,"user":{"login":"pug205","id":20951465,"avatar_url":"https://avatars.githubusercontent.com/u/20951465?v=3","gravatar_id":"","url":"https://api.github.com/users/pug205","html_url":"https://github.com/pug205","followers_url":"https://api.github.com/users/pug205/followers","following_url":"https://api.github.com/users/pug205/following{/other_user}","gists_url":"https://api.github.com/users/pug205/gists{/gist_id}","starred_url":"https://api.github.com/users/pug205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pug205/subscriptions","organizations_url":"https://api.github.com/users/pug205/orgs","repos_url":"https://api.github.com/users/pug205/repos","events_url":"https://api.github.com/users/pug205/events{/privacy}","received_events_url":"https://api.github.com/users/pug205/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T13:23:23Z","updated_at":"2016-10-12T13:23:23Z","body":"I did some research on Google and found the following thread on the Xamarin forum: [https://forums.xamarin.com/discussion/62810/xamarin-android-gcm-notification](url)\r\n\r\n\"I had also the same issue and started to investigate it. Seems that when you debug deploy again with the same app version, the instanceId isn't valid anymore but gcm doesn't seem to notice this and the token remains the same. When you toggle the appversion (either up or down) everything seems to work fine.\"\r\n\r\nAnd a code example\r\n`[...]\r\nvar instanceID = InstanceID.GetInstance (Android.App.Application.Context);  // inital call, will maybe get old instanceID\r\ninstanceID.DeleteInstanceID ();                                         // force unregistration\r\ninstanceID = InstanceID.GetInstance (Android.App.Application.Context);      // get a new one\r\nvar token = instanceID.GetToken([...])`\r\n"}}
{"actor":{"display_login":"pug205"}}