Udostępnij za pośrednictwem


AppWidgetManager.ActionAppwidgetHostRestored Field

Definition

Sent to widget hosts after AppWidget state related to the host has been restored from backup.

[Android.Runtime.Register("ACTION_APPWIDGET_HOST_RESTORED")]
public const string ActionAppwidgetHostRestored;
[<Android.Runtime.Register("ACTION_APPWIDGET_HOST_RESTORED")>]
val mutable ActionAppwidgetHostRestored : string

Field Value

Attributes

Remarks

Sent to widget hosts after AppWidget state related to the host has been restored from backup. The intent contains information about how to translate AppWidget ids from the restored data to their new equivalents. If an application maintains multiple separate widget host instances, it will receive this broadcast separately for each one.

The intent will contain the following extras:

<table> <tr> <td>#EXTRA_APPWIDGET_OLD_IDS</td> <td>The set of appWidgetIds represented in a restored backup that have been successfully incorporated into the current environment. This may be all of the AppWidgets known to this application, or just a subset. Each entry in this array of appWidgetIds has a corresponding entry in the #EXTRA_APPWIDGET_IDS extra.</td> </tr> <tr> <td>#EXTRA_APPWIDGET_IDS</td> <td>The set of appWidgetIds now valid for this application. The app should look at its restored widget configuration and translate each appWidgetId in the #EXTRA_APPWIDGET_OLD_IDS array to its new value found at the corresponding index within this array.</td> </tr> <tr> <td>#EXTRA_HOST_ID</td> <td>The integer ID of the widget host instance whose state has just been restored.</td> </tr> </table>

<p class="note">This is a protected intent that can only be sent by the system.

Java documentation for android.appwidget.AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also