Reference: Platform primitivesTopics: 3 chaptersPrerequisites: Compose + lifecycle fundamentals
Graphics, Media & Performance Primitives
Three topics that don't fit neatly into the numbered modules but every serious Android app needs: custom graphics (Canvas, AGSL shaders), media playback (Media3 / ExoPlayer), and battery / power optimization. Each is a full chapter here.
🎨
Graphics & Rendering
Canvas, AGSL shaders, drawWithCache, animated vector drawables, and custom drawing for performance.
▶️
Media3 / ExoPlayer
The full media stack — playback, DRM, adaptive streaming, MediaSession, lockscreen + Android Auto.
🔋
Battery & Power
Doze, App Standby, background execution limits, Battery Historian, and the optimization playbook.
When you'll reach for these
- Graphics: bespoke data visualization, game UI, custom chart libraries, realtime video effects, branded loading animations that Lottie can't handle.
- Media3: music/video/audio playback, podcasts, livestreams, recorded content, any app with audio that must survive screen off / background.
- Battery: every fitness / tracking / streaming app — once you have real users, the one-star reviews about battery drain come fast unless you've been disciplined from day one.
How these relate to existing modules
- Jetpack Compose — Custom Layouts & Gestures covers Compose Canvas and basic drawing. This section goes deeper into Skia API, AGSL, and native rendering.
- Advanced Components — CameraX & Sensors covers camera pipelines. Media3 extends into video playback.
- Module 10 — Performance covers startup, macrobenchmark, and baseline profiles. This section covers battery specifically.
Chapters
- Graphics & Rendering — Canvas, AGSL, drawWithCache, Skia, AnimatedVectorDrawable
- Media3 / ExoPlayer — playback, DRM, adaptive streaming, MediaSession, Android Auto integration
- Battery & Power Optimization — Doze, App Standby, JobScheduler vs WorkManager, Battery Historian, profiling