Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Possible problem with the Push Notification guide on the AGK help pages

Author
Message
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 3rd Nov 2017 08:09 Edited at: 3rd Nov 2017 08:16
I added push notification to my app yesterday following the guide exactly and everything works fine but when I updated it via the beta channel on the play store I noticed that users are starting to get flagged as blacklisted when requesting for a token. After searching for help I found some Google documentation that says users can get flagged as blacklisted if the call for a token is happening too often and that they recommend putting a delay between each request of a few seconds and they recommend a random delay between each request.

I've implemented this but I'm unsure what's going to happen to new requests and what happens to the users currently blacklisted. I've raised a ticket with Google for support but have to wait up to a week for a response.

So first issue I think the code here needs updating to include a delay between each request or maybe TGC can update the functions to not request for a token everytime it's called and have some form of delay built into the functions: https://www.appgamekit.com/documentation/guides/push_notifications_android.htm

Secondly, has anyone else experienced this problem before and if so did you include a delay and did it solve the issue? Were people getting tokens assigned to them again? And did the users flagged as blacklisted get assigned tokens again?

My worry is that it's actually the app that's now blacklisted.

Here's the official documentation which mentions the blacklisted token (search for blacklisted on the page). https://developers.google.com/cloud-messaging/http-server-ref

I will update this post with the code I've used that has a random delay between each request if I notice that it seems to be working and people are being assigned tokens. I'll be monitoring my database throughout the day with legs and fingers crossed
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 3rd Nov 2017 11:01 Edited at: 3rd Nov 2017 11:13
I'm well impressed with Google's reply so far. They replied really quickly and I wasn't expect them to offer any help if I'm honest. Here's one of their replies so far:



I still don't have anymore downloads of my beta update so I can't tell if the change of code I applied has fixed the problem but I will keep monitoring and will update with anymore news I hear from Google and with the code I've used if it looks like it's working.

I don't think it's got anything to do with the PHP pages that include the PHP function TGC wrote because there's quite a large delay between each time those pages are accessed by the same user.
JohnnyMeek
10
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 3rd Nov 2017 11:54 Edited at: 3rd Nov 2017 11:55
I'm surprised you got it working. I spent a lot of time trying to incorporate Push Notifications using the Xtralife.cloud back end, but it seems AppGameKit uses a deprecated method. I never got it working, which pretty much rendered my turn based multiplayer game useless. It actually prompted me to start working with the Godot engine.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 4th Nov 2017 00:30
Have 11 downloads so far and the 4 that were blacklisted haven't opened the app again so I can't say yet if they do get a new token after being blacklisted. I've got 7 people now with a token so it seems to be working better.

Here's the code I used to create a delay between each call

pinete
12
Years of Service
User Offline
Joined: 28th Jul 2011
Location:
Posted: 4th Nov 2017 02:00 Edited at: 4th Nov 2017 02:01
Thanks for sharing Kevin, this is really interesting and can be very useful.
Thanks a lot!
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 4th Nov 2017 09:50
@pinete you're welcome.. Still only 11 downloads at the moment. It is a beta version and only have 92 signed up for it so might be a while before I get some more numbers. Will just have to keep monitoring it before I go fully live with it.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 4th Nov 2017 10:56
Just noticed something interesting and might explain the blacklisted users. I've updated the app again now and it's currently being processed so shouldn't be available for anyone to download yet but I've already got one blacklisted user (even with the time delay). This to me would suggest that these users must be the Google bots that test the apps and do all of the checks to make sure it's safe before making it public etc. I've asked Google to confirm. If that is the case then the time delay code probably isn't needed but it won't hurt having it in.

Login to post a reply

Server time is: 2024-04-19 04:52:10
Your offset time is: 2024-04-19 04:52:10