I had a previously working android push notifications setup. However I removed some permissions from the manifest.xml that I felt were unnecessary:
<uses-permissionandroid:name="android.permission.GET_ACCOUNTS"/>
<uses-permissionandroid:name="com.android.vending.BILLING"/>
When running the game again after this, I noticed push notifications weren't getting received anymore. So I replaced the permissions to as they were, deleted the APK and game from device, and reinstalled it. But, I still don't receive the push notifications.
Looking through the console log, when registering for Android notifications I see the following error:
AndroidDevicePushNotificationRegistration request failed: '409: Conflict'
I get a GCM token ok and can login to Playfab ok. One the server side I get an 'invalid parameter' error.
Pushing to other playfab ids works fine.
Could the permission change have caused this? Do you have any advice to how can I restore it to work correctly?
Thanks
Tom
Answer by Brendan · Nov 18, 2016 at 04:44 PM
A 409 usually indicates an attempt to write to data which is already being written to by another operation, so it sounds like the user token for Push may be in a bad state. What are the Title ID and the PlayFab ID for this test?
Hey - The title ID is EE42, and the playfabID is 3F389C3FCF02175B
Nothing looks wrong with the account, so let's try this: I've turned on some additional logging for your Title ID. As soon as you get a chance, please re-try this test, and post back here with your results so that I can check that against what appears in the logs.
One additional note: I did pull the info for the last failure you had on that call, for that PlayFab ID, and made the call to register that account for Push, which worked fine. If you can reproduce the error though, I can have a look at what other calls are being made around the same time by the client, to see what the conflict is.
Hi Brendan, thanks for mentioning 'what other calls are being made around the same time by the client' - I checked on this and there was a SetDisplayName call also being made. So I've sequenced this out and that has resolved the issue. Registration succeeds and push messages are received again.
Thanks for your help.
Tom