reactnative-plugin-appice 1.7.28 → 1.7.29
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/README.md +37 -37
- package/android/README.md +14 -14
- package/android/build.gradle +138 -158
- package/android/gitignore +47 -47
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/android/gradlew +234 -234
- package/android/local.properties +8 -8
- package/android/src/main/AndroidManifest.xml +120 -164
- package/android/src/main/java/com/{reactlibrary → appice/react}/AppICEUtils.java +274 -274
- package/android/src/main/java/com/{reactlibrary → appice/react}/AppIceReactPluginModule.java +778 -778
- package/android/src/main/java/com/{reactlibrary → appice/react}/AppIceReactPluginPackage.java +28 -28
- package/android/src/main/java/com/{reactlibrary → appice/react}/CampaignCampsReceiver.java +56 -56
- package/android/src/main/java/com/{reactlibrary → appice/react}/EnumConstants.java +282 -282
- package/android/src/main/java/com/{reactlibrary → appice/react}/NotificationEventService.java +59 -59
- package/android/src/main/java/com/{reactlibrary → appice/react}/StringConstants.java +24 -24
- package/campaign.js +25 -25
- package/example/App.js +332 -332
- package/example/Gemfile +6 -6
- package/example/PageA.tsx +15 -15
- package/example/__tests__/App-test.js +14 -14
- package/example/ancilliary.js +486 -486
- package/example/android/app/_BUCK +55 -55
- package/example/android/app/build.gradle +320 -320
- package/example/android/app/build_defs.bzl +19 -19
- package/example/android/app/proguard-rules.pro +10 -10
- package/example/android/app/src/debug/AndroidManifest.xml +13 -13
- package/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java +73 -73
- package/example/android/app/src/main/AndroidManifest.xml +72 -72
- package/example/android/app/src/main/java/com/example/MainActivity.java +48 -48
- package/example/android/app/src/main/java/com/example/MainApplication.java +91 -91
- package/example/android/app/src/main/java/com/example/newarchitecture/MainApplicationReactNativeHost.java +116 -116
- package/example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java +36 -36
- package/example/android/app/src/main/java/com/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -48
- package/example/android/app/src/main/jni/Android.mk +48 -48
- package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +24 -24
- package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -16
- package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -45
- package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -38
- package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +61 -61
- package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -32
- package/example/android/app/src/main/jni/OnLoad.cpp +11 -11
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -36
- package/example/android/app/src/main/res/values/strings.xml +3 -3
- package/example/android/app/src/main/res/values/styles.xml +9 -9
- package/example/android/build.gradle +73 -73
- package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/example/android/gradle.properties +40 -40
- package/example/android/gradlew +234 -234
- package/example/android/settings.gradle +11 -11
- package/example/app.json +3 -3
- package/example/babel.config.js +3 -3
- package/example/index.js +9 -9
- package/example/ios/Podfile +44 -44
- package/example/ios/Podfile.lock +561 -561
- package/example/ios/_xcode.env +11 -11
- package/example/ios/example/AppDelegate.h +8 -8
- package/example/ios/example/AppDelegate.mm +174 -174
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +53 -53
- package/example/ios/example/Images.xcassets/Contents.json +6 -6
- package/example/ios/example/Info.plist +62 -62
- package/example/ios/example/LaunchScreen.storyboard +47 -47
- package/example/ios/example/example.entitlements +8 -8
- package/example/ios/example/main.m +10 -10
- package/example/ios/example.xcodeproj/project.pbxproj +712 -712
- package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +88 -88
- package/example/ios/example.xcworkspace/contents.xcworkspacedata +10 -10
- package/example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- package/example/ios/exampleTests/Info.plist +24 -24
- package/example/ios/exampleTests/exampleTests.m +66 -66
- package/example/metro.config.js +17 -17
- package/example/package.json +36 -36
- package/example/yarn.lock +7176 -7176
- package/index.js +590 -590
- package/ios/AppICEReactEvent.h +23 -23
- package/ios/AppICEReactEvent.m +86 -86
- package/ios/AppIceReactPlugin.h +65 -65
- package/ios/AppIceReactPlugin.m +683 -683
- package/ios/AppIceReactPlugin.xcodeproj/project.pbxproj +364 -364
- package/ios/AppIceReactPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -4
- package/ios/AppIceReactPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- package/ios/AppIceReactPlugin.xcworkspace/contents.xcworkspacedata +10 -10
- package/ios/AppIceReactPlugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- package/ios/Podfile +10 -10
- package/ios/Podfile.lock +3 -3
- package/ios/Pods/Manifest.lock +3 -3
- package/ios/Pods/Pods.xcodeproj/project.pbxproj +395 -395
- package/ios/Pods/Pods.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/Pods-AppIceReactPlugin.xcscheme +58 -58
- package/ios/Pods/Pods.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/xcschememanagement.plist +18 -18
- package/ios/Pods/Pods.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-Info.plist +26 -26
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-acknowledgements.markdown +3 -3
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-acknowledgements.plist +29 -29
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-dummy.m +5 -5
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-umbrella.h +16 -16
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.debug.xcconfig +6 -6
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.modulemap +6 -6
- package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.release.xcconfig +6 -6
- package/package.json +6 -9
- package/reactnative-plugin-appice.podspec +30 -30
package/android/src/main/java/com/{reactlibrary → appice/react}/NotificationEventService.java
RENAMED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
package com.
|
|
2
|
-
|
|
3
|
-
import android.annotation.TargetApi;
|
|
4
|
-
import android.app.job.JobParameters;
|
|
5
|
-
import android.app.job.JobService;
|
|
6
|
-
import android.os.Build;
|
|
7
|
-
import android.os.Bundle;
|
|
8
|
-
import android.os.PersistableBundle;
|
|
9
|
-
import androidx.annotation.RequiresApi;
|
|
10
|
-
import androidx.work.Configuration;
|
|
11
|
-
|
|
12
|
-
import java.util.Timer;
|
|
13
|
-
import java.util.TimerTask;
|
|
14
|
-
import java.util.concurrent.atomic.AtomicReference;
|
|
15
|
-
|
|
16
|
-
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
|
17
|
-
public class NotificationEventService extends JobService {
|
|
18
|
-
@Override
|
|
19
|
-
public boolean onStartJob(final JobParameters params) {
|
|
20
|
-
if (params != null) {
|
|
21
|
-
PersistableBundle bundle = params.getExtras();
|
|
22
|
-
if (bundle != null) {
|
|
23
|
-
final Bundle bundle1 = toBundle(bundle);
|
|
24
|
-
if (bundle1 != null) {
|
|
25
|
-
new Timer("AppICE-NotifService-Timer").schedule(new TimerTask() {
|
|
26
|
-
@Override
|
|
27
|
-
public void run() {
|
|
28
|
-
CampaignCampsReceiver rc = new CampaignCampsReceiver();
|
|
29
|
-
AppICEUtils.printLog("NotificationEventService"," data "+bundle1);
|
|
30
|
-
rc.sendCallback(bundle1, getApplicationContext());
|
|
31
|
-
jobFinished(params,false);
|
|
32
|
-
}
|
|
33
|
-
}, 1 * 1000);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public static Bundle toBundle(PersistableBundle persistableBundle) {
|
|
42
|
-
try {
|
|
43
|
-
if (persistableBundle == null) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
Bundle bundle = new Bundle();
|
|
47
|
-
if (Build.VERSION.SDK_INT >= 21)
|
|
48
|
-
bundle.putAll(persistableBundle);
|
|
49
|
-
return bundle;
|
|
50
|
-
} catch (Exception e) {
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@Override
|
|
57
|
-
public boolean onStopJob(JobParameters params) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
1
|
+
package com.appice.react;
|
|
2
|
+
|
|
3
|
+
import android.annotation.TargetApi;
|
|
4
|
+
import android.app.job.JobParameters;
|
|
5
|
+
import android.app.job.JobService;
|
|
6
|
+
import android.os.Build;
|
|
7
|
+
import android.os.Bundle;
|
|
8
|
+
import android.os.PersistableBundle;
|
|
9
|
+
import androidx.annotation.RequiresApi;
|
|
10
|
+
import androidx.work.Configuration;
|
|
11
|
+
|
|
12
|
+
import java.util.Timer;
|
|
13
|
+
import java.util.TimerTask;
|
|
14
|
+
import java.util.concurrent.atomic.AtomicReference;
|
|
15
|
+
|
|
16
|
+
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
|
17
|
+
public class NotificationEventService extends JobService {
|
|
18
|
+
@Override
|
|
19
|
+
public boolean onStartJob(final JobParameters params) {
|
|
20
|
+
if (params != null) {
|
|
21
|
+
PersistableBundle bundle = params.getExtras();
|
|
22
|
+
if (bundle != null) {
|
|
23
|
+
final Bundle bundle1 = toBundle(bundle);
|
|
24
|
+
if (bundle1 != null) {
|
|
25
|
+
new Timer("AppICE-NotifService-Timer").schedule(new TimerTask() {
|
|
26
|
+
@Override
|
|
27
|
+
public void run() {
|
|
28
|
+
CampaignCampsReceiver rc = new CampaignCampsReceiver();
|
|
29
|
+
AppICEUtils.printLog("NotificationEventService"," data "+bundle1);
|
|
30
|
+
rc.sendCallback(bundle1, getApplicationContext());
|
|
31
|
+
jobFinished(params,false);
|
|
32
|
+
}
|
|
33
|
+
}, 1 * 1000);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public static Bundle toBundle(PersistableBundle persistableBundle) {
|
|
42
|
+
try {
|
|
43
|
+
if (persistableBundle == null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
Bundle bundle = new Bundle();
|
|
47
|
+
if (Build.VERSION.SDK_INT >= 21)
|
|
48
|
+
bundle.putAll(persistableBundle);
|
|
49
|
+
return bundle;
|
|
50
|
+
} catch (Exception e) {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@Override
|
|
57
|
+
public boolean onStopJob(JobParameters params) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
60
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
package com.
|
|
2
|
-
public interface StringConstants{
|
|
3
|
-
String FAILED_RETRIVE_MEDIA_DATA = "Failed to retrieve media data";
|
|
4
|
-
String INVALID_INBOX_FORMAT = "Invalid inbox message format";
|
|
5
|
-
|
|
6
|
-
String MEDIA_URL = "mediaUrl";
|
|
7
|
-
String MEDIA_TYPE = "mediaType";
|
|
8
|
-
String MEDIA_THUMBNAIL = "mediaThumbnail";
|
|
9
|
-
String MEDIA_DATA = "mediaData";
|
|
10
|
-
String APPICE_PUSH_NOTIFICATION_CLICKED = "AppICEPushNotificationClicked";
|
|
11
|
-
String APPICE_INAPP_NOTIFICATION_CLICKED = "AppICEInAppClicked";
|
|
12
|
-
String INBOX_MESSAGE = "message";
|
|
13
|
-
String INBOX_TITLE = "title";
|
|
14
|
-
String INBOX_MESSAGE_STATUS = "messageStatus";
|
|
15
|
-
String INBOX_CAMPAIGN_TYPE = "campType";
|
|
16
|
-
String INBOX_MESSAGE_LANGUAGE = "messageLanguage";
|
|
17
|
-
String INBOX_MESSAGE_ID = "id";
|
|
18
|
-
String INBOX_CAMPAIGN_ID = "campId";
|
|
19
|
-
String INBOX_MESSAGE_CATEGORY = "category";
|
|
20
|
-
String INBOX_MESSAGE_ICON = "icon";
|
|
21
|
-
String INBOX_CUSTOM_DATA = "cdata";
|
|
22
|
-
String FIRST_SEEN = "fsn";
|
|
23
|
-
String LAST_SEEN = "lsn";
|
|
24
|
-
String CUSTOM_DATA = "cdata";
|
|
1
|
+
package com.appice.react;
|
|
2
|
+
public interface StringConstants{
|
|
3
|
+
String FAILED_RETRIVE_MEDIA_DATA = "Failed to retrieve media data";
|
|
4
|
+
String INVALID_INBOX_FORMAT = "Invalid inbox message format";
|
|
5
|
+
|
|
6
|
+
String MEDIA_URL = "mediaUrl";
|
|
7
|
+
String MEDIA_TYPE = "mediaType";
|
|
8
|
+
String MEDIA_THUMBNAIL = "mediaThumbnail";
|
|
9
|
+
String MEDIA_DATA = "mediaData";
|
|
10
|
+
String APPICE_PUSH_NOTIFICATION_CLICKED = "AppICEPushNotificationClicked";
|
|
11
|
+
String APPICE_INAPP_NOTIFICATION_CLICKED = "AppICEInAppClicked";
|
|
12
|
+
String INBOX_MESSAGE = "message";
|
|
13
|
+
String INBOX_TITLE = "title";
|
|
14
|
+
String INBOX_MESSAGE_STATUS = "messageStatus";
|
|
15
|
+
String INBOX_CAMPAIGN_TYPE = "campType";
|
|
16
|
+
String INBOX_MESSAGE_LANGUAGE = "messageLanguage";
|
|
17
|
+
String INBOX_MESSAGE_ID = "id";
|
|
18
|
+
String INBOX_CAMPAIGN_ID = "campId";
|
|
19
|
+
String INBOX_MESSAGE_CATEGORY = "category";
|
|
20
|
+
String INBOX_MESSAGE_ICON = "icon";
|
|
21
|
+
String INBOX_CUSTOM_DATA = "cdata";
|
|
22
|
+
String FIRST_SEEN = "fsn";
|
|
23
|
+
String LAST_SEEN = "lsn";
|
|
24
|
+
String CUSTOM_DATA = "cdata";
|
|
25
25
|
}
|
package/campaign.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
export default class Campaign {
|
|
3
|
-
constructor(campId, actionUrl, actionType, customData) {
|
|
4
|
-
this._campId = campId;
|
|
5
|
-
this._actionUrl = actionUrl;
|
|
6
|
-
this._actionType = actionType;
|
|
7
|
-
this._customData = customData;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// Getter methods for campaign properties
|
|
11
|
-
getCampaignId() {
|
|
12
|
-
return this._campId;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
getActionUrl() {
|
|
16
|
-
return this._actionUrl;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
getActionType() {
|
|
20
|
-
return this._actionType;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
getCustomData() {
|
|
24
|
-
return this._customData;
|
|
25
|
-
}
|
|
1
|
+
|
|
2
|
+
export default class Campaign {
|
|
3
|
+
constructor(campId, actionUrl, actionType, customData) {
|
|
4
|
+
this._campId = campId;
|
|
5
|
+
this._actionUrl = actionUrl;
|
|
6
|
+
this._actionType = actionType;
|
|
7
|
+
this._customData = customData;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Getter methods for campaign properties
|
|
11
|
+
getCampaignId() {
|
|
12
|
+
return this._campId;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getActionUrl() {
|
|
16
|
+
return this._actionUrl;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
getActionType() {
|
|
20
|
+
return this._actionType;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
getCustomData() {
|
|
24
|
+
return this._customData;
|
|
25
|
+
}
|
|
26
26
|
}
|