You can pass any integer value you want as the request code . The point of the request code is that you can distinguish between different permission requests in the onRequestPermissionsResult handler.
Read moreHow do I remove permission from request?
Here’s how to manage permissions on a specific app:
Read moreWhich class is request permission in android?
The method requestPermissions(String[] permissions, int requestCode ); is a public method that is used to request dangerous permissions. We can ask for multiple dangerous permissions by passing a string array of permissions.
Read moreHow do I enable permissions on Android?
Change app permissions
Read moreWhere do I find request permissions on Android?
Learn how an app can use your phone’s location
Read moreHow do I ask for permission on an application?
There is no way for you request Permission from Application . You always need an activity for it. When Application called, no Activity is initialized.
Read moreHow do I request permission for an Android app?
In your app’s manifest file, declare the permissions that your app might need to request . Design your app’s UX so that specific actions in your app are associated with specific runtime permissions. Users should know which actions might require them to grant permission for your app to access private user data.
Read more