Skip to content
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

Closed
Saurabhreactninja opened this issue May 18, 2021 · 6 comments
Closed

PermissionsAndroid don't show custom title and message . #31547

Saurabhreactninja opened this issue May 18, 2021 · 6 comments
Labels
API: PermissionsAndroid Needs: Author Feedback Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Newer Patch Available Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Saurabhreactninja
Copy link

Saurabhreactninja commented May 18, 2021

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);
}
};

@chrisglein chrisglein added API: PermissionsAndroid Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Newer Patch Available Platform: Android Android applications. and removed Needs: Triage 🔍 labels May 18, 2021
@github-actions
Copy link

⚠️ Using Old Version
ℹ️ It looks like you are using an older version of React Native. Please upgrade to the latest version, and verify if the issue persists. If it does not, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the current release.

@github-actions
Copy link

⚠️ Missing Required Fields
ℹ️ It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a new issue is created. Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one.

@Saurabhreactninja
Copy link
Author

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

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels May 19, 2021
@chrisglein
Copy link

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?

@chrisglein chrisglein added Needs: Author Feedback and removed Needs: Attention Issues where the author has responded to feedback. labels Jun 22, 2021
@github-actions
Copy link

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 19, 2023
@github-actions
Copy link

This issue was closed because the author hasn't provided the requested feedback after 7 days.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: PermissionsAndroid Needs: Author Feedback Needs: Issue Template This issue does not make use of the Issue Template, and may be missing necessary information. Newer Patch Available Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants