This commit is contained in:
2026-06-16 11:29:27 +08:00
parent 9182410c81
commit b8beb2ec4c
6 changed files with 673 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
@@ -49,5 +50,9 @@
android:exported="false"
android:foregroundServiceType="dataSync"
android:stopWithTask="false" />
<!-- 避免 Firebase SDK 默认 Service 抢收 data-only FCM -->
<service
android:name="com.google.firebase.messaging.FirebaseMessagingService"
tools:node="remove" />
</application>
</manifest>

View File

@@ -22,6 +22,7 @@ public class MainActivity extends ReactActivity {
@Override
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ProxyFcmService.handleLaunchIntent(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS)
!= PackageManager.PERMISSION_GRANTED) {