Android O Limitations for Lower Target SDK

I started testing my application on Nexus 5x with Android O.
My targetSdkVersionis 22.
On the developer's site I read about Background execution limits :
Where:
By default, these restrictions apply only to O-oriented applications. However, users can enable these restrictions for any application on the settings screen, even if the application is not configured to O.

  • Where are these settings (to limit Android O restrictions)?
  • What is the best practice for these restrictions while I still want to keep below targetSdkVersion?
+6
source share
3 answers
  • I also can not find.
  • API 26, . , . onCreate.

:

Context.startForegroundService() . Context.startForegroundService(), . , startForeground() . (startForeground )

0

App info > Battery usage, .

, :

W/BroadcastQueue: : Intent {act = android.intent.action. $ACTION dat = package: $APP_PACKAGE flg = 0x4000010 ( )} $APP_PACKAGE/$APP_RECEIVER

Application Information> Battery Usage

[UPDATE 27.09.2017]

:

"", , , .

( ignore allow)

adb shell appops set your.application.id.here RUN_IN_BACKGROUND ignore 

:

  • targetSdkVersion, , , , thats .

  • , , targetSdkVersion, , , , appp shell appops, . , , , . , / // Play Store/candygrams , , .

. Android Oreo

0
  • >
  • IMO, , API 26... ( , ).
0
source

All Articles