If you've ever built an Android app, you know the pain of handling runtime permissions. Callbacks, onRequestPermissionsResult, checking if the user said "don't ask again" — it's a mess.
TheActivity is an open-source Android library that simplifies ALL of this into clean, chainable one-liners.
What It Does
// Request permissions in one line
TheActivity.getInstance().requestPermissions(
Manifest.permission.CAMERA,
Manifest.permission.RECORD_AUDIO
) { granted, denied ->
if (granted) startCamera()
}
No more:
- ❌ Overriding
onActivityResult - ❌ Managing request codes
- ❌ Checking permission state manually
- ❌ Handling "Don't ask again" edge cases
Features
✅ One-line permission requests with callbacks
✅ Start activities for result — without request codes
✅ Pick files, images, contacts with simple API
✅ Works with any Activity or Fragment
✅ Zero boilerplate, zero configuration
✅ Lightweight (~15KB)
Why You Should Try It
If you're tired of writing 50 lines of permission boilerplate every time, this library will save you hours. It's been battle-tested in production apps and handles all the edge cases Android throws at you.
⭐ GitHub: github.com/p32929/TheActivity
Give it a star if it saves you time! 🚀
Top comments (0)