@capacitor/push-notifications 7.0.4 → 7.0.6
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
CHANGED
|
@@ -27,7 +27,9 @@ func application(_ application: UIApplication, didFailToRegisterForRemoteNotific
|
|
|
27
27
|
|
|
28
28
|
## Android
|
|
29
29
|
|
|
30
|
-
The Push Notification API uses [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) SDK for handling notifications. See [Set up a Firebase Cloud Messaging client app on Android](https://firebase.google.com/docs/cloud-messaging/android/client) and follow the instructions for creating a Firebase project and registering your application.
|
|
30
|
+
The Push Notification API uses [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) SDK for handling notifications. See [Set up a Firebase Cloud Messaging client app on Android](https://firebase.google.com/docs/cloud-messaging/android/client) and follow the instructions for creating a Firebase project and registering your application.
|
|
31
|
+
|
|
32
|
+
**There is no need to add the Firebase SDK** to your app or edit your app manifest - the Push Notifications provides that for you. All that is required is your Firebase project's `google-services.json` file added to the module (app-level) directory of your app.
|
|
31
33
|
|
|
32
34
|
Android 13 requires a permission check in order to receive push notifications. You are required to call `checkPermissions()` and `requestPermissions()` accordingly, when targeting SDK 33.
|
|
33
35
|
|
package/android/build.gradle
CHANGED
|
@@ -43,7 +43,7 @@ android {
|
|
|
43
43
|
buildTypes {
|
|
44
44
|
release {
|
|
45
45
|
minifyEnabled false
|
|
46
|
-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
46
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
lintOptions {
|
package/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.java
CHANGED
|
@@ -64,8 +64,7 @@ public class PushNotificationsPlugin extends Plugin {
|
|
|
64
64
|
if (key.equals("google.message_id")) {
|
|
65
65
|
notificationJson.put("id", bundle.getString(key));
|
|
66
66
|
} else {
|
|
67
|
-
|
|
68
|
-
dataObject.put(key, valueStr);
|
|
67
|
+
dataObject.put(key, bundle.get(key));
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
notificationJson.put("data", dataObject);
|
|
@@ -144,7 +143,7 @@ public class PushNotificationsPlugin extends Plugin {
|
|
|
144
143
|
JSObject extras = new JSObject();
|
|
145
144
|
|
|
146
145
|
for (String key : notification.extras.keySet()) {
|
|
147
|
-
extras.put(key, notification.extras.
|
|
146
|
+
extras.put(key, notification.extras.get(key));
|
|
148
147
|
}
|
|
149
148
|
|
|
150
149
|
jsNotif.put("data", extras);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/push-notifications",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.6",
|
|
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": "78a4a360a0ef77fc659ffbedf24af3114cc7ca72"
|
|
86
86
|
}
|