As per the Docs-
Note: By default, these restrictions only apply to apps that target Android 8.0 (API level 26) or higher. However, users can enable most of these restrictions for any app from the Settings screen, even if the app targets an API level lower than 26.
I'm targeting Below API 26 but i cannot find the settings to enable the restriction in official android emulator.
Where is this setting available?
targetSdkVersion
is below 26. In some cases, you still do not need to make any changes. For example, if you have a service that downloads a file, and you are sure that the service will be done in less than a minute, the background restrictions will not affect you. – Iodous