-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[📚] Support for Android 13 context permissions / or switch to react-native-permissions for all permissions work #6283
Comments
Any news for this? |
@fellipe-ribeiro nope - it's open source, no need to ask for news, what you see is what you get --> https://medium.com/hackernoon/i-thought-i-understood-open-source-i-was-wrong-cf54999c097b In the meantime, feel free to post a PR if this is important to your business, I'm traveling right now but have just enough time to collaborate on getting PRs in. I won't be able to do anything related to it for a month at least I think, and react-native-permissions should be considered your workaround until then |
Fixed with react-native-permissions. |
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
Thank you for your contributions. |
|
Given the quality of react-native-permissions and that everyone (including myself!) has already had to handle this using it with android 13 out for a while... I think this actually calls for removing permissions from this library at the next breaking change |
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
Thank you for your contributions. |
How ? |
It helps solve the issue because it is a complete, well-maintained package that supports the ability to interrogate current permission grant status on all useful permissions, and/or request permission from the user if the permission is not granted but you need it. How could that not help solve a permission-related issue 🤔 ? It appears to be the canonical solution, in fact. |
I understand, but then it created a mix of library usage for notifications only. if (authorizationStatus !== messaging.AuthorizationStatus.PROVISIONAL &&
authorizationStatus !== messaging.AuthorizationStatus.AUTHORIZED ) {
try {
// requesting permission from user is required for iOS
authorizationStatus = await messaging().requestPermission();
if (Platform.OS === PLATFORM.ANDROID) {
await requestNotifications(['alert']);
}
} catch ( error ) {
console.error(error);
}
}
if (authorizationStatus === messaging.AuthorizationStatus.AUTHORIZED || messaging.AuthorizationStatus.PROVISIONAL) {
try {
// Retrieve mobile token
const fcmToken = await messaging().getToken();
if ( fcmToken ) {
this.token = fcmToken;
}
} catch ( error ) {
console.error(error);
}
} |
My best recommendation is to use react-native-permissions for all permission related activity in all places, in all code. Then there is no mix. It is what I do in fact, in my work projects and what I think most people do? |
Removed react-native-firebase notification handling to use react-native-permissions for notifications. Support Android 13. Related : invertase/react-native-firebase#6283
Removed react-native-firebase notification handling to use react-native-permissions for notifications. Support Android 13. Related : invertase/react-native-firebase#6283
Re-opening this but note that it is to track what I consider to be the real work:
|
Agree with @mikehardy , RNFB ought to get out of the business of permissions when it is nowhere near comprehensive enough. We have a potential breaking change incoming in the following year so I'm marking this as something to remove. |
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
Thank you for your contributions. |
Discussed in #6282
Originally posted by MicaelRodrigues May 31, 2022
With the upcoming [release](https://developer.android.com/about/versions/13/overview#timeline - late July) of
Android Tiramisu
apps will need to request permission to receive push notifications:It will start working similarly to IOS, that shows a system dialog for user choice. So, as a suggestion
messaging().requestPermission
should open that system dialog if the user hasn't granted/rejected permssions yet.The text was updated successfully, but these errors were encountered: