BitmovinDownloadService

com.bitmovin.player.offline.service

BitmovinDownloadService

open class BitmovinDownloadService : MultiDownloadManagerDownloadService

Android Service that handles downloading content for offline playback. Can be extended to implement custom notification behaviour.

Constructors

BitmovinDownloadServiceconstructor()

Properties

NameSummary
ACCESSIBILITY_SERVICEval ACCESSIBILITY_SERVICE: String = "accessibility"
ACCOUNT_SERVICEval ACCOUNT_SERVICE: String = "account"
ACTION_ADD_DOWNLOADval ACTION_ADD_DOWNLOAD: String = "androidx.media3.exoplayer.downloadService.action.ADD_DOWNLOAD"
ACTION_ADD_DOWNLOADSval ACTION_ADD_DOWNLOADS: String = "com.google.android.exoplayer.downloadService.action.ADD_DOWNLOADS"
Action that will be send to add a list of Downloads.
ACTION_CALLBACK_ERRORval ACTION_CALLBACK_ERROR: String = "com.bitmovin.player.callback.error"
Action that will be send if an error occurs.
ACTION_INITval ACTION_INIT: String = "androidx.media3.exoplayer.downloadService.action.INIT"
ACTION_PAUSE_DOWNLOADSval ACTION_PAUSE_DOWNLOADS: String = "androidx.media3.exoplayer.downloadService.action.PAUSE_DOWNLOADS"
ACTION_RELOAD_CONFIGURATIONval ACTION_RELOAD_CONFIGURATION: String = "com.bitmovin.player.downloadService.action.RELOAD_CONFIGURATION"
Action that will be send to force a reload of the OfflineConfig.
ACTION_REMOVE_ALL_DOWNLOADSval ACTION_REMOVE_ALL_DOWNLOADS: String = "androidx.media3.exoplayer.downloadService.action.REMOVE_ALL_DOWNLOADS"
ACTION_REMOVE_DOWNLOADval ACTION_REMOVE_DOWNLOAD: String = "androidx.media3.exoplayer.downloadService.action.REMOVE_DOWNLOAD"
ACTION_REMOVE_DOWNLOADSval ACTION_REMOVE_DOWNLOADS: String = "com.google.android.exoplayer.downloadService.action.REMOVE_DOWNLOADS"
Action that will be send to remove a list of Downloads(IDs).
ACTION_RESTARTval ACTION_RESTART: String = "androidx.media3.exoplayer.downloadService.action.RESTART"
ACTION_RESUME_DOWNLOADSval ACTION_RESUME_DOWNLOADS: String = "androidx.media3.exoplayer.downloadService.action.RESUME_DOWNLOADS"
ACTION_SET_REQUIREMENTSval ACTION_SET_REQUIREMENTS: String = "androidx.media3.exoplayer.downloadService.action.SET_REQUIREMENTS"
ACTION_SET_STOP_REASONval ACTION_SET_STOP_REASON: String = "androidx.media3.exoplayer.downloadService.action.SET_STOP_REASON"
ACTIVITY_SERVICEval ACTIVITY_SERVICE: String = "activity"
ADVANCED_PROTECTION_SERVICEval ADVANCED_PROTECTION_SERVICE: String = "advanced_protection"
ALARM_SERVICEval ALARM_SERVICE: String = "alarm"
APP_FUNCTION_SERVICEval APP_FUNCTION_SERVICE: String = "app_function"
APP_OPS_SERVICEval APP_OPS_SERVICE: String = "appops"
APP_SEARCH_SERVICEval APP_SEARCH_SERVICE: String = "app_search"
APPWIDGET_SERVICEval APPWIDGET_SERVICE: String = "appwidget"
AUDIO_SERVICEval AUDIO_SERVICE: String = "audio"
AUTOFILL_SERVICEval AUTOFILL_SERVICE: String = "autofill"
BATTERY_SERVICEval BATTERY_SERVICE: String = "batterymanager"
BIND_ABOVE_CLIENTval BIND_ABOVE_CLIENT: Int = 8
BIND_ADJUST_WITH_ACTIVITYval BIND_ADJUST_WITH_ACTIVITY: Int = 128
BIND_ALLOW_ACTIVITY_STARTSval BIND_ALLOW_ACTIVITY_STARTS: Int = 512
BIND_ALLOW_OOM_MANAGEMENTval BIND_ALLOW_OOM_MANAGEMENT: Int = 16
BIND_AUTO_CREATEval BIND_AUTO_CREATE: Int = 1
BIND_DEBUG_UNBINDval BIND_DEBUG_UNBIND: Int = 2
BIND_EXTERNAL_SERVICEval BIND_EXTERNAL_SERVICE: Int = -2147483648
BIND_EXTERNAL_SERVICE_LONGval BIND_EXTERNAL_SERVICE_LONG: Long = 4611686018427387904
BIND_IMPORTANTval BIND_IMPORTANT: Int = 64
BIND_INCLUDE_CAPABILITIESval BIND_INCLUDE_CAPABILITIES: Int = 4096
BIND_NOT_FOREGROUNDval BIND_NOT_FOREGROUND: Int = 4
BIND_NOT_PERCEPTIBLEval BIND_NOT_PERCEPTIBLE: Int = 256
BIND_PACKAGE_ISOLATED_PROCESSval BIND_PACKAGE_ISOLATED_PROCESS: Int = 16384
BIND_SHARED_ISOLATED_PROCESSval BIND_SHARED_ISOLATED_PROCESS: Int = 8192
BIND_WAIVE_PRIORITYval BIND_WAIVE_PRIORITY: Int = 32
BIOMETRIC_SERVICEval BIOMETRIC_SERVICE: String = "biometric"
BLOB_STORE_SERVICEval BLOB_STORE_SERVICE: String = "blob_store"
BLUETOOTH_SERVICEval BLUETOOTH_SERVICE: String = "bluetooth"
BUGREPORT_SERVICEval BUGREPORT_SERVICE: String = "bugreport"
CAMERA_SERVICEval CAMERA_SERVICE: String = "camera"
CAPTIONING_SERVICEval CAPTIONING_SERVICE: String = "captioning"
CARRIER_CONFIG_SERVICEval CARRIER_CONFIG_SERVICE: String = "carrier_config"
CHOOSER_SERVICEval CHOOSER_SERVICE: String = "chooser"
CLIPBOARD_SERVICEval CLIPBOARD_SERVICE: String = "clipboard"
Companionval Companion: MultiDownloadManagerDownloadService.Companion
COMPANION_DEVICE_SERVICEval COMPANION_DEVICE_SERVICE: String = "companiondevice"
CONNECTIVITY_DIAGNOSTICS_SERVICEval CONNECTIVITY_DIAGNOSTICS_SERVICE: String = "connectivity_diagnostics"
CONNECTIVITY_SERVICEval CONNECTIVITY_SERVICE: String = "connectivity"
CONSUMER_IR_SERVICEval CONSUMER_IR_SERVICE: String = "consumer_ir"
CONTACT_KEYS_SERVICEval CONTACT_KEYS_SERVICE: String = "contact_keys"
CONTEXT_IGNORE_SECURITYval CONTEXT_IGNORE_SECURITY: Int = 2
CONTEXT_INCLUDE_CODEval CONTEXT_INCLUDE_CODE: Int = 1
CONTEXT_RESTRICTEDval CONTEXT_RESTRICTED: Int = 4
CREDENTIAL_SERVICEval CREDENTIAL_SERVICE: String = "credential"
CROSS_PROFILE_APPS_SERVICEval CROSS_PROFILE_APPS_SERVICE: String = "crossprofileapps"
DEFAULT_DEVICE_STATE_REQUIREMENTSval DEFAULT_DEVICE_STATE_REQUIREMENTS: Set<DeviceStateRequirement>
DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVALval DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL: Long = 1000
DEFAULT_REQUIREMENTSval DEFAULT_REQUIREMENTS: Requirements
use DEFAULT_DEVICE_STATE_REQUIREMENTS instead
DEVICE_ID_DEFAULTval DEVICE_ID_DEFAULT: Int = 0
DEVICE_ID_INVALIDval DEVICE_ID_INVALID: Int = -1
DEVICE_LOCK_SERVICEval DEVICE_LOCK_SERVICE: String = "device_lock"
DEVICE_POLICY_SERVICEval DEVICE_POLICY_SERVICE: String = "device_policy"
DISPLAY_HASH_SERVICEval DISPLAY_HASH_SERVICE: String = "display_hash"
DISPLAY_SERVICEval DISPLAY_SERVICE: String = "display"
DOMAIN_VERIFICATION_SERVICEval DOMAIN_VERIFICATION_SERVICE: String = "domain_verification"
DOWNLOAD_SERVICEval DOWNLOAD_SERVICE: String = "download"
DROPBOX_SERVICEval DROPBOX_SERVICE: String = "dropbox"
EUICC_SERVICEval EUICC_SERVICE: String = "euicc"
FILE_INTEGRITY_SERVICEval FILE_INTEGRITY_SERVICE: String = "file_integrity"
FILE_SERVICEval FILE_SERVICE: String = "file"
FOREGROUND_NOTIFICATION_ID_NONEval FOREGROUND_NOTIFICATION_ID_NONE: Int = 0
GAME_SERVICEval GAME_SERVICE: String = "game"
GRAMMATICAL_INFLECTION_SERVICEval GRAMMATICAL_INFLECTION_SERVICE: String = "grammatical_inflection"
HARDWARE_PROPERTIES_SERVICEval HARDWARE_PROPERTIES_SERVICE: String = "hardware_properties"
HEALTHCONNECT_SERVICEval HEALTHCONNECT_SERVICE: String = "healthconnect"
INPUT_METHOD_SERVICEval INPUT_METHOD_SERVICE: String = "input_method"
INPUT_SERVICEval INPUT_SERVICE: String = "input"
IPSEC_SERVICEval IPSEC_SERVICE: String = "ipsec"
JOB_SCHEDULER_SERVICEval JOB_SCHEDULER_SERVICE: String = "jobscheduler"
KEY_CALLBACK_ERROR_CODEval KEY_CALLBACK_ERROR_CODE: String = "error_code"
Extra name for error callbacks, containing the error code.
KEY_CALLBACK_ERROR_MESSAGEval KEY_CALLBACK_ERROR_MESSAGE: String = "error_message"
Extra name for error callbacks, containing the error message.
KEY_CALLBACK_SOURCEval KEY_CALLBACK_SOURCE: String = "callback_source"
Extra name for callbacks, containing the contentID of the affected OfflineContent.
KEY_CONTENT_IDval KEY_CONTENT_ID: String = "content_id"
KEY_CONTENT_IDSval KEY_CONTENT_IDS: String = "content_ids"
Key for the Strings content id in .ACTION_REMOVE_DOWNLOADS intents.
KEY_DOWNLOAD_REQUESTval KEY_DOWNLOAD_REQUEST: String = "download_request"
KEY_DOWNLOAD_REQUESTSval KEY_DOWNLOAD_REQUESTS: String = "download_requests"
Key for the DownloadRequests in .ACTION_ADD_DOWNLOADS intents.
KEY_FOREGROUNDval KEY_FOREGROUND: String = "foreground"
KEY_OFFLINE_CONTENTval KEY_OFFLINE_CONTENT: String = "offline_content"
Key for the OfflineContent in an ACTION_ADD intent.
KEY_REQUIREMENTSval KEY_REQUIREMENTS: String = "requirements"
KEY_STOP_REASONval KEY_STOP_REASON: String = "stop_reason"
KEYGUARD_SERVICEval KEYGUARD_SERVICE: String = "keyguard"
KEYSTORE_SERVICEval KEYSTORE_SERVICE: String = "keystore"
LAUNCHER_APPS_SERVICEval LAUNCHER_APPS_SERVICE: String = "launcherapps"
LAYOUT_INFLATER_SERVICEval LAYOUT_INFLATER_SERVICE: String = "layout_inflater"
LOCALE_SERVICEval LOCALE_SERVICE: String = "locale"
LOCATION_SERVICEval LOCATION_SERVICE: String = "location"
MEDIA_COMMUNICATION_SERVICEval MEDIA_COMMUNICATION_SERVICE: String = "media_communication"
MEDIA_METRICS_SERVICEval MEDIA_METRICS_SERVICE: String = "media_metrics"
MEDIA_PROJECTION_SERVICEval MEDIA_PROJECTION_SERVICE: String = "media_projection"
MEDIA_QUALITY_SERVICEval MEDIA_QUALITY_SERVICE: String = "media_quality"
MEDIA_ROUTER_SERVICEval MEDIA_ROUTER_SERVICE: String = "media_router"
MEDIA_SESSION_SERVICEval MEDIA_SESSION_SERVICE: String = "media_session"
MIDI_SERVICEval MIDI_SERVICE: String = "midi"
MODE_APPENDval MODE_APPEND: Int = 32768
MODE_ENABLE_WRITE_AHEAD_LOGGINGval MODE_ENABLE_WRITE_AHEAD_LOGGING: Int = 8
MODE_MULTI_PROCESSval MODE_MULTI_PROCESS: Int = 4
MODE_NO_LOCALIZED_COLLATORSval MODE_NO_LOCALIZED_COLLATORS: Int = 16
MODE_PRIVATEval MODE_PRIVATE: Int = 0
MODE_WORLD_READABLEval MODE_WORLD_READABLE: Int = 1
MODE_WORLD_WRITEABLEval MODE_WORLD_WRITEABLE: Int = 2
NETWORK_STATS_SERVICEval NETWORK_STATS_SERVICE: String = "netstats"
NFC_SERVICEval NFC_SERVICE: String = "nfc"
NOTIFICATION_SERVICEval NOTIFICATION_SERVICE: String = "notification"
NPU_SERVICEval NPU_SERVICE: String = "npu"
NSD_SERVICEval NSD_SERVICE: String = "servicediscovery"
OVERLAY_SERVICEval OVERLAY_SERVICE: String = "overlay"
PCC_SANDBOX_SERVICEval PCC_SANDBOX_SERVICE: String = "pcc_sandbox"
PEOPLE_SERVICEval PEOPLE_SERVICE: String = "people"
PERFORMANCE_HINT_SERVICEval PERFORMANCE_HINT_SERVICE: String = "performance_hint"
PERSISTENT_DATA_BLOCK_SERVICEval PERSISTENT_DATA_BLOCK_SERVICE: String = "persistent_data_block"
POWER_SERVICEval POWER_SERVICE: String = "power"
PRINT_SERVICEval PRINT_SERVICE: String = "print"
PROFILING_SERVICEval PROFILING_SERVICE: String = "profiling"
RECEIVER_EXPORTEDval RECEIVER_EXPORTED: Int = 2
RECEIVER_NOT_EXPORTEDval RECEIVER_NOT_EXPORTED: Int = 4
RECEIVER_VISIBLE_TO_INSTANT_APPSval RECEIVER_VISIBLE_TO_INSTANT_APPS: Int = 1
RESTRICTIONS_SERVICEval RESTRICTIONS_SERVICE: String = "restrictions"
ROLE_SERVICEval ROLE_SERVICE: String = "role"
SATELLITE_SERVICEval SATELLITE_SERVICE: String = "satellite"
SEARCH_SERVICEval SEARCH_SERVICE: String = "search"
SECURITY_STATE_SERVICEval SECURITY_STATE_SERVICE: String = "security_state"
SENSOR_SERVICEval SENSOR_SERVICE: String = "sensor"
SERIAL_SERVICEval SERIAL_SERVICE: String = "serial"
SHORTCUT_SERVICEval SHORTCUT_SERVICE: String = "shortcut"
START_CONTINUATION_MASKval START_CONTINUATION_MASK: Int = 15
START_FLAG_REDELIVERYval START_FLAG_REDELIVERY: Int = 1
START_FLAG_RETRYval START_FLAG_RETRY: Int = 2
START_NOT_STICKYval START_NOT_STICKY: Int = 2
START_REDELIVER_INTENTval START_REDELIVER_INTENT: Int = 3
START_STICKYval START_STICKY: Int = 1
START_STICKY_COMPATIBILITYval START_STICKY_COMPATIBILITY: Int = 0
STATUS_BAR_SERVICEval STATUS_BAR_SERVICE: String = "statusbar"
STOP_FOREGROUND_DETACHval STOP_FOREGROUND_DETACH: Int = 2
STOP_FOREGROUND_LEGACYval STOP_FOREGROUND_LEGACY: Int = 0
STOP_FOREGROUND_REMOVEval STOP_FOREGROUND_REMOVE: Int = 1
STORAGE_SERVICEval STORAGE_SERVICE: String = "storage"
STORAGE_STATS_SERVICEval STORAGE_STATS_SERVICE: String = "storagestats"
SYSTEM_HEALTH_SERVICEval SYSTEM_HEALTH_SERVICE: String = "systemhealth"
TELECOM_SERVICEval TELECOM_SERVICE: String = "telecom"
TELEPHONY_IMS_SERVICEval TELEPHONY_IMS_SERVICE: String = "telephony_ims"
TELEPHONY_PHONE_NUMBER_SERVICEval TELEPHONY_PHONE_NUMBER_SERVICE: String = "telephony_phone_number"
TELEPHONY_SERVICEval TELEPHONY_SERVICE: String = "phone"
TELEPHONY_SUBSCRIPTION_SERVICEval TELEPHONY_SUBSCRIPTION_SERVICE: String = "telephony_subscription_service"
TETHERING_SERVICEval TETHERING_SERVICE: String = "tethering"
TEXT_CLASSIFICATION_SERVICEval TEXT_CLASSIFICATION_SERVICE: String = "textclassification"
TEXT_SERVICES_MANAGER_SERVICEval TEXT_SERVICES_MANAGER_SERVICE: String = "textservices"
TRIM_MEMORY_BACKGROUNDval TRIM_MEMORY_BACKGROUND: Int = 40
TRIM_MEMORY_COMPLETEval TRIM_MEMORY_COMPLETE: Int = 80
TRIM_MEMORY_MODERATEval TRIM_MEMORY_MODERATE: Int = 60
TRIM_MEMORY_RUNNING_CRITICALval TRIM_MEMORY_RUNNING_CRITICAL: Int = 15
TRIM_MEMORY_RUNNING_LOWval TRIM_MEMORY_RUNNING_LOW: Int = 10
TRIM_MEMORY_RUNNING_MODERATEval TRIM_MEMORY_RUNNING_MODERATE: Int = 5
TRIM_MEMORY_UI_HIDDENval TRIM_MEMORY_UI_HIDDEN: Int = 20
TV_AD_SERVICEval TV_AD_SERVICE: String = "tv_ad"
TV_INPUT_SERVICEval TV_INPUT_SERVICE: String = "tv_input"
TV_INTERACTIVE_APP_SERVICEval TV_INTERACTIVE_APP_SERVICE: String = "tv_interactive_app"
UI_MODE_SERVICEval UI_MODE_SERVICE: String = "uimode"
USAGE_STATS_SERVICEval USAGE_STATS_SERVICE: String = "usagestats"
USB_SERVICEval USB_SERVICE: String = "usb"
USER_SERVICEval USER_SERVICE: String = "user"
VIBRATOR_MANAGER_SERVICEval VIBRATOR_MANAGER_SERVICE: String = "vibrator_manager"
VIBRATOR_SERVICEval VIBRATOR_SERVICE: String = "vibrator"
VIRTUAL_DEVICE_SERVICEval VIRTUAL_DEVICE_SERVICE: String = "virtualdevice"
VPN_MANAGEMENT_SERVICEval VPN_MANAGEMENT_SERVICE: String = "vpn_management"
WALLPAPER_SERVICEval WALLPAPER_SERVICE: String = "wallpaper"
WEB_APP_SERVICEval WEB_APP_SERVICE: String = "web_app"
WIFI_AWARE_SERVICEval WIFI_AWARE_SERVICE: String = "wifiaware"
WIFI_P2P_SERVICEval WIFI_P2P_SERVICE: String = "wifip2p"
WIFI_RTT_RANGING_SERVICEval WIFI_RTT_RANGING_SERVICE: String = "wifirtt"
WIFI_SERVICEval WIFI_SERVICE: String = "wifi"
WINDOW_SERVICEval WINDOW_SERVICE: String = "window"

Functions

NameSummary
bindIsolatedServiceopen fun bindIsolatedService(service: Intent, flags: Int, instanceName: String, executor: Executor, conn: ServiceConnection): Boolean
bindServiceopen fun bindService(service: Intent, flags: Context.BindServiceFlags, executor: Executor, conn: ServiceConnection): Boolean
bindServiceAsUseropen fun bindServiceAsUser(service: Intent, conn: ServiceConnection, flags: Context.BindServiceFlags, user: UserHandle): Boolean
buildAddDownloadIntentopen fun buildAddDownloadIntent(context: Context, clazz: Class<out DownloadService>, downloadRequest: DownloadRequest, foreground: Boolean): Intent
buildAddDownloadsIntentfun buildAddDownloadsIntent(context: Context, clazz: Class<out DownloadService>, downloadRequests: ArrayList<DownloadRequest>, stopReason: Int, foreground: Boolean): Intent
Builds an Intent for adding a new download.
buildPauseDownloadsIntentopen fun buildPauseDownloadsIntent(context: Context, clazz: Class<out DownloadService>, foreground: Boolean): Intent
buildRemoveAllDownloadsIntentopen fun buildRemoveAllDownloadsIntent(context: Context, clazz: Class<out DownloadService>, foreground: Boolean): Intent
buildRemoveDownloadIntentopen fun buildRemoveDownloadIntent(context: Context, clazz: Class<out DownloadService>, id: String, foreground: Boolean): Intent
buildRemoveDownloadsIntentfun buildRemoveDownloadsIntent(context: Context, clazz: Class<out DownloadService>, ids: ArrayList<String>, foreground: Boolean): Intent
Builds an Intent for removing the download with the id.
buildResumeDownloadsIntentopen fun buildResumeDownloadsIntent(context: Context, clazz: Class<out DownloadService>, foreground: Boolean): Intent
buildSetRequirementsIntentopen fun buildSetRequirementsIntent(context: Context, clazz: Class<out DownloadService>, requirements: Requirements, foreground: Boolean): Intent
buildSetStopReasonIntentopen fun buildSetStopReasonIntent(context: Context, clazz: Class<out DownloadService>, id: String, stopReason: Int, foreground: Boolean): Intent
checkCallingOrSelfPermissionopen fun checkCallingOrSelfPermission(permission: String): Int
checkCallingOrSelfUriPermissionopen fun checkCallingOrSelfUriPermission(uri: Uri, modeFlags: Int): Int
checkCallingOrSelfUriPermissionsopen fun checkCallingOrSelfUriPermissions(uris: List<Uri>, modeFlags: Int): Array<Int>
checkCallingPermissionopen fun checkCallingPermission(permission: String): Int
checkCallingUriPermissionopen fun checkCallingUriPermission(uri: Uri, modeFlags: Int): Int
checkCallingUriPermissionsopen fun checkCallingUriPermissions(uris: List<Uri>, modeFlags: Int): Array<Int>
checkContentUriPermissionFullopen fun checkContentUriPermissionFull(uri: Uri, pid: Int, uid: Int, modeFlags: Int): Int
checkPermissionopen fun checkPermission(permission: String, pid: Int, uid: Int): Int
checkSelfPermissionopen fun checkSelfPermission(permission: String): Int
checkUriPermissionopen fun checkUriPermission(uri: Uri, pid: Int, uid: Int, modeFlags: Int): Int
checkUriPermissionsopen fun checkUriPermissions(uris: List<Uri>, pid: Int, uid: Int, modeFlags: Int): Array<Int>
clearDownloadManagerHelpersopen fun clearDownloadManagerHelpers()
clearWallpaperopen fun clearWallpaper()
createAttributionContextopen fun createAttributionContext(attributionTag: String): Context
createConfigurationContextopen fun createConfigurationContext(overrideConfiguration: Configuration): Context
createContextopen fun createContext(contextParams: ContextParams): Context
createContextForSplitopen fun createContextForSplit(splitName: String): Context
createDeviceContextopen fun createDeviceContext(deviceId: Int): Context
createDeviceProtectedStorageContextopen fun createDeviceProtectedStorageContext(): Context
createDisplayContextopen fun createDisplayContext(display: Display): Context
createPackageContextopen fun createPackageContext(packageName: String, flags: Int): Context
createWindowContextopen fun createWindowContext(display: Display, type: Int, options: Bundle): Context
databaseListopen fun databaseList(): Array<String>
deleteDatabaseopen fun deleteDatabase(name: String): Boolean
deleteFileopen fun deleteFile(name: String): Boolean
deleteSharedPreferencesopen fun deleteSharedPreferences(name: String): Boolean
enforceCallingOrSelfPermissionopen fun enforceCallingOrSelfPermission(permission: String, message: String)
enforceCallingOrSelfUriPermissionopen fun enforceCallingOrSelfUriPermission(uri: Uri, modeFlags: Int, message: String)
enforceCallingPermissionopen fun enforceCallingPermission(permission: String, message: String)
enforceCallingUriPermissionopen fun enforceCallingUriPermission(uri: Uri, modeFlags: Int, message: String)
enforcePermissionopen fun enforcePermission(permission: String, pid: Int, uid: Int, message: String)
enforceUriPermissionopen fun enforceUriPermission(uri: Uri, pid: Int, uid: Int, modeFlags: Int, message: String)
fileListopen fun fileList(): Array<String>
getApplicationfun getApplication(): Application
getApplicationContextopen fun getApplicationContext(): Context
getApplicationInfoopen fun getApplicationInfo(): ApplicationInfo
getAssetsopen fun getAssets(): AssetManager
getAttributionSourceopen fun getAttributionSource(): AttributionSource
getAttributionTagopen fun getAttributionTag(): String
getBaseContextopen fun getBaseContext(): Context
getCacheDiropen fun getCacheDir(): File
getClassLoaderopen fun getClassLoader(): ClassLoader
getCodeCacheDiropen fun getCodeCacheDir(): File
getColorfun getColor(id: Int): Int
getColorStateListfun getColorStateList(id: Int): ColorStateList
getContentResolveropen fun getContentResolver(): ContentResolver
getDatabasePathopen fun getDatabasePath(name: String): File
getDataDiropen fun getDataDir(): File
getDeviceIdopen fun getDeviceId(): Int
getDiropen fun getDir(name: String, mode: Int): File
getDisplayopen fun getDisplay(): Display
getDrawablefun getDrawable(id: Int): Drawable
getExternalCacheDiropen fun getExternalCacheDir(): File
getExternalCacheDirsopen fun getExternalCacheDirs(): Array<File>
getExternalFilesDiropen fun getExternalFilesDir(type: String): File
getExternalFilesDirsopen fun getExternalFilesDirs(type: String): Array<File>
getExternalMediaDirsopen fun getExternalMediaDirs(): Array<File>
getFilesDiropen fun getFilesDir(): File
getFileStreamPathopen fun getFileStreamPath(name: String): File
getForegroundServiceTypefun getForegroundServiceType(): Int
getMainExecutoropen fun getMainExecutor(): Executor
getMainLooperopen fun getMainLooper(): Looper
getNoBackupFilesDiropen fun getNoBackupFilesDir(): File
getObbDiropen fun getObbDir(): File
getObbDirsopen fun getObbDirs(): Array<File>
getOpPackageNameopen fun getOpPackageName(): String
getPackageCodePathopen fun getPackageCodePath(): String
getPackageManageropen fun getPackageManager(): PackageManager
getPackageNameopen fun getPackageName(): String
getPackageResourcePathopen fun getPackageResourcePath(): String
getParamsopen fun getParams(): ContextParams
getRequirements@NonNull
open fun getRequirements(): Requirements
getResourcesopen fun getResources(): Resources
getSharedPreferencesopen fun getSharedPreferences(name: String, mode: Int): SharedPreferences
getStringfun getString(resId: Int): String
getSystemServicefun <T> getSystemService(serviceClass: Class<T>): T
open fun getSystemService(name: String): Any
getSystemServiceNameopen fun getSystemServiceName(serviceClass: Class<out Any>): String
getTextfun getText(resId: Int): CharSequence
getThemeopen fun getTheme(): Resources.Theme
getUpdateableFlagsopen fun getUpdateableFlags(): Context.BindServiceFlags
getWallpaperopen fun getWallpaper(): Drawable
getWallpaperDesiredMinimumHeightopen fun getWallpaperDesiredMinimumHeight(): Int
getWallpaperDesiredMinimumWidthopen fun getWallpaperDesiredMinimumWidth(): Int
grantUriPermissionopen fun grantUriPermission(toPackage: String, uri: Uri, modeFlags: Int)
isDeviceProtectedStorageopen fun isDeviceProtectedStorage(): Boolean
isRestrictedopen fun isRestricted(): Boolean
isUiContextopen fun isUiContext(): Boolean
moveDatabaseFromopen fun moveDatabaseFrom(sourceContext: Context, name: String): Boolean
moveSharedPreferencesFromopen fun moveSharedPreferencesFrom(sourceContext: Context, name: String): Boolean
obtainStyledAttributesfun obtainStyledAttributes(set: AttributeSet, attrs: Array<Int>): TypedArray
onBindfun onBind(intent: Intent): IBinder
onConfigurationChangedopen fun onConfigurationChanged(newConfig: Configuration)
onCreateopen fun onCreate()
open fun onCreate()
onDestroyopen fun onDestroy()
open fun onDestroy()
onDownloadChangedopen fun onDownloadChanged(downloadManager: DownloadManager, download: Download, finalException: Exception)
open fun onDownloadChanged(downloadManager: DownloadManager, download: Download, finalException: Exception)
onDownloadRemovedopen fun onDownloadRemoved(downloadManager: DownloadManager, download: Download)
open fun onDownloadRemoved(downloadManager: DownloadManager, download: Download)
onDownloadsPausedChangedopen fun onDownloadsPausedChanged(downloadManager: DownloadManager, downloadsPaused: Boolean)
onIdleopen fun onIdle()
open fun onIdle(downloadManager: DownloadManager)
onInitializedopen fun onInitialized(downloadManager: DownloadManager)
open fun onInitialized(downloadManager: DownloadManager)
onLowMemoryopen fun onLowMemory()
onRebindopen fun onRebind(intent: Intent)
onRequirementsStateChangedopen fun onRequirementsStateChanged(downloadManager: DownloadManager, requirements: Requirements, notMetRequirements: Int)
onStartopen fun onStart(intent: Intent, startId: Int)
onStartCommandopen fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int
open fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int
Copied over from the base DownloadService class. But a lot of extending of the actual code, so marking changes would confuse more than it helps.
onTaskRemovedopen fun onTaskRemoved(rootIntent: Intent)
onTimeoutopen fun onTimeout(startId: Int, fgsType: Int)
onTrimMemoryopen fun onTrimMemory(level: Int)
onUnbindopen fun onUnbind(intent: Intent): Boolean
onWaitingForRequirementsChangedopen fun onWaitingForRequirementsChanged(downloadManager: DownloadManager, waitingForRequirements: Boolean)
open fun onWaitingForRequirementsChanged(downloadManager: DownloadManager, waitingForRequirements: Boolean)
openFileInputopen fun openFileInput(name: String): FileInputStream
openFileOutputopen fun openFileOutput(name: String, mode: Int): FileOutputStream
openOrCreateDatabaseopen fun openOrCreateDatabase(name: String, mode: Int, factory: SQLiteDatabase.CursorFactory): SQLiteDatabase
peekWallpaperopen fun peekWallpaper(): Drawable
rebindServiceopen fun rebindService(conn: ServiceConnection, flags: Context.BindServiceFlags)
registerComponentCallbacksopen fun registerComponentCallbacks(callback: ComponentCallbacks)
registerDeviceIdChangeListeneropen fun registerDeviceIdChangeListener(executor: Executor, listener: IntConsumer)
registerReceiveropen fun registerReceiver(receiver: BroadcastReceiver, filter: IntentFilter): Intent
removeStickyBroadcastopen fun removeStickyBroadcast(intent: Intent)
removeStickyBroadcastAsUseropen fun removeStickyBroadcastAsUser(intent: Intent, user: UserHandle)
revokeSelfPermissionOnKillopen fun revokeSelfPermissionOnKill(permName: String)
revokeSelfPermissionsOnKillopen fun revokeSelfPermissionsOnKill(permissions: Collection<String>)
revokeUriPermissionopen fun revokeUriPermission(uri: Uri, modeFlags: Int)
sendAddDownloadopen fun sendAddDownload(context: Context, clazz: Class<out DownloadService>, downloadRequest: DownloadRequest, foreground: Boolean)
sendAddDownloadsfun sendAddDownloads(context: Context, clazz: Class<out DownloadService>, downloadRequests: ArrayList<DownloadRequest>, offlineContent: OfflineContent, foreground: Boolean)
Starts the service if not started already and adds a new download.
sendBroadcastopen fun sendBroadcast(intent: Intent)
sendBroadcastAsUseropen fun sendBroadcastAsUser(intent: Intent, user: UserHandle)
sendBroadcastWithMultiplePermissionsopen fun sendBroadcastWithMultiplePermissions(intent: Intent, receiverPermissions: Array<String>)
sendOrderedBroadcastopen fun sendOrderedBroadcast(intent: Intent, initialCode: Int, receiverPermission: String, receiverAppOp: String, resultReceiver: BroadcastReceiver, scheduler: Handler, initialData: String, initialExtras: Bundle, options: Bundle)
sendOrderedBroadcastAsUseropen fun sendOrderedBroadcastAsUser(intent: Intent, user: UserHandle, receiverPermission: String, resultReceiver: BroadcastReceiver, scheduler: Handler, initialCode: Int, initialData: String, initialExtras: Bundle)
sendPauseDownloadsopen fun sendPauseDownloads(context: Context, clazz: Class<out DownloadService>, foreground: Boolean)
fun sendPauseDownloads(context: Context, clazz: Class<out DownloadService>, offlineContent: OfflineContent, foreground: Boolean)
Starts the service if not started already and pauses all downloads.
sendRemoveAllDownloadsopen fun sendRemoveAllDownloads(context: Context, clazz: Class<out DownloadService>, foreground: Boolean)
fun sendRemoveAllDownloads(context: Context, clazz: Class<out DownloadService>, offlineContent: OfflineContent, foreground: Boolean)
Starts the service if not started already and removes all downloads.
sendRemoveDownloadopen fun sendRemoveDownload(context: Context, clazz: Class<out DownloadService>, id: String, foreground: Boolean)
sendRemoveDownloadsfun sendRemoveDownloads(context: Context, clazz: Class<out DownloadService>, ids: ArrayList<String>, offlineContent: OfflineContent, foreground: Boolean)
Starts the service if not started already and removes a download.
sendResumeDownloadsopen fun sendResumeDownloads(context: Context, clazz: Class<out DownloadService>, foreground: Boolean)
fun sendResumeDownloads(context: Context, clazz: Class<out DownloadService>, offlineContent: OfflineContent, foreground: Boolean)
Starts the service if not started already and resumes all downloads.
sendSetRequirementsopen fun sendSetRequirements(context: Context, clazz: Class<out DownloadService>, requirements: Requirements, foreground: Boolean)
sendSetStopReasonopen fun sendSetStopReason(context: Context, clazz: Class<out DownloadService>, id: String, stopReason: Int, foreground: Boolean)
sendStickyBroadcastopen fun sendStickyBroadcast(intent: Intent)
sendStickyBroadcastAsUseropen fun sendStickyBroadcastAsUser(intent: Intent, user: UserHandle)
sendStickyOrderedBroadcastopen fun sendStickyOrderedBroadcast(intent: Intent, resultReceiver: BroadcastReceiver, scheduler: Handler, initialCode: Int, initialData: String, initialExtras: Bundle)
sendStickyOrderedBroadcastAsUseropen fun sendStickyOrderedBroadcastAsUser(intent: Intent, user: UserHandle, resultReceiver: BroadcastReceiver, scheduler: Handler, initialCode: Int, initialData: String, initialExtras: Bundle)
setThemeopen fun setTheme(resid: Int)
setWallpaperopen fun setWallpaper(bitmap: Bitmap)
startopen fun start(context: Context, clazz: Class<out DownloadService>)
startActivitiesopen fun startActivities(intents: Array<Intent>)
startActivityopen fun startActivity(intent: Intent)
startForegroundopen fun startForeground(context: Context, clazz: Class<out DownloadService>)
startForegroundServiceopen fun startForegroundService(service: Intent): ComponentName
startInstrumentationopen fun startInstrumentation(className: ComponentName, profileFile: String, arguments: Bundle): Boolean
startIntentSenderopen fun startIntentSender(intent: IntentSender, fillInIntent: Intent, flagsMask: Int, flagsValues: Int, extraFlags: Int)
startServiceopen fun startService(service: Intent): ComponentName
stopForegroundfun stopForeground(removeNotification: Boolean)
stopSelffun stopSelf()
stopSelfResultfun stopSelfResult(startId: Int): Boolean
stopServiceopen fun stopService(name: Intent): Boolean
unbindServiceopen fun unbindService(conn: ServiceConnection)
unregisterComponentCallbacksopen fun unregisterComponentCallbacks(callback: ComponentCallbacks)
unregisterDeviceIdChangeListeneropen fun unregisterDeviceIdChangeListener(listener: IntConsumer)
unregisterReceiveropen fun unregisterReceiver(receiver: BroadcastReceiver)
updateServiceBindingsopen fun updateServiceBindings(params: Collection<Context.UpdateBindingParams>)
updateServiceGroupopen fun updateServiceGroup(conn: ServiceConnection, group: Int, importance: Int)