mr.*_*oot 4 android push-notification google-play firebase firebase-cloud-messaging
我正在尝试在未接收的发布应用程序中发送FCM通知(在用户之间发送消息、好友请求等),但它们在调试 apk 中发送/接收得很好,我对此进行了搜索,发现了一些不起作用的解决方案为我
像这样,我把它放在亲卫规则中但不起作用
-keep class com.google.firebase.* {*;}
Run Code Online (Sandbox Code Playgroud)
在我的 AndroidManifest.xml 中
<service
android:name=".notifications.MyFirebaseMessaging"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name=".notifications.MyFirebaseInstanceId"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
Run Code Online (Sandbox Code Playgroud)
和其他依赖项,我不将它们包含在这里,因为应用程序在调试模式下工作正常
已编辑
我已经有了
您尚未将用于发布的 SHA-1 密钥添加到您的 firebase 控制台,因此不存在于您的 google-services.json 中。
如果您使用的是 Google Play 应用签名。确保 Play 商店用于签署您的版本的密钥也已在步骤 2 中添加
| 归档时间: |
|
| 查看次数: |
7136 次 |
| 最近记录: |