反应原生gcm android点击通知没有打开应用程序

时间:2016-01-08 05:14:21

标签: android reactjs notifications google-cloud-messaging react-native

我在简单应用上遇到此问题,应该让应用在收到服务器请求时收到GCM Notification。我能够让通知显示,但点击通知将无法打开应用程序?

我可以使用任何功能让react-native-gcm-android收听通知点击吗?这是一个已知的问题?或者有任何已知的解决方法吗?

我们专门使用此模块https://www.npmjs.com/package/react-native-gcm-android

1 个答案:

答案 0 :(得分:0)

我也在使用这个包。 对我有用的是从

中删除android:exported="false"
<receiver
  android:exported="false"
  android:name="com.oney.gcm.GcmBroadcastReceiver">
  <intent-filter>
    <action android:name="com.oney.gcm.GCMReceiveNotification" />
  </intent-filter>
</receiver>
<{1>}下的

你需要重新捆绑Android应用程序以查看效果。

相关问题