react-native-mapp-plugin 1.1.1 → 1.1.2

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 (44) hide show
  1. package/android/.classpath +1 -1
  2. package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  3. package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  4. package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  5. package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  6. package/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  7. package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
  8. package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  9. package/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  10. package/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  11. package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  12. package/android/.gradle/7.5.1/fileHashes/resourceHashesCache.bin +0 -0
  13. package/android/.gradle/7.5.1/gc.properties +0 -0
  14. package/android/.gradle/8.2/checksums/checksums.lock +0 -0
  15. package/android/.gradle/8.2/checksums/md5-checksums.bin +0 -0
  16. package/android/.gradle/8.2/checksums/sha1-checksums.bin +0 -0
  17. package/android/.gradle/8.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  18. package/android/.gradle/8.2/dependencies-accessors/gc.properties +0 -0
  19. package/android/.gradle/8.2/executionHistory/executionHistory.lock +0 -0
  20. package/android/.gradle/8.2/fileChanges/last-build.bin +0 -0
  21. package/android/.gradle/8.2/fileHashes/fileHashes.bin +0 -0
  22. package/android/.gradle/8.2/fileHashes/fileHashes.lock +0 -0
  23. package/android/.gradle/8.2/fileHashes/resourceHashesCache.bin +0 -0
  24. package/android/.gradle/8.2/gc.properties +0 -0
  25. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  26. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  27. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  28. package/android/.gradle/config.properties +2 -0
  29. package/android/.gradle/file-system.probe +0 -0
  30. package/android/.idea/compiler.xml +6 -0
  31. package/android/.idea/gradle.xml +19 -0
  32. package/android/.idea/migrations.xml +10 -0
  33. package/android/.idea/misc.xml +9 -0
  34. package/android/.idea/vcs.xml +6 -0
  35. package/android/.settings/org.eclipse.buildship.core.prefs +2 -2
  36. package/android/build.gradle +16 -16
  37. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  38. package/android/local.properties +8 -0
  39. package/android/src/main/AndroidManifest.xml +0 -1
  40. package/android/src/main/java/com/reactlibrary/ActivityListener.java +1 -0
  41. package/android/src/main/java/com/reactlibrary/HelperActivity.java +9 -17
  42. package/android/src/main/java/com/reactlibrary/MyPushBroadcastReceiver.java +1 -0
  43. package/android/src/main/java/com/reactlibrary/RNMappPluginModule.java +41 -76
  44. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <classpath>
3
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
3
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
4
4
  <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5
5
  <classpathentry kind="output" path="bin/default"/>
6
6
  </classpath>
File without changes
File without changes
@@ -1,2 +1,2 @@
1
- #Tue Oct 31 15:25:54 CET 2023
2
- gradle.version=7.4.2
1
+ #Tue Feb 13 16:23:41 CET 2024
2
+ gradle.version=8.2
@@ -0,0 +1,2 @@
1
+ #Wed Feb 07 19:16:56 CET 2024
2
+ java.home=/Applications/Android Studio.app/Contents/jbr/Contents/Home
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="CompilerConfiguration">
4
+ <bytecodeTargetLevel target="17" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="GradleMigrationSettings" migrationVersion="1" />
4
+ <component name="GradleSettings">
5
+ <option name="linkedExternalProjectsSettings">
6
+ <GradleProjectSettings>
7
+ <option name="externalProjectPath" value="$PROJECT_DIR$" />
8
+ <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
9
+ <option name="modules">
10
+ <set>
11
+ <option value="$PROJECT_DIR$" />
12
+ <option value="$PROJECT_DIR$/app" />
13
+ </set>
14
+ </option>
15
+ <option name="resolveExternalAnnotations" value="false" />
16
+ </GradleProjectSettings>
17
+ </option>
18
+ </component>
19
+ </project>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectMigrations">
4
+ <option name="MigrateToGradleLocalJavaHome">
5
+ <set>
6
+ <option value="$PROJECT_DIR$" />
7
+ </set>
8
+ </option>
9
+ </component>
10
+ </project>
@@ -0,0 +1,9 @@
1
+ <project version="4">
2
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
3
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
4
+ <output url="file://$PROJECT_DIR$/build/classes" />
5
+ </component>
6
+ <component name="ProjectType">
7
+ <option name="id" value="Android" />
8
+ </component>
9
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
+ </component>
6
+ </project>
@@ -1,11 +1,11 @@
1
1
  arguments=--init-script /var/folders/t6/pvjmf_n16v706r03q_t_vlx58tvf6j/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/t6/pvjmf_n16v706r03q_t_vlx58tvf6j/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
2
2
  auto.sync=true
3
3
  build.scans.enabled=false
4
- connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.4.2))
4
+ connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5
5
  connection.project.dir=
6
6
  eclipse.preferences.version=1
7
7
  gradle.user.home=
8
- java.home=/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
8
+ java.home=/Users/semsudin.tafilovic/Library/Java/JavaVirtualMachines/jbr-17.0.9/Contents/Home
9
9
  jvm.arguments=
10
10
  offline.mode=false
11
11
  override.workspace.settings=true
@@ -9,10 +9,9 @@ buildscript {
9
9
  // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
10
10
  url "$rootDir/../node_modules/react-native/android"
11
11
  }
12
- jcenter()
13
12
  }
14
13
  dependencies {
15
- classpath('com.android.tools.build:gradle:7.3.1')
14
+ classpath('com.android.tools.build:gradle:8.2.2')
16
15
  //classpath('com.google.gms:google-services:4.3.15')
17
16
  //classpath("com.facebook.react:react-native-gradle-plugin")
18
17
  // NOTE: Do not place your application dependencies here; they belong
@@ -23,8 +22,8 @@ buildscript {
23
22
  allprojects {
24
23
  repositories {
25
24
  google()
25
+ mavenLocal()
26
26
  mavenCentral()
27
- jcenter()
28
27
  maven { url "https://maven.google.com/" }
29
28
  }
30
29
  }
@@ -35,12 +34,13 @@ def safeExtGet(prop, fallback) {
35
34
  }
36
35
 
37
36
  android {
38
- compileSdkVersion safeExtGet('compileSdkVersion', 33)
39
- buildToolsVersion safeExtGet('buildToolsVersion', '33.0.1')
37
+ namespace 'com.reactlibrary'
38
+ compileSdkVersion safeExtGet('compileSdkVersion', 34)
39
+ buildToolsVersion safeExtGet('buildToolsVersion', '34.0.0')
40
40
 
41
41
  defaultConfig {
42
42
  minSdkVersion safeExtGet('minSdkVersion', 21)
43
- targetSdkVersion safeExtGet('targetSdkVersion', 33)
43
+ targetSdkVersion safeExtGet('targetSdkVersion', 34)
44
44
  versionCode 1
45
45
  versionName '1.0'
46
46
  }
@@ -54,18 +54,18 @@ android {
54
54
  }
55
55
 
56
56
  dependencies {
57
- implementation("com.facebook.react:react-native:+")
58
- implementation 'com.google.code.gson:gson:2.8.5'
59
- implementation 'com.google.dagger:dagger:2.24'
60
- implementation 'androidx.appcompat:appcompat:1.6.0'
61
- implementation "androidx.lifecycle:lifecycle-viewmodel:2.5.1"
62
- implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
57
+ implementation('com.facebook.react:react-native:0.20.1')
58
+ implementation 'com.google.code.gson:gson:2.10.1'
59
+ //implementation 'com.google.dagger:dagger:2.24'
60
+ implementation 'androidx.appcompat:appcompat:1.6.1'
61
+ implementation 'androidx.lifecycle:lifecycle-viewmodel:2.7.0'
62
+ implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
63
63
  annotationProcessor 'com.google.dagger:dagger-compiler:2.24'
64
- implementation platform('com.google.firebase:firebase-bom:29.0.4')
64
+ implementation platform('com.google.firebase:firebase-bom:32.7.1')
65
65
  implementation('com.google.firebase:firebase-messaging')
66
- api('com.google.android.gms:play-services-location:21.0.1')
67
- implementation 'androidx.media:media:1.6.0'
66
+ api('com.google.android.gms:play-services-location:21.1.0')
67
+ implementation 'androidx.media:media:1.7.0'
68
68
  implementation 'androidx.legacy:legacy-support-v13:1.0.0'
69
- implementation("com.mapp.sdk:mapp-android:6.0.20.2")
69
+ implementation("com.mapp.sdk:mapp-android:6.0.21")
70
70
  }
71
71
 
@@ -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-7.5.1-all.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
7
7
  android.enableAapt2=false
@@ -0,0 +1,8 @@
1
+ ## This file must *NOT* be checked into Version Control Systems,
2
+ # as it contains information specific to your local configuration.
3
+ #
4
+ # Location of the SDK. This is only used by Gradle.
5
+ # For customization when using a Version Control System, please read the
6
+ # header note.
7
+ #Wed Feb 07 19:16:56 CET 2024
8
+ sdk.dir=/Users/semsudin.tafilovic/Library/Android/sdk
@@ -42,7 +42,6 @@
42
42
  <category android:name="${applicationId}" />
43
43
 
44
44
  </intent-filter>
45
-
46
45
  </activity>
47
46
  <service
48
47
  android:name="com.appoxee.push.fcm.MappMessagingService"
@@ -25,6 +25,7 @@ public class ActivityListener extends Activity {
25
25
  launchIntent.putExtra("action", intent.getAction());
26
26
  launchIntent.setData(intent.getData());
27
27
  launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
28
+ launchIntent.setPackage(this.getPackageName());
28
29
  startActivity(launchIntent);
29
30
  Appoxee.handleRichPush(this,intent);
30
31
  finish();
@@ -27,24 +27,16 @@ public class HelperActivity extends Activity {
27
27
  return;
28
28
  }
29
29
 
30
- ComponentName name = intent.getComponent();
31
- String packageName = getPackageName();
32
-
33
- if (Objects.equals(name.getPackageName(), packageName)) {
34
- if (intent.getAction() != null && !intent.getAction().equals("")) {
35
- Intent launchIntent = getDefaultActivityIntent();
36
- ComponentName launcherComponent = launchIntent.getComponent();
30
+ if (intent.getAction() != null && !intent.getAction().equals("")) {
31
+ Intent launchIntent = getDefaultActivityIntent();
32
+ launchIntent.setPackage(this.getPackageName());
33
+ launchIntent.putExtra("action", intent.getAction());
34
+ launchIntent.setData(intent.getData());
35
+ launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
36
+ startActivity(launchIntent);
37
37
 
38
- if (Objects.equals(launcherComponent.getPackageName(), packageName)) {
39
- launchIntent.putExtra("action", intent.getAction());
40
- launchIntent.setData(intent.getData());
41
- launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
42
- startActivity(launchIntent);
43
- }
44
-
45
- EventEmitter.shared().sendEvent(new IntentNotificationEvent(Objects.requireNonNull(intent.getData()), intent.getAction()));
46
- finish();
47
- }
38
+ EventEmitter.shared().sendEvent(new IntentNotificationEvent(Objects.requireNonNull(intent.getData()), intent.getAction()));
39
+ finish();
48
40
  }
49
41
  }
50
42
 
@@ -12,6 +12,7 @@ public class MyPushBroadcastReceiver extends PushDataReceiver {
12
12
  @Override
13
13
  public void onPushReceived(PushData pushData) {
14
14
  Log.d("APX", "Push received " + pushData);
15
+
15
16
  EventEmitter.shared().sendEvent(new PushNotificationEvent(pushData,"onPushReceived"));
16
17
  super.onPushReceived(pushData);
17
18
  }
@@ -2,18 +2,14 @@
2
2
  package com.reactlibrary;
3
3
 
4
4
  import android.Manifest;
5
- import android.app.Activity;
6
5
  import android.app.Application;
7
6
  import android.content.pm.ActivityInfo;
8
7
  import android.content.pm.PackageManager;
9
8
  import android.os.Build;
10
- import android.util.Log;
11
- import android.widget.Toast;
12
9
 
13
10
  import androidx.annotation.Nullable;
14
11
  import androidx.core.app.NotificationManagerCompat;
15
12
  import androidx.core.content.ContextCompat;
16
- import androidx.fragment.app.FragmentActivity;
17
13
 
18
14
  import com.appoxee.Appoxee;
19
15
  import com.appoxee.AppoxeeOptions;
@@ -25,6 +21,7 @@ import com.appoxee.internal.inapp.model.InAppStatistics;
25
21
  import com.appoxee.internal.inapp.model.MessageContext;
26
22
  import com.appoxee.internal.inapp.model.Tracking;
27
23
  import com.appoxee.internal.inapp.model.TrackingAttributes;
24
+ import com.appoxee.internal.permission.PermissionHelper;
28
25
  import com.appoxee.internal.permission.PermissionsCallback;
29
26
  import com.appoxee.internal.permission.PermissionsManager;
30
27
  import com.appoxee.internal.service.AppoxeeServiceAdapter;
@@ -41,14 +38,12 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
41
38
  import com.facebook.react.bridge.ReactMethod;
42
39
  import com.facebook.react.bridge.WritableArray;
43
40
  import com.facebook.react.bridge.WritableMap;
44
- import com.facebook.react.bridge.WritableNativeArray;
45
41
  import com.facebook.react.bridge.WritableNativeMap;
46
42
  import com.google.firebase.messaging.RemoteMessage;
47
43
 
48
44
  import org.json.JSONException;
49
45
  import org.json.JSONObject;
50
46
 
51
- import java.util.ArrayList;
52
47
  import java.util.Iterator;
53
48
  import java.util.List;
54
49
  import java.util.Map;
@@ -116,77 +111,47 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
116
111
 
117
112
  @ReactMethod
118
113
  public void requestGeofenceLocationPermission(Promise promise) {
119
- if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M && getCurrentActivity() instanceof ReactActivity) {
120
- ReactActivity activity = (ReactActivity) getCurrentActivity();
121
- boolean fineLoc = activity
122
- .checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED;
123
- boolean backLoc = activity.checkSelfPermission(
124
- Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_GRANTED;
125
- boolean coarseLoc = activity.checkSelfPermission(
126
- Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED;
127
- boolean geofencePermission = false;
128
- List<String> requiredPermissions = new ArrayList<>();
129
- requiredPermissions.addAll(
130
- List.of(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION));
131
-
132
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
133
- geofencePermission = fineLoc;
134
- } else {
135
- geofencePermission = fineLoc && backLoc;
136
- }
137
-
138
- if (!geofencePermission) {
139
- activity.requestPermissions(requiredPermissions.toArray(new String[] {}), 1,
140
- (requestCode, permissions, results) -> {
141
- for (int i : results) {
142
- if (i != PackageManager.PERMISSION_GRANTED) {
143
- // Toast.makeText(activity, "PERMISSION NOT GRANTED",
144
- // Toast.LENGTH_SHORT).show();
145
- promise.resolve(false);
146
- return false;
147
- }
148
- }
149
- // Toast.makeText(activity, "PERMISSION GRANTED", Toast.LENGTH_SHORT).show();
150
- promise.resolve(true);
151
- return true;
152
- });
114
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
115
+ promise.resolve(true);
116
+ } else {
117
+ if (getCurrentActivity() instanceof ReactActivity) {
118
+ int fineLocation = getCurrentActivity().checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION);
119
+ int backgroundLocation = getCurrentActivity().checkSelfPermission(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
120
+
121
+ if (fineLocation != PermissionsManager.PERMISSION_GRANTED ||
122
+ backgroundLocation != PermissionsManager.PERMISSION_GRANTED) {
123
+ PermissionHelper.getInstance().openAppSystemSettings(getCurrentActivity());
124
+ promise.resolve(false);
125
+ } else {
126
+ promise.resolve(true);
127
+ }
153
128
  } else {
154
- // Toast.makeText(activity, "PERMISSION ALREADY GRANTED",
155
- // Toast.LENGTH_SHORT).show();
156
- promise.resolve(true);
129
+ promise.reject("Can't access activity for requesting permission!");
157
130
  }
158
- } else {
159
- promise.reject("Can't access activity for requesting permission!");
160
131
  }
161
132
  }
162
133
 
163
134
  @ReactMethod
164
135
  public void requestPostNotificationPermission(Promise promise) {
165
- if (Build.VERSION.SDK_INT > Build.VERSION_CODES.S_V2 && getCurrentActivity() instanceof ReactActivity) {
166
- ReactActivity activity = (ReactActivity) getCurrentActivity();
167
- if (activity
168
- .checkSelfPermission(Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
169
- activity.requestPermissions(new String[] { Manifest.permission.POST_NOTIFICATIONS }, 1,
170
- (requestCode, permissions, results) -> {
171
- for (int i : results) {
172
- if (i != PackageManager.PERMISSION_GRANTED) {
173
- // Toast.makeText(activity, "PERMISSION NOT GRANTED",
174
- // Toast.LENGTH_SHORT).show();
175
- promise.resolve(false);
176
- return false;
177
- }
178
- }
179
- // Toast.makeText(activity, "PERMISSION GRANTED", Toast.LENGTH_SHORT).show();
180
- promise.resolve(true);
181
- return true;
182
- });
136
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
137
+ promise.resolve(true);
138
+ } else {
139
+ if (getCurrentActivity() instanceof ReactActivity) {
140
+ ReactActivity activity = (ReactActivity) getCurrentActivity();
141
+ Appoxee.instance().requestNotificationsPermission(activity, new PermissionsCallback() {
142
+ @Override
143
+ public void onPermissionsResult(Map<String, Integer> map) {
144
+ if (map.containsKey(Manifest.permission.POST_NOTIFICATIONS)) {
145
+ Integer result = map.get(Manifest.permission.POST_NOTIFICATIONS);
146
+ promise.resolve(result == PermissionsManager.PERMISSION_GRANTED);
147
+ } else {
148
+ promise.resolve(false);
149
+ }
150
+ }
151
+ });
183
152
  } else {
184
- // Toast.makeText(activity, "PERMISSION ALREADY GRANTED",
185
- // Toast.LENGTH_SHORT).show();
186
- promise.resolve(true);
153
+ promise.reject("Can't access activity for requesting permission!");
187
154
  }
188
- } else {
189
- promise.reject("Can't access activity for requesting permission!");
190
155
  }
191
156
  }
192
157
 
@@ -267,7 +232,7 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
267
232
 
268
233
  @ReactMethod
269
234
  public void engageTestServer(String cepURl, String sdkKey, String googleProjectId, String server, String appID,
270
- String tenantID) {
235
+ String tenantID) {
271
236
  AppoxeeOptions opt = new AppoxeeOptions();
272
237
  opt.appID = appID;
273
238
  opt.sdkKey = sdkKey;
@@ -418,7 +383,7 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
418
383
  @ReactMethod
419
384
  public void fetchLatestInboxMessage(final Promise promise) {
420
385
 
421
- Appoxee.instance().fetchInboxMessages(reactContext.getApplicationContext());
386
+ Appoxee.instance().fetchInboxMessages();
422
387
 
423
388
  InAppInboxCallback inAppInboxCallback = new InAppInboxCallback();
424
389
  inAppInboxCallback.addInAppInboxMessagesReceivedCallback(new InAppInboxCallback.onInAppInboxMessagesReceived() {
@@ -447,7 +412,7 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
447
412
  @ReactMethod
448
413
  public void fetchInboxMessage(final Promise promise) {
449
414
 
450
- Appoxee.instance().fetchInboxMessages(reactContext.getApplicationContext());
415
+ Appoxee.instance().fetchInboxMessages();
451
416
 
452
417
  InAppInboxCallback inAppInboxCallback = new InAppInboxCallback();
453
418
  inAppInboxCallback.addInAppInboxMessagesReceivedCallback(new InAppInboxCallback.onInAppInboxMessagesReceived() {
@@ -498,8 +463,8 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
498
463
 
499
464
  @ReactMethod
500
465
  public void triggerStatistic(Integer templateId, String originalEventId,
501
- String trackingKey, Long displayMillis,
502
- String reason, String link) {
466
+ String trackingKey, Long displayMillis,
467
+ String reason, String link) {
503
468
  Appoxee.instance()
504
469
  .triggerStatistcs((reactContext.getApplicationContext()), getInAppStatisticsRequestObject(templateId,
505
470
  originalEventId, trackingKey, displayMillis, reason, link));
@@ -546,8 +511,8 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
546
511
  }
547
512
 
548
513
  private static InAppStatistics getInAppStatisticsRequestObject(int templateId, String originalEventId,
549
- String trackingKey, Long displayMillis,
550
- String reason, String link) {
514
+ String trackingKey, Long displayMillis,
515
+ String reason, String link) {
551
516
 
552
517
  InAppStatistics inAppStatistics = new InAppStatistics();
553
518
  // This will be received from the respective Screens.
@@ -675,7 +640,7 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
675
640
  .setCollapseKey(collapseKey);
676
641
 
677
642
  if (data != null) {
678
- for (Iterator<String> it = data.keys(); it.hasNext();) {
643
+ for (Iterator<String> it = data.keys(); it.hasNext(); ) {
679
644
  String k = it.next();
680
645
  builder.addData(k, data.getString(k));
681
646
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mapp-plugin",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Mapp SDK for React Native.",
5
5
  "main": "index.js",
6
6
  "keywords": [