Giter VIP home page Giter VIP logo

Comments (5)

rdelrosario avatar rdelrosario commented on September 16, 2024

Will check this issue and will work on supporting this

On Wed, Jan 6, 2016 at 5:51 AM, John [email protected] wrote:

Hi,

I'm using Pushsharp to send GCM notifications and when I send to a
particular registration Id the DeviceSubscriptionExpired callback is being
fired.

This plugin doesn't seem to cater for this scenario as once there's a
Token stored it continues to use that without checking if it's still valid.

Can you advise when I should be calling the unregister method?


Reply to this email directly or view it on GitHub
#28.

from xamarin-plugins.

MKahmen avatar MKahmen commented on September 16, 2024

Hi @JohnMcAvinue ,

were you able to find a workaround?

Same issue occurs to me.

EDIT:
#29

http://stackoverflow.com/questions/11590482/do-gcm-registration-ids-expire

When an application is updated, it should invalidate its existing registration ID, as it is not guaranteed to work with the new version. Because there is no lifecycle method called when the application is updated, the best way to achieve this validation is by storing the current application version when a registration ID is stored.

EDIT2:
http://stackoverflow.com/questions/16838654/handling-registration-id-changes-in-google-cloud-messaging-on-android

The 'periodical' refresh never happened, and the registration refresh is not included in the new GCM library.

The only known cause for registration ID change is the old bug of apps getting unregistered automatically if they receive a message while getting upgraded. Until this bug is fixed apps still need to call register() after upgrade, and so far the registration ID may change in this case. Calling unregister() explicitly usually changes the registration ID too.

The suggestion/workaround is to generate your own random identifier, saved as a shared preference for example. On each app upgrade you can upload the identifier and the potentially new registration ID. This may also help tracking and debugging the upgrade and registration changes on server side.

from xamarin-plugins.

rdelrosario avatar rdelrosario commented on September 16, 2024

Just released a new version that sends registration each time register is called. Let me know if fixes the issue, if not reopen this issue.

from xamarin-plugins.

MKahmen avatar MKahmen commented on September 16, 2024

just wanted to let you know, that it fixed the issue!

keep up the great work, man. thanks a lot! :-)

from xamarin-plugins.

JohnMcAvinue avatar JohnMcAvinue commented on September 16, 2024

Thanks for doing this. I ended up hacking your code so it doesn't persist the token and registers all the time. It seems to work well. Thanks for all your hard work!

from xamarin-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.