googlesamples/android-testdpc ? reverse-engineered prompt

Reverse engineered prompt

Build me an Android app called Test DPC that helps me set up and test a managed work profile or fully managed device. I want it to act like a sample device policy controller, so I can enroll a device, provision a work profile, and then see and control the kinds of enterprise settings an admin app can manage.

The app should have a simple setup flow for provisioning, including QR code based setup and the usual test account style onboarding. Once it’s set up, I want screens for things like enabling work apps, applying app restrictions, managing security policies, and checking how apps behave in a managed context. Make it feel like a real reference app for Android Enterprise testing, not just a demo.

Please keep it compatible with modern Android and build it in a way that can be used as a sample for other DPCs too. If you need to check current Android docs for any enterprise setup details, do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab