Android Question FirebaseMessaging Not Found (Manifest Editor)

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi all.
I'm trying to replace the service FirebaseMessaging with the Receiver FirebaseMessaging.
I removed FirebaseMessaging service from my project and added Receiver FirebaseMessaging.

Now I see in a log these lines
B4X:
Error parsing Manifest script
FirebaseMessaging Not Found (Manifest Editor)

What am I doing wrong?

Please see my manifest.

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="34"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:usesCleartextTraffic, "true")
SetApplicationAttribute(android:allowBackup, "false")
CreateResourceFromFile(Macro, Themes.LightTheme)
'Non-SSL permission
CreateResourceFromFile(Macro, Core.NetworkClearText)
'End of default text.

'AddPermission (android.permission.WRITE_EXTERNAL_STORAGE)
'AddPermission (android.permission.READ_EXTERNAL_STORAGE)

'    FusedLocationProvider:

'    required manifest entry required for Google Play Services
AddApplicationText(<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />)
    SetActivityAttribute(MessageDetails, android:windowSoftInputMode, adjustPan|stateHidden)
'Farebase
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAnalytics.Crashlytics)

AddPermission(com.google.android.gms.permission.AD_ID)

Thanks.


'34
AddPermission(android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING)
SetServiceAttribute(FirebaseMessaging, android:foregroundServiceType, "remoteMessaging")
 

Alex_197

Well-Known Member
Licensed User
Longtime User
The problem is in these to lines in the Manifest

B4X:
'34
AddPermission(android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING)
SetServiceAttribute(FirebaseMessaging, android:foregroundServiceType, "remoteMessaging")

Erel's tutorial https://www.b4x.com/android/forum/t...getsdkversion-34-and-services.162140/#content says that we need to add two things to the manifest editor - permission and service type:
B4X:
AddPermission(android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK)
SetServiceAttribute(MyMusicService, android:foregroundServiceType, "mediaPlayback")

That's what I did.

If I use the Service with the name FirebaseMessaging and reference this service in my manifest everything is Ok. But if I replace my service with Receiver with the same name I'm getting this error.
B4X:
Error parsing Manifest script
FirebaseMessaging Not Found (Manifest Editor)

I also tried to add permission and service type to PushExample client from this tutorial and I'm getting the same error. See the attached project.

Thank you.
 

Attachments

  • PushExample.zip
    10.5 KB · Views: 57
Upvote 0
Top