我正在实现fcm与后端作为python,我需要徽章应用程序图标每当推送通知来,但它不工作的大部分Android手机除了moto g android 7.
我在AndroidManifest.xml中做了:
<service
android:name=".fcmnotification.Custom_FirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service
android:name=".fcmnotification.Custom_FirebaseInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
Run Code Online (Sandbox Code Playgroud)
这是AndroidManifest.xml中的元数据:
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/pushlogo"
tools:ignore="ManifestResource"/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorPrimary" />
Run Code Online (Sandbox Code Playgroud) android ×1