reactnative-plugin-appice 1.7.15 → 1.7.16

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.
@@ -10,10 +10,9 @@
10
10
  // original location:
11
11
  // - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
12
12
 
13
- def DEFAULT_COMPILE_SDK_VERSION = 33
14
- def DEFAULT_BUILD_TOOLS_VERSION = '30.0.3'
15
- def DEFAULT_MIN_SDK_VERSION = 16
16
- def DEFAULT_TARGET_SDK_VERSION = 33
13
+ def DEFAULT_COMPILE_SDK_VERSION = 34
14
+ def DEFAULT_MIN_SDK_VERSION = 21
15
+ def DEFAULT_TARGET_SDK_VERSION = 34
17
16
 
18
17
  def safeExtGet(prop, fallback) {
19
18
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -41,12 +40,12 @@ apply plugin: 'com.android.library'
41
40
 
42
41
  android {
43
42
  compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
44
- buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
45
43
  defaultConfig {
46
44
  minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
47
45
  targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
48
46
  versionCode 2
49
47
  versionName "2.0"
48
+ multiDexEnabled true
50
49
  }
51
50
  lintOptions {
52
51
  abortOnError false
@@ -103,7 +102,7 @@ dependencies {
103
102
  implementation "com.android.installreferrer:installreferrer:2.2"
104
103
 
105
104
  //firebase
106
- implementation "com.google.firebase:firebase-messaging:23.0.6"
105
+ implementation "com.google.firebase:firebase-messaging:24.0.0"
107
106
 
108
107
  // maps
109
108
  implementation "com.google.android.gms:play-services-maps:18.0.0"
@@ -114,11 +113,14 @@ dependencies {
114
113
  annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.3.1"
115
114
 
116
115
  //appice
117
- implementation 'appice.io.android:sdk:2.5.79'
116
+ implementation 'appice.io.android:sdk:2.5.81'
118
117
 
119
118
  //glide
120
119
  implementation "com.github.bumptech.glide:glide:4.11.0"
121
120
  annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
121
+
122
+ // multidex
123
+ implementation 'com.android.support:multidex:1.0.3'
122
124
  }
123
125
 
124
126
  def configureReactNativePom(def pom) {
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable prettier/prettier */
2
2
  const AppICE = require('reactnative-plugin-appice');
3
3
  import { URL } from 'react-native-url-polyfill';
4
- import { getInboxMessageForId , synchronizeInbox} from './App';
5
4
 
6
5
  /* eslint-disable prettier/prettier */
7
6
  /**
@@ -415,13 +414,24 @@ const setUser = (profile) => {
415
414
  * @param {string} useId user id
416
415
  * @param {object} callback return the response
417
416
  */
418
- const getOfferDataForDeeplink = (dl,userId,callback) =>{
417
+ const getOfferDataForDeeplink = (dl,timeout, callback) =>{
419
418
  const mid = extractMidFromDeepLink(dl);
420
419
  const offerid = extractOfferIdFromDeepLink(dl);
421
420
  if(mid != null){
422
- synchronizeInbox();
423
- getOfferDataForInboxMessage(mid, userId, offerid, (result) => {
424
- callback(result);
421
+ const userId = null;
422
+ AppICE.getUserId((userIds) => {
423
+ userId = JSON.parse(userIds)[0];
424
+ console.log('getUserId parse:', userId);
425
+ if (!userId) {
426
+ userId = userIds[0];
427
+ }
428
+ });
429
+ AppICE.synchronizeInbox(timeout, (success) => {
430
+ if(success){
431
+ AppICE.getInboxMessageForId(mid, userId, (inboxMessage) => {
432
+ callback(inboxMessage)
433
+ });
434
+ }
425
435
  });
426
436
  }
427
437
  }
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactnative-plugin-appice",
3
- "version": "1.7.15",
3
+ "version": "1.7.16",
4
4
  "description": "appICE React Native SDK",
5
5
  "main": "index.js",
6
6
  "files": [