This differential implements native method to check for notifications permissions and uses it in JavaScript. Relevant types are updated as well.
Details
Build the app and open it. Open settings and revoke comm notifications permissions. Go back to app and ensure that "Failed to register push notifs" message is displayed and no notifications
are delivered. Close the app. Go back to settings, bring notifications permissions back. Open the app, ensure that previous message is not displayed and notifications are succesfully delivered.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/android/app/src/main/java/app/comm/android/notifications/CommAndroidNotifications.java | ||
---|---|---|
99 ↗ | (On Diff #21295) | A Boolean has three values: Boolean.FALSE, Boolean.TRUE, null. What happens when we call promise.resolve(null)? Is it transformed to js boolean as false? If that's not the case, we can convert Boolean to boolean on java side using Boolean.TRUE.equals(...). |
native/android/app/src/main/java/app/comm/android/notifications/CommAndroidNotifications.java | ||
---|---|---|
99 ↗ | (On Diff #21295) | According to docs of this method: https://developer.android.com/reference/androidx/core/app/NotificationManagerCompat#areNotificationsEnabled() it returns primitive type boolean. Assigning it to class type Boolean works but it is my silly mistake to do it this way. I will change type to boolean here. |