Git Product home page Git Product logo

Comments (4)

oney avatar oney commented on June 20, 2024

I will recommend doing requestPermissions every time when app starts, and check whether the token changes by yourself.

from react-native-gcm-android.

ACCTFORGH avatar ACCTFORGH commented on June 20, 2024

Thanks! So the token won't change unless the app is terminated?

Also, one thing I am curious, I first put the requestPermissions() method after the addListeners method as in the instructions but did not get the "register" event captured and didn't see the received token printed in console. However, putting the method before the listeners works. Shouldn't the listeners be lasting and the sequence of requestPermissions() not affect the event being caught by the listeners?

from react-native-gcm-android.

oney avatar oney commented on June 20, 2024

Hmm.. Token refreshing should be handled better. I will implement it in the future and welcome a PR!

I think the sequence of requestPermissions and listener matters.
I can't figure out why putting requestPermissions() method after the addListeners doesn't work...

from react-native-gcm-android.

ACCTFORGH avatar ACCTFORGH commented on June 20, 2024

Now, putting the method after the listeners works too. It could be just that it took some time for the app to first time register.

from react-native-gcm-android.

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.