[notifications][Android] Convert all exported modules to new API (#24499)# Why Converts all exported modules to new API in `expo-notifications`. # Test Plan - bare-expo ✅ - expo go ✅
[android] Remove unnecessary version checks (#24203)# Why This PR is related to #24201, it removes unnecessary version checks # How Remove version check logic for SDK's < 23 # Test Pla
[android] Remove unnecessary version checks (#24203)# Why This PR is related to #24201, it removes unnecessary version checks # How Remove version check logic for SDK's < 23 # Test Plan Tested in Bare Expo in Android 13 simulator
show more ...
[notifications][Android] Convert remaining modules to Kotlin (#24494)# Why Converts remaining modules to Kotlin. # Test Plan - bare-expo ✅
[notifications][Android] Convert almost all exported modules to Kotlin (#24462)# Why I'm in the middle of rewriting the expo-notifications to a new API. I decided to split the work across multip
[notifications][Android] Convert almost all exported modules to Kotlin (#24462)# Why I'm in the middle of rewriting the expo-notifications to a new API. I decided to split the work across multiple PRs. Converts almost all exported modules to Kotlin, besides those with more complicated scoping logic. # Test Plan - expo-go ✅
[notifications][Android] Fix BadgeManager not found in vendored code
[notifications][Android] Remove badge manager (#24458)# Why I'm in the middle of rewriting the `expo-notifications` to a new API. I decided to split the work across multiple PRs. This PR reduc
[notifications][Android] Remove badge manager (#24458)# Why I'm in the middle of rewriting the `expo-notifications` to a new API. I decided to split the work across multiple PRs. This PR reduces the `ExpoBadgeManager` to just one static variable. It'll make other changes much easier to achieve. # Test Plan - expo-go and NCL ✅
[notifications] Support android sdk 33 POST_NOTIFICATIONS permission (#19672)# Why android sdk 33 introduced the `POST_NOTIFICATIONS` runtime permission. fixed #19043 # How - for sdk < 33
[notifications] Support android sdk 33 POST_NOTIFICATIONS permission (#19672)# Why android sdk 33 introduced the `POST_NOTIFICATIONS` runtime permission. fixed #19043 # How - for sdk < 33, use the legacy permission response mainly from `NotificationManagerCompat.areNotificationsEnabled` - for sdk >= 33, request `POST_NOTIFICATIONS` permission then merge the response with `NotificationManagerCompat.areNotificationsEnabled`. - we didn't officially support compileSdkVersion 33, this pr tries to use the code without compileSdkVersion 33. # Test Plan - bare-expo android sdk 31 + NCL notification - bare-expo android sdk 33 + NCL notification
[android][ios] Upgrade stripe-react-native to 0.19.0 (#19432)# Why close ENG-6537 # How - `et uvm -m @stripe/stripe-react-native -c 'v0.19.0'` - backport native stripe version to old sdks
[android][ios] Upgrade stripe-react-native to 0.19.0 (#19432)# Why close ENG-6537 # How - `et uvm -m @stripe/stripe-react-native -c 'v0.19.0'` - backport native stripe version to old sdks' podspec and build.gradle - [android] transform manually - remove `GooglePayButtonManager.kt`, `GooglePayButtonView.kt` - remove `GooglePayButtonManager()` in `StripeSdkPackage.kt` - revert `import host.exp.expoview.R` change in `CardFormView.kt` - backport versioned code for stripe-android 20.12 breaking changes ## [Notable change] bump `compileSdkVersion` to 33 on android expo go this is a hard requirement for stripe 0.19.0 - [notifications] fix related build error when `RemoteInput.getResultsFromIntent` returns null - [webview] backport for build error: https://github.com/react-native-webview/react-native-webview/commit/7f78f206170b0a8f29b467fa2cc546544e9cd300 - [gesture-handler] backport for build error: https://github.com/software-mansion/react-native-gesture-handler/commit/8d70e87b035e6c5d2009d41f4137a10a1b77ca5a # Test Plan 1. clone and setup [stripe example app](https://github.com/stripe/stripe-react-native#run-the-example-app) 2. in `example/` - `yarn add file:/path/to/expo/packages/expo` - yarn add for `[email protected]`, `[email protected]` and other unsynced packages - `expo start` 3. test android/ios unversioned expo go with the local stripe example app. 4. there're many different test cases. i just did smoke test from the accepting payments by credit cards. stripe test api keys: https://stripe.com/docs/keys stripe test credit card: https://stripe.com/docs/testing
[notifications] Fix older notifications be overwritten issue (#17974)# Why when there are multiple notifications, the latest one will overwrite previous' intent extra data. `useLastNotificationR
[notifications] Fix older notifications be overwritten issue (#17974)# Why when there are multiple notifications, the latest one will overwrite previous' intent extra data. `useLastNotificationResponse` returns the latest received notification but not the clicked notification. fixed https://github.com/expo/expo/issues/17966 https://github.com/expo/expo/issues/17531#issuecomment-1160495971 # How - the previous PendingIntent be overwritten because `PendingIntent.FLAG_UPDATE_CURRENT`. we also used `PendingIntent.FLAG_UPDATE_CURRENT` for previous implementation, the main difference is that for `PendingIntent.getActivities`, it is slightly different to check whether two PendingIntent are equal. i noticed that OneSignal reverted their implementation of PendingIntent.getActivities aka the Reverse Activity Trampoline because the problem for Xiaomi devices. in this pr, i changed the implementation to ``` notification pendingIntent -> hidden background Activity (NotificationForwarderActivity) -> foreground Activity -> broadcast receiveResponse -> finishe NotificationForwarderActivity ``` - remove `foregroundActivityIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_MULTIPLE_TASK` that cause #17960 - backport changes to versioned code # Test Plan follow #17966 to test multiple notifications and the `Notifications.addNotificationResponseReceivedListener` returned content Co-authored-by: Bartłomiej Bukowski <[email protected]>
[notifications] Fix issues from push notifications (#17871)# Why another fix for android 12 notification trampoline issue # How 1. text input notification category is a broken regression f
[notifications] Fix issues from push notifications (#17871)# Why another fix for android 12 notification trampoline issue # How 1. text input notification category is a broken regression from #17686 where to get the text input placeholder from `RemoteInput` has NPE. we can get the placeholder from `NotificationAction.placeholder` now. 2. update FCM version for https://github.com/expo/expo/pull/17686#issuecomment-1154700811. originally there was [some blocker from updating to cloud messaging 22.0 because from other firebase sdk versions](https://github.com/expo/expo/pull/15010#issuecomment-1079194697). thank to @bbarthec upgrade firebase sdks in sdk 45, we can now update cloud messaging successfully. checked to [the changelog](https://firebase.google.com/support/release-notes/android#messaging_v22-0-0), there're no other breaking changes. it should be safe to upgrade to the version. 3. there're still some `FirebaseInstanceId` in expo go, migrate these code as #15010 # Test Plan bare-expo + NCL Notifications `send me a push notification` test case
[Android][iOS][notifications] Support unregistering from push notifications (#17812)Co-authored-by: Tomasz Sapeta <[email protected]>
[notifications] Fix opening wrong activity for expo go (#17751)# Why fix #17686 for expo go to open wrong activity # How from #17686 the PendingIntent for foreground activity missed some i
[notifications] Fix opening wrong activity for expo go (#17751)# Why fix #17686 for expo go to open wrong activity # How from #17686 the PendingIntent for foreground activity missed some intent extra. we should also call `NotificationsService.setNotificationResponseToIntent` like the original implementation: https://github.com/expo/expo/blob/6097718a9a1b69c672a3845336c42fb86da13c61/packages/expo-notifications/android/src/main/java/expo/modules/notifications/service/delegates/ExpoHandlingDelegate.kt#L123 # Test Plan unversioned expo go + NCL "schedule notification for 10 seconds from now", pressing home key to background the app and click the notification after 10 seconds.
[Android][Notifications] Fix Data-only FCM Notifications appearing in Notification Drawer (#17707)# Why Fixes #16261. Prior to this change "data only" or "silent" Push Notifications would appear i
[Android][Notifications] Fix Data-only FCM Notifications appearing in Notification Drawer (#17707)# Why Fixes #16261. Prior to this change "data only" or "silent" Push Notifications would appear in the Android Notification Drawer, despite not having a title or message. This is an odd user experience, which makes it difficult for developers to leverage "silent" notifications to update app data (e.g. the badge count). # How This already functions correctly on iOS, but for Android a native change was required to check for the existence of the Notification title and message. If both are not present, we should not attempt to show this notification in the Notification Drawer. # Test Plan Unit testing added for native Android changes. To test end-to-end, see #16261 for sample app code and detailed instructions on setting up a Firebase project. Running `apps/bare-expo`'s Expo Test Suite's "Notifications" end-to-end should also verify that there are no regressions.
[notifications] Fix android 12 notification trampolines (#17686)# Why originally clicking a notification to launch app in foreground, our call flow is like ``` notification pendingIntent -> br
[notifications] Fix android 12 notification trampolines (#17686)# Why originally clicking a notification to launch app in foreground, our call flow is like ``` notification pendingIntent -> broadcast receiver in service -> startActivity └> broadcast receiveResponse ``` this is abandoned from android 12 which is called [notification trampolines](https://developer.android.com/about/versions/12/behavior-changes-12#identify-notification-trampolines). fix #17531 # How reference the solution from onesignal: https://onesignal.com/blog/android-12-notification-open-changes/, the pr changes the call flow like: ``` notification pendingIntent --> foreground Activity └> hidden background Activity (NotificationForwarderActivity) -> broadcast receiveResponse ``` # Test Plan bare-expo + NCL "schedule notification for 10 seconds from now", pressing home key to background the app and click the notification after 10 seconds.
[android] Set Badge Count Number Based on Notification Payload (#17171)* [android] Set Badge Count Number Based on Notification Payload The badge field set in notification payload is ignored on
[android] Set Badge Count Number Based on Notification Payload (#17171)* [android] Set Badge Count Number Based on Notification Payload The badge field set in notification payload is ignored on Android. Set badge count number by fetching the value from the payload content. * Update packages/expo-notifications/CHANGELOG.md Co-authored-by: Will Schurman <[email protected]>
[android] Fix more FLAG_MUTABLE exception in PendingIntent (#17333)# Why fix #17276 # How basically follow #17164 but search all `PendingIntent.g` across all code in expo/expo repository.
[android] Fix more FLAG_MUTABLE exception in PendingIntent (#17333)# Why fix #17276 # How basically follow #17164 but search all `PendingIntent.g` across all code in expo/expo repository. # Test Plan on Android S devices, use android unversioned expo go + NCL for the following test cases: 1. BackgroundNotification 2. Notifications
[notifications] handle SCHEDULE_EXACT_ALARM for android 12 (#17334)# Why fix #17276 # How - If the app has the `SCHEDULE_EXACT_ALARM` permission, call `setExactAndAllowWhileIdle`. otherwis
[notifications] handle SCHEDULE_EXACT_ALARM for android 12 (#17334)# Why fix #17276 # How - If the app has the `SCHEDULE_EXACT_ALARM` permission, call `setExactAndAllowWhileIdle`. otherwise, call `setAndAllowWhileIdle` instead. - add `SCHEDULE_EXACT_ALARM` permission to expo go's AndroidManifest.xml # Test Plan on android 12 devices, test unversioned expo go + Notifications schedule 10s local notification test Co-authored-by: Tomasz Sapeta <[email protected]>
[expo-notifications][android] Remove badge deadcode (#17205)
Remove unimodules-task-manager-interface on Android (#16683)
[notifications][android] upgrade firebase messaging and replace "getInstanceId" call (#15010)# Why closes https://github.com/expo/expo/issues/14860 also users no longer need to manually add t
[notifications][android] upgrade firebase messaging and replace "getInstanceId" call (#15010)# Why closes https://github.com/expo/expo/issues/14860 also users no longer need to manually add the firebase instance ID library if they are using a higher version of Firebase in their app (see https://forums.expo.dev/t/cant-get-expotoken-in-expo-notification-due-to-failed-resolution-of-lcom-google-firebase-iid-firebaseinstanceid/53265) # How https://firebase.google.com/docs/projects/manage-installations#retrieving-an-identifier # Test Plan Tested in a bare app, expo push token and device push token are the same as before the changes Co-authored-by: Kudo Chien <[email protected]>
[expo-modules] Move code from `unimodules` into `expo-modules-core` (#13703)# Why Migrated `unimodules-core`, `unimodules-react-native-adapter`, `unimodules-app-loader` into `expo-modules-core`
[expo-modules] Move code from `unimodules` into `expo-modules-core` (#13703)# Why Migrated `unimodules-core`, `unimodules-react-native-adapter`, `unimodules-app-loader` into `expo-modules-core` # How - Change package using AS refactor tools - Fix some places where AS wasn't able to do automatically - Fix compatibility with new auto-linking - Ensure that classes which are used during installation steps are still available in the old place # Test Plan - expo-go (tested using unversioned and 41) - bare-expo
[android] lint spotless ktlint and fix CI step (#13662)
[notifications][android] respect shouldPlaySound: false in setNotificationHandler (#13411)* Upgrade androidx core to 1.5.0 * use builder.setSilent * changelog * docs and readme * Apply
[notifications][android] respect shouldPlaySound: false in setNotificationHandler (#13411)* Upgrade androidx core to 1.5.0 * use builder.setSilent * changelog * docs and readme * Apply suggestions from code review Co-authored-by: Expo CI <[email protected]> * pass true to setSilent Co-authored-by: Expo CI <[email protected]>
[notifications] feat: respond to notifications while app is backgrounded (#13130)* JS interface * fix up ios * install unimodules-task-manager-interface * rename some iOS things * andro
[notifications] feat: respond to notifications while app is backgrounded (#13130)* JS interface * fix up ios * install unimodules-task-manager-interface * rename some iOS things * android implementation * [android] only trigger on remote notifications, and only serialize remote payload * no need to serialize on iOS * TS interface rename * add 'remote-notification' background mode to Expo Go * CHANGELOG.md * Update packages/expo-notifications/CHANGELOG.md Co-authored-by: Expo CI <[email protected]> * add test to NCL * docs and readme * fix lint * Apply suggestions from code review Co-authored-by: Tomasz Sapeta <[email protected]> * [fastlane] Automatically remove background remote-notification for App Store * update docs Co-authored-by: Expo CI <[email protected]> Co-authored-by: Tomasz Sapeta <[email protected]>
[permissions] Migrate interface to expo-modules-core (#12961)
12345