public
abstract
class
MediaLibraryService
extends MediaSessionService
Base class for media library services, which is the service containing
MediaLibraryService.MediaLibrarySession.
Media library services enable applications to browse media content provided by an application
and ask the application to start playing it. They may also be used to control content that
is already playing by way of a MediaSession.
When extending this class, also add the following to your AndroidManifest.xml.
<service android:name="component_name_of_your_implementation" >
<intent-filter>
<action android:name="androidx.media2.session.MediaLibraryService" />
</intent-filter>
</service>
You may also declare
android.media.browse.MediaBrowserService
for compatibility with
MediaBrowserCompat. This service can handle it automatically.
Summary
Nested classes |
class |
MediaLibraryService.LibraryParams
Contains information that the library service needs to send to the client.
|
class |
MediaLibraryService.MediaLibrarySession
Session for the MediaLibraryService.
|
Inherited constants |
|
|
From class
android.app.Service
int |
START_CONTINUATION_MASK
|
int |
START_FLAG_REDELIVERY
|
int |
START_FLAG_RETRY
|
int |
START_NOT_STICKY
|
int |
START_REDELIVER_INTENT
|
int |
START_STICKY
|
int |
START_STICKY_COMPATIBILITY
|
int |
STOP_FOREGROUND_DETACH
|
int |
STOP_FOREGROUND_REMOVE
|
|
From class
android.content.Context
String |
ACCESSIBILITY_SERVICE
|
String |
ACCOUNT_SERVICE
|
String |
ACTIVITY_SERVICE
|
String |
ALARM_SERVICE
|
String |
APPWIDGET_SERVICE
|
String |
APP_OPS_SERVICE
|
String |
APP_SEARCH_SERVICE
|
String |
AUDIO_SERVICE
|
String |
BATTERY_SERVICE
|
int |
BIND_ABOVE_CLIENT
|
int |
BIND_ADJUST_WITH_ACTIVITY
|
int |
BIND_ALLOW_OOM_MANAGEMENT
|
int |
BIND_AUTO_CREATE
|
int |
BIND_DEBUG_UNBIND
|
int |
BIND_EXTERNAL_SERVICE
|
int |
BIND_IMPORTANT
|
int |
BIND_INCLUDE_CAPABILITIES
|
int |
BIND_NOT_FOREGROUND
|
int |
BIND_NOT_PERCEPTIBLE
|
int |
BIND_WAIVE_PRIORITY
|
String |
BIOMETRIC_SERVICE
|
String |
BLOB_STORE_SERVICE
|
String |
BLUETOOTH_SERVICE
|
String |
BUGREPORT_SERVICE
|
String |
CAMERA_SERVICE
|
String |
CAPTIONING_SERVICE
|
String |
CARRIER_CONFIG_SERVICE
|
String |
CLIPBOARD_SERVICE
|
String |
COMPANION_DEVICE_SERVICE
|
String |
CONNECTIVITY_DIAGNOSTICS_SERVICE
|
String |
CONNECTIVITY_SERVICE
|
String |
CONSUMER_IR_SERVICE
|
int |
CONTEXT_IGNORE_SECURITY
|
int |
CONTEXT_INCLUDE_CODE
|
int |
CONTEXT_RESTRICTED
|
String |
CROSS_PROFILE_APPS_SERVICE
|
String |
DEVICE_POLICY_SERVICE
|
String |
DISPLAY_HASH_SERVICE
|
String |
DISPLAY_SERVICE
|
String |
DOMAIN_VERIFICATION_SERVICE
|
String |
DOWNLOAD_SERVICE
|
String |
DROPBOX_SERVICE
|
String |
EUICC_SERVICE
|
String |
FILE_INTEGRITY_SERVICE
|
String |
FINGERPRINT_SERVICE
|
String |
GAME_SERVICE
|
String |
HARDWARE_PROPERTIES_SERVICE
|
String |
INPUT_METHOD_SERVICE
|
String |
INPUT_SERVICE
|
String |
IPSEC_SERVICE
|
String |
JOB_SCHEDULER_SERVICE
|
String |
KEYGUARD_SERVICE
|
String |
LAUNCHER_APPS_SERVICE
|
String |
LAYOUT_INFLATER_SERVICE
|
String |
LOCATION_SERVICE
|
String |
MEDIA_COMMUNICATION_SERVICE
|
String |
MEDIA_METRICS_SERVICE
|
String |
MEDIA_PROJECTION_SERVICE
|
String |
MEDIA_ROUTER_SERVICE
|
String |
MEDIA_SESSION_SERVICE
|
String |
MIDI_SERVICE
|
int |
MODE_APPEND
|
int |
MODE_ENABLE_WRITE_AHEAD_LOGGING
|
int |
MODE_MULTI_PROCESS
|
int |
MODE_NO_LOCALIZED_COLLATORS
|
int |
MODE_PRIVATE
|
int |
MODE_WORLD_READABLE
|
int |
MODE_WORLD_WRITEABLE
|
String |
NETWORK_STATS_SERVICE
|
String |
NFC_SERVICE
|
String |
NOTIFICATION_SERVICE
|
String |
NSD_SERVICE
|
String |
PEOPLE_SERVICE
|
String |
PERFORMANCE_HINT_SERVICE
|
String |
POWER_SERVICE
|
String |
PRINT_SERVICE
|
int |
RECEIVER_VISIBLE_TO_INSTANT_APPS
|
String |
RESTRICTIONS_SERVICE
|
String |
ROLE_SERVICE
|
String |
SEARCH_SERVICE
|
String |
SENSOR_SERVICE
|
String |
SHORTCUT_SERVICE
|
String |
STORAGE_SERVICE
|
String |
STORAGE_STATS_SERVICE
|
String |
SYSTEM_HEALTH_SERVICE
|
String |
TELECOM_SERVICE
|
String |
TELEPHONY_IMS_SERVICE
|
String |
TELEPHONY_SERVICE
|
String |
TELEPHONY_SUBSCRIPTION_SERVICE
|
String |
TEXT_CLASSIFICATION_SERVICE
|
String |
TEXT_SERVICES_MANAGER_SERVICE
|
String |
TV_INPUT_SERVICE
|
String |
UI_MODE_SERVICE
|
String |
USAGE_STATS_SERVICE
|
String |
USB_SERVICE
|
String |
USER_SERVICE
|
String |
VIBRATOR_MANAGER_SERVICE
|
String |
VIBRATOR_SERVICE
|
String |
VPN_MANAGEMENT_SERVICE
|
String |
WALLPAPER_SERVICE
|
String |
WIFI_AWARE_SERVICE
|
String |
WIFI_P2P_SERVICE
|
String |
WIFI_RTT_RANGING_SERVICE
|
String |
WIFI_SERVICE
|
String |
WINDOW_SERVICE
|
|
From interface
android.content.ComponentCallbacks2
int |
TRIM_MEMORY_BACKGROUND
|
int |
TRIM_MEMORY_COMPLETE
|
int |
TRIM_MEMORY_MODERATE
|
int |
TRIM_MEMORY_RUNNING_CRITICAL
|
int |
TRIM_MEMORY_RUNNING_LOW
|
int |
TRIM_MEMORY_RUNNING_MODERATE
|
int |
TRIM_MEMORY_UI_HIDDEN
|
|
Inherited methods |
|
|
From class
android.app.Service
void
|
attachBaseContext(Context arg0)
|
void
|
dump(FileDescriptor arg0, PrintWriter arg1, String[] arg2)
|
final
Application
|
getApplication()
|
final
int
|
getForegroundServiceType()
|
abstract
IBinder
|
onBind(Intent arg0)
|
void
|
onConfigurationChanged(Configuration arg0)
|
void
|
onCreate()
|
void
|
onDestroy()
|
void
|
onLowMemory()
|
void
|
onRebind(Intent arg0)
|
void
|
onStart(Intent arg0, int arg1)
|
int
|
onStartCommand(Intent arg0, int arg1, int arg2)
|
void
|
onTaskRemoved(Intent arg0)
|
void
|
onTrimMemory(int arg0)
|
boolean
|
onUnbind(Intent arg0)
|
final
void
|
startForeground(int arg0, Notification arg1)
|
final
void
|
startForeground(int arg0, Notification arg1, int arg2)
|
final
void
|
stopForeground(int arg0)
|
final
void
|
stopForeground(boolean arg0)
|
final
void
|
stopSelf()
|
final
void
|
stopSelf(int arg0)
|
final
boolean
|
stopSelfResult(int arg0)
|
|
From class
android.content.ContextWrapper
void
|
attachBaseContext(Context arg0)
|
boolean
|
bindIsolatedService(Intent arg0, int arg1, String arg2, Executor arg3, ServiceConnection arg4)
|
boolean
|
bindService(Intent arg0, int arg1, Executor arg2, ServiceConnection arg3)
|
boolean
|
bindService(Intent arg0, ServiceConnection arg1, int arg2)
|
boolean
|
bindServiceAsUser(Intent arg0, ServiceConnection arg1, int arg2, UserHandle arg3)
|
int
|
checkCallingOrSelfPermission(String arg0)
|
int
|
checkCallingOrSelfUriPermission(Uri arg0, int arg1)
|
int[]
|
checkCallingOrSelfUriPermissions(List<Uri> arg0, int arg1)
|
int
|
checkCallingPermission(String arg0)
|
int
|
checkCallingUriPermission(Uri arg0, int arg1)
|
int[]
|
checkCallingUriPermissions(List<Uri> arg0, int arg1)
|
int
|
checkPermission(String arg0, int arg1, int arg2)
|
int
|
checkSelfPermission(String arg0)
|
int
|
checkUriPermission(Uri arg0, String arg1, String arg2, int arg3, int arg4, int arg5)
|
int
|
|