Notification.Builder.SetFullScreenIntent(PendingIntent, Boolean) 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.
An intent to launch instead of posting the notification to the status bar.
[Android.Runtime.Register("setFullScreenIntent", "(Landroid/app/PendingIntent;Z)Landroid/app/Notification$Builder;", "GetSetFullScreenIntent_Landroid_app_PendingIntent_ZHandler")]
public virtual Android.App.Notification.Builder SetFullScreenIntent(Android.App.PendingIntent? intent, bool highPriority);
[<Android.Runtime.Register("setFullScreenIntent", "(Landroid/app/PendingIntent;Z)Landroid/app/Notification$Builder;", "GetSetFullScreenIntent_Landroid_app_PendingIntent_ZHandler")>]
abstract member SetFullScreenIntent : Android.App.PendingIntent * bool -> Android.App.Notification.Builder
override this.SetFullScreenIntent : Android.App.PendingIntent * bool -> Android.App.Notification.Builder
Parameters
- intent
- PendingIntent
PendingIntent: the pending intent to launch
- highPriority
- Boolean
boolean: Passing true will cause this notification to be sent even if other notifications are suppressed
Returns
This Android.App.Notification.Builder instance, allowing calls to be chained.
- Attributes
Remarks
An intent to launch instead of posting the notification to the status bar. Only for use with extremely high-priority notifications demanding the user's immediate attention, such as an incoming phone call or alarm clock that the user has explicitly set to a particular time. If this facility is used for something else, please give the user an option to turn it off and use a normal notification, as this can be extremely disruptive. Apps targeting Build.VERSION_CODES.Q and above will have to request a permission (Manifest.permission.USE_FULL_SCREEN_INTENT) in order to use full screen intents.
Prior to Build.VERSION_CODES.TIRAMISU, the system may display a heads up notification (which may display on screen longer than other heads up notifications), instead of launching the intent, while the user is using the device. From Build.VERSION_CODES.TIRAMISU, the system UI will display a heads up notification, instead of launching this intent, while the user is using the device. This notification will display with emphasized action buttons. If the posting app holds Manifest.permission.USE_FULL_SCREEN_INTENT, then the heads up notification will appear persistently until the user dismisses or snoozes it, or the app cancels it. If the posting app does not hold Manifest.permission.USE_FULL_SCREEN_INTENT, then the notification will appear as heads up notification even when the screen is locked or turned off, and this notification will only be persistent for 60 seconds.
To be launched as a full screen intent, the notification must also be posted to a channel with importance level set to IMPORTANCE_HIGH or higher.
See also:
Android reference for android.app.Notification.Builder.setFullScreenIntent.
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.