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
@@ -0,0 +1,232 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJavaSpec.js
9
+ *
10
+ * @nolint
11
+ */
12
+
13
+ package com.reactlibrary;
14
+
15
+ import com.facebook.proguard.annotations.DoNotStrip;
16
+ import com.facebook.react.bridge.Promise;
17
+ import com.facebook.react.bridge.ReactApplicationContext;
18
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
19
+ import com.facebook.react.bridge.ReactMethod;
20
+ import com.facebook.react.bridge.ReadableArray;
21
+ import com.facebook.react.bridge.ReadableMap;
22
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
23
+ import javax.annotation.Nonnull;
24
+
25
+ public abstract class NativeRNMappPluginModuleSpec extends ReactContextBaseJavaModule implements TurboModule {
26
+ public static final String NAME = "RNMappPluginModule";
27
+
28
+ public NativeRNMappPluginModuleSpec(ReactApplicationContext reactContext) {
29
+ super(reactContext);
30
+ }
31
+
32
+ @Override
33
+ public @Nonnull String getName() {
34
+ return NAME;
35
+ }
36
+
37
+ @ReactMethod
38
+ @DoNotStrip
39
+ public abstract void requestGeofenceLocationPermission(Promise promise);
40
+
41
+ @ReactMethod
42
+ @DoNotStrip
43
+ public abstract void requestPostNotificationPermission(Promise promise);
44
+
45
+ @ReactMethod
46
+ @DoNotStrip
47
+ public abstract void setRemoteMessage(String msgJson, Promise promise);
48
+
49
+ @ReactMethod
50
+ @DoNotStrip
51
+ public abstract void isPushFromMapp(String msgJson, Promise promise);
52
+
53
+ @ReactMethod
54
+ @DoNotStrip
55
+ public abstract void setToken(String token, Promise promise);
56
+
57
+ @ReactMethod
58
+ @DoNotStrip
59
+ public abstract void getToken(Promise promise);
60
+
61
+ @ReactMethod
62
+ @DoNotStrip
63
+ public abstract void setAlias(String alias, Promise promise);
64
+
65
+ @ReactMethod
66
+ @DoNotStrip
67
+ public abstract void setAliasWithResend(String alias, boolean resendCustomAttributes, Promise promise);
68
+
69
+ @ReactMethod
70
+ @DoNotStrip
71
+ public abstract void getAlias(Promise promise);
72
+
73
+ @ReactMethod
74
+ @DoNotStrip
75
+ public abstract void engage2();
76
+
77
+ @ReactMethod
78
+ @DoNotStrip
79
+ public abstract void engage(String sdkKey, String googleProjectId, String server, String appID, String tenantID);
80
+
81
+ @ReactMethod
82
+ @DoNotStrip
83
+ public abstract void engageTestServer(String cepURl, String sdkKey, String googleProjectId, String server, String appID, String tenantID);
84
+
85
+ @ReactMethod
86
+ @DoNotStrip
87
+ public abstract void onInitCompletedListener(Promise promise);
88
+
89
+ @ReactMethod
90
+ @DoNotStrip
91
+ public abstract void isReady(Promise promise);
92
+
93
+ @ReactMethod
94
+ @DoNotStrip
95
+ public abstract void setPushEnabled(boolean optIn);
96
+
97
+ @ReactMethod
98
+ @DoNotStrip
99
+ public abstract void isPushEnabled(Promise promise);
100
+
101
+ @ReactMethod
102
+ @DoNotStrip
103
+ public abstract void setAttributes(ReadableMap attributes, Promise promise);
104
+
105
+ @ReactMethod
106
+ @DoNotStrip
107
+ public abstract void getAttributes(ReadableArray keys, Promise promise);
108
+
109
+ @ReactMethod
110
+ @DoNotStrip
111
+ public abstract void setAttribute(String key, String value);
112
+
113
+ @ReactMethod
114
+ @DoNotStrip
115
+ public abstract void setAttributeBoolean(String key, boolean value);
116
+
117
+ @ReactMethod
118
+ @DoNotStrip
119
+ public abstract void setAttributeInt(String key, double value);
120
+
121
+ @ReactMethod
122
+ @DoNotStrip
123
+ public abstract void removeAttribute(String attribute);
124
+
125
+ @ReactMethod
126
+ @DoNotStrip
127
+ public abstract void getAttributeStringValue(String key, Promise promise);
128
+
129
+ @ReactMethod
130
+ @DoNotStrip
131
+ public abstract void addTag(String tag);
132
+
133
+ @ReactMethod
134
+ @DoNotStrip
135
+ public abstract void removeTag(String tag);
136
+
137
+ @ReactMethod
138
+ @DoNotStrip
139
+ public abstract void getTags(Promise promise);
140
+
141
+ @ReactMethod
142
+ @DoNotStrip
143
+ public abstract void getDeviceInfo(Promise promise);
144
+
145
+ @ReactMethod
146
+ @DoNotStrip
147
+ public abstract void getDeviceDmcInfo(Promise promise);
148
+
149
+ @ReactMethod
150
+ @DoNotStrip
151
+ public abstract void isDeviceRegistered(Promise promise);
152
+
153
+ @ReactMethod
154
+ @DoNotStrip
155
+ public abstract void lockScreenOrientation(double orientation);
156
+
157
+ @ReactMethod
158
+ @DoNotStrip
159
+ public abstract void removeBadgeNumber();
160
+
161
+ @ReactMethod
162
+ @DoNotStrip
163
+ public abstract void startGeofencing(Promise promise);
164
+
165
+ @ReactMethod
166
+ @DoNotStrip
167
+ public abstract void stopGeofencing(Promise promise);
168
+
169
+ @ReactMethod
170
+ @DoNotStrip
171
+ public abstract void startGeoFencing();
172
+
173
+ @ReactMethod
174
+ @DoNotStrip
175
+ public abstract void stopGeoFencing();
176
+
177
+ @ReactMethod
178
+ @DoNotStrip
179
+ public abstract void fetchLatestInboxMessage(Promise promise);
180
+
181
+ @ReactMethod
182
+ @DoNotStrip
183
+ public abstract void fetchInboxMessage(Promise promise);
184
+
185
+ @ReactMethod
186
+ @DoNotStrip
187
+ public abstract void triggerInApp(String key);
188
+
189
+ @ReactMethod
190
+ @DoNotStrip
191
+ public abstract void inAppMarkAsRead(double templateId, String eventId);
192
+
193
+ @ReactMethod
194
+ @DoNotStrip
195
+ public abstract void inAppMarkAsUnRead(double templateId, String eventId);
196
+
197
+ @ReactMethod
198
+ @DoNotStrip
199
+ public abstract void inAppMarkAsDeleted(double templateId, String eventId);
200
+
201
+ @ReactMethod
202
+ @DoNotStrip
203
+ public abstract void triggerStatistic(double templateId, String originalEventId, String trackingKey, double displayMillis, String reason, String link);
204
+
205
+ @ReactMethod
206
+ @DoNotStrip
207
+ public abstract void addAndroidListener(String eventName);
208
+
209
+ @ReactMethod
210
+ @DoNotStrip
211
+ public abstract void removeAndroidListeners(double count);
212
+
213
+ @ReactMethod
214
+ @DoNotStrip
215
+ public abstract void addListener(String eventName);
216
+
217
+ @ReactMethod
218
+ @DoNotStrip
219
+ public abstract void removeListeners(double count);
220
+
221
+ @ReactMethod
222
+ @DoNotStrip
223
+ public abstract void clearNotifications();
224
+
225
+ @ReactMethod
226
+ @DoNotStrip
227
+ public abstract void clearNotification(double id);
228
+
229
+ @ReactMethod
230
+ @DoNotStrip
231
+ public abstract void logOut(boolean pushEnabled);
232
+ }
@@ -2,7 +2,7 @@ package com.reactlibrary;
2
2
 
3
3
  import androidx.annotation.NonNull;
4
4
 
5
- import com.appoxee.push.PushData;
5
+ import com.appoxee.shared.MappPush;
6
6
  import com.facebook.react.bridge.WritableMap;
7
7
 
8
8
  /**
@@ -25,10 +25,10 @@ public class PushNotificationEvent implements Event {
25
25
  return RNUtils.getPushMessageToJSon(message, type);
26
26
  }
27
27
 
28
- private final PushData message;
28
+ private final MappPush message;
29
29
  private final String type;
30
30
 
31
- public PushNotificationEvent(@NonNull PushData message, String type) {
31
+ public PushNotificationEvent(@NonNull MappPush message, String type) {
32
32
  this.message = message;
33
33
  this.type = type;
34
34
  }