react-native-mapp-plugin 1.0.11-beta8 → 1.1.0-beta01
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.
- package/.local-pack/settings.json +1 -0
- package/Mapp.js +48 -12
- package/RNMappPlugin.podspec +7 -4
- package/__package.json +2 -6
- package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/{5.6.4 → 7.5.1}/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/{5.6.4/executionHistory/executionHistory.bin → 7.5.1/fileHashes/resourceHashesCache.bin} +0 -0
- package/android/.gradle/7.5.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.gradle/file-system.probe +0 -0
- package/android/.idea/gradle.xml +1 -1
- package/android/.idea/jarRepositories.xml +20 -0
- package/android/.idea/libraries/Gradle__androidx_activity_activity_1_6_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_annotation_annotation_1_3_0.xml +11 -0
- package/android/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_3_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_6_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_6_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_1_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_autofill_autofill_1_1_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml +4 -4
- package/android/.idea/libraries/Gradle__androidx_core_core_1_9_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_core_core_ktx_1_9_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml +3 -4
- package/android/.idea/libraries/Gradle__androidx_fragment_fragment_1_3_6_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_legacy_legacy_support_v13_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_legacy_legacy_support_v4_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_5_1.xml +11 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_1_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_5_1_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_5_1_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_5_1_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_ktx_2_5_1_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_savedstate_2_5_1_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_media_media_1_6_0_aar.xml +16 -0
- package/android/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml +3 -4
- package/android/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_2_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml +3 -4
- package/android/.idea/libraries/Gradle__androidx_tracing_tracing_1_1_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_1_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__com_facebook_fbjni_fbjni_0_3_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_2_5_0_aar.xml +15 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_2_5_0_aar.xml +17 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_2_5_0_aar.xml +17 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_2_5_0_aar.xml +17 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_2_5_0_aar.xml +17 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_native_2_5_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_2_5_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_ashmem_2_5_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_java_2_5_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_native_2_5_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagefilters_2_5_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagetranscoder_2_5_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_fresco_ui_common_2_5_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_infer_annotation_infer_annotation_0_18_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_71_0_rc_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_annotation_0_10_4.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_nativeloader_0_10_4.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_10_4_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_yoga_proguard_annotations_1_19_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_android_datatransport_transport_api_3_0_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_android_datatransport_transport_backend_cct_3_0_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_android_datatransport_transport_runtime_3_0_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_base_18_1_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_18_1_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_cloud_messaging_17_0_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_location_21_0_1_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_stats_17_0_0_aar.xml +2 -3
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_18_0_2_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_2.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_code_gson_gson_2_9_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_annotations_16_0_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_common_20_0_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_components_17_0_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_datatransport_18_0_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_encoders_17_0_0.xml +13 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_encoders_json_18_0_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_iid_interop_17_1_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_installations_17_0_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_installations_interop_17_0_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_measurement_connector_19_0_0_aar.xml +12 -0
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_messaging_23_0_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__com_mapp_sdk_mapp_android_6_0_19_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_4_9_2.xml +13 -0
- package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_urlconnection_4_9_2.xml +13 -0
- package/android/.idea/libraries/Gradle__com_squareup_okio_okio_2_9_0.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_annotations_jvm_1_3_72.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_7_10.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_7_10.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_6_10.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk8_1_6_10.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_android_1_6_1.xml +13 -0
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm_1_6_1.xml +13 -0
- package/android/.idea/misc.xml +1 -1
- package/android/.idea/modules/android.androidTest.iml +132 -0
- package/android/.idea/modules/android.iml +6 -84
- package/android/.idea/modules/android.main.iml +137 -0
- package/android/.idea/modules/android.unitTest.iml +127 -0
- package/android/.idea/modules/app/android.app.iml +1 -6
- package/android/.idea/modules.xml +3 -0
- package/android/.project +2 -2
- package/android/.settings/org.eclipse.buildship.core.prefs +4 -4
- package/android/build.gradle +17 -21
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradle.properties +1 -0
- package/android/src/main/AndroidManifest.xml +12 -3
- package/android/src/main/java/com/reactlibrary/ActivityListener.java +1 -1
- package/android/src/main/java/com/reactlibrary/EventEmitter.java +15 -26
- package/android/src/main/java/com/reactlibrary/MessageService.java +3 -1
- package/android/src/main/java/com/reactlibrary/RNMappPluginModule.java +188 -48
- package/android/src/main/java/com/reactlibrary/RNMappPluginPackage.java +16 -16
- package/ios/Frameworks/AppoxeeSDK.framework/Versions/A/AppoxeeSDK +0 -0
- package/ios/RNMappEventEmmiter.h +3 -3
- package/ios/RNMappPluginModule.h +3 -3
- package/ios/RNMappPluginModule.m +8 -0
- package/package.json +5 -9
- package/android/.gradle/5.6.4/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/5.6.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.1.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.1.1/fileHashes/fileHashes.lock +0 -0
- package/android/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_core_core_1_2_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0.xml +0 -11
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_media_media_1_0_1_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_0_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_0_8_1_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_0_8_1_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_0_8_1_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_0_8_1_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp_0_8_1_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_20_1_aar.xml +0 -24
- package/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_1_2_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_stetho_stetho_okhttp_1_2_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_fasterxml_jackson_core_jackson_core_2_2_3.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_base_17_5_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_basement_17_5_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_location_18_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_places_placereport_17_0_0_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_android_gms_play_services_tasks_17_2_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_auto_value_auto_value_annotations_1_6_5.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_code_gson_gson_2_8_5.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_common_19_0_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_iid_20_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_iid_interop_17_0_0_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_measurement_connector_18_0_0_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_google_firebase_firebase_messaging_20_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_nineoldandroids_library_2_4_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_parse_bolts_bolts_android_1_1_4.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_2_5_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okhttp_okhttp_ws_2_5_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okio_okio_1_6_0.xml +0 -13
- package/android/.idea/libraries/Gradle__commons_cli_commons_cli_1_2.xml +0 -13
- package/android/.idea/libraries/Gradle__org_webkit_android_jsc_r174650_aar.xml +0 -11
- package/iospatch.sh +0 -13
- /package/android/.gradle/{5.6.4 → 7.4.2/dependencies-accessors}/gc.properties +0 -0
- /package/android/.gradle/{5.6.4 → 7.4.2}/fileChanges/last-build.bin +0 -0
- /package/android/.gradle/{7.1.1/dependencies-accessors → 7.4.2}/gc.properties +0 -0
- /package/android/.gradle/{7.1.1 → 7.5.1/dependencies-accessors}/gc.properties +0 -0
- /package/android/.gradle/{7.1.1 → 7.5.1}/fileChanges/last-build.bin +0 -0
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
package com.reactlibrary;
|
|
3
3
|
|
|
4
4
|
import android.Manifest;
|
|
5
|
+
import android.app.Activity;
|
|
5
6
|
import android.app.Application;
|
|
6
7
|
import android.content.pm.ActivityInfo;
|
|
7
8
|
import android.content.pm.PackageManager;
|
|
8
9
|
import android.os.Build;
|
|
9
10
|
import android.util.Log;
|
|
11
|
+
import android.widget.Toast;
|
|
10
12
|
|
|
11
13
|
import androidx.annotation.Nullable;
|
|
12
14
|
import androidx.core.app.NotificationManagerCompat;
|
|
13
15
|
import androidx.core.content.ContextCompat;
|
|
16
|
+
import androidx.fragment.app.FragmentActivity;
|
|
14
17
|
|
|
15
18
|
import com.appoxee.Appoxee;
|
|
16
19
|
import com.appoxee.AppoxeeOptions;
|
|
@@ -22,10 +25,13 @@ import com.appoxee.internal.inapp.model.InAppStatistics;
|
|
|
22
25
|
import com.appoxee.internal.inapp.model.MessageContext;
|
|
23
26
|
import com.appoxee.internal.inapp.model.Tracking;
|
|
24
27
|
import com.appoxee.internal.inapp.model.TrackingAttributes;
|
|
28
|
+
import com.appoxee.internal.permission.PermissionsCallback;
|
|
29
|
+
import com.appoxee.internal.permission.PermissionsManager;
|
|
25
30
|
import com.appoxee.internal.service.AppoxeeServiceAdapter;
|
|
26
31
|
import com.appoxee.internal.util.ResultCallback;
|
|
27
32
|
import com.appoxee.push.NotificationMode;
|
|
28
33
|
import com.appoxee.push.PushData;
|
|
34
|
+
import com.facebook.react.ReactActivity;
|
|
29
35
|
import com.facebook.react.bridge.Arguments;
|
|
30
36
|
import com.facebook.react.bridge.Callback;
|
|
31
37
|
import com.facebook.react.bridge.LifecycleEventListener;
|
|
@@ -35,12 +41,14 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
|
35
41
|
import com.facebook.react.bridge.ReactMethod;
|
|
36
42
|
import com.facebook.react.bridge.WritableArray;
|
|
37
43
|
import com.facebook.react.bridge.WritableMap;
|
|
44
|
+
import com.facebook.react.bridge.WritableNativeArray;
|
|
38
45
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
39
46
|
import com.google.firebase.messaging.RemoteMessage;
|
|
40
47
|
|
|
41
48
|
import org.json.JSONException;
|
|
42
49
|
import org.json.JSONObject;
|
|
43
50
|
|
|
51
|
+
import java.util.ArrayList;
|
|
44
52
|
import java.util.Iterator;
|
|
45
53
|
import java.util.List;
|
|
46
54
|
import java.util.Map;
|
|
@@ -73,14 +81,12 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
73
81
|
@Override
|
|
74
82
|
public void initialize() {
|
|
75
83
|
super.initialize();
|
|
76
|
-
// application is initialized in constructor
|
|
77
|
-
/* if (getCurrentActivity() != null)
|
|
78
|
-
application = (Application) getCurrentActivity().getApplication();*/
|
|
79
84
|
getReactApplicationContext().addLifecycleEventListener(new LifecycleEventListener() {
|
|
80
85
|
@Override
|
|
81
86
|
public void onHostResume() {
|
|
82
87
|
Appoxee.engage(application);
|
|
83
88
|
Appoxee.setOrientation(application, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
|
89
|
+
Appoxee.instance().setReceiver(MyPushBroadcastReceiver.class);
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
@Override
|
|
@@ -109,12 +115,90 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
@ReactMethod
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
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
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
// Toast.makeText(activity, "PERMISSION ALREADY GRANTED",
|
|
155
|
+
// Toast.LENGTH_SHORT).show();
|
|
156
|
+
promise.resolve(true);
|
|
157
|
+
}
|
|
158
|
+
} else {
|
|
159
|
+
promise.reject("Can't access activity for requesting permission!");
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@ReactMethod
|
|
164
|
+
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
|
+
});
|
|
183
|
+
} else {
|
|
184
|
+
// Toast.makeText(activity, "PERMISSION ALREADY GRANTED",
|
|
185
|
+
// Toast.LENGTH_SHORT).show();
|
|
186
|
+
promise.resolve(true);
|
|
187
|
+
}
|
|
188
|
+
} else {
|
|
189
|
+
promise.reject("Can't access activity for requesting permission!");
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@ReactMethod
|
|
194
|
+
public void setRemoteMessage(String msgJson, Promise promise) {
|
|
195
|
+
RemoteMessage remoteMessage = getRemoteMessage(msgJson);
|
|
196
|
+
if (remoteMessage != null) {
|
|
197
|
+
Appoxee.instance().setRemoteMessage(remoteMessage);
|
|
198
|
+
promise.resolve(true);
|
|
199
|
+
}
|
|
200
|
+
promise.resolve(false);
|
|
201
|
+
}
|
|
118
202
|
|
|
119
203
|
@ReactMethod
|
|
120
204
|
public void isPushFromMapp(String msgJson, Promise promise) {
|
|
@@ -128,19 +212,30 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
128
212
|
}
|
|
129
213
|
|
|
130
214
|
@ReactMethod
|
|
131
|
-
public void setToken(String token) {
|
|
215
|
+
public void setToken(String token, Promise promise) {
|
|
132
216
|
Appoxee.instance().setToken(token);
|
|
217
|
+
promise.resolve(true);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@ReactMethod
|
|
221
|
+
public void getToken(Promise promise) {
|
|
222
|
+
Appoxee.instance().getFcmToken(new ResultCallback<String>() {
|
|
223
|
+
@Override
|
|
224
|
+
public void onResult(@Nullable String s) {
|
|
225
|
+
promise.resolve(s);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
133
228
|
}
|
|
134
229
|
|
|
135
230
|
@ReactMethod
|
|
136
|
-
public void setAlias(String alias) {
|
|
231
|
+
public void setAlias(String alias, Promise promise) {
|
|
137
232
|
Appoxee.instance().setAlias(alias);
|
|
233
|
+
promise.resolve(true);
|
|
138
234
|
}
|
|
139
235
|
|
|
140
236
|
@ReactMethod
|
|
141
237
|
public void engage2() {
|
|
142
238
|
Appoxee.engage(Objects.requireNonNull(application));
|
|
143
|
-
|
|
144
239
|
}
|
|
145
240
|
|
|
146
241
|
@ReactMethod
|
|
@@ -148,7 +243,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
148
243
|
AppoxeeOptions opt = new AppoxeeOptions();
|
|
149
244
|
opt.appID = appID;
|
|
150
245
|
opt.sdkKey = sdkKey;
|
|
151
|
-
opt.googleProjectId = googleProjectId;
|
|
152
246
|
opt.server = AppoxeeOptions.Server.valueOf(server);
|
|
153
247
|
if (server.equals("TEST") || server.equals("TEST55") || server.equals("TEST_55")) {
|
|
154
248
|
opt.cepURL = "https://jamie-test.shortest-route.com";
|
|
@@ -161,21 +255,22 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
161
255
|
public void onInitCompleted(boolean successful, Exception failReason) {
|
|
162
256
|
/**
|
|
163
257
|
* OnInitCompleteListener must be attached;
|
|
164
|
-
* Internally {@link AppoxeeServiceAdapter#getDeviceInfoDMC()} is called and
|
|
258
|
+
* Internally {@link AppoxeeServiceAdapter#getDeviceInfoDMC()} is called and
|
|
259
|
+
* "user_id" created.
|
|
165
260
|
* If "user_id" is null InApp messages are not working.
|
|
166
261
|
*/
|
|
167
262
|
}
|
|
168
263
|
});
|
|
169
264
|
Appoxee.setOrientation(application, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
|
170
|
-
|
|
265
|
+
Appoxee.instance().setReceiver(MyPushBroadcastReceiver.class);
|
|
171
266
|
}
|
|
172
267
|
|
|
173
268
|
@ReactMethod
|
|
174
|
-
public void engageTestServer(String cepURl, String sdkKey, String googleProjectId, String server, String appID,
|
|
269
|
+
public void engageTestServer(String cepURl, String sdkKey, String googleProjectId, String server, String appID,
|
|
270
|
+
String tenantID) {
|
|
175
271
|
AppoxeeOptions opt = new AppoxeeOptions();
|
|
176
272
|
opt.appID = appID;
|
|
177
273
|
opt.sdkKey = sdkKey;
|
|
178
|
-
opt.googleProjectId = googleProjectId;
|
|
179
274
|
opt.server = AppoxeeOptions.Server.valueOf(server);
|
|
180
275
|
opt.cepURL = cepURl;
|
|
181
276
|
opt.tenantID = tenantID;
|
|
@@ -195,7 +290,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
195
290
|
promise.resolve(Appoxee.instance().isPushEnabled());
|
|
196
291
|
}
|
|
197
292
|
|
|
198
|
-
|
|
199
293
|
@ReactMethod
|
|
200
294
|
public void isReady(Promise promise) {
|
|
201
295
|
promise.resolve(Appoxee.instance().isReady());
|
|
@@ -212,7 +306,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
212
306
|
});
|
|
213
307
|
}
|
|
214
308
|
|
|
215
|
-
|
|
216
309
|
@ReactMethod
|
|
217
310
|
public void setAttribute(String key, String value) {
|
|
218
311
|
Appoxee.instance().setAttribute(key, value);
|
|
@@ -258,7 +351,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
258
351
|
Appoxee.instance().removeAttribute(attribute);
|
|
259
352
|
}
|
|
260
353
|
|
|
261
|
-
|
|
262
354
|
@ReactMethod
|
|
263
355
|
public void getAlias(Promise promise) {
|
|
264
356
|
promise.resolve(Appoxee.instance().getAlias());
|
|
@@ -274,7 +366,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
274
366
|
promise.resolve(Appoxee.instance().getAttributeStringValue(value));
|
|
275
367
|
}
|
|
276
368
|
|
|
277
|
-
|
|
278
369
|
@ReactMethod
|
|
279
370
|
public void lockScreenOrientation(Integer orientation) {
|
|
280
371
|
Appoxee.setOrientation(Objects.requireNonNull((Application) reactContext.getApplicationContext()), orientation);
|
|
@@ -306,7 +397,8 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
306
397
|
}
|
|
307
398
|
|
|
308
399
|
/**
|
|
309
|
-
* This method is deprecated in Java. Use method
|
|
400
|
+
* This method is deprecated in Java. Use method
|
|
401
|
+
* {@link #startGeofencing(ResultCallback)}}
|
|
310
402
|
*/
|
|
311
403
|
@ReactMethod
|
|
312
404
|
@Deprecated()
|
|
@@ -323,6 +415,35 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
323
415
|
Appoxee.instance().stopGeoFencing();
|
|
324
416
|
}
|
|
325
417
|
|
|
418
|
+
@ReactMethod
|
|
419
|
+
public void fetchLatestInboxMessage(final Promise promise) {
|
|
420
|
+
|
|
421
|
+
Appoxee.instance().fetchInboxMessages(reactContext.getApplicationContext());
|
|
422
|
+
|
|
423
|
+
InAppInboxCallback inAppInboxCallback = new InAppInboxCallback();
|
|
424
|
+
inAppInboxCallback.addInAppInboxMessagesReceivedCallback(new InAppInboxCallback.onInAppInboxMessagesReceived() {
|
|
425
|
+
@Override
|
|
426
|
+
public void onInAppInboxMessages(List<APXInboxMessage> richMessages) {
|
|
427
|
+
WritableArray messagesArray = Arguments.createArray();
|
|
428
|
+
APXInboxMessage msg = null;
|
|
429
|
+
if (richMessages != null) {
|
|
430
|
+
for (APXInboxMessage message : richMessages) {
|
|
431
|
+
if (msg == null || message.getTemplateId() > msg.getTemplateId()) {
|
|
432
|
+
msg = message;
|
|
433
|
+
}
|
|
434
|
+
messagesArray.pushMap(messageToJson(message));
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
promise.resolve(msg != null ? messageToJson(msg) : null);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
@Override
|
|
441
|
+
public void onInAppInboxMessage(final APXInboxMessage message) {
|
|
442
|
+
promise.resolve(messageToJson(message));
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
|
|
326
447
|
@ReactMethod
|
|
327
448
|
public void fetchInboxMessage(final Promise promise) {
|
|
328
449
|
|
|
@@ -361,34 +482,34 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
361
482
|
|
|
362
483
|
@ReactMethod
|
|
363
484
|
public void inAppMarkAsUnRead(Integer templateId, String eventId) {
|
|
364
|
-
Appoxee.instance().triggerStatistcs((reactContext.getApplicationContext()),
|
|
365
|
-
|
|
366
|
-
|
|
485
|
+
Appoxee.instance().triggerStatistcs((reactContext.getApplicationContext()),
|
|
486
|
+
getInAppStatisticsRequestObject(templateId,
|
|
487
|
+
eventId,
|
|
488
|
+
InAppStatistics.INBOX_INBOX_MESSAGE_UNREAD_KEY, null, null, null));
|
|
367
489
|
}
|
|
368
490
|
|
|
369
491
|
@ReactMethod
|
|
370
492
|
public void inAppMarkAsDeleted(Integer templateId, String eventId) {
|
|
371
|
-
Appoxee.instance().triggerStatistcs((reactContext.getApplicationContext()),
|
|
372
|
-
|
|
373
|
-
|
|
493
|
+
Appoxee.instance().triggerStatistcs((reactContext.getApplicationContext()),
|
|
494
|
+
getInAppStatisticsRequestObject(templateId,
|
|
495
|
+
eventId,
|
|
496
|
+
InAppStatistics.INBOX_INBOX_MESSAGE_DELETED_KEY, null, null, null));
|
|
374
497
|
}
|
|
375
498
|
|
|
376
499
|
@ReactMethod
|
|
377
500
|
public void triggerStatistic(Integer templateId, String originalEventId,
|
|
378
|
-
|
|
379
|
-
|
|
501
|
+
String trackingKey, Long displayMillis,
|
|
502
|
+
String reason, String link) {
|
|
380
503
|
Appoxee.instance()
|
|
381
|
-
.triggerStatistcs((reactContext.getApplicationContext())
|
|
382
|
-
|
|
504
|
+
.triggerStatistcs((reactContext.getApplicationContext()), getInAppStatisticsRequestObject(templateId,
|
|
505
|
+
originalEventId, trackingKey, displayMillis, reason, link));
|
|
383
506
|
}
|
|
384
507
|
|
|
385
508
|
@ReactMethod
|
|
386
509
|
public void isDeviceRegistered(Promise promise) {
|
|
387
510
|
promise.resolve(Appoxee.instance().isDeviceRegistered());
|
|
388
|
-
|
|
389
511
|
}
|
|
390
512
|
|
|
391
|
-
|
|
392
513
|
@ReactMethod
|
|
393
514
|
public void addAndroidListener(String eventName) {
|
|
394
515
|
EventEmitter.shared().addAndroidListener(eventName);
|
|
@@ -399,13 +520,37 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
399
520
|
EventEmitter.shared().removeAndroidListeners(count);
|
|
400
521
|
}
|
|
401
522
|
|
|
523
|
+
// Required for rn built in EventEmitter Calls.
|
|
524
|
+
@ReactMethod
|
|
525
|
+
public void addListener(String eventName) {
|
|
526
|
+
addAndroidListener(eventName);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
@ReactMethod
|
|
530
|
+
public void removeListeners(Integer count) {
|
|
531
|
+
removeAndroidListeners(count);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
@ReactMethod
|
|
535
|
+
public void getDeviceDmcInfo(final Promise promise) {
|
|
536
|
+
try {
|
|
537
|
+
Map<String, String> map = Appoxee.instance().getDmcDeviceInfo();
|
|
538
|
+
WritableMap wm = new WritableNativeMap();
|
|
539
|
+
for (Map.Entry<String, String> item : map.entrySet()) {
|
|
540
|
+
wm.putString(item.getKey(), item.getValue());
|
|
541
|
+
}
|
|
542
|
+
promise.resolve(wm);
|
|
543
|
+
} catch (Exception e) {
|
|
544
|
+
promise.reject("Error getting DMC Info", e);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
402
547
|
|
|
403
548
|
private static InAppStatistics getInAppStatisticsRequestObject(int templateId, String originalEventId,
|
|
404
|
-
|
|
405
|
-
|
|
549
|
+
String trackingKey, Long displayMillis,
|
|
550
|
+
String reason, String link) {
|
|
406
551
|
|
|
407
552
|
InAppStatistics inAppStatistics = new InAppStatistics();
|
|
408
|
-
//This will be received from the respective Screens.
|
|
553
|
+
// This will be received from the respective Screens.
|
|
409
554
|
MessageContext mc = new MessageContext();
|
|
410
555
|
mc.setTemplateId(templateId);
|
|
411
556
|
mc.setOriginialEventid(originalEventId);
|
|
@@ -423,7 +568,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
423
568
|
|
|
424
569
|
}
|
|
425
570
|
|
|
426
|
-
|
|
427
571
|
private WritableMap messageToJson(APXInboxMessage msg) {
|
|
428
572
|
WritableMap msgJson = new WritableNativeMap();
|
|
429
573
|
|
|
@@ -445,7 +589,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
445
589
|
for (ApxInAppExtras apxInAppExtras : msg.getExtras())
|
|
446
590
|
msgJson.putString(apxInAppExtras.getName(), apxInAppExtras.getValue());
|
|
447
591
|
|
|
448
|
-
|
|
449
592
|
} catch (Exception e) {
|
|
450
593
|
e.printStackTrace();
|
|
451
594
|
}
|
|
@@ -453,7 +596,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
453
596
|
return msgJson;
|
|
454
597
|
}
|
|
455
598
|
|
|
456
|
-
|
|
457
599
|
private WritableMap getDeviceInfoJson(DeviceInfo deviceInfoList) {
|
|
458
600
|
WritableMap deviceInfo = new WritableNativeMap();
|
|
459
601
|
try {
|
|
@@ -474,7 +616,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
474
616
|
return deviceInfo;
|
|
475
617
|
}
|
|
476
618
|
|
|
477
|
-
|
|
478
619
|
public static WritableMap getPushMessageToJSon(PushData pushData) {
|
|
479
620
|
WritableMap deviceInfo = new WritableNativeMap();
|
|
480
621
|
try {
|
|
@@ -502,7 +643,7 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
|
|
|
502
643
|
return deviceInfo;
|
|
503
644
|
}
|
|
504
645
|
|
|
505
|
-
private RemoteMessage getRemoteMessage(String jsonMsg) {
|
|
646
|
+
private RemoteMessage getRemoteMessage(String jsonMsg) {
|
|
506
647
|
if (jsonMsg == null)
|
|
507
648
|
return null;
|
|
508
649
|
|
|
@@ -552,8 +693,10 @@ private RemoteMessage getRemoteMessage(String jsonMsg) {
|
|
|
552
693
|
return false;
|
|
553
694
|
}
|
|
554
695
|
|
|
555
|
-
return ContextCompat.checkSelfPermission(getReactApplicationContext(),
|
|
556
|
-
|
|
696
|
+
return ContextCompat.checkSelfPermission(getReactApplicationContext(),
|
|
697
|
+
Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_DENIED &&
|
|
698
|
+
ContextCompat.checkSelfPermission(getReactApplicationContext(),
|
|
699
|
+
Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_DENIED;
|
|
557
700
|
}
|
|
558
701
|
|
|
559
702
|
@ReactMethod
|
|
@@ -561,7 +704,6 @@ private RemoteMessage getRemoteMessage(String jsonMsg) {
|
|
|
561
704
|
NotificationManagerCompat.from(reactContext.getApplicationContext()).cancelAll();
|
|
562
705
|
}
|
|
563
706
|
|
|
564
|
-
|
|
565
707
|
@ReactMethod
|
|
566
708
|
public void clearNotification(int id) {
|
|
567
709
|
NotificationManagerCompat.from(reactContext.getApplicationContext()).cancel(id);
|
|
@@ -571,6 +713,4 @@ private RemoteMessage getRemoteMessage(String jsonMsg) {
|
|
|
571
713
|
public void logOut(boolean pushEnabled) {
|
|
572
714
|
Appoxee.instance().logOut(application, pushEnabled);
|
|
573
715
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
}
|
|
716
|
+
}
|
|
@@ -2,34 +2,34 @@
|
|
|
2
2
|
package com.reactlibrary;
|
|
3
3
|
|
|
4
4
|
import java.util.ArrayList;
|
|
5
|
-
import java.util.Arrays;
|
|
6
5
|
import java.util.Collections;
|
|
7
6
|
import java.util.List;
|
|
8
7
|
|
|
9
8
|
import com.facebook.react.ReactPackage;
|
|
10
9
|
import com.facebook.react.bridge.NativeModule;
|
|
11
10
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
12
|
-
import com.facebook.react.uimanager.ViewManager;
|
|
13
11
|
import com.facebook.react.bridge.JavaScriptModule;
|
|
12
|
+
import com.facebook.react.uimanager.ViewManager;
|
|
13
|
+
|
|
14
14
|
/**
|
|
15
15
|
* Created by Aleksandar Marinkovic on 2019-05-15.
|
|
16
16
|
* Copyright (c) 2019 MAPP.
|
|
17
17
|
*/
|
|
18
18
|
public class RNMappPluginPackage implements ReactPackage {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
@Override
|
|
20
|
+
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
|
|
21
|
+
List<NativeModule> modules = new ArrayList<>();
|
|
22
|
+
modules.add(new RNMappPluginModule(reactContext));
|
|
23
|
+
return modules;
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
// Deprecated from RN 0.47
|
|
27
|
+
public List<Class<? extends JavaScriptModule>> createJSModules() {
|
|
28
|
+
return Collections.emptyList();
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
@Override
|
|
32
|
+
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
|
33
|
+
return Collections.emptyList();
|
|
34
|
+
}
|
|
35
35
|
}
|
|
Binary file
|
package/ios/RNMappEventEmmiter.h
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
#import <Foundation/Foundation.h>
|
|
9
|
-
#import
|
|
10
|
-
#import
|
|
11
|
-
#import
|
|
9
|
+
#import "AppoxeeSDK.h"
|
|
10
|
+
#import "AppoxeeInapp.h"
|
|
11
|
+
#import "AppoxeeLocationManager.h"
|
|
12
12
|
#import <React/RCTEventEmitter.h>
|
|
13
13
|
|
|
14
14
|
NS_ASSUME_NONNULL_BEGIN
|
package/ios/RNMappPluginModule.h
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#import <React/RCTBridgeModule.h>
|
|
2
2
|
#import <React/RCTEventEmitter.h>
|
|
3
|
-
#import
|
|
4
|
-
#import
|
|
5
|
-
#import
|
|
3
|
+
#import "AppoxeeSDK.h"
|
|
4
|
+
#import "AppoxeeInapp.h"
|
|
5
|
+
#import "AppoxeeLocationManager.h"
|
|
6
6
|
#import <UserNotifications/UNUserNotificationCenter.h>
|
|
7
7
|
|
|
8
8
|
@interface RNMappPluginModule : NSObject <RCTBridgeModule,AppoxeeInappDelegate, AppoxeeNotificationDelegate, AppoxeeLocationManagerDelegate >
|
package/ios/RNMappPluginModule.m
CHANGED
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
return [RNMappEventEmmiter shared].bridge;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
- (void)setCallableJSModules:(RCTCallableJSModules *)callableJSModules {
|
|
17
|
+
[RNMappEventEmmiter shared].callableJSModules = callableJSModules;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
- (RCTCallableJSModules *)callableJSModules {
|
|
21
|
+
return [RNMappEventEmmiter shared].callableJSModules;
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
- (dispatch_queue_t)methodQueue {
|
|
17
25
|
return dispatch_get_main_queue();
|
|
18
26
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-mapp-plugin",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0-beta01",
|
|
4
4
|
"description": "Mapp SDK for React Native.",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
-
"postinstall": "./iospatch.sh"
|
|
9
|
-
},
|
|
10
6
|
"keywords": [
|
|
11
7
|
"react-native",
|
|
12
8
|
"react",
|
|
@@ -18,13 +14,13 @@
|
|
|
18
14
|
"author": "Mapp",
|
|
19
15
|
"license": "MIT",
|
|
20
16
|
"peerDependencies": {
|
|
21
|
-
"react": "^
|
|
17
|
+
"react": "^18.0.0",
|
|
22
18
|
"react-native": ">=0.60.0-rc.0 <1.0.x"
|
|
23
19
|
},
|
|
24
20
|
"devDependencies": {
|
|
25
|
-
"jest": "^
|
|
26
|
-
"react": "
|
|
27
|
-
"react-native": "
|
|
21
|
+
"jest": "^28.1.3",
|
|
22
|
+
"react": "18.0.0",
|
|
23
|
+
"react-native": "0.69.4"
|
|
28
24
|
},
|
|
29
25
|
"repository": {
|
|
30
26
|
"type": "git",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<component name="libraryTable">
|
|
2
|
-
<library name="Gradle: androidx.activity:activity:1.0.0@aar">
|
|
3
|
-
<CLASSES>
|
|
4
|
-
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/088d7d849f49f07ab53816da761fdba5/jetified-activity-1.0.0/jars/classes.jar!/" />
|
|
5
|
-
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/088d7d849f49f07ab53816da761fdba5/jetified-activity-1.0.0/res" />
|
|
6
|
-
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/088d7d849f49f07ab53816da761fdba5/jetified-activity-1.0.0/AndroidManifest.xml" />
|
|
7
|
-
</CLASSES>
|
|
8
|
-
<JAVADOC />
|
|
9
|
-
<SOURCES>
|
|
10
|
-
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.activity/activity/1.0.0/28eb83e6a29ac3fbb87aa632cfa0e644a313f491/activity-1.0.0-sources.jar!/" />
|
|
11
|
-
</SOURCES>
|
|
12
|
-
</library>
|
|
13
|
-
</component>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<component name="libraryTable">
|
|
2
|
-
<library name="Gradle: androidx.annotation:annotation:1.1.0">
|
|
3
|
-
<CLASSES>
|
|
4
|
-
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation/1.1.0/e3a6fb2f40e3a3842e6b7472628ba4ce416ea4c8/annotation-1.1.0.jar!/" />
|
|
5
|
-
</CLASSES>
|
|
6
|
-
<JAVADOC>
|
|
7
|
-
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation/1.1.0/408af38ec57369afe3fd6466e1c4bfdd5f15fc92/annotation-1.1.0-javadoc.jar!/" />
|
|
8
|
-
</JAVADOC>
|
|
9
|
-
<SOURCES>
|
|
10
|
-
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation/1.1.0/8b7bdc00eb4d998bfbc76767b098620990f2a805/annotation-1.1.0-sources.jar!/" />
|
|
11
|
-
</SOURCES>
|
|
12
|
-
</library>
|
|
13
|
-
</component>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<component name="libraryTable">
|
|
2
|
-
<library name="Gradle: androidx.appcompat:appcompat:1.1.0@aar">
|
|
3
|
-
<ANNOTATIONS>
|
|
4
|
-
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/8b73c3c5dac00295b925b784073d2040/appcompat-1.1.0/annotations.zip!/" />
|
|
5
|
-
</ANNOTATIONS>
|
|
6
|
-
<CLASSES>
|
|
7
|
-
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/8b73c3c5dac00295b925b784073d2040/appcompat-1.1.0/jars/classes.jar!/" />
|
|
8
|
-
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/8b73c3c5dac00295b925b784073d2040/appcompat-1.1.0/res" />
|
|
9
|
-
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/8b73c3c5dac00295b925b784073d2040/appcompat-1.1.0/AndroidManifest.xml" />
|
|
10
|
-
</CLASSES>
|
|
11
|
-
<JAVADOC />
|
|
12
|
-
<SOURCES>
|
|
13
|
-
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.appcompat/appcompat/1.1.0/9865019bbd2d95e41dede3d8ebf964aa93f97766/appcompat-1.1.0-sources.jar!/" />
|
|
14
|
-
</SOURCES>
|
|
15
|
-
</library>
|
|
16
|
-
</component>
|
package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<component name="libraryTable">
|
|
2
|
-
<library name="Gradle: androidx.appcompat:appcompat-resources:1.1.0@aar">
|
|
3
|
-
<CLASSES>
|
|
4
|
-
<root url="jar://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0d41efc8fc480fdbcebe08adf1cc73b2/jetified-appcompat-resources-1.1.0/jars/classes.jar!/" />
|
|
5
|
-
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0d41efc8fc480fdbcebe08adf1cc73b2/jetified-appcompat-resources-1.1.0/res" />
|
|
6
|
-
<root url="file://$USER_HOME$/.gradle/caches/transforms-2/files-2.1/0d41efc8fc480fdbcebe08adf1cc73b2/jetified-appcompat-resources-1.1.0/AndroidManifest.xml" />
|
|
7
|
-
</CLASSES>
|
|
8
|
-
<JAVADOC />
|
|
9
|
-
<SOURCES>
|
|
10
|
-
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/androidx.appcompat/appcompat-resources/1.1.0/a7dcffd1afb81e3c892ad061b33da031c2d7289f/appcompat-resources-1.1.0-sources.jar!/" />
|
|
11
|
-
</SOURCES>
|
|
12
|
-
</library>
|
|
13
|
-
</component>
|