exponea / exponea-react-native-sdk

MIT License
8 stars 13 forks source link

Exponea.requestPushAuthorization not resolving on Android when permission is denied. #125

Open dannyBies opened 2 months ago

dannyBies commented 2 months ago

When I call Exponea.requestPushAuthorization I see the following behaviour:

IOS

Android

I am using a OnePlus 8T - Android 14 to test

adam1929 commented 2 months ago

Hi @dannyBies thank you for reporting. Behaviour you described does make sense, but still is unwanted. Native part is waiting for response from system if permission has been granted or not. The promise is resulted after that. In case of denied permission, SDK should show dialog to user to grant permission. That has to be done on main UI thread. Is it possible that you are invoking await Exponea.requestPushAuthorization(); on UI thread (button click, etc...) ? Could you move await into background thread? If that doesn't help, could you see any suspicious app logs or system logs? There could be something that prevents from system to response to SDK so promise.resolve() is delayed or not called at all. If you want to investigate this behaviour with your logs, please ask your CSM and open issue with our support team. Thank you