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
| BitmovinDownloadService | constructor() |
Properties
Functions
| Name | Summary |
|---|---|
| bindIsolatedService | open fun bindIsolatedService(service: Intent, flags: Int, instanceName: String, executor: Executor, conn: ServiceConnection): Boolean |
| bindService | open fun bindService(service: Intent, flags: Context.BindServiceFlags, executor: Executor, conn: ServiceConnection): Boolean |
| bindServiceAsUser | open fun bindServiceAsUser(service: Intent, conn: ServiceConnection, flags: Context.BindServiceFlags, user: UserHandle): Boolean |
| buildAddDownloadIntent | open fun buildAddDownloadIntent(context: Context, clazz: Class<out DownloadService>, downloadRequest: DownloadRequest, foreground: Boolean): Intent |
| buildAddDownloadsIntent | fun buildAddDownloadsIntent(context: Context, clazz: Class<out DownloadService>, downloadRequests: ArrayList<DownloadRequest>, stopReason: Int, foreground: Boolean): Intent Builds an Intent for adding a new download. |
| buildPauseDownloadsIntent | open fun buildPauseDownloadsIntent(context: Context, clazz: Class<out DownloadService>, foreground: Boolean): Intent |
| buildRemoveAllDownloadsIntent | open fun buildRemoveAllDownloadsIntent(context: Context, clazz: Class<out DownloadService>, foreground: Boolean): Intent |
| buildRemoveDownloadIntent | open fun buildRemoveDownloadIntent(context: Context, clazz: Class<out DownloadService>, id: String, foreground: Boolean): Intent |
| buildRemoveDownloadsIntent | fun buildRemoveDownloadsIntent(context: Context, clazz: Class<out DownloadService>, ids: ArrayList<String>, foreground: Boolean): Intent Builds an Intent for removing the download with the id. |
| buildResumeDownloadsIntent | open fun buildResumeDownloadsIntent(context: Context, clazz: Class<out DownloadService>, foreground: Boolean): Intent |
| buildSetRequirementsIntent | open fun buildSetRequirementsIntent(context: Context, clazz: Class<out DownloadService>, requirements: Requirements, foreground: Boolean): Intent |
| buildSetStopReasonIntent | open fun buildSetStopReasonIntent(context: Context, clazz: Class<out DownloadService>, id: String, stopReason: Int, foreground: Boolean): Intent |
| checkCallingOrSelfPermission | open fun checkCallingOrSelfPermission(permission: String): Int |
| checkCallingOrSelfUriPermission | open fun checkCallingOrSelfUriPermission(uri: Uri, modeFlags: Int): Int |
| checkCallingOrSelfUriPermissions | open fun checkCallingOrSelfUriPermissions(uris: List<Uri>, modeFlags: Int): Array<Int> |
| checkCallingPermission | open fun checkCallingPermission(permission: String): Int |
| checkCallingUriPermission | open fun checkCallingUriPermission(uri: Uri, modeFlags: Int): Int |
| checkCallingUriPermissions | open fun checkCallingUriPermissions(uris: List<Uri>, modeFlags: Int): Array<Int> |
| checkContentUriPermissionFull | open fun checkContentUriPermissionFull(uri: Uri, pid: Int, uid: Int, modeFlags: Int): Int |
| checkPermission | open fun checkPermission(permission: String, pid: Int, uid: Int): Int |
| checkSelfPermission | open fun checkSelfPermission(permission: String): Int |
| checkUriPermission | open fun checkUriPermission(uri: Uri, pid: Int, uid: Int, modeFlags: Int): Int |
| checkUriPermissions | open fun checkUriPermissions(uris: List<Uri>, pid: Int, uid: Int, modeFlags: Int): Array<Int> |
| clearDownloadManagerHelpers | open fun clearDownloadManagerHelpers() |
| clearWallpaper | open fun clearWallpaper() |
| createAttributionContext | open fun createAttributionContext(attributionTag: String): Context |
| createConfigurationContext | open fun createConfigurationContext(overrideConfiguration: Configuration): Context |
| createContext | open fun createContext(contextParams: ContextParams): Context |
| createContextForSplit | open fun createContextForSplit(splitName: String): Context |
| createDeviceContext | open fun createDeviceContext(deviceId: Int): Context |
| createDeviceProtectedStorageContext | open fun createDeviceProtectedStorageContext(): Context |
| createDisplayContext | open fun createDisplayContext(display: Display): Context |
| createPackageContext | open fun createPackageContext(packageName: String, flags: Int): Context |
| createWindowContext | open fun createWindowContext(display: Display, type: Int, options: Bundle): Context |
| databaseList | open fun databaseList(): Array<String> |
| deleteDatabase | open fun deleteDatabase(name: String): Boolean |
| deleteFile | open fun deleteFile(name: String): Boolean |
| deleteSharedPreferences | open fun deleteSharedPreferences(name: String): Boolean |
| enforceCallingOrSelfPermission | open fun enforceCallingOrSelfPermission(permission: String, message: String) |
| enforceCallingOrSelfUriPermission | open fun enforceCallingOrSelfUriPermission(uri: Uri, modeFlags: Int, message: String) |
| enforceCallingPermission | open fun enforceCallingPermission(permission: String, message: String) |
| enforceCallingUriPermission | open fun enforceCallingUriPermission(uri: Uri, modeFlags: Int, message: String) |
| enforcePermission | open fun enforcePermission(permission: String, pid: Int, uid: Int, message: String) |
| enforceUriPermission | open fun enforceUriPermission(uri: Uri, pid: Int, uid: Int, modeFlags: Int, message: String) |
| fileList | open fun fileList(): Array<String> |
| getApplication | fun getApplication(): Application |
| getApplicationContext | open fun getApplicationContext(): Context |
| getApplicationInfo | open fun getApplicationInfo(): ApplicationInfo |
| getAssets | open fun getAssets(): AssetManager |
| getAttributionSource | open fun getAttributionSource(): AttributionSource |
| getAttributionTag | open fun getAttributionTag(): String |
| getBaseContext | open fun getBaseContext(): Context |
| getCacheDir | open fun getCacheDir(): File |
| getClassLoader | open fun getClassLoader(): ClassLoader |
| getCodeCacheDir | open fun getCodeCacheDir(): File |
| getColor | fun getColor(id: Int): Int |
| getColorStateList | fun getColorStateList(id: Int): ColorStateList |
| getContentResolver | open fun getContentResolver(): ContentResolver |
| getDatabasePath | open fun getDatabasePath(name: String): File |
| getDataDir | open fun getDataDir(): File |
| getDeviceId | open fun getDeviceId(): Int |
| getDir | open fun getDir(name: String, mode: Int): File |
| getDisplay | open fun getDisplay(): Display |
| getDrawable | fun getDrawable(id: Int): Drawable |
| getExternalCacheDir | open fun getExternalCacheDir(): File |
| getExternalCacheDirs | open fun getExternalCacheDirs(): Array<File> |
| getExternalFilesDir | open fun getExternalFilesDir(type: String): File |
| getExternalFilesDirs | open fun getExternalFilesDirs(type: String): Array<File> |
| getExternalMediaDirs | open fun getExternalMediaDirs(): Array<File> |
| getFilesDir | open fun getFilesDir(): File |
| getFileStreamPath | open fun getFileStreamPath(name: String): File |
| getForegroundServiceType | fun getForegroundServiceType(): Int |
| getMainExecutor | open fun getMainExecutor(): Executor |
| getMainLooper | open fun getMainLooper(): Looper |
| getNoBackupFilesDir | open fun getNoBackupFilesDir(): File |
| getObbDir | open fun getObbDir(): File |
| getObbDirs | open fun getObbDirs(): Array<File> |
| getOpPackageName | open fun getOpPackageName(): String |
| getPackageCodePath | open fun getPackageCodePath(): String |
| getPackageManager | open fun getPackageManager(): PackageManager |
| getPackageName | open fun getPackageName(): String |
| getPackageResourcePath | open fun getPackageResourcePath(): String |
| getParams | open fun getParams(): ContextParams |
| getRequirements | @NonNull open fun getRequirements(): Requirements |
| getResources | open fun getResources(): Resources |
| getSharedPreferences | open fun getSharedPreferences(name: String, mode: Int): SharedPreferences |
| getString | fun getString(resId: Int): String |
| getSystemService | fun <T> getSystemService(serviceClass: Class<T>): T open fun getSystemService(name: String): Any |
| getSystemServiceName | open fun getSystemServiceName(serviceClass: Class<out Any>): String |
| getText | fun getText(resId: Int): CharSequence |
| getTheme | open fun getTheme(): Resources.Theme |
| getUpdateableFlags | open fun getUpdateableFlags(): Context.BindServiceFlags |
| getWallpaper | open fun getWallpaper(): Drawable |
| getWallpaperDesiredMinimumHeight | open fun getWallpaperDesiredMinimumHeight(): Int |
| getWallpaperDesiredMinimumWidth | open fun getWallpaperDesiredMinimumWidth(): Int |
| grantUriPermission | open fun grantUriPermission(toPackage: String, uri: Uri, modeFlags: Int) |
| isDeviceProtectedStorage | open fun isDeviceProtectedStorage(): Boolean |
| isRestricted | open fun isRestricted(): Boolean |
| isUiContext | open fun isUiContext(): Boolean |
| moveDatabaseFrom | open fun moveDatabaseFrom(sourceContext: Context, name: String): Boolean |
| moveSharedPreferencesFrom | open fun moveSharedPreferencesFrom(sourceContext: Context, name: String): Boolean |
| obtainStyledAttributes | fun obtainStyledAttributes(set: AttributeSet, attrs: Array<Int>): TypedArray |
| onBind | fun onBind(intent: Intent): IBinder |
| onConfigurationChanged | open fun onConfigurationChanged(newConfig: Configuration) |
| onCreate | open fun onCreate() open fun onCreate() |
| onDestroy | open fun onDestroy() open fun onDestroy() |
| onDownloadChanged | open fun onDownloadChanged(downloadManager: DownloadManager, download: Download, finalException: Exception) open fun onDownloadChanged(downloadManager: DownloadManager, download: Download, finalException: Exception) |
| onDownloadRemoved | open fun onDownloadRemoved(downloadManager: DownloadManager, download: Download) open fun onDownloadRemoved(downloadManager: DownloadManager, download: Download) |
| onDownloadsPausedChanged | open fun onDownloadsPausedChanged(downloadManager: DownloadManager, downloadsPaused: Boolean) |
| onIdle | open fun onIdle() open fun onIdle(downloadManager: DownloadManager) |
| onInitialized | open fun onInitialized(downloadManager: DownloadManager) open fun onInitialized(downloadManager: DownloadManager) |
| onLowMemory | open fun onLowMemory() |
| onRebind | open fun onRebind(intent: Intent) |
| onRequirementsStateChanged | open fun onRequirementsStateChanged(downloadManager: DownloadManager, requirements: Requirements, notMetRequirements: Int) |
| onStart | open fun onStart(intent: Intent, startId: Int) |
| onStartCommand | open 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. |
| onTaskRemoved | open fun onTaskRemoved(rootIntent: Intent) |
| onTimeout | open fun onTimeout(startId: Int, fgsType: Int) |
| onTrimMemory | open fun onTrimMemory(level: Int) |
| onUnbind | open fun onUnbind(intent: Intent): Boolean |
| onWaitingForRequirementsChanged | open fun onWaitingForRequirementsChanged(downloadManager: DownloadManager, waitingForRequirements: Boolean) open fun onWaitingForRequirementsChanged(downloadManager: DownloadManager, waitingForRequirements: Boolean) |
| openFileInput | open fun openFileInput(name: String): FileInputStream |
| openFileOutput | open fun openFileOutput(name: String, mode: Int): FileOutputStream |
| openOrCreateDatabase | open fun openOrCreateDatabase(name: String, mode: Int, factory: SQLiteDatabase.CursorFactory): SQLiteDatabase |
| peekWallpaper | open fun peekWallpaper(): Drawable |
| rebindService | open fun rebindService(conn: ServiceConnection, flags: Context.BindServiceFlags) |
| registerComponentCallbacks | open fun registerComponentCallbacks(callback: ComponentCallbacks) |
| registerDeviceIdChangeListener | open fun registerDeviceIdChangeListener(executor: Executor, listener: IntConsumer) |
| registerReceiver | open fun registerReceiver(receiver: BroadcastReceiver, filter: IntentFilter): Intent |
| removeStickyBroadcast | open fun removeStickyBroadcast(intent: Intent) |
| removeStickyBroadcastAsUser | open fun removeStickyBroadcastAsUser(intent: Intent, user: UserHandle) |
| revokeSelfPermissionOnKill | open fun revokeSelfPermissionOnKill(permName: String) |
| revokeSelfPermissionsOnKill | open fun revokeSelfPermissionsOnKill(permissions: Collection<String>) |
| revokeUriPermission | open fun revokeUriPermission(uri: Uri, modeFlags: Int) |
| sendAddDownload | open fun sendAddDownload(context: Context, clazz: Class<out DownloadService>, downloadRequest: DownloadRequest, foreground: Boolean) |
| sendAddDownloads | fun 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. |
| sendBroadcast | open fun sendBroadcast(intent: Intent) |
| sendBroadcastAsUser | open fun sendBroadcastAsUser(intent: Intent, user: UserHandle) |
| sendBroadcastWithMultiplePermissions | open fun sendBroadcastWithMultiplePermissions(intent: Intent, receiverPermissions: Array<String>) |
| sendOrderedBroadcast | open fun sendOrderedBroadcast(intent: Intent, initialCode: Int, receiverPermission: String, receiverAppOp: String, resultReceiver: BroadcastReceiver, scheduler: Handler, initialData: String, initialExtras: Bundle, options: Bundle) |
| sendOrderedBroadcastAsUser | open fun sendOrderedBroadcastAsUser(intent: Intent, user: UserHandle, receiverPermission: String, resultReceiver: BroadcastReceiver, scheduler: Handler, initialCode: Int, initialData: String, initialExtras: Bundle) |
| sendPauseDownloads | open 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. |
| sendRemoveAllDownloads | open 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. |
| sendRemoveDownload | open fun sendRemoveDownload(context: Context, clazz: Class<out DownloadService>, id: String, foreground: Boolean) |
| sendRemoveDownloads | fun 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. |
| sendResumeDownloads | open 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. |
| sendSetRequirements | open fun sendSetRequirements(context: Context, clazz: Class<out DownloadService>, requirements: Requirements, foreground: Boolean) |
| sendSetStopReason | open fun sendSetStopReason(context: Context, clazz: Class<out DownloadService>, id: String, stopReason: Int, foreground: Boolean) |
| sendStickyBroadcast | open fun sendStickyBroadcast(intent: Intent) |
| sendStickyBroadcastAsUser | open fun sendStickyBroadcastAsUser(intent: Intent, user: UserHandle) |
| sendStickyOrderedBroadcast | open fun sendStickyOrderedBroadcast(intent: Intent, resultReceiver: BroadcastReceiver, scheduler: Handler, initialCode: Int, initialData: String, initialExtras: Bundle) |
| sendStickyOrderedBroadcastAsUser | open fun sendStickyOrderedBroadcastAsUser(intent: Intent, user: UserHandle, resultReceiver: BroadcastReceiver, scheduler: Handler, initialCode: Int, initialData: String, initialExtras: Bundle) |
| setTheme | open fun setTheme(resid: Int) |
| setWallpaper | open fun setWallpaper(bitmap: Bitmap) |
| start | open fun start(context: Context, clazz: Class<out DownloadService>) |
| startActivities | open fun startActivities(intents: Array<Intent>) |
| startActivity | open fun startActivity(intent: Intent) |
| startForeground | open fun startForeground(context: Context, clazz: Class<out DownloadService>) |
| startForegroundService | open fun startForegroundService(service: Intent): ComponentName |
| startInstrumentation | open fun startInstrumentation(className: ComponentName, profileFile: String, arguments: Bundle): Boolean |
| startIntentSender | open fun startIntentSender(intent: IntentSender, fillInIntent: Intent, flagsMask: Int, flagsValues: Int, extraFlags: Int) |
| startService | open fun startService(service: Intent): ComponentName |
| stopForeground | fun stopForeground(removeNotification: Boolean) |
| stopSelf | fun stopSelf() |
| stopSelfResult | fun stopSelfResult(startId: Int): Boolean |
| stopService | open fun stopService(name: Intent): Boolean |
| unbindService | open fun unbindService(conn: ServiceConnection) |
| unregisterComponentCallbacks | open fun unregisterComponentCallbacks(callback: ComponentCallbacks) |
| unregisterDeviceIdChangeListener | open fun unregisterDeviceIdChangeListener(listener: IntConsumer) |
| unregisterReceiver | open fun unregisterReceiver(receiver: BroadcastReceiver) |
| updateServiceBindings | open fun updateServiceBindings(params: Collection<Context.UpdateBindingParams>) |
| updateServiceGroup | open fun updateServiceGroup(conn: ServiceConnection, group: Int, importance: Int) |