[]Struct jni_android_sys::android::media::session::MediaSession

#[repr(transparent)]
pub struct MediaSession(_);

public final class MediaSession

Required feature: "android-media-session-MediaSession"

Methods

impl MediaSession

pub fn new<'env>(
    __jni_env: &'env Env,
    arg0: impl Into<Option<&'env Context>>,
    arg1: impl Into<Option<&'env String>>
) -> Result<Local<'env, MediaSession>, Local<'env, Throwable>>
[src]

MediaSession

Required features: "android-content-Context", "java-lang-String"

pub fn setCallback_Callback<'env>(
    &'env self,
    arg0: impl Into<Option<&'env MediaSession_Callback>>
) -> Result<(), Local<'env, Throwable>>
[src]

setCallback

Required features: "android-media-session-MediaSession_Callback"

pub fn setCallback_Callback_Handler<'env>(
    &'env self,
    arg0: impl Into<Option<&'env MediaSession_Callback>>,
    arg1: impl Into<Option<&'env Handler>>
) -> Result<(), Local<'env, Throwable>>
[src]

setCallback

Required features: "android-media-session-MediaSession_Callback", "android-os-Handler"

pub fn setSessionActivity<'env>(
    &'env self,
    arg0: impl Into<Option<&'env PendingIntent>>
) -> Result<(), Local<'env, Throwable>>
[src]

setSessionActivity

Required features: "android-app-PendingIntent"

pub fn setMediaButtonReceiver<'env>(
    &'env self,
    arg0: impl Into<Option<&'env PendingIntent>>
) -> Result<(), Local<'env, Throwable>>
[src]

setMediaButtonReceiver

Required features: "android-app-PendingIntent"

pub fn setFlags<'env>(
    &'env self,
    arg0: i32
) -> Result<(), Local<'env, Throwable>>
[src]

pub fn setPlaybackToLocal<'env>(
    &'env self,
    arg0: impl Into<Option<&'env AudioAttributes>>
) -> Result<(), Local<'env, Throwable>>
[src]

setPlaybackToLocal

Required features: "android-media-AudioAttributes"

pub fn setPlaybackToRemote<'env>(
    &'env self,
    arg0: impl Into<Option<&'env VolumeProvider>>
) -> Result<(), Local<'env, Throwable>>
[src]

setPlaybackToRemote

Required features: "android-media-VolumeProvider"

pub fn setActive<'env>(
    &'env self,
    arg0: bool
) -> Result<(), Local<'env, Throwable>>
[src]

pub fn isActive<'env>(&'env self) -> Result<bool, Local<'env, Throwable>>[src]

pub fn sendSessionEvent<'env>(
    &'env self,
    arg0: impl Into<Option<&'env String>>,
    arg1: impl Into<Option<&'env Bundle>>
) -> Result<(), Local<'env, Throwable>>
[src]

sendSessionEvent

Required features: "android-os-Bundle", "java-lang-String"

pub fn release<'env>(&'env self) -> Result<(), Local<'env, Throwable>>[src]

pub fn getSessionToken<'env>(
    &'env self
) -> Result<Option<Local<'env, MediaSession_Token>>, Local<'env, Throwable>>
[src]

getSessionToken

Required features: "android-media-session-MediaSession_Token"

pub fn getController<'env>(
    &'env self
) -> Result<Option<Local<'env, MediaController>>, Local<'env, Throwable>>
[src]

getController

Required features: "android-media-session-MediaController"

pub fn setPlaybackState<'env>(
    &'env self,
    arg0: impl Into<Option<&'env PlaybackState>>
) -> Result<(), Local<'env, Throwable>>
[src]

setPlaybackState

Required features: "android-media-session-PlaybackState"

pub fn setMetadata<'env>(
    &'env self,
    arg0: impl Into<Option<&'env MediaMetadata>>
) -> Result<(), Local<'env, Throwable>>
[src]

setMetadata

Required features: "android-media-MediaMetadata"

pub fn setQueue<'env>(
    &'env self,
    arg0: impl Into<Option<&'env List>>
) -> Result<(), Local<'env, Throwable>>
[src]

setQueue

Required features: "java-util-List"

pub fn setQueueTitle<'env>(
    &'env self,
    arg0: impl Into<Option<&'env CharSequence>>
) -> Result<(), Local<'env, Throwable>>
[src]

setQueueTitle

Required features: "java-lang-CharSequence"

pub fn setRatingType<'env>(
    &'env self,
    arg0: i32
) -> Result<(), Local<'env, Throwable>>
[src]

pub fn setExtras<'env>(
    &'env self,
    arg0: impl Into<Option<&'env Bundle>>
) -> Result<(), Local<'env, Throwable>>
[src]

setExtras

Required features: "android-os-Bundle"

pub fn getCurrentControllerInfo<'env>(
    &'env self
) -> Result<Option<Local<'env, MediaSessionManager_RemoteUserInfo>>, Local<'env, Throwable>>
[src]

getCurrentControllerInfo

Required features: "android-media-session-MediaSessionManager_RemoteUserInfo"

pub const FLAG_HANDLES_MEDIA_BUTTONS: i32[src]

Deprecated

public static final FLAG_HANDLES_MEDIA_BUTTONS

pub const FLAG_HANDLES_TRANSPORT_CONTROLS: i32[src]

Deprecated

public static final FLAG_HANDLES_TRANSPORT_CONTROLS

Methods from Deref<Target = Object>

pub fn getClass<'env>(
    &'env self
) -> Result<Option<Local<'env, Class>>, Local<'env, Throwable>>
[src]

getClass

Required features: "java-lang-Class"

pub fn hashCode<'env>(&'env self) -> Result<i32, Local<'env, Throwable>>[src]

pub fn equals<'env>(
    &'env self,
    arg0: impl Into<Option<&'env Object>>
) -> Result<bool, Local<'env, Throwable>>
[src]

equals

Required features: "java-lang-Object"

pub fn toString<'env>(
    &'env self
) -> Result<Option<Local<'env, String>>, Local<'env, Throwable>>
[src]

toString

Required features: "java-lang-String"

pub fn notify<'env>(&'env self) -> Result<(), Local<'env, Throwable>>[src]

pub fn notifyAll<'env>(&'env self) -> Result<(), Local<'env, Throwable>>[src]

pub fn wait_long<'env>(
    &'env self,
    arg0: i64
) -> Result<(), Local<'env, Throwable>>
[src]

pub fn wait_long_int<'env>(
    &'env self,
    arg0: i64,
    arg1: i32
) -> Result<(), Local<'env, Throwable>>
[src]

pub fn wait<'env>(&'env self) -> Result<(), Local<'env, Throwable>>[src]

Trait Implementations

impl AsJValue for MediaSession

impl AsValidJObjectAndEnv for MediaSession

impl Deref for MediaSession

type Target = Object

The resulting type after dereferencing.

impl JniType for MediaSession

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.