Closed astraydog closed 3 years ago
@astraydog RC_CAMERA_AND_LOCATION
can be any integer. RC_
means "Request Code" and it's how we'll uniquely identify the permission request.
So you can just do:
// Value really doesn't matter as long as it's unique!
public static final int RC_CAMERA_AND_LOCATION = 123;
R.string_camera_and_location_rationale
is just a custom string you want to show to the user explaining why you want the permission. It could be something like this:
https://github.com/googlesamples/easypermissions/blob/2b2b5c40d11caf601c89da0af995f57772a2e52b/app/src/main/res/values/strings.xml#L6
Basic Information
Device type: Emulator____ OS version: android 9.0 EasyPermissions version: 2.0.1
Describe the problem
What I want is record the screen actions and save it to /storage/emulated/0/Download/. how to define RC_CAMERA_AND_LOCATION? It says Cannot resolve symbol 'RC_CAMERA_AND_LOCATION'. And what is the value of 'R.string.camera_and_location_rationale'
I have define permissions in AndroidManifest.xml.
Code and logs