Merge "Docs: Background optimizations \'foreground\' -> \'running app\' fix." into mnc-mr-docs am: df0509bce1
am: 86efe43
* commit '86efe4331c6a02a10e17f992e9f4fb3ec120e5ca':
Docs: Background optimizations 'foreground' -> 'running app' fix.
Change-Id: I89288dcb8518a72e61d046e89c96e45c21ce5a52
This commit is contained in:
@@ -156,10 +156,9 @@ page.image=images/cards/card-n-changes_2x.png
|
|||||||
<ul>
|
<ul>
|
||||||
<li>Apps targeting Android N do not receive {@link
|
<li>Apps targeting Android N do not receive {@link
|
||||||
android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts, even if they
|
android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts, even if they
|
||||||
have manifest entries to request notification of these events. Apps running
|
have manifest entries to request notification of these events. Apps that are
|
||||||
in the foreground can still listen for {@code CONNECTIVITY_CHANGE} on their
|
running can still listen for {@code CONNECTIVITY_CHANGE} on their main thread
|
||||||
main thread if they request notification with a {@link
|
if they request notification with a {@link android.content.BroadcastReceiver}.
|
||||||
android.content.BroadcastReceiver}.
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>Apps cannot send or receive {@link
|
<li>Apps cannot send or receive {@link
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ page.keywords="android N", "implicit broadcasts", "job scheduler"
|
|||||||
<ul>
|
<ul>
|
||||||
<li>Apps targeting the Preview do not receive {@link
|
<li>Apps targeting the Preview do not receive {@link
|
||||||
android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts if they
|
android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts if they
|
||||||
register to receive them in their manifest. Apps running in the foreground
|
register to receive them in their manifest. Apps that are running can still
|
||||||
can still listen for {@code CONNECTIVITY_CHANGE} on their main thread by
|
listen for {@code CONNECTIVITY_CHANGE} on their main thread by registering a
|
||||||
registering a {@link android.content.BroadcastReceiver} with {@link
|
{@link android.content.BroadcastReceiver} with {@link
|
||||||
android.content.Context#registerReceiver Context.registerReceiver()}.
|
android.content.Context#registerReceiver Context.registerReceiver()}.
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@@ -165,9 +165,8 @@ public static void scheduleJob(Context context) {
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Apps running in the foreground can still listen for {@code
|
Apps that are running can still listen for {@code CONNECTIVITY_CHANGE} with a
|
||||||
CONNECTIVITY_CHANGE} with a registered {@link
|
registered {@link android.content.BroadcastReceiver}. However, the {@link
|
||||||
android.content.BroadcastReceiver}. However, the {@link
|
|
||||||
android.net.ConnectivityManager} API provides a more robust method to request
|
android.net.ConnectivityManager} API provides a more robust method to request
|
||||||
a callback only when specified network conditions are met.
|
a callback only when specified network conditions are met.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user