@capacitor-community/fcm 5.0.2 → 6.0.0

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
@@ -6,13 +6,13 @@
6
6
  </p>
7
7
 
8
8
  <p align="center">
9
- <img src="https://img.shields.io/maintenance/yes/2022?style=flat-square" />
9
+ <img src="https://img.shields.io/maintenance/yes/2024?style=flat-square" />
10
10
  <a href="https://www.npmjs.com/package/@capacitor-community/fcm"><img src="https://img.shields.io/npm/l/@capacitor-community/fcm?style=flat-square" /></a>
11
11
  <br>
12
12
  <a href="https://www.npmjs.com/package/@capacitor-community/fcm"><img src="https://img.shields.io/npm/dw/@capacitor-community/fcm?style=flat-square" /></a>
13
13
  <a href="https://www.npmjs.com/package/@capacitor-community/fcm"><img src="https://img.shields.io/npm/v/@capacitor-community/fcm?style=flat-square" /></a>
14
14
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
15
- <a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-23-orange?style=flat-square" /></a>
15
+ <a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-25-orange?style=flat-square" /></a>
16
16
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
17
17
 
18
18
  </p>
@@ -251,6 +251,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
251
251
  <td align="center" valign="top" width="20%"><a href="http://www.jcesarmobile.com/"><img src="https://avatars.githubusercontent.com/u/1637892?v=4?s=75" width="75px;" alt="jcesarmobile"/><br /><sub><b>jcesarmobile</b></sub></a><br /><a href="#question-jcesarmobile" title="Answering Questions">💬</a> <a href="https://github.com/capacitor-community/fcm/commits?author=jcesarmobile" title="Documentation">📖</a> <a href="#maintenance-jcesarmobile" title="Maintenance">🚧</a></td>
252
252
  <td align="center" valign="top" width="20%"><a href="https://github.com/ramikhafagi96"><img src="https://avatars.githubusercontent.com/u/38646828?v=4?s=75" width="75px;" alt="Rami Khafagi"/><br /><sub><b>Rami Khafagi</b></sub></a><br /><a href="https://github.com/capacitor-community/fcm/commits?author=ramikhafagi96" title="Code">💻</a></td>
253
253
  <td align="center" valign="top" width="20%"><a href="https://github.com/bipoza"><img src="https://avatars.githubusercontent.com/u/26112509?v=4?s=75" width="75px;" alt="Bittor Poza"/><br /><sub><b>Bittor Poza</b></sub></a><br /><a href="https://github.com/capacitor-community/fcm/commits?author=bipoza" title="Code">💻</a></td>
254
+ <td align="center" valign="top" width="20%"><a href="https://github.com/Vishal-Isharani"><img src="https://avatars.githubusercontent.com/u/10386581?v=4?s=75" width="75px;" alt="Vishal Isharani"/><br /><sub><b>Vishal Isharani</b></sub></a><br /><a href="#maintenance-Vishal-Isharani" title="Maintenance">🚧</a></td>
255
+ <td align="center" valign="top" width="20%"><a href="https://github.com/kashz"><img src="https://avatars.githubusercontent.com/u/12661101?v=4?s=75" width="75px;" alt="Shunta KARASAWA"/><br /><sub><b>Shunta KARASAWA</b></sub></a><br /><a href="#maintenance-kashz" title="Maintenance">🚧</a></td>
254
256
  </tr>
255
257
  </tbody>
256
258
  </table>
@@ -3,7 +3,7 @@ ext {
3
3
  androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
4
4
  androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
5
5
  androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
6
- firebaseMessagingVersion = project.hasProperty('firebaseMessagingVersion') ? rootProject.ext.firebaseMessagingVersion : '23.1.2'
6
+ firebaseMessagingVersion = project.hasProperty('firebaseMessagingVersion') ? rootProject.ext.firebaseMessagingVersion : '23.3.1'
7
7
  }
8
8
 
9
9
  buildscript {
@@ -12,7 +12,7 @@ buildscript {
12
12
  mavenCentral()
13
13
  }
14
14
  dependencies {
15
- classpath 'com.android.tools.build:gradle:8.0.0'
15
+ classpath 'com.android.tools.build:gradle:8.2.1'
16
16
  }
17
17
  }
18
18
 
@@ -20,10 +20,10 @@ apply plugin: 'com.android.library'
20
20
 
21
21
  android {
22
22
  namespace "com.getcapacitor.community.fcm.fcm"
23
- compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
23
+ compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
24
24
  defaultConfig {
25
25
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
26
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
26
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
27
27
  versionCode 1
28
28
  versionName "1.0"
29
29
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -84,13 +84,13 @@ public class FCMPlugin extends Plugin {
84
84
 
85
85
  @PluginMethod()
86
86
  public void refreshToken(final PluginCall call) {
87
- FirebaseMessaging.getInstance().deleteToken();
88
- FirebaseMessaging.getInstance().getToken().addOnCompleteListener(getActivity(), tokenResult -> {
89
- JSObject data = new JSObject();
90
- data.put("token", tokenResult.getResult());
91
- call.resolve(data);
92
- });
93
- FirebaseMessaging.getInstance().getToken().addOnFailureListener(e -> call.reject("Failed to get FCM registration token", e));
87
+ FirebaseMessaging.getInstance().deleteToken().addOnCompleteListener((result) -> {
88
+ FirebaseMessaging.getInstance().getToken().addOnCompleteListener(getActivity(), tokenResult -> {
89
+ JSObject data = new JSObject();
90
+ data.put("token", tokenResult.getResult());
91
+ call.resolve(data);
92
+ }).addOnFailureListener(e -> call.reject("Failed to get FCM registration token", e));
93
+ }).addOnFailureListener(e -> call.reject("Failed to delete FCM registration token", e));
94
94
  }
95
95
 
96
96
  @PluginMethod()
@@ -7,7 +7,9 @@ CAP_PLUGIN(FCMPlugin, "FCM",
7
7
  CAP_PLUGIN_METHOD(subscribeTo, CAPPluginReturnPromise);
8
8
  CAP_PLUGIN_METHOD(unsubscribeFrom, CAPPluginReturnPromise);
9
9
  CAP_PLUGIN_METHOD(getToken, CAPPluginReturnPromise);
10
+ CAP_PLUGIN_METHOD(refreshToken, CAPPluginReturnPromise);
10
11
  CAP_PLUGIN_METHOD(deleteInstance, CAPPluginReturnPromise);
11
12
  CAP_PLUGIN_METHOD(setAutoInit, CAPPluginReturnPromise);
12
13
  CAP_PLUGIN_METHOD(isAutoInitEnabled, CAPPluginReturnPromise);
14
+ CAP_PLUGIN_METHOD(refreshToken, CAPPluginReturnPromise);
13
15
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor-community/fcm",
3
- "version": "5.0.2",
3
+ "version": "6.0.0",
4
4
  "description": "Enable Firebase Cloud Messaging features for Capacitor apps",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -51,10 +51,10 @@
51
51
  "contributors:gen": "all-contributors generate"
52
52
  },
53
53
  "devDependencies": {
54
- "@capacitor/android": "^5.0.0",
55
- "@capacitor/core": "^5.0.0",
54
+ "@capacitor/android": "^6.0.0",
55
+ "@capacitor/core": "^6.0.0",
56
56
  "@capacitor/docgen": "^0.0.18",
57
- "@capacitor/ios": "^5.0.0",
57
+ "@capacitor/ios": "^6.0.0",
58
58
  "@ionic/eslint-config": "^0.3.0",
59
59
  "@ionic/prettier-config": "^1.0.1",
60
60
  "@ionic/swiftlint-config": "^1.1.2",
@@ -69,7 +69,7 @@
69
69
  "typescript": "~4.1.5"
70
70
  },
71
71
  "peerDependencies": {
72
- "@capacitor/core": "^5.0.0"
72
+ "@capacitor/core": "^6.0.0"
73
73
  },
74
74
  "prettier": "@ionic/prettier-config",
75
75
  "swiftlint": "@ionic/swiftlint-config",