ActivityOptions.SetPendingIntentBackgroundActivityStartMode Method
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.
Sets the mode for allowing or denying the senders privileges to start background activities to the PendingIntent.
[Android.Runtime.Register("setPendingIntentBackgroundActivityStartMode", "(I)Landroid/app/ActivityOptions;", "GetSetPendingIntentBackgroundActivityStartMode_IHandler", ApiSince=34)]
public virtual Android.App.ActivityOptions SetPendingIntentBackgroundActivityStartMode (Android.App.BackgroundActivityStartMode state);
[<Android.Runtime.Register("setPendingIntentBackgroundActivityStartMode", "(I)Landroid/app/ActivityOptions;", "GetSetPendingIntentBackgroundActivityStartMode_IHandler", ApiSince=34)>]
abstract member SetPendingIntentBackgroundActivityStartMode : Android.App.BackgroundActivityStartMode -> Android.App.ActivityOptions
override this.SetPendingIntentBackgroundActivityStartMode : Android.App.BackgroundActivityStartMode -> Android.App.ActivityOptions
Parameters
Returns
- Attributes
Remarks
Sets the mode for allowing or denying the senders privileges to start background activities to the PendingIntent.
This is typically used in when executing PendingIntent#send(Context, int, Intent, PendingIntent.OnFinished, Handler, String, Bundle)
or similar methods. A privileged sender of a PendingIntent should only grant #MODE_BACKGROUND_ACTIVITY_START_ALLOWED
if the PendingIntent is from a trusted source and/or executed on behalf the user.
Java documentation for android.app.ActivityOptions.setPendingIntentBackgroundActivityStartMode(int)
.
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.