Android Question Question about Manifest Foreground service SpecialUse

Zoran Vujacic

Member
Licensed User
Hi everyone,

I need some advice.
If I start the Foreground service speciaUse, is the manifest in this post good?

In the Play Store, I see that there are fewer "crashes", so I'm trying to check everything:
Problem
Your app or a library it uses tried to start a foreground service without declaring a service type

Recommendation
Declare the foreground service type in the manifest file and include it in the startForeground() call

Thank you!


In
startserviceb

startservisb:

Service.StartForeground(1, notif):
Sub Service_Start (StartingIntent As Intent)
Service.StartForeground(1, notif)
End Sub

manifest:

Manifest:
SetServiceAttribute(startservisb, android:foregroundServiceType, "specialUse")
AddPermission(android.permission.FOREGROUND_SERVICE_SPECIAL_USE)
AddApplicationText(
<service android:name="startservisb" android:foregroundServiceType="specialUse">
    <property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
        android:value="Ensures notifications even in the background to help manage power and prevent shutdowns."/>
</service>
)
 

drgottjr

Expert
Licensed User
Longtime User
if you are publishing the app on play, you have to justify the specialuse foreground type to google. if you are not publishing on play, you can probably put whatever foreground service type you want. if you are publishing on play, submit your project. when google sees the special type, they will contact you. have your story ready.
 
Upvote 0
Top