1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-07-02 06:33:36 +00:00

Create a service

This commit is contained in:
2021-04-14 18:03:27 +02:00
parent 0af31bc3a0
commit bf53babf53
8 changed files with 206 additions and 12 deletions

View File

@ -15,6 +15,11 @@
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<!-- This is required for independent push notifications service to work
(when FCM service can not be used) -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<!-- This is required on Android 11+ for image picker -->
<queries>
<intent>
@ -26,9 +31,6 @@
</intent>
</queries>
<!-- This is required for independent push notifications service to work
(when FCM service can not be used) -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
@ -79,5 +81,18 @@
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
<!-- Independent push notifications service -->
<service android:name=".independentnotifications.NotificationsService" />
<!-- Boot receiver to start independent push notifications service -->
<receiver android:name=".BootReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<!-- Cold boot -->
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
</application>
</manifest>