AppWidgetManager.ActionAppwidgetPick Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Activity action to launch from your AppWidgetHost
activity when you want to
pick an AppWidget to display.
[Android.Runtime.Register("ACTION_APPWIDGET_PICK")]
public const string ActionAppwidgetPick;
[<Android.Runtime.Register("ACTION_APPWIDGET_PICK")>]
val mutable ActionAppwidgetPick : string
Field Value
- Attributes
Remarks
Activity action to launch from your AppWidgetHost
activity when you want to pick an AppWidget to display. The AppWidget picker activity will be launched.
You must supply the following extras: <table> <tr> <td>#EXTRA_APPWIDGET_ID
</td> <td>A newly allocated appWidgetId, which will be bound to the AppWidget provider once the user has selected one.</td> </tr> </table>
The system will respond with an onActivityResult call with the following extras in the intent: <table> <tr> <td>#EXTRA_APPWIDGET_ID
</td> <td>The appWidgetId that you supplied in the original intent.</td> </tr> </table>
When you receive the result from the AppWidget pick activity, if the resultCode is android.app.Activity#RESULT_OK
, an AppWidget has been selected. You should then check the AppWidgetProviderInfo for the returned AppWidget, and if it has one, launch its configuration activity. If android.app.Activity#RESULT_CANCELED
is returned, you should delete the appWidgetId.
Java documentation for android.appwidget.AppWidgetManager.ACTION_APPWIDGET_PICK
.
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.