I am making an application to send msg and use a service, the problem is that the service on Android 9 stops because there is a rule that in energy saving force to stop the service.
What I thought is to ask the user to allow skip energy saving for the application.
I tried and couldn't, someone help me?
I'll send the code I have to try help :\
Xamarin.Android
Img Notification Starts Service:
Manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.1" package="Sms.Sms" android:installLocation="auto">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
<service android:name="com.xamarin.example.DemoService" android:directBootAware="true" android:permission="android.permission.BIND_JOB_SERVICE" />
</application>
</manifest>
Codes\Manifest file\Img:
If it's a bad question say don't hate, I try