react-native-mapp-plugin 1.0.4-beta1 → 1.0.4-beta10

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.
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="ChangeListManager">
4
- <list default="true" id="8b4f258a-c093-494f-afe5-5f5a25c90893" name="Default Changelist" comment="">
4
+ <list default="true" id="8b4f258a-c093-494f-afe5-5f5a25c90893" name="Default Changelist" comment="new version">
5
5
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
6
6
  </list>
7
7
  <option name="SHOW_DIALOG" value="false" />
@@ -42,8 +42,18 @@
42
42
  <workItem from="1625580406053" duration="4000" />
43
43
  <workItem from="1625659434437" duration="279000" />
44
44
  <workItem from="1632413120138" duration="665000" />
45
- <workItem from="1632874987690" duration="479000" />
45
+ <workItem from="1632874987690" duration="1182000" />
46
+ <workItem from="1632917248275" duration="2037000" />
47
+ <workItem from="1632991423561" duration="7319000" />
46
48
  </task>
49
+ <task id="LOCAL-00001" summary="new version">
50
+ <created>1632917445507</created>
51
+ <option name="number" value="00001" />
52
+ <option name="presentableId" value="LOCAL-00001" />
53
+ <option name="project" value="LOCAL" />
54
+ <updated>1632917445507</updated>
55
+ </task>
56
+ <option name="localTasksCounter" value="2" />
47
57
  <servers />
48
58
  </component>
49
59
  <component name="TypeScriptGeneratedFilesManager">
@@ -54,10 +64,22 @@
54
64
  <map>
55
65
  <entry key="MAIN">
56
66
  <value>
57
- <State />
67
+ <State>
68
+ <option name="COLUMN_ID_WIDTH">
69
+ <map>
70
+ <entry key="Table.Default.Author.ColumnIdWidth" value="129" />
71
+ <entry key="Table.Default.Date.ColumnIdWidth" value="129" />
72
+ </map>
73
+ </option>
74
+ </State>
58
75
  </value>
59
76
  </entry>
60
77
  </map>
61
78
  </option>
79
+ <option name="oldMeFiltersMigrated" value="true" />
80
+ </component>
81
+ <component name="VcsManagerConfiguration">
82
+ <MESSAGE value="new version" />
83
+ <option name="LAST_COMMIT_MESSAGE" value="new version" />
62
84
  </component>
63
85
  </project>
package/__package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "react-native-mapp-plugin",
3
+ "version": "1.0.3beta12",
4
+ "description": "Mapp SDK for React Native.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "postinstall": "./iospatch.sh"
9
+ },
10
+ "keywords": [
11
+ "react-native",
12
+ "react",
13
+ "react-component",
14
+ "ios",
15
+ "android",
16
+ "mapp"
17
+ ],
18
+ "author": "Mapp",
19
+ "license": "MIT",
20
+ "peerDependencies": {
21
+ "react": "^16.8.1",
22
+ "react-native": ">=0.60.0-rc.0 <1.0.x"
23
+ },
24
+ "devDependencies": {
25
+ "jest": "^24.9.0",
26
+ "react": "^16.9.0",
27
+ "react-native": "^0.61.5"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/MappCloud/React-native-plugin.git"
32
+ },
33
+ "bugs": {
34
+ "url": "https://github.com/MappCloud/React-native-plugin/issues"
35
+ },
36
+ "homepage": "https://github.com/MappCloud/React-native-plugin#readme"
37
+ }
@@ -72,5 +72,5 @@ dependencies {
72
72
  api('com.google.android.gms:play-services-location:16.0.0')
73
73
  implementation 'androidx.media:media:1.0.1'
74
74
  implementation 'androidx.legacy:legacy-support-v13:1.0.0'
75
- implementation 'com.mapp.sdk:mapp-android:6.0.17-special2'
75
+ implementation 'com.mapp.sdk:mapp-android:6.0.17-special8'
76
76
  }
@@ -21,6 +21,7 @@ import com.appoxee.internal.inapp.model.InAppStatistics;
21
21
  import com.appoxee.internal.inapp.model.MessageContext;
22
22
  import com.appoxee.internal.inapp.model.Tracking;
23
23
  import com.appoxee.internal.inapp.model.TrackingAttributes;
24
+ import com.appoxee.internal.service.AppoxeeServiceAdapter;
24
25
  import com.appoxee.push.NotificationMode;
25
26
  import com.appoxee.push.PushData;
26
27
  import com.facebook.react.bridge.Arguments;
@@ -48,6 +49,7 @@ import java.util.concurrent.ConcurrentHashMap;
48
49
  * Created by Aleksandar Marinkovic on 2019-05-15.
49
50
  * Copyright (c) 2019 MAPP.
50
51
  */
52
+ @SuppressWarnings("ALL")
51
53
  public class RNMappPluginModule extends ReactContextBaseJavaModule {
52
54
 
53
55
  private final ReactApplicationContext reactContext;
@@ -69,8 +71,9 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
69
71
  @Override
70
72
  public void initialize() {
71
73
  super.initialize();
72
- if (getCurrentActivity() != null)
73
- application = (Application) getCurrentActivity().getApplication();
74
+ // application is initialized in constructor
75
+ /* if (getCurrentActivity() != null)
76
+ application = (Application) getCurrentActivity().getApplication();*/
74
77
  getReactApplicationContext().addLifecycleEventListener(new LifecycleEventListener() {
75
78
  @Override
76
79
  public void onHostResume() {
@@ -109,7 +112,6 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
109
112
  RemoteMessage remoteMessage = getRemoteMessage(msgJson);
110
113
  if (remoteMessage != null){
111
114
  Appoxee.instance().setRemoteMessage(remoteMessage);
112
- Log.d(this.getClass().getName(),remoteMessage.toString());
113
115
  }
114
116
  }
115
117
 
@@ -147,12 +149,22 @@ public class RNMappPluginModule extends ReactContextBaseJavaModule {
147
149
  opt.sdkKey = sdkKey;
148
150
  opt.googleProjectId = googleProjectId;
149
151
  opt.server = AppoxeeOptions.Server.valueOf(server);
150
- if (server.equals("TEST") || server.equals("TEST55")) {
152
+ if (server.equals("TEST") || server.equals("TEST55") || server.equals("TEST_55")) {
151
153
  opt.cepURL = "https://jamie-test.shortest-route.com";
152
154
  }
153
155
  opt.notificationMode = NotificationMode.BACKGROUND_AND_FOREGROUND;
154
156
  opt.tenantID = tenantID;
155
157
  Appoxee.engage(Objects.requireNonNull(application), opt);
158
+ Appoxee.instance().addInitListener(new Appoxee.OnInitCompletedListener() {
159
+ @Override
160
+ public void onInitCompleted(boolean successful, Exception failReason) {
161
+ /**
162
+ * OnInitCompleteListener must be attached;
163
+ * Internally {@link AppoxeeServiceAdapter#getDeviceInfoDMC()} is called and "user_id" created.
164
+ * If "user_id" is null InApp messages are not working.
165
+ */
166
+ }
167
+ });
156
168
  Appoxee.setOrientation(application, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
157
169
 
158
170
  }
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "react-native-mapp-plugin",
3
- "version": "1.0.4beta1",
3
+ "version": "1.0.4beta10",
4
4
  "description": "Mapp SDK for React Native.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "postinstall": "node -e \"process.platform === 'darwin' && require('child_process').spawn('sh', ['./iospatch.sh'], { stdio: 'inherit'})\""
8
9
  },
9
10
  "keywords": [
10
11
  "react-native",
@@ -27,7 +28,7 @@
27
28
  },
28
29
  "repository": {
29
30
  "type": "git",
30
- "url": "git+https://github.com/MappCloud/React-native-plugin.git"
31
+ "url": "git+https://github.com/MappCloud/React-native-plugin/tree/push_messages_fix"
31
32
  },
32
33
  "bugs": {
33
34
  "url": "https://github.com/MappCloud/React-native-plugin/issues"