次の方法で共有


AudioManager.RegisterAudioDeviceCallback(AudioDeviceCallback, Handler) Method

Definition

Registers an AudioDeviceCallback object to receive notifications of changes to the set of connected audio devices.

[Android.Runtime.Register("registerAudioDeviceCallback", "(Landroid/media/AudioDeviceCallback;Landroid/os/Handler;)V", "GetRegisterAudioDeviceCallback_Landroid_media_AudioDeviceCallback_Landroid_os_Handler_Handler", ApiSince=23)]
public virtual void RegisterAudioDeviceCallback (Android.Media.AudioDeviceCallback? callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("registerAudioDeviceCallback", "(Landroid/media/AudioDeviceCallback;Landroid/os/Handler;)V", "GetRegisterAudioDeviceCallback_Landroid_media_AudioDeviceCallback_Landroid_os_Handler_Handler", ApiSince=23)>]
abstract member RegisterAudioDeviceCallback : Android.Media.AudioDeviceCallback * Android.OS.Handler -> unit
override this.RegisterAudioDeviceCallback : Android.Media.AudioDeviceCallback * Android.OS.Handler -> unit

Parameters

callback
AudioDeviceCallback

The AudioDeviceCallback object to receive connect/disconnect notifications.

handler
Handler

Specifies the Handler object for the thread on which to execute the callback. If null, the Handler associated with the main Looper will be used.

Attributes

Remarks

Registers an AudioDeviceCallback object to receive notifications of changes to the set of connected audio devices.

Java documentation for android.media.AudioManager.registerAudioDeviceCallback(android.media.AudioDeviceCallback, android.os.Handler).

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.

Applies to