Comments (4)
I will recommend doing requestPermissions
every time when app starts, and check whether the token changes by yourself.
from react-native-gcm-android.
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.
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.
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)
- npm version is newer than github version HOT 1
- App crashes when closed while receiving notification HOT 5
- npm WARN [email protected] requires a peer of react-native-system-notification@^0.1.2 but none was installed. HOT 7
- Error: 'GcmAndroid.launchNotification internal', undefined HOT 1
- Handling AndroidManifest.xml with buildtypes and applicationIdSuffix HOT 1
- com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type `int64', but had type `double'
- issue with implementaion HOT 2
- App does not receive messages after reboot on Android 5.0 HOT 1
- App crashes while in background
- Cant get token HOT 1
- RN 0.29 needs Activity instance? HOT 3
- Emitter
- SysNotificationClick as Listener doesn´t work for me (Android)
- Oney: Are you still interested in keeping this library up to date? I can help HOT 1
- Error :app:transformClassesWithJarMeringForDebug HOT 1
- google services
- No static method builder() Lcom/facebook/react/ReactInstanceManager$Builder; HOT 1
- I'm getting this error when I run my app. No error shows up while building though. Please help me
- react-native-fcm
- ar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-gcm-android.