MediaSessionManager.MediaKeyEventSessionPackageName Property
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.
Gets the package name of the media key event session.
public string MediaKeyEventSessionPackageName { [Android.Runtime.Register("getMediaKeyEventSessionPackageName", "()Ljava/lang/String;", "", ApiSince=33)] get; }
[<get: Android.Runtime.Register("getMediaKeyEventSessionPackageName", "()Ljava/lang/String;", "", ApiSince=33)>]
member this.MediaKeyEventSessionPackageName : string
Property Value
The package name of the media key event session or the last session's media button
receiver if the media key event session is null
. Returns an empty string
if neither of them exists.
- Attributes
Remarks
Gets the package name of the media key event session.
This requires the android.Manifest.permission#MEDIA_CONTENT_CONTROL
permission be held by the calling app, or the app has an enabled notification listener using the NotificationListenerService
APIs. If none of them applies, it will throw a SecurityException
.
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.