-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PermissionsAndroid don't show custom title and message . #31547
Comments
|
|
I am using react native version 0.64. If you want to check than please check this offical code https://reactnative.dev/docs/permissionsandroid with ACCESS_FINE_LOCATION instead of CAMERA. When you use camera as a permission it show custom message and title but as soon you replace the CAMERA permission with ACCESS_FINE_LOCATION than it start showing default message. https://reactnative.dev/docs/permissionsandroid |
Replicated your sample code in a snack here: https://snack.expo.io/6nm5IVhYY With that I see a different message for camera vs. location. Is there more to your repro I'm missing that I didn't capture in the Snack? |
This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days. |
This issue was closed because the author hasn't provided the requested feedback after 7 days. |
In react version 0.62
I am calling PermissionsAndroid with custom message and title but app just show the default message. I am using the code given below.
const requestLocationPermission = async () => {
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
{
title: "LocationPermission",
message:
"Our app need to access your location" +
"so that we can use to separate photo on asset .",
buttonNeutral: "Ask Me Later",
buttonNegative: "Cancel",
buttonPositive: "OK"
}
);
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
console.log("You can use the location");
} else {
console.log("Location permission denied");
}
} catch (err) {
console.warn(err);
}
};
The text was updated successfully, but these errors were encountered: