requestPin

fun AppWidgetHostState.requestPin(target: ComponentName = value!!.appWidgetInfo.provider, successCallback: PendingIntent? = null): Boolean

Request the launcher to pin the current hosted appwidget if any.

Return

true if request was successful, false otherwise

See also

Parameters

target

the provider component name or null to use the one defined in the host

successCallback

a PendingIntent to send when the launcher successfully placed the widget