Open pierroo opened 4 months ago
Additional information: apparently onesignal is not at fault for putting app in background, even the
PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS,
)
for react native will bring the app to background
does anyone know WHY and if there is a way to avoid it?
What happened?
I just realized that OneSignal.promptForPushNotificationsWithUserResponse puts the app in background for half a second when it's called. I use "react-native-appstate-hook" to detect app state change, and if I comment out this function it no longer goes in background.
I never noticed it before, recent changes were updating onesignal from 4.5.1 to 4.5.2, and react native from 0.69.12 to 0.73.4
obviously this is problematic!
Steps to reproduce?
What did you expect to happen?
Leave my app foreground, obviously
React Native OneSignal SDK version
4.5.2
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct