Android emulator Permissions.askAsync(Permissions.NOTIFICATIONS) returns granted
See original GitHub issueEnvironment
expo v26 & v27 Genymotion Android Emulator
Steps to Reproduce
Everything works fine on expo 25, Permissions.askAsync(Permissions.NOTIFICATIONS)
returns status undetermined on Android emulator and iOS simulator. Problem started after updating expo to v26 and v27. iOS works fine but not Android. On Android emulator notification status is granted
and Notifications.getExpoPushTokenAsync
never resolves.
Expected Behavior
Permissions.askAsync(Permissions.NOTIFICATIONS)
returns status different than granted
and Notifications.getExpoPushTokenAsync
is never executed.
Actual Behavior
Permissions.askAsync(Permissions.NOTIFICATIONS)
returns status granted
and Notifications.getExpoPushTokenAsync
is executed and never resolves.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Notification runtime permission - Android Developers
Your app must wait to send notifications until after you request the new permission and the user grants that permission to your app....
Read more >Permissions.askAsync(Permissions.CAMERA) always denied ...
On Android, the canAskAgain permission always returned false (I haven't got around to ios).I found a workaround for my issue that may be ......
Read more >How to use the expo-permissions.NOTIFICATIONS function in ...
askAsync (Permissions.NOTIFICATIONS); finalStatus = status; } // Stop here if the user did not grant permissions if (finalStatus !== 'granted') { return null ......
Read more >React Native Push Notifications - DEV Community
askAsync (Permissions.NOTIFICATIONS) to get permission from the user. If the user does not provide the permission, then we throw an error.
Read more >React Native: Adding Push Notifications to your App with Expo
const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS); if (status !== 'granted') { return; }
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There seems to have been a somewhat undocumented change in the askAsync/getAsync where the Expo Client 27 is now asking you to grant permission again for each individual Expo app (slug). It would be great to have this more documented/called out in this ticket
Locking this thread so we don’t have stale issues or problems with the same symptoms but different root causes in the same thread. As @sjchmiela said, please feel free to open a new thread if you encounter this problem with the latest Expo SDK.