@capacitor/push-notifications 9.0.0-alpha.1 → 9.0.0-alpha.2
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/CapacitorPushNotifications.podspec +1 -1
- package/Package.swift +2 -2
- package/android/build.gradle +3 -4
- package/android/src/main/java/com/capacitorjs/plugins/pushnotifications/NotificationChannelManager.java +1 -1
- package/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.java +2 -0
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] }
|
|
13
13
|
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'push-notifications/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '
|
|
14
|
+
s.ios.deployment_target = '16.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
16
|
s.swift_version = '5.1'
|
|
17
17
|
end
|
package/Package.swift
CHANGED
|
@@ -3,14 +3,14 @@ import PackageDescription
|
|
|
3
3
|
|
|
4
4
|
let package = Package(
|
|
5
5
|
name: "CapacitorPushNotifications",
|
|
6
|
-
platforms: [.iOS(.
|
|
6
|
+
platforms: [.iOS(.v16)],
|
|
7
7
|
products: [
|
|
8
8
|
.library(
|
|
9
9
|
name: "CapacitorPushNotifications",
|
|
10
10
|
targets: ["PushNotificationsPlugin"])
|
|
11
11
|
],
|
|
12
12
|
dependencies: [
|
|
13
|
-
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "9.0.0-alpha.
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "9.0.0-alpha.5")
|
|
14
14
|
],
|
|
15
15
|
targets: [
|
|
16
16
|
.target(
|
package/android/build.gradle
CHANGED
|
@@ -16,7 +16,7 @@ buildscript {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
dependencies {
|
|
19
|
-
classpath 'com.android.tools.build:gradle:
|
|
19
|
+
classpath 'com.android.tools.build:gradle:9.2.1'
|
|
20
20
|
if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
|
21
21
|
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
|
|
22
22
|
}
|
|
@@ -32,10 +32,9 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
|
|
32
32
|
|
|
33
33
|
android {
|
|
34
34
|
namespace = "com.capacitorjs.plugins.pushnotifications"
|
|
35
|
-
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
35
|
+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37
|
|
36
36
|
defaultConfig {
|
|
37
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
38
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
|
|
37
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
|
|
39
38
|
versionCode 1
|
|
40
39
|
versionName "1.0"
|
|
41
40
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -109,7 +109,7 @@ public class NotificationChannelManager {
|
|
|
109
109
|
channel.put(CHANNEL_SOUND, notificationChannel.getSound());
|
|
110
110
|
channel.put(CHANNEL_VIBRATE, notificationChannel.shouldVibrate());
|
|
111
111
|
channel.put(CHANNEL_USE_LIGHTS, notificationChannel.shouldShowLights());
|
|
112
|
-
channel.put(CHANNEL_LIGHT_COLOR, String.format("#%06X",
|
|
112
|
+
channel.put(CHANNEL_LIGHT_COLOR, String.format("#%06X", 0xFFFFFF & notificationChannel.getLightColor()));
|
|
113
113
|
Logger.debug(Logger.tags("NotificationChannel"), "visibility " + notificationChannel.getLockscreenVisibility());
|
|
114
114
|
Logger.debug(Logger.tags("NotificationChannel"), "importance " + notificationChannel.getImportance());
|
|
115
115
|
channels.put(channel);
|
package/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.java
CHANGED
|
@@ -55,6 +55,7 @@ public class PushNotificationsPlugin extends Plugin {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
@Override
|
|
58
|
+
@SuppressWarnings("deprecation")
|
|
58
59
|
protected void handleOnNewIntent(Intent data) {
|
|
59
60
|
super.handleOnNewIntent(data);
|
|
60
61
|
Bundle bundle = data.getExtras();
|
|
@@ -121,6 +122,7 @@ public class PushNotificationsPlugin extends Plugin {
|
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
@PluginMethod
|
|
125
|
+
@SuppressWarnings("deprecation")
|
|
124
126
|
public void getDeliveredNotifications(PluginCall call) {
|
|
125
127
|
JSArray notifications = new JSArray();
|
|
126
128
|
StatusBarNotification[] activeNotifications = notificationManager.getActiveNotifications();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/push-notifications",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.2",
|
|
4
4
|
"description": "The Push Notifications API provides access to native push notifications.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "3865beba413621711a947acc8d61bb4c74d98122"
|
|
86
86
|
}
|