Skip to main content
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

Chapters