- Jun 6, 2020
- 11,559
- 4,422
I need to keep an Android TV service running all the time and have some questions:
1) I am thinking of including "Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS" mode/setting as mentioned in
The app will be running on devices running API 28+, but in order for a particular feature of the app to work correctly, I need to set the targetSDK=22.
So, will setting the foreground mode work on a device running API 28+ but with the manifest set to targetSDK=22?
2) Should I still do a PhoneWakeState.PartialLock even if the TV will stay powered on - is there any harm in including this line anyway?
3) Should/can I combine #StartCommandReturnValue: android.app.Service.START_STICKY with Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS
Any other suggestions?
I am asking because when I use just the sticky option (using the default...
1) I am thinking of including "Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS" mode/setting as mentioned in
برای دیدن لینک ها باید ثبت نام کنید
The app will be running on devices running API 28+, but in order for a particular feature of the app to work correctly, I need to set the targetSDK=22.
So, will setting the foreground mode work on a device running API 28+ but with the manifest set to targetSDK=22?
2) Should I still do a PhoneWakeState.PartialLock even if the TV will stay powered on - is there any harm in including this line anyway?
3) Should/can I combine #StartCommandReturnValue: android.app.Service.START_STICKY with Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS
Any other suggestions?
I am asking because when I use just the sticky option (using the default...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید