My requirement is to lock my app in foreground for a particular time period. During that time, I have to disable the notification bar like restrict taking incoming calls from the notification. I have tried this post and this one. But am unable to achieve the same. Am checking on my One Plus mobile Android version 13.
When tried these solutions am getting error like: view.WindowManager$BadTokenException: Unable to add window android.view.OplusViewRootImplHooks$ColorW@89ef82e -- permission denied for window type 2010
My gradle config is :
compileSdk 33 minSdk 28 targetSdk 33
It would be great if you can provide me a proper solution.
Regards, Pratheeja
this isn't possible without root/high privileges. not possible for "common" apps due to security reasons ofc