Merge "Docs: Minor fixes to Background Optimizations and Doze docs" into mnc-mr-docs
am: 6bd5c3d
* commit '6bd5c3d4cc57d48b5576bd015a38c06f1e093de4':
Docs: Minor fixes to Background Optimizations and Doze docs
Change-Id: I4a22f136ab2ec4f05032fcef360da1707aa11875
This commit is contained in:
@@ -112,7 +112,7 @@ page.keywords="android N", "implicit broadcasts", "job scheduler"
|
|||||||
<p class="note">
|
<p class="note">
|
||||||
<strong>Note:</strong> A {@link android.content.BroadcastReceiver} registered with
|
<strong>Note:</strong> A {@link android.content.BroadcastReceiver} registered with
|
||||||
{@link android.content.Context#registerReceiver Context.registerReceiver()}
|
{@link android.content.Context#registerReceiver Context.registerReceiver()}
|
||||||
continues to receive these broadcasts while the app is in the foreground.
|
continues to receive these broadcasts while the app is running.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3 id="sched-jobs">
|
<h3 id="sched-jobs">
|
||||||
@@ -269,7 +269,7 @@ public static void scheduleJob(Context context) {
|
|||||||
MY_BACKGROUND_JOB,
|
MY_BACKGROUND_JOB,
|
||||||
new ComponentName(context, MediaContentJob.class));
|
new ComponentName(context, MediaContentJob.class));
|
||||||
builder.addTriggerContentUri(
|
builder.addTriggerContentUri(
|
||||||
new JobInfo.TriggerContentUri(MEDIA_URI,
|
new JobInfo.TriggerContentUri(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||||
JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS));
|
JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS));
|
||||||
js.schedule(builder.build());
|
js.schedule(builder.build());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,13 +205,14 @@ Standby</a>
|
|||||||
you can set alarms that will fire even if the device is in Doze.
|
you can set alarms that will fire even if the device is in Doze.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p class="note"><strong>Note:</strong> Neither
|
<p class="note">
|
||||||
{@link
|
<strong>Note:</strong> Neither {@link
|
||||||
android.app.AlarmManager#setAndAllowWhileIdle(int, long,
|
android.app.AlarmManager#setAndAllowWhileIdle(int, long,
|
||||||
android.app.PendingIntent) setAndAllowWhileIdle()} nor {@link
|
android.app.PendingIntent) setAndAllowWhileIdle()} nor {@link
|
||||||
android.app.AlarmManager#setExactAndAllowWhileIdle(int, long,
|
android.app.AlarmManager#setExactAndAllowWhileIdle(int, long,
|
||||||
android.app.PendingIntent) setExactAndAllowWhileIdle()} can fire alarms more than once per 15
|
android.app.PendingIntent) setExactAndAllowWhileIdle()} can fire alarms more
|
||||||
minutes per app.</p>
|
than once per 9 minutes, per app.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The Doze restriction on network access is also likely to affect your app,
|
The Doze restriction on network access is also likely to affect your app,
|
||||||
|
|||||||
Reference in New Issue
Block a user