Install
$ agentstack add skill-sunnat629-android-media-pack-media3-workmanager-offline-ops ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Trigger
Use for offline media downloads, download constraints and scheduling, retryable background media operations, or media3-exoplayer-workmanager.
Rules
- Start with
media3-background-playback-serviceandmedia3-datasources-networkingfor service and network policy. - Pin Media3 to
1.10.1through the version catalog. - Offline downloads MUST use the official Media3 stack: a
DownloadServicesubclass driven by a singletonDownloadManager, with downloads submitted asDownloadRequestviaDownloadService.sendAddDownload. UseDownloadHelperto prepare adaptive (HLS/DASH) downloads and select tracks. DownloadIndex(fromDownloadManager) is the single source of truth for download state. Track it separately from player state.- Express constraints (network type, charging, storage) with Media3
Requirementsapplied throughDownloadService.sendSetRequirements, NOT WorkManagerConstraints. media3-exoplayer-workmanageronly providesWorkManagerScheduler, aSchedulerthat restarts theDownloadServicewhen pendingRequirementsare met again. Return it fromgetScheduler(); that is the entire WorkManager role in downloads.- Use WorkManager directly only for genuinely custom non-download deferrable work, for example cache cleanup or license refresh sweeps.
DownloadServiceMUST be declared withforegroundServiceType="dataSync", which on targetSdk 35+ has a 6-hour runtime cap per app session. Keep downloads resumable; theSchedulerrestarts the service later.- Keep download and cache policy centralized and observable.
- Make cancellation and removal explicit through
DownloadService.sendRemoveDownload; stale downloads are product bugs.
Example
media3-exoplayer-workmanager = { module = "androidx.media3:media3-exoplayer-workmanager", version.ref = "media3" }
class MediaDownloadService : DownloadService(NOTIFICATION_ID) {
override fun getDownloadManager(): DownloadManager = AppDeps.downloadManager
override fun getScheduler(): Scheduler = WorkManagerScheduler(this, "media3_downloads")
override fun getForegroundNotification(
downloads: MutableList,
notMetRequirements: Int,
): Notification = AppDeps.downloadNotificationHelper.buildProgressNotification(
this, R.drawable.ic_download, null, null, downloads, notMetRequirements)
}
DownloadService.sendAddDownload(
context, MediaDownloadService::class.java,
DownloadRequest.Builder(contentId, contentUri).build(), false)
DownloadService.sendSetRequirements(
context, MediaDownloadService::class.java,
Requirements(Requirements.NETWORK_UNMETERED), false)
Do Not
- DO NOT hand-roll download Workers; WorkManager cannot own Media3 download state or resumption.
- DO NOT gate downloads with WorkManager
Constraints; useRequirements. - Do not use WorkManager for live playback lifetime.
- Do not start unbounded parallel downloads; cap via
DownloadManager.maxParallelDownloads. - Do not let UI screens own offline queue truth; read
DownloadIndex.
Related
media3-background-playback-servicemedia3-datasources-networkingmedia3-vod-playback
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: sunnat629
- Source: sunnat629/android-media-pack
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.