Git Product home page Git Product logo

Comments (15)

xphaul avatar xphaul commented on July 19, 2024 1

@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.

oney avatar oney commented on July 19, 2024

You are using v0.1.6, right?

from react-native-gcm-android.

jojonarte avatar jojonarte commented on July 19, 2024

Oops, I have been using 0.1.3 I'll try 0.1.6 and let you know.

from react-native-gcm-android.

jojonarte avatar jojonarte commented on July 19, 2024

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.

oney avatar oney commented on July 19, 2024

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.

jojonarte avatar jojonarte commented on July 19, 2024

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.

oney avatar oney commented on July 19, 2024

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.

jojonarte avatar jojonarte commented on July 19, 2024

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.

iambernie3 avatar iambernie3 commented on July 19, 2024

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.

jojonarte avatar jojonarte commented on July 19, 2024

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.

babalustu avatar babalustu commented on July 19, 2024

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.

chinloongtan avatar chinloongtan commented on July 19, 2024

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.

mtford90 avatar mtford90 commented on July 19, 2024

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.

savioseb avatar savioseb commented on July 19, 2024

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.

savioseb avatar savioseb commented on July 19, 2024

Also fixed this problem #51

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.