Skip to content

Commit

Permalink
Merge pull request #118 from OutSystems/feat/RMET-2948/subscribe-gene…
Browse files Browse the repository at this point in the history
…ral-app-topic

RMET-2948 - Subscribe and unsubscribe to appIdentifier-based topic when registering and unregistering device
  • Loading branch information
alexgerardojacinto authored Oct 11, 2024
2 parents 928bf10 + 1b0b4ba commit 46dfd00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The changes documented here do not include those from the original repository.

## [Unreleased]

### Features
- (android) Subscribe to app general topic when registering device (and unsubscribe when unregistering) (https://outsystemsrd.atlassian.net/browse/RMET-2948).

### Fix
- (ios) `NotificationClickedV2` not being triggered when deep link property is not set (https://outsystemsrd.atlassian.net/browse/RMET-3695).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class OSFirebaseCloudMessaging : CordovaImplementation() {

flow?.collect {
if (it == OSFCMPermissionEvents.Granted) {
if (controller.registerDevice()) {
if (controller.registerDevice(this.getPackageAppName())) {
sendSuccess(callbackContext)
} else {
sendError(callbackContext, FirebaseMessagingError.REGISTRATION_ERROR)
Expand All @@ -287,7 +287,7 @@ class OSFirebaseCloudMessaging : CordovaImplementation() {
}

private suspend fun unregisterDevice(callbackContext: CallbackContext) {
if (controller.unregisterDevice()) {
if (controller.unregisterDevice(this.getPackageAppName())) {
sendSuccess(callbackContext)
} else {
sendError(callbackContext, FirebaseMessagingError.UNREGISTRATION_ERROR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ apply plugin: 'kotlin-kapt'
dependencies {
implementation("com.github.outsystems:oscore-android:1.2.0@aar")
implementation("com.github.outsystems:oscordova-android:2.0.1@aar")
implementation("com.github.outsystems:osfirebasemessaging-android:1.2.2.2@aar")
implementation("com.github.outsystems:oslocalnotifications-android:1.1.0.3@aar")
implementation("com.github.outsystems:osfirebasemessaging-android:1.2.3-dev@aar")
implementation("com.github.outsystems:oslocalnotifications-android:1.1.0@aar")

implementation("com.google.code.gson:gson:2.8.9")

Expand Down

0 comments on commit 46dfd00

Please sign in to comment.