B4X FEED How to keep a service running all the time with targetSdkVersion="22" in Manifest?

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: How to keep a service running all the time with targetSdkVersion=\"22\" in Manifest? است. این موضوع تا کنون 27 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع How to keep a service running all the time with targetSdkVersion=\"22\" in Manifest?
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
27
پسندها
0
آخرین ارسال توسط PracticalSoft
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...



 

عقب
بالا