I'm creating a feature which uses two permissions
SCHEDULE_EXACT_ALARM - Special Permission (Need to direct the user to settings screen via Intent)
POST_NOTIFICATIONS - Runtime Permission (Can be handled by using rememberLauncherForActivityResult()
The main issue is that I have to handle cases 4 cases
both are granted
None of them is granted
SCHEDULE_EXACT_ALARM is granted POST_NOTIFICATIONS is denied
POST_NOTIFICATIONS is granted SCHEDULE_EXACT_ALARM is denied
How to the achieve the above in an elegant way first and then if possible devise a scalable way for the same.
I was able to achieve my goal but the code I wrote is too tightly coupled and doesn't follows SOLID principles.