Add foreground service type to MagicFirebaseMessagingService

Since SDK 31 foreground services can't start while running in
background, except for a few special cases like phone calls.

See:
 - https://developer.android.com/guide/components/foreground-services#background-start-restrictions

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2022-06-22 15:44:16 +02:00
parent 1551e7f1cb
commit 738ed94f98
No known key found for this signature in database
GPG Key ID: FECE3A7222C52A4E

View File

@ -39,7 +39,8 @@
<service
android:name=".services.firebase.MagicFirebaseMessagingService"
android:exported="false">
android:exported="false"
android:foregroundServiceType="phoneCall">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>