The "No-Permission" Camera Trick in Jetpack Compose: An Architect's Guide
A deep dive into Intent-based delegation, Activity Result APIs, and why you should stop asking for the CAMERA permission for simple uploads. As an Android developer, you’ve likely spent hours wrestling with runtime permissions — checking, requesting, and handling the “Never ask again” state. But for many common use cases, you can capture images in Jetpack Compose without requesting camera permission. In this guide, we’ll explore how to leverage the Activity Result API , the technical nuances of Intent-based delegation , and the production “sharp edges” you need to watch out for. 1. The Power of Delegation (IPC) The reason we can skip the permission ceremony is based on Intent-based Delegation . When you use the Activity Result contracts, your app never actually touches the camera hardware. Instead, it sends a request via Inter-Process Communication (IPC) to a “handler” app (typically the System Camera). The System Camera: Holds the actual ...