In Android-11, If I choose Only This Time
permission and access Camera then:
Observed Behaviour: One-Time permission
stays granted for a few seconds (approx 3-5 sec) after we kill the application. If I re-open the application instantly or before this short period of time then the permission stays granted and If I re-open it after this short period of time then it will ask permission again and works fine.
Expected Behaviour: The permission will be revoked instantly after we kill the application instead of waiting for any specific period of time.
Is there any solution to it or is it a bug in Android-11? Also, nothing is mentioned in the documentation related to it. https://developer.android.com/guide/topics/permissions/overview#one-time
(P.S: All permission related checks are already implemented in the code.)