Comments (15)
Can you try this demo project? And see whether the same error happens.
https://github.com/oney/TestGcm
from react-native-gcm-android.
You must have some packages from "Extras" installed in android sdk, don't remember which ones.
from react-native-gcm-android.
Try adding
multiDexEnabled true
within the defaultConfig{} block, inside your android/app/build.gradle
from react-native-gcm-android.
you need to install Google Play Services and Google Repository from the android sdk
@isuvorov
from react-native-gcm-android.
@oney can you highlight this in your homepage
from react-native-gcm-android.
Thing worth one more highlight is people should NOT multiDexEnable true
even if someone advises them to.
from react-native-gcm-android.
@Herby can you give any insight on #3
from react-native-gcm-android.
@jawadrehman I really don't know. That thing is strange. It was making problems in my project as well, now it does not and everything goes fine (though the '.json not found in root' message is still appearing during build).
from react-native-gcm-android.
@jawadrehman Sure, but how to install Google Play Services?
from react-native-gcm-android.
@Herby I will do
from react-native-gcm-android.
@oney Re: how to install Google Play Services: In Windows as well as in OSX IIRC, Android SDK has this UI that manages installed parts, Google Play Services as well as Google Repository are one of the items thereof. IIRC in "Extras" section.
from react-native-gcm-android.
Run command android
to open Android SDK Manager.
And find Google Play Services and Google Repository in Extras like below
It's super weird that it shows I don't install Google Play Services and Google Repository.
from react-native-gcm-android.
@oney they are installed, its just that there's an update available.
EDIT - This might have been because of latency on part of GCM. Didnt knew that it could be a bit slower compared to APNS . Thanks for your help .
btw, after loads of fiddling around i finally made it give me a gcm token. the only issue i have now is that the messages are only recieved on the device on first app launch (so not when say app is closed / app is in another view). is it because i have a kindle fire that i installed google play services on or is it an issue.
from react-native-gcm-android.
@jawadrehman The communication between JS and native (Java) is paused when app is closed. I recommend you create a subclass of GcmListenerService to handle the notification.
Demo is oney/TestGcm@5fa3614
from react-native-gcm-android.
@jawadrehman @Herby @oney I have google play services and google repository already installed. I'm still facing the same error of: RNGcmAndroid' A problem occurred configuring project ':RNGcmAndroid'. Please guide.
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.