exponea / exponea-react-native-sdk

MIT License
8 stars 13 forks source link

notification permission support missing for android 13 #109

Closed Adnan-Bacic closed 10 months ago

Adnan-Bacic commented 11 months ago

i been looking into the push notification sections in the docs and it seems like it is missing android notification permission.

for ios there is this section:

https://github.com/exponea/exponea-react-native-sdk/blob/master/documentation/PUSH_IOS.md#5-authorizing-for-receiving-push-notifications

with a function called requestIosPushAuthorization.

the android part has no such functionality:

https://github.com/exponea/exponea-react-native-sdk/blob/master/documentation/PUSH_ANDROID.md

since android 13, android is now opt-in for notifications. a few examples from the android website:

https://developer.android.com/develop/ui/views/notifications/notification-permission

https://source.android.com/docs/core/display/notification-perm

https://developer.android.com/about/versions/13/behavior-changes-13

i believe the sdk must be updated to support notification permission for android 13 with POST_NOTIFICATION

<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

so perhaps instead of just having a requestIosPushAuthorization function, there should just be a single requestPushAuthorization function for both platforms.

adam1929 commented 10 months ago

Hi @Adnan-Bacic we have a plan to update RN SDK with such a API method for android. Requesting for push permissions could be implemented by developer in final app, but we would like to help with this. Native Android SDK contains that API but it was delivered later than RN SDK. Next release should contains that method. Thank you for patience

xcibik00 commented 7 months ago

Hi @Adnan-Bacic - its supported now in Exponea RN SDK version 1.7.0