Skip to content

Commit

Permalink
UPDATE cordova-plugin-hms-push 6.11.0-300
Browse files Browse the repository at this point in the history
  • Loading branch information
ozkulbeng authored Oct 11, 2023
1 parent 7f09dbb commit 758a6e7
Show file tree
Hide file tree
Showing 30 changed files with 121 additions and 105 deletions.
67 changes: 67 additions & 0 deletions cordova-plugin-hms-push/OpenSourceSoftwareNotice.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<p style="text-align:center"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><strong><span style="font-size:16pt"><span style="font-family:Arial,sans-serif">OPEN SOURCE SOFTWARE NOTICE</span></span></strong></span></span></span></p>

<p style="text-align:center"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><strong>&nbsp;</strong></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><span style="font-family:Arial,sans-serif">Please note we provide an open source software notice along with this product and/or this product firmware (in the following just &ldquo;this product&rdquo;). The open source software licenses are granted by the respective right holders. And the open source licenses prevail all other license information with regard to the respective open source software contained in the product, including but not limited to End User Software Licensing Agreement. This notice is provided on behalf of Huawei Technologies Co. Ltd. and any of its local subsidiaries which may have provided this product to you in your local country.</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000">&nbsp;</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><strong><span style="font-size:16pt"><span style="font-family:Arial,sans-serif">Warranty Disclaimer&nbsp;&nbsp;</span></span></strong><strong>&nbsp;</strong><strong><em>&nbsp;</em></strong></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><strong><span style="font-size:9pt"><span style="font-family:Arial,sans-serif">THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.</span></span></strong></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><em>&nbsp;</em></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><strong><span style="font-size:16pt"><span style="font-family:Arial,sans-serif">Copyright Notice and License Texts</span></span></strong></span></span></span></p>

<h1 style="text-align:start"><span style="font-size:22pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><strong><span style="color:#000000"><span style="font-size:10.5pt"><span style="font-family:Arial,sans-serif">Software: com.facebook.fresco:fresco 2.6.0</span></span></span></strong></span></span></h1>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><strong><span style="font-family:Arial,sans-serif">Copyright notice:</span></strong></span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000">Copyright (c) Facebook, Inc. and its affiliates.</span></span></span></p>

<p style="text-align:start"><span style="font-size:medium"><span style="font-family:Arial,sans-serif"><span style="color:#000000">&nbsp;</span></span></span></p>

<p style="text-align:start"><span style="font-size:medium"><span style="font-family:Arial,sans-serif"><span style="color:#000000">&nbsp;</span></span></span></p>

<p style="text-align:start"><span style="font-size:medium"><span style="font-family:Arial,sans-serif"><span style="color:#000000"><strong>License:</strong>&nbsp;<span style="font-size:10.5pt">MIT License</span></span></span></span></p>

<p>Permission is hereby granted, free of charge, to any person obtaining a copy<br />
of this software and associated documentation files (the &quot;Software&quot;), to deal<br />
in the Software without restriction, including without limitation the rights<br />
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br />
copies of the Software, and to permit persons to whom the Software is<br />
furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in all<br />
copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br />
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br />
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br />
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br />
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br />
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br />
SOFTWARE.</p>

<p style="text-align:start"><span style="font-size:medium"><span style="font-family:Arial,sans-serif"><span style="color:#000000">&nbsp;</span></span></span></p>

<h1 style="text-align:start">&nbsp;</h1>

<p style="text-align:start"><span style="font-size:medium"><span style="font-family:Arial,sans-serif"><span style="color:#000000">&nbsp;<strong><span style="font-size:16pt">Written Offer&nbsp;</span></strong><strong>&nbsp;</strong></span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><span style="font-family:Arial,sans-serif">This product contains software whose rights holders license it on the terms of the GNU General Public License, version 2 (GPLv2) and/or other open source software licenses. We will provide you and any third party with the source code of the software licensed under an open source software license if you send us a written request by mail or email to the following addresses:</span></span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><span style="color:blue"><u><span style="font-family:Arial,sans-serif"><a href="mailto:[email protected]" style="color:blue; text-decoration:underline">[email protected]</a></span></u></span></span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><span style="font-family:Arial,sans-serif"><span style="color:black">detailing the name of the product and the firmware version for which you need the source code and indicating how we can contact you.</span></span></span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><span style="font-family:Arial,sans-serif"><span style="color:black">Please note you need to make a payment before you obtain the complete Corresponding Source Code from us. For how much you will pay and how we will deliver the complete Corresponding Source Code to you, we will further discuss it by mail or email.</span></span></span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><span style="font-family:Arial,sans-serif"><span style="color:black">This offer is valid to anyone in receipt of this information.</span></span></span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000">&nbsp;</span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000"><strong>THIS OFFER IS VALID FOR THREE YEARS FROM THE MOMENT WE DISTRIBUTED THE PRODUCT OR FIRMWARE .</strong></span></span></span></p>

<p style="text-align:start"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="color:#000000">&nbsp;</span></span></span></p>

This file was deleted.

4 changes: 2 additions & 2 deletions cordova-plugin-hms-push/example/cordova/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [2.1. Cordova](#21-cordova)
- [3. Configuration and Description](#3-configuration-and-description)
- [4. Questions or Issues](#4-questions-or-issues)
- [5. Licencing and Terms](#5-licencing-and-terms)
- [5. Licensing and Terms](#5-licensing-and-terms)

---

Expand Down Expand Up @@ -113,6 +113,6 @@ the [GitHub repository](https://github.com/HMS-Core/hms-cordova-plugin).
---
## 5. Licencing and Terms
## 5. Licensing and Terms
HMS Push Cordova Plugin is licensed under the [Apache 2.0 license](LICENSE).
2 changes: 1 addition & 1 deletion cordova-plugin-hms-push/example/cordova/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<widget id="<PACKAGE_NAME>" version="6.10.0.300" xmlns="http://www.w3.org/ns/widgets">
<widget id="<PACKAGE_NAME>" version="6.11.0.300" xmlns="http://www.w3.org/ns/widgets">
<name>
CordovaHMSPushDemo
</name>
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-push/example/cordova/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "CordovaHMSPushDemo",
"displayName": "CordovaHMSPushDemo",
"version": "6.10.0-300",
"version": "6.11.0-300",
"description": "A demo application which shows the usage of HMS Push SDK",
"main": "index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions cordova-plugin-hms-push/example/ionic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [2.1.2. With Capacitor Runtime](#212-with-capacitor-runtime)
- [3. Configuration and Description](#3-configuration-and-description)
- [4. Questions or Issues](#4-questions-or-issues)
- [5. Licencing and Terms](#5-licencing-and-terms)
- [5. Licensing and Terms](#5-licensing-and-terms)

---

Expand Down Expand Up @@ -219,7 +219,7 @@ This demo application demonstrates the usage of HMS Push Cordova Plugin.
/*
<Other dependencies>
*/
classpath 'com.huawei.agconnect:agcp:1.8.1.300'
classpath 'com.huawei.agconnect:agcp:1.9.1.300'
}
}
Expand Down Expand Up @@ -269,6 +269,6 @@ the [GitHub repository](https://github.com/HMS-Core/hms-cordova-plugin).
---
## 5. Licencing and Terms
## 5. Licensing and Terms
HMS Push Cordova Plugin is licensed under the [Apache 2.0 license](LICENSE).
2 changes: 1 addition & 1 deletion cordova-plugin-hms-push/example/ionic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "HMSPushDemo",
"version": "6.10.0-300",
"version": "6.11.0-300",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-push/hooks/after_plugin_install.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = function (context) {

function addAGConnectDependency(lines) {
var AG_CONNECT_DEPENDENCY =
"classpath 'com.huawei.agconnect:agcp:1.8.1.300' " + COMMENT;
"classpath 'com.huawei.agconnect:agcp:1.9.1.300' " + COMMENT;
var pattern =
/(\s*)classpath(\s+)[\',\"]com.android.tools.build:gradle.*[^\]\n]/m;
var index;
Expand Down
4 changes: 2 additions & 2 deletions cordova-plugin-hms-push/ionic-native/dist/ngx/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@hmscore/ionic-native-hms-push",
"description": "Ionic Native wrappers for Cordova Plugin HMS Push",
"version": "6.10.0-300",
"zipVersion": "6.10.0.300",
"version": "6.11.0-300",
"zipVersion": "6.11.0.300",
"module": "index.js",
"typings": "index.d.ts",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions cordova-plugin-hms-push/ionic-native/dist/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@hmscore/ionic-native-hms-push",
"description": "Ionic Native wrappers for Cordova Plugin HMS Push",
"version": "6.10.0-300",
"zipVersion": "6.10.0.300",
"version": "6.11.0-300",
"zipVersion": "6.11.0.300",
"module": "index.js",
"typings": "index.d.ts",
"license": "Apache-2.0",
Expand Down
3 changes: 1 addition & 2 deletions cordova-plugin-hms-push/ionic-native/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,7 @@ export class HmsPushEvent extends IonicNativePlugin {
ON_PUSH_MESSAGE_SENT_ERROR = "ON_PUSH_MESSAGE_SENT_ERROR";
ON_PUSH_MESSAGE_SENT_DELIVERED = "ON_PUSH_MESSAGE_SENT_DELIVERED";
ON_MULTI_SENDER_TOKEN_ERROR_EVENT = "ON_MULTI_SENDER_TOKEN_ERROR_EVENT";
ON_MULTI_SENDER_TOKEN_RECEIVED_EVENT =
"ON_MULTI_SENDER_TOKEN_RECEIVED_EVENT";
ON_MULTI_SENDER_TOKEN_RECEIVED_EVENT = "ON_MULTI_SENDER_TOKEN_RECEIVED_EVENT";
}

@Plugin({
Expand Down
8 changes: 3 additions & 5 deletions cordova-plugin-hms-push/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hmscore/cordova-plugin-hms-push",
"description": "Cordova HMS Push Plugin",
"version": "6.10.0-300",
"version": "6.11.0-300",
"main": "./www/HmsPush.js",
"types": "./types/index.d.ts",
"repository": {
Expand Down Expand Up @@ -40,14 +40,12 @@
"package.json",
"plugin.xml",
"README.md",
"THIRD PARTY OPEN SOURCE SOFTWARE NOTICE.txt"
"OpenSourceSoftwareNotice.html"
],
"dependencies": {
"@types/cordova": "0.0.34",
"cordova": "^11.0.0"
"@types/cordova": "0.0.34"
},
"devDependencies": {
"@types/cordova": "0.0.34",
"typescript": "3.9.5"
},
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions cordova-plugin-hms-push/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-hms-push"
version="6.10.0-300"
version="6.11.0-300"
xmlns="http://apache.org/cordova/ns/plugins/1.0">
<name>
Cordova Plugin HMS Push
Expand Down Expand Up @@ -75,7 +75,7 @@
</config-file>
<framework src="androidx.core:core:1.3.0" />
<framework src="com.facebook.fresco:fresco:2.6.0" />
<framework src="com.huawei.hms:push:6.10.0.300" />
<framework src="com.huawei.hms:push:6.11.0.300" />
<framework src="src/android/build-extras.gradle" custom="true"
type="gradleReference"></framework>
<source-file src="src/android/src/main/java/com/huawei/hms/cordova/push/HMSPush.java"
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-push/src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ android {
dependencies {
implementation 'com.facebook.fresco:fresco:2.6.0'
implementation 'org.apache.cordova:framework:8.1.0'
implementation 'com.huawei.hms:push:6.10.0.300'
implementation 'com.huawei.hms:push:6.11.0.300'
implementation 'androidx.core:core:1.3.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
public class HMSPush extends CordovaPlugin {
private static final String KIT = "Push";

private static final String VERSION = "6.10.0.300";
private static final String VERSION = "6.11.0.300";

private static CordovaInterface staticCordova;

Expand Down
9 changes: 3 additions & 6 deletions cordova-plugin-hms-push/src/www/HmsPushEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@ export const REMOTE_DATA_MESSAGE_RECEIVED = "REMOTE_DATA_MESSAGE_RECEIVED";
export const TOKEN_RECEIVED_EVENT = "TOKEN_RECEIVED_EVENT";
export const ON_TOKEN_ERROR_EVENT = "ON_TOKEN_ERROR_EVENT";
export const NOTIFICATION_OPENED_EVENT = "NOTIFICATION_OPENED_EVENT";
export const LOCAL_NOTIFICATION_ACTION_EVENT =
"LOCAL_NOTIFICATION_ACTION_EVENT";
export const LOCAL_NOTIFICATION_ACTION_EVENT = "LOCAL_NOTIFICATION_ACTION_EVENT";
export const ON_PUSH_MESSAGE_SENT = "ON_PUSH_MESSAGE_SENT";
export const ON_PUSH_MESSAGE_SENT_ERROR = "ON_PUSH_MESSAGE_SENT_ERROR";
export const ON_PUSH_MESSAGE_SENT_DELIVERED = "ON_PUSH_MESSAGE_SENT_DELIVERED";
export const ON_MULTI_SENDER_TOKEN_ERROR_EVENT =
"ON_MULTI_SENDER_TOKEN_ERROR_EVENT";
export const ON_MULTI_SENDER_TOKEN_RECEIVED_EVENT =
"ON_MULTI_SENDER_TOKEN_RECEIVED_EVENT";
export const ON_MULTI_SENDER_TOKEN_ERROR_EVENT = "ON_MULTI_SENDER_TOKEN_ERROR_EVENT";
export const ON_MULTI_SENDER_TOKEN_RECEIVED_EVENT = "ON_MULTI_SENDER_TOKEN_RECEIVED_EVENT";
6 changes: 3 additions & 3 deletions cordova-plugin-hms-push/src/www/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ function initEventHandler() {
if (window.hmsEventHandlers === undefined) window.hmsEventHandlers = {};

window.hmsEventHandler = (eventName, data) => {
if (Object.prototype.hasOwnProperty(eventName)) {
if (window.hmsEventHandlers.hasOwnProperty(eventName)) {
window.hmsEventHandlers[eventName].forEach((handler: Handler) => {
handler(data);
});
}
};

window.registerHMSEvent = (eventName, handler) => {
if (Object.prototype.hasOwnProperty(eventName)) {
if (window.hmsEventHandlers.hasOwnProperty(eventName)) {
window.hmsEventHandlers[eventName].push(handler);
} else {
window.hmsEventHandlers[eventName] = [handler];
}
};

window.unregisterHMSEvent = (eventName, handler) => {
if (Object.prototype.hasOwnProperty(eventName)) {
if (window.hmsEventHandlers.hasOwnProperty(eventName)) {
if (handler) {
const idx = window.hmsEventHandlers[eventName].indexOf(handler);
if (idx > -1) {
Expand Down
18 changes: 4 additions & 14 deletions cordova-plugin-hms-push/types/HmsLocalNotification.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,9 @@
limitations under the License.
*/

import {
Attr,
Importance,
Priority,
RepeatType,
Visibility,
} from "./Interfaces";
export declare function localNotification(
localNotification: LocalNotificationObject
): Promise<any>;
export declare function localNotificationSchedule(
localNotificationSchedule: LocalNotificationObject
): Promise<any>;
import { Attr, Importance, Priority, RepeatType, Visibility } from "./Interfaces";
export declare function localNotification(localNotification: LocalNotificationObject): Promise<any>;
export declare function localNotificationSchedule(localNotificationSchedule: LocalNotificationObject): Promise<any>;
export declare function cancelAllNotifications(): Promise<boolean>;
export declare function cancelNotifications(): Promise<boolean>;
export declare function cancelScheduledNotifications(): Promise<boolean>;
Expand All @@ -39,7 +29,7 @@ export declare function getChannels(): Promise<any>;
export declare function channelExists(channelId: string): Promise<boolean>;
export declare function channelBlocked(channelId: string): Promise<boolean>;
export declare function deleteChannel(channelId: string): Promise<boolean>;
type LocalNotificationObject = {
declare type LocalNotificationObject = {
[key in Attr]?: any;
};
interface IdTag {
Expand Down
2 changes: 1 addition & 1 deletion cordova-plugin-hms-push/types/HmsPush.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export declare function setItem(key: string, value: string): Promise<void>;
export declare function removeItem(key: string): Promise<void>;
export declare function getItem(key: string): Promise<object>;
export declare function removeBackgroundFile(): Promise<void>;
type RemoteMessageObject = {
declare type RemoteMessageObject = {
[key in RemoteMessageBuilder]?: any;
};
export { RemoteMessageBuilder };
Expand Down
Loading

0 comments on commit 758a6e7

Please sign in to comment.