react-native-mapp-plugin 1.3.6 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +19 -10
  2. package/Mapp.js +27 -4
  3. package/MappEventEmitter.js +4 -1
  4. package/RNMappPlugin.podspec +3 -4
  5. package/android/build.gradle +40 -20
  6. package/android/gradle/gradle-daemon-jvm.properties +12 -0
  7. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  8. package/android/gradle.properties +0 -2
  9. package/android/gradlew +18 -0
  10. package/android/gradlew.bat +15 -0
  11. package/android/settings.gradle +2 -4
  12. package/android/src/main/java/com/reactlibrary/ActivityListener.java +2 -4
  13. package/android/src/main/java/com/reactlibrary/HelperActivity.java +2 -2
  14. package/android/src/main/java/com/reactlibrary/MessageService.java +15 -10
  15. package/android/src/main/java/com/reactlibrary/MyPushBroadcastReceiver.java +29 -22
  16. package/android/src/main/java/com/reactlibrary/NativeRNMappPluginModuleSpec.java +232 -0
  17. package/android/src/main/java/com/reactlibrary/PushNotificationEvent.java +3 -3
  18. package/android/src/main/java/com/reactlibrary/RNMappPluginModule.java +525 -402
  19. package/android/src/main/java/com/reactlibrary/RNMappPluginPackage.java +9 -14
  20. package/android/src/main/java/com/reactlibrary/RNUtils.java +16 -16
  21. package/android/src/main/jni/CMakeLists.txt +28 -0
  22. package/android/src/main/jni/RNMappPlugin-generated.cpp +320 -0
  23. package/android/src/main/jni/RNMappPlugin.h +31 -0
  24. package/android/src/main/jni/react/renderer/components/RNMappPlugin/RNMappPluginJSI.h +471 -0
  25. package/ios/Frameworks/AppoxeeInapp.xcframework/Info.plist +5 -5
  26. package/ios/Frameworks/AppoxeeInapp.xcframework/ios-arm64/libAppoxeeInapp.a +0 -0
  27. package/ios/Frameworks/AppoxeeInapp.xcframework/ios-arm64_x86_64-simulator/libAppoxeeInapp.a +0 -0
  28. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64/libAppoxeeSDK.a +0 -0
  29. package/ios/Frameworks/AppoxeeSDK.xcframework/ios-arm64_x86_64-simulator/libAppoxeeSDK.a +0 -0
  30. package/package.json +65 -12
  31. package/react-native.config.js +6 -3
  32. package/specs/NativeRNMappPluginModule.js +59 -0
  33. package/.gitattributes +0 -1
  34. package/.local-pack/settings.json +0 -1
  35. package/.vscode/settings.json +0 -4
  36. package/Helper.md +0 -23
  37. package/__package.json +0 -33
  38. package/android/.classpath +0 -6
  39. package/android/.project +0 -34
  40. package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
  41. package/clean.sh +0 -34
  42. package/ios/RNMappPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  43. package/ios/RNMappPlugin.xcodeproj/project.xcworkspace/xcuserdata/stefan.stevanovic.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  44. package/ios/RNMappPlugin.xcodeproj/xcuserdata/stefan.stevanovic.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  45. package/jsdoc.conf.json +0 -15
  46. package/react-native-mapp-plugin-1.3.8.tgz +0 -0
  47. package/specs/MappEngagePluginSpec.js +0 -8
package/CHANGELOG.md CHANGED
@@ -1,21 +1,30 @@
1
- ## Version 1.3.6
1
+ ## Version 1.4.1
2
+
3
+ ***Dependency Updates***
2
4
 
3
- ***Improvements***
5
+ - Android: Aligned with Mapp Engage Android SDK 7.1.1.
6
+ - iOS: Aligned with Mapp Engage Inapp iOS SDK 6.0.11, which provides improved in-app statistics.
4
7
 
5
- -iOS: Updated bundled Mapp Engage SDK binaries to version 6.1.3 (AppoxeeSDK.xcframework).
8
+ ***Architecture***
6
9
 
7
- -iOS: Updated CocoaPods integration to use vendored `.xcframework` and bundled resources directly from this plugin.
10
+ - Android: Updated plugin to support New Architecture (TurboModule).
8
11
 
9
- -iOS: Removed direct CocoaPods dependencies on `MappSDK`, `MappSDKInapp`, and `MappSDKGeotargeting` from the podspec to keep native SDK versions aligned with the plugin package.
12
+ ## Version 1.4.0
10
13
 
11
- ***Compatibility***
14
+ ***Bug Fixes***
12
15
 
13
- -No JavaScript API changes.
16
+ - Android: `requestPostNotificationPermission` now requests the runtime notification permission instead of only checking its current state.
17
+ - Android: If the runtime prompt is unavailable or the permission is blocked, the plugin now opens the app notification settings screen and resolves the promise in every path.
14
18
 
15
- -No Android SDK changes in this release.
19
+ ***Dependency Updates***
16
20
 
17
- **Note:**
18
- -This is a packaging and dependency-alignment release focused on iOS integration consistency. No breaking changes are expected.
21
+ - Aligned with Mapp Engage Android SDK 7.0.2.
22
+
23
+ ## Version 1.3.6
24
+
25
+ ***Dependency Updates***
26
+
27
+ -Aligned with Mapp Engage iOS SDK 6.1.3
19
28
 
20
29
  ## Version 1.3.5
21
30
 
package/Mapp.js CHANGED
@@ -6,8 +6,10 @@ import { NativeModules, Platform } from "react-native";
6
6
  import CustomEvent from "./CustomEvent.js";
7
7
 
8
8
  import MappEventEmitter from "./MappEventEmitter.js";
9
+ import NativeRNMappPluginModule from "./specs/NativeRNMappPluginModule";
9
10
 
10
- const { RNMappPluginModule } = NativeModules;
11
+ const RNMappPluginModule =
12
+ NativeRNMappPluginModule || NativeModules.RNMappPluginModule;
11
13
  const EventEmitter = new MappEventEmitter();
12
14
 
13
15
  const IOS_INIT = "com.mapp.init";
@@ -142,6 +144,26 @@ export class Mapp {
142
144
  );
143
145
  }
144
146
 
147
+ static engageTestServer(
148
+ cepUrl: string,
149
+ sdkKey: string,
150
+ googleProjectId: string,
151
+ server: string,
152
+ appID: string,
153
+ tenantID: string
154
+ ) {
155
+ if (Platform.OS == "android") {
156
+ return RNMappPluginModule.engageTestServer(
157
+ cepUrl,
158
+ sdkKey,
159
+ googleProjectId,
160
+ server,
161
+ appID,
162
+ tenantID
163
+ );
164
+ }
165
+ }
166
+
145
167
  /**
146
168
  * On Init Completed Listener
147
169
  *
@@ -409,9 +431,10 @@ export class Mapp {
409
431
  }
410
432
 
411
433
  /**
412
- * Check if permission for posting notifications on Android 13 and up is granted or not.
413
- * If permission is not granted, then system dialog will be invoked and shown.
414
- * @returns true if permission is granted, false if it is not
434
+ * Requests notification permission on Android 13 and up.
435
+ * If the runtime prompt is unavailable or the permission is blocked, native code
436
+ * falls back to opening the app notification settings screen.
437
+ * @returns true if permission is already granted or the user grants it, false otherwise
415
438
  */
416
439
  static requestPostNotificationPermission(): Promise<any> {
417
440
  if (Platform.OS == "android") {
@@ -7,7 +7,10 @@ import {
7
7
  Platform
8
8
  } from 'react-native';
9
9
 
10
- const RNMappPluginModule = NativeModules.RNMappPluginModule;
10
+ import NativeRNMappPluginModule from './specs/NativeRNMappPluginModule';
11
+
12
+ const RNMappPluginModule =
13
+ NativeRNMappPluginModule || NativeModules.RNMappPluginModule;
11
14
 
12
15
  class MappEventEmitter extends NativeEventEmitter {
13
16
 
@@ -9,13 +9,14 @@ Pod::Spec.new do |s|
9
9
  s.description = <<-DESC
10
10
  Mapp SDK for React Native
11
11
  DESC
12
- s.homepage = "https://github.com/MappCloud/React-native-plugin"
12
+ s.homepage = "https://github.com/mapp-digital/Mapp-Engage-ReactNative-Plugin"
13
13
  s.license = "MIT"
14
14
  s.author = "Mapp"
15
15
  s.platforms = { :ios => "10.0" }
16
- s.source = { :git => "https://github.com/MappCloud/React-native-plugin", :tag => "#{s.version}" }
16
+ s.source = { :git => "https://github.com/mapp-digital/Mapp-Engage-ReactNative-Plugin", :tag => "#{s.version}" }
17
17
 
18
18
  s.source_files = "ios/**/*.{h,c,m,swift}"
19
+ s.exclude_files = "ios/RNMappPluginTests/**/*"
19
20
  s.vendored_framework = "ios/Frameworks/AppoxeeSDK.xcframework", "ios/Frameworks/AppoxeeLocationServices.xcframework", "ios/Frameworks/AppoxeeInapp.xcframework"
20
21
  s.resources = "ios/Frameworks/AppoxeeSDKResources.bundle", "ios/Frameworks/AppoxeeInappResources.bundle"
21
22
  s.preserve_path = "ios/Frameworks/"
@@ -24,7 +25,5 @@ Pod::Spec.new do |s|
24
25
  s.frameworks = "WebKit"
25
26
  s.library = 'sqlite3'
26
27
  s.dependency "React"
27
- s.dependency 'RCT-Folly'
28
28
 
29
29
  end
30
-
@@ -1,16 +1,16 @@
1
- plugins {
2
- id("com.android.library")
3
- id("org.jetbrains.kotlin.android")
4
- id("com.facebook.react") // This is required for New Architecture & Codegen
1
+ apply plugin: "com.android.library"
2
+
3
+ def getExtOrDefault = { name, fallback ->
4
+ rootProject.ext.has(name) ? rootProject.ext.get(name) : fallback
5
5
  }
6
6
 
7
7
  android {
8
8
  namespace "com.reactlibrary"
9
- compileSdk = 36
9
+ compileSdk = getExtOrDefault("compileSdkVersion", 36)
10
10
 
11
11
  defaultConfig {
12
- minSdk = 24
13
- targetSdk = 36
12
+ minSdk = getExtOrDefault("minSdkVersion", 24)
13
+ targetSdk = getExtOrDefault("targetSdkVersion", 36)
14
14
  versionCode = 1
15
15
  versionName = "1.0"
16
16
  }
@@ -19,24 +19,44 @@ android {
19
19
  sourceCompatibility = JavaVersion.VERSION_17
20
20
  targetCompatibility = JavaVersion.VERSION_17
21
21
  }
22
+
23
+ testOptions {
24
+ unitTests {
25
+ returnDefaultValues = true
26
+ includeAndroidResources = true
27
+ }
28
+ }
22
29
  }
23
30
 
24
31
  dependencies {
25
- implementation "com.facebook.react:react-android:0.81.4"
26
- implementation "org.jetbrains.kotlin:kotlin-stdlib:2.2.20"
27
- implementation 'com.google.code.gson:gson:2.13.2'
32
+ //noinspection GradleDynamicVersion
33
+ implementation "com.facebook.react:react-native:+"
34
+ constraints {
35
+ implementation("androidx.core:core") {
36
+ version {
37
+ strictly "1.18.0"
38
+ }
39
+ because "androidx.core 1.19.0 requires AGP 9.1+, while React Native dependencies currently require the app to stay on AGP 8"
40
+ }
41
+ implementation("androidx.core:core-ktx") {
42
+ version {
43
+ strictly "1.18.0"
44
+ }
45
+ because "androidx.core-ktx 1.19.0 requires AGP 9.1+, while React Native dependencies currently require the app to stay on AGP 8"
46
+ }
47
+ }
48
+ implementation 'com.google.code.gson:gson:2.14.0'
28
49
  implementation 'androidx.appcompat:appcompat:1.7.1'
29
- implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.4'
30
- implementation platform('com.google.firebase:firebase-bom:34.5.0')
50
+ implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7'
51
+ implementation platform('com.google.firebase:firebase-bom:33.16.0')
31
52
  implementation('com.google.firebase:firebase-messaging')
32
53
  api('com.google.android.gms:play-services-location:21.3.0')
33
- implementation 'androidx.media:media:1.7.1'
54
+ implementation 'androidx.media:media:1.8.0'
34
55
  implementation 'androidx.legacy:legacy-support-v13:1.0.0'
35
- implementation("com.mapp.sdk:mapp-android:6.1.3")
56
+ implementation("com.mapp.sdk:engage-android:7.1.1")
57
+ testImplementation 'junit:junit:4.13.2'
58
+ testImplementation 'org.mockito:mockito-core:5.23.0'
59
+ testImplementation 'org.mockito:mockito-inline:5.2.0'
60
+ testImplementation 'org.json:json:20260522'
61
+ testImplementation 'org.robolectric:robolectric:4.16.1'
36
62
  }
37
-
38
- react {
39
- jsRootDir = rootDir
40
- libraryName = "RNMappPlugin"
41
- codegenJavaPackageName = "com.reactlibrary"
42
- }
@@ -0,0 +1,12 @@
1
+ #This file is generated by updateDaemonJvm
2
+ toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ec7520a1e057cd116f9544c42142a16b/redirect
3
+ toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/4c4f879899012ff0a8b2e2117df03b0e/redirect
4
+ toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ec7520a1e057cd116f9544c42142a16b/redirect
5
+ toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/4c4f879899012ff0a8b2e2117df03b0e/redirect
6
+ toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/73bcfb608d1fde9fb62e462f834a3299/redirect
7
+ toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/846ee0d876d26a26f37aa1ce8de73224/redirect
8
+ toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ec7520a1e057cd116f9544c42142a16b/redirect
9
+ toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/4c4f879899012ff0a8b2e2117df03b0e/redirect
10
+ toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/9482ddec596298c84656d31d16652665/redirect
11
+ toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/39701d92e1756bb2f141eb67cd4c660e/redirect
12
+ toolchainVersion=21
@@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
7
7
  android.enableAapt2=false
@@ -39,6 +39,4 @@ newArchEnabled=true
39
39
  # If set to false, you will be using JSC instead.
40
40
  hermesEnabled=false
41
41
 
42
- NODE_BINARY=/Users/semsudin.tafilovic/.nvm/versions/node/v20.19.0/bin/node
43
-
44
42
  org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
@@ -0,0 +1,18 @@
1
+ #!/bin/sh
2
+
3
+ set -eu
4
+
5
+ APP_HOME=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
6
+ CLASSPATH="$APP_HOME/gradle/wrapper/gradle-wrapper.jar"
7
+
8
+ if [ -n "${JAVA_HOME:-}" ]; then
9
+ JAVACMD="$JAVA_HOME/bin/java"
10
+ else
11
+ JAVACMD="java"
12
+ fi
13
+
14
+ exec "$JAVACMD" \
15
+ -Dorg.gradle.appname=gradlew \
16
+ -classpath "$CLASSPATH" \
17
+ org.gradle.wrapper.GradleWrapperMain \
18
+ "$@"
@@ -0,0 +1,15 @@
1
+ @ECHO OFF
2
+ SETLOCAL
3
+
4
+ SET DIRNAME=%~dp0
5
+ IF "%DIRNAME%"=="" SET DIRNAME=.
6
+ SET APP_HOME=%DIRNAME%
7
+ SET CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8
+
9
+ IF DEFINED JAVA_HOME (
10
+ SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
11
+ ) ELSE (
12
+ SET JAVA_EXE=java.exe
13
+ )
14
+
15
+ "%JAVA_EXE%" -Dorg.gradle.appname=gradlew -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
@@ -5,9 +5,8 @@ pluginManagement {
5
5
  gradlePluginPortal()
6
6
  }
7
7
  plugins {
8
- id("com.android.library") version("8.13.0") // 👈 for library
9
- id("com.facebook.react") version("0.81.4") // 👈 for React Native
10
- id("org.jetbrains.kotlin.android") version("2.2.20") // 👈 for Kotlin
8
+ id("com.android.library") version("9.1.1") // 👈 for library
9
+ id("com.facebook.react") version("0.84.1") // 👈 for React Native
11
10
  }
12
11
  }
13
12
 
@@ -21,4 +20,3 @@ dependencyResolutionManagement {
21
20
  includeBuild("../node_modules/@react-native/gradle-plugin")
22
21
 
23
22
  rootProject.name="MappEngagePlugin"
24
- include(":MappEngagePlugin")
@@ -8,8 +8,6 @@ import android.os.Bundle;
8
8
 
9
9
 
10
10
 
11
- import com.appoxee.Appoxee;
12
-
13
11
  /**
14
12
  * Created by Aleksandar Marinkovic on 1/30/19.
15
13
  * Copyright (c) 2019 MAPP.
@@ -27,14 +25,14 @@ public class ActivityListener extends Activity {
27
25
  launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
28
26
  launchIntent.setPackage(this.getPackageName());
29
27
  startActivity(launchIntent);
30
- Appoxee.handleRichPush(this,intent);
28
+ // handleRichPush() removed in SDK v7
31
29
  finish();
32
30
  }
33
31
 
34
32
  @Override
35
33
  protected void onNewIntent(Intent intent) {
36
34
  super.onNewIntent(intent);
37
- Appoxee.handleRichPush(this, intent);
35
+ // handleRichPush() removed in SDK v7
38
36
  }
39
37
 
40
38
  private Intent getDefaultActivityIntent() {
@@ -27,7 +27,7 @@ public class HelperActivity extends Activity {
27
27
  return;
28
28
  }
29
29
 
30
- if (intent.getAction() != null && !intent.getAction().equals("")) {
30
+ if (intent.getAction() != null && !intent.getAction().isEmpty()) {
31
31
  Intent launchIntent = getDefaultActivityIntent();
32
32
  launchIntent.setPackage(this.getPackageName());
33
33
  launchIntent.putExtra("action", intent.getAction());
@@ -56,7 +56,7 @@ public class HelperActivity extends Activity {
56
56
  String packageName = getPackageName();
57
57
 
58
58
  if (Objects.equals(name.getPackageName(), packageName)) {
59
- if (intent.getAction() != null && !intent.getAction().equals("")) {
59
+ if (intent.getAction() != null && !intent.getAction().isEmpty()) {
60
60
  EventEmitter.shared().sendEvent(new IntentNotificationEvent(Objects.requireNonNull(intent.getData()), intent.getAction()));
61
61
  }
62
62
  }
@@ -5,38 +5,43 @@ import android.util.Log;
5
5
  import androidx.annotation.NonNull;
6
6
 
7
7
  import com.appoxee.Appoxee;
8
- import com.appoxee.internal.logger.LoggerFactory;
8
+ import com.appoxee.shared.AppoxeeOptions;
9
9
  import com.google.firebase.messaging.FirebaseMessagingService;
10
10
  import com.google.firebase.messaging.RemoteMessage;
11
11
 
12
- import java.util.Map;
13
12
  import java.util.concurrent.TimeUnit;
14
13
 
15
14
 
15
+ /**
16
+ * Updated for Engage SDK v7:
17
+ * - isPushMessageFromMapp() replaces data.containsKey("p") check
18
+ * - handlePushMessage() replaces setRemoteMessage()
19
+ * - updateFirebaseToken() replaces setToken()
20
+ */
16
21
  public class MessageService extends FirebaseMessagingService {
22
+
17
23
  @Override
18
24
  public void onCreate() {
19
25
  super.onCreate();
20
- Appoxee.engage(getApplication());
26
+ Appoxee.engage(getApplication(), null);
21
27
  }
22
28
 
23
29
  @Override
24
30
  public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {
25
31
  Log.d("onMessageReceived", remoteMessage.toString());
26
- Map<String, String> data = remoteMessage.getData();
27
- if (data.containsKey("p")) {
32
+ if (Appoxee.instance().isPushMessageFromMapp(remoteMessage)) {
28
33
  waitInitialization();
29
- Appoxee.instance().setRemoteMessage(remoteMessage);
34
+ Appoxee.instance().handlePushMessage(remoteMessage);
30
35
  } else {
31
36
  super.onMessageReceived(remoteMessage);
32
37
  }
33
38
  }
34
39
 
35
40
  @Override
36
- public void onNewToken(@NonNull String s) {
41
+ public void onNewToken(@NonNull String token) {
37
42
  waitInitialization();
38
- Appoxee.instance().setToken(s);
39
- super.onNewToken(s);
43
+ Appoxee.instance().updateFirebaseToken(token).enqueue(result -> {});
44
+ super.onNewToken(token);
40
45
  }
41
46
 
42
47
  private void waitInitialization() {
@@ -47,7 +52,7 @@ public class MessageService extends FirebaseMessagingService {
47
52
  limit--;
48
53
  }
49
54
  } catch (Exception e) {
50
- LoggerFactory.getDevLogger().e(e.getMessage());
55
+ Log.e("MessageService", "waitInitialization interrupted", e);
51
56
  }
52
57
  }
53
58
  }
@@ -2,43 +2,50 @@ package com.reactlibrary;
2
2
 
3
3
  import android.util.Log;
4
4
 
5
- import com.appoxee.push.PushData;
6
- import com.appoxee.push.PushDataReceiver;
5
+ import com.appoxee.shared.LocalPushBroadcast;
6
+ import com.appoxee.shared.MappPush;
7
+
7
8
  /**
8
9
  * Created by Aleksandar Marinkovic on 2019-05-15.
9
10
  * Copyright (c) 2019 MAPP.
11
+ *
12
+ * Updated for Engage SDK v7: extends LocalPushBroadcast instead of PushDataReceiver.
10
13
  */
11
- public class MyPushBroadcastReceiver extends PushDataReceiver {
12
- @Override
13
- public void onPushReceived(PushData pushData) {
14
- Log.d("APX", "Push received " + pushData);
14
+ public class MyPushBroadcastReceiver extends LocalPushBroadcast {
15
15
 
16
- EventEmitter.shared().sendEvent(new PushNotificationEvent(pushData,"onPushReceived"));
17
- super.onPushReceived(pushData);
16
+ @Override
17
+ public void onReceived(MappPush mappPush) {
18
+ Log.d("APX", "Push received " + mappPush);
19
+ EventEmitter.shared().sendEvent(new PushNotificationEvent(mappPush, "onPushReceived"));
18
20
  }
19
21
 
20
22
  @Override
21
- public void onPushOpened(PushData pushData) {
22
- Log.d("APX", "Push opened " + pushData);
23
- EventEmitter.shared().sendEvent(new PushNotificationEvent(pushData,"onPushOpened"));
24
- super.onPushOpened(pushData);
23
+ public void onOpened(MappPush mappPush) {
24
+ Log.d("APX", "Push opened " + mappPush);
25
+ EventEmitter.shared().sendEvent(new PushNotificationEvent(mappPush, "onPushOpened"));
25
26
  }
26
27
 
27
28
  @Override
28
- public void onPushDismissed(PushData pushData) {
29
- Log.d("APX", "Push dismissed " + pushData);
30
- EventEmitter.shared().sendEvent(new PushNotificationEvent(pushData,"onPushDismissed"));
31
- super.onPushDismissed(pushData);
29
+ public void onDismissed(MappPush mappPush) {
30
+ Log.d("APX", "Push dismissed " + mappPush);
31
+ EventEmitter.shared().sendEvent(new PushNotificationEvent(mappPush, "onPushDismissed"));
32
32
  }
33
33
 
34
-
35
34
  @Override
36
- public void onSilentPush(PushData pushData) {
37
- Log.d("APX", "Push Silent " + pushData);
38
- EventEmitter.shared().sendEvent(new PushNotificationEvent(pushData,"onSilentPush"));
39
- super.onSilentPush(pushData);
40
-
35
+ public void onSilent(MappPush mappPush) {
36
+ Log.d("APX", "Push silent " + mappPush);
37
+ EventEmitter.shared().sendEvent(new PushNotificationEvent(mappPush, "onSilentPush"));
41
38
  }
42
39
 
40
+ @Override
41
+ public void onButtonClick(MappPush mappPush) {
42
+ Log.d("APX", "Push button clicked " + mappPush);
43
+ EventEmitter.shared().sendEvent(new PushNotificationEvent(mappPush, "onPushButtonClicked"));
44
+ }
43
45
 
46
+ @Override
47
+ public void onRichPush(MappPush mappPush) {
48
+ Log.d("APX", "Rich push " + mappPush);
49
+ EventEmitter.shared().sendEvent(new PushNotificationEvent(mappPush, "onRichPush"));
50
+ }
44
51
  }