AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Media3 Workmanager Offline Ops

skill-sunnat629-android-media-pack-media3-workmanager-offline-ops · by sunnat629

Compact skill for Media3 offline downloads with DownloadService, DownloadManager, Requirements, and the WorkManagerScheduler role of media3-exoplayer-workmanager.

No reviews yet
0 installs
5 views
0.0% view→install

Install

$ agentstack add skill-sunnat629-android-media-pack-media3-workmanager-offline-ops

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-sunnat629-android-media-pack-media3-workmanager-offline-ops)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
17d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

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 →
Are you the author of Media3 Workmanager Offline Ops? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

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-service and media3-datasources-networking for service and network policy.
  • Pin Media3 to 1.10.1 through the version catalog.
  • Offline downloads MUST use the official Media3 stack: a DownloadService subclass driven by a singleton DownloadManager, with downloads submitted as DownloadRequest via DownloadService.sendAddDownload. Use DownloadHelper to prepare adaptive (HLS/DASH) downloads and select tracks.
  • DownloadIndex (from DownloadManager) is the single source of truth for download state. Track it separately from player state.
  • Express constraints (network type, charging, storage) with Media3 Requirements applied through DownloadService.sendSetRequirements, NOT WorkManager Constraints.
  • media3-exoplayer-workmanager only provides WorkManagerScheduler, a Scheduler that restarts the DownloadService when pending Requirements are met again. Return it from getScheduler(); 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.
  • DownloadService MUST be declared with foregroundServiceType="dataSync", which on targetSdk 35+ has a 6-hour runtime cap per app session. Keep downloads resumable; the Scheduler restarts 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; use Requirements.
  • 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-service
  • media3-datasources-networking
  • media3-vod-playback

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.