【问题标题】:react native gcm android clicking on notification not opening the app反应原生gcm android点击通知未打开应用程序
【发布时间】:2016-01-08 05:14:20
【问题描述】:

我在简单的应用程序上遇到了这个问题,它应该让应用程序在收到来自服务器的请求时收到GCM Notification。我可以让通知显示,但是点击通知不会打开应用程序?

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

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

【问题讨论】:

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


    【解决方案1】:

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

    中删除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>
    

    AndroidManifest.xml下。

    你需要重新捆绑安卓应用才能看到效果。

    【讨论】:

      猜你喜欢
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 2012-11-22
      • 1970-01-01
      • 1970-01-01
      • 2018-05-27
      • 2019-08-08
      • 1970-01-01
      相关资源
      最近更新 更多