react-native-acoustic-mobile-push-snooze-beta 3.9.34 → 3.9.35
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/android/build.gradle
CHANGED
|
@@ -1,36 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
buildscript {
|
|
3
|
-
repositories {
|
|
4
|
-
google()
|
|
5
|
-
mavenCentral()
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
dependencies {
|
|
9
|
-
classpath 'com.android.tools.build:gradle:4.1.0'
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
1
|
apply plugin: 'com.android.library'
|
|
14
2
|
|
|
15
3
|
android {
|
|
16
|
-
|
|
4
|
+
compileSdk 34
|
|
17
5
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
6
|
+
defaultConfig {
|
|
7
|
+
minSdkVersion 21
|
|
8
|
+
targetSdkVersion 34
|
|
9
|
+
versionCode 1
|
|
10
|
+
versionName "1.0"
|
|
11
|
+
}
|
|
12
|
+
lintOptions {
|
|
13
|
+
abortOnError false
|
|
14
|
+
}
|
|
27
15
|
}
|
|
28
16
|
|
|
29
17
|
dependencies {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
18
|
+
compileOnly('com.facebook.react:react-native:+') {
|
|
19
|
+
exclude group: 'com.android.support'
|
|
20
|
+
}
|
|
33
21
|
|
|
34
|
-
|
|
22
|
+
implementation "io.github.go-acoustic:acoustic-mobile-push-android-sdk:$campaignSDKVersion"
|
|
35
23
|
}
|
|
36
24
|
|
package/android/src/main/java/co/acoustic/mobile/push/plugin/snooze/SnoozeIntentService.java
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright (C) 2025 Acoustic, L.P. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* NOTICE: This file contains material that is confidential and proprietary to
|
|
5
5
|
* Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
|
|
@@ -29,38 +29,38 @@ import java.util.Calendar;
|
|
|
29
29
|
* This service restores the snoozed notification to the notification bar.
|
|
30
30
|
*/
|
|
31
31
|
public class SnoozeIntentService extends IntentService {
|
|
32
|
-
|
|
32
|
+
private static final String TAG = "SnoozeIntentService";
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
public SnoozeIntentService() {
|
|
35
|
+
super("Snooze");
|
|
36
|
+
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Logger.e(TAG, "Failed to parse notification", jsone);
|
|
49
|
-
}
|
|
38
|
+
@Override
|
|
39
|
+
protected void onHandleIntent(Intent intent) {
|
|
40
|
+
Logger.d(TAG, "Snooze done");
|
|
41
|
+
Bundle extras = new Bundle();
|
|
42
|
+
try {
|
|
43
|
+
extras.putString(Constants.Notifications.ALERT_KEY, intent.getStringExtra(Constants.Notifications.SOURCE_NOTIFICATION_KEY));
|
|
44
|
+
extras.putString(Constants.Notifications.MCE_PAYLOAD_KEY, intent.getStringExtra(Constants.Notifications.SOURCE_MCE_PAYLOAD_KEY));
|
|
45
|
+
AlertProcessor.processAlert(getApplicationContext(), extras);
|
|
46
|
+
} catch (Exception e) {
|
|
47
|
+
Logger.e(TAG, "Failed to process alert", e);
|
|
50
48
|
}
|
|
49
|
+
}
|
|
51
50
|
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
/**
|
|
53
|
+
* This method schedule a notification reappearance
|
|
54
|
+
*
|
|
55
|
+
* @param mgr The alarm manager
|
|
56
|
+
* @param pi The pending intent for the action
|
|
57
|
+
* @param delayInMinutes The number of minutes after which the notification will reappear
|
|
58
|
+
*/
|
|
59
|
+
public void scheduleSnooze(AlarmManager mgr, PendingIntent pi, int delayInMinutes) {
|
|
60
|
+
Calendar alertTime = Calendar.getInstance();
|
|
61
|
+
alertTime.setTimeInMillis(System.currentTimeMillis());
|
|
62
|
+
alertTime.add(Calendar.MINUTE, delayInMinutes);
|
|
63
|
+
mgr.set(AlarmManager.RTC, alertTime.getTimeInMillis(), pi);
|
|
64
|
+
Logger.d(TAG, "Snooze service was scheduled with the date " + alertTime.getTime());
|
|
65
|
+
}
|
|
66
66
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"author": "Acoustic, L.P.",
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"react-native-acoustic-mobile-push-beta": "3.9.
|
|
12
|
+
"react-native-acoustic-mobile-push-beta": "3.9.35"
|
|
13
13
|
},
|
|
14
14
|
"description": "BETA: Acoustic Mobile Push Snooze Action Plugin",
|
|
15
15
|
"main": "index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"directory": "plugins/react-native-acoustic-mobile-push-snooze",
|
|
19
19
|
"url": "https://github.com/aipoweredmarketer/ca-mce-react-native"
|
|
20
20
|
},
|
|
21
|
-
"version": "3.9.
|
|
21
|
+
"version": "3.9.35",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"plist": "^3.0.1",
|
|
24
24
|
"xml2js": "^0.4.19",
|