Comments (15)
@jojonarte how did you fix this issue? i've tried following savioseb fix but i still cant get to open the app upon clicking the notification . thanks
from react-native-gcm-android.
You are using v0.1.6, right?
from react-native-gcm-android.
Oops, I have been using 0.1.3 I'll try 0.1.6 and let you know.
from react-native-gcm-android.
Right now I've tested it, and I'm currently on 0.1.6, I couldn't get the app to show upon clicking the notification received.
from react-native-gcm-android.
Can you confirm re-reading README to follow new usage?
jojonarte [email protected] 於 2016年1月8日星期五 寫道:
Right now I've tested it, and I'm currently on 0.1.6, I couldn't get the
app to show upon clicking the notification received.—
Reply to this email directly or view it on GitHub
#22 (comment)
.
from react-native-gcm-android.
I've re-read and made sure I have put all the right codes and settings, Do I need the 'react-native-system-notification' to be able to listen to clicks on the notification and show the app???
from react-native-gcm-android.
No, you don't. I will test to try reproducing later. Have you tried the
demo project TestGcm?
jojonarte [email protected] 於 2016年1月8日星期五 寫道:
I've re-read and made sure I have put all the right codes and settings, Do
I need the 'react-native-system-notification' to be able to listen to
clicks on the notification and show the app???—
Reply to this email directly or view it on GitHub
#22 (comment)
.
from react-native-gcm-android.
Demo project works fine. Alright let me know. As of now I can't open the app by tapping notification.
from react-native-gcm-android.
hi @oney ,
I have the same problem with @jojonarte if I tapping the notification I just want directly open the app.
from react-native-gcm-android.
Update:
I've retested the sample, the sample works right out from cloning. i wonder if the multidex true issue on our gradle file could be triggering the problem on not listening to clicks on notification??
ps: We definitely need the multidex as our app requires a huge amount of dependencies. Do you have any known workaround on this?
from react-native-gcm-android.
Hi @jojonarte,
Have you tried sending the push notification to your app using oneys test code (but replacing with your server API key and device token)? I was having exactly the same issue (also using multidex true) and it turned out to be the structure of the gcm object I was sending from my server.
I did have the subject and message in the notification node:
notification: {
title: "Hello, World",
icon: "ic_launcher",
body: "This is a notification that will be displayed ASAP."
}
but moved it to the data node as per oney:
"data": {
"info": {
"subject": "Hello GCM2",
"message": "Hello from the server side!"
}
}
Not sure it's the ideal workaround but it works well enough for me.
from react-native-gcm-android.
it works for me when I remove
android:exported="false"
from
<receiver
android:exported="false"
android:name="com.oney.gcm.GcmBroadcastReceiver">
<intent-filter>
<action android:name="com.oney.gcm.GCMReceiveNotification" />
</intent-filter>
</receiver>
Since it wasn't there for the demo app's AndroidManifest.xml
from react-native-gcm-android.
Experiencing this too. I've implemented all the advice in this issue but no luck! I'm running gcm 0.2.0 and system-notification 0.1.8.
from react-native-gcm-android.
I commented out the
GcmAndroid.stopService();
and it's worked well for me.
My change:
`if (GcmAndroid.launchNotification) {
console.log('Before entering function:', GcmAndroid.launchNotification);
//GcmAndroid.stopService();
console.log('GcmAndroid.launchNotification:', GcmAndroid.launchNotification);
var notification = GcmAndroid.launchNotification;
var info = JSON.parse(notification.info);
Notification.create({
subject: info.subject,
message: info.message,
});
//GcmAndroid.stopService();
} else {
class Savio extends Component {
.....`
from react-native-gcm-android.
Also fixed this problem #51
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.