zetavg / react-native-system-notification

Android system notifications for React Native. Supports push notifications with GCM integrated.
https://www.npmjs.com/package/react-native-system-notification
244 stars 102 forks source link

PendingIntent seems only getBroadcast #3

Closed narychen closed 8 years ago

narychen commented 8 years ago

Clicking the notification does not start the main activity. Is there any way to do it?

avishayil commented 8 years ago

+1 on this

zetavg commented 8 years ago

This bug seems to occur on RN 0.17 since I've done the development on 0.16 and haven't test it on the new version for now. I'm currently figuring it out :smiley:

Are you guys all using 0.17?

joa-queen commented 8 years ago

I am.

avishayil commented 8 years ago

Me too

zetavg commented 8 years ago

And what are your Android versions by the way?

avishayil commented 8 years ago

5.1.1

zetavg commented 8 years ago

I just tested this using https://github.com/Neson/ReactNativeSystemNotificationDev and it turns out that the problem is related to Android version - on 5.1.0 it works fine, but not 4.1.1.

Heading to figure it out and probably solve this with #2.

zetavg commented 8 years ago

2431ec6 might have fixed this, and it's published to NPM with the version 0.0.8 (tested on API level 16 (4.1.1), 21 (5.0.0) and 22 (5.1.0)).You can try and let me know if it works :smile:.

Note that a new permission needs to be add to android/app/src/main/AndroidManifest.xml:

    <uses-permission android:name="android.permission.GET_TASKS" />