indigitall-hms-capacitor-plugin 1.4.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 ADDED
@@ -0,0 +1,37 @@
1
+ # indigitall-hms-capacitor-plugin
2
+
3
+ Capacitor Indigitall Hms Plugin
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install indigitall-hms-capacitor-plugin
9
+ npx cap sync
10
+ ```
11
+
12
+ ## API
13
+
14
+ <docgen-index>
15
+
16
+ * [`echo(...)`](#echo)
17
+
18
+ </docgen-index>
19
+
20
+ <docgen-api>
21
+ <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
22
+
23
+ ### echo(...)
24
+
25
+ ```typescript
26
+ echo(options: { value: string; }) => Promise<{ value: string; }>
27
+ ```
28
+
29
+ | Param | Type |
30
+ | ------------- | ------------------------------- |
31
+ | **`options`** | <code>{ value: string; }</code> |
32
+
33
+ **Returns:** <code>Promise&lt;{ value: string; }&gt;</code>
34
+
35
+ --------------------
36
+
37
+ </docgen-api>
@@ -0,0 +1,68 @@
1
+
2
+ apply plugin: 'com.huawei.agconnect'
3
+ ext {
4
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
5
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
6
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
7
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
8
+ }
9
+
10
+ buildscript {
11
+ repositories {
12
+ google()
13
+ mavenCentral()
14
+ maven { url 'https://developer.huawei.com/repo/' }
15
+ }
16
+ dependencies {
17
+ classpath 'com.android.tools.build:gradle:4.2.1'
18
+ classpath 'com.huawei.agconnect:agcp:1.6.5.300'
19
+ }
20
+ }
21
+
22
+ apply plugin: 'com.android.library'
23
+
24
+ android {
25
+ compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 31
26
+ defaultConfig {
27
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
28
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 31
29
+ versionCode 1
30
+ versionName "1.0"
31
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
32
+ }
33
+ buildTypes {
34
+ release {
35
+ minifyEnabled false
36
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
37
+ }
38
+ }
39
+ lintOptions {
40
+ abortOnError false
41
+ }
42
+ compileOptions {
43
+ sourceCompatibility JavaVersion.VERSION_1_8
44
+ targetCompatibility JavaVersion.VERSION_1_8
45
+ }
46
+ }
47
+
48
+ repositories {
49
+ google()
50
+ mavenCentral()
51
+ maven { url 'https://developer.huawei.com/repo/' }
52
+ }
53
+
54
+
55
+ dependencies {
56
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
57
+ implementation project(':capacitor-android')
58
+ implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
59
+ implementation project(path: ':indigitall-capacitor-plugin')
60
+ testImplementation "junit:junit:$junitVersion"
61
+ androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
62
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
63
+ implementation('com.indigitall:android-hms:4.20.+'){
64
+ exclude group: "com.indigitall", module: "android-commons"
65
+ }
66
+ implementation('com.huawei.hms:push:6.3.0.304')
67
+ implementation('com.huawei.hms:location:6.2.0.300')
68
+ }
@@ -0,0 +1,22 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="com.indigitall.hms.capacitor">
3
+ <uses-permission android:name="android.permission.INTERNET" />
4
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
5
+ <uses-permission android:name="android.permission.VIBRATE" />
6
+ <uses-permission android:name="android.permission.WAKE_LOCK"/> <queries>
7
+ <intent>
8
+ <action android:name="android.intent.action.VIEW" />
9
+ <category android:name="android.intent.category.BROWSABLE" />
10
+ <data android:scheme="https" />
11
+ </intent>
12
+ </queries>
13
+ <application
14
+ android:allowBackup="true">
15
+ <service android:name=".IndigitallHMSMessagingService"
16
+ android:exported="false">
17
+ <intent-filter>
18
+ <action android:name="com.huawei.push.action.MESSAGING_EVENT" />
19
+ </intent-filter>
20
+ </service>
21
+ </application>
22
+ </manifest>
@@ -0,0 +1,35 @@
1
+ package com.indigitall.hms.capacitor;
2
+
3
+ import com.huawei.hms.push.RemoteMessage;
4
+ import com.indigitall.android.hms.services.HMSMessagingService;
5
+ //import com.indigitall.android.utils.FirebaseUtils;
6
+ import com.indigitall.capacitor.IndigitallCpPlugin;
7
+
8
+ import org.json.JSONException;
9
+ import org.json.JSONObject;
10
+
11
+ public class IndigitallHMSMessagingService extends HMSMessagingService {
12
+
13
+ @Override
14
+ public void onMessageReceived(RemoteMessage remoteMessage) {
15
+ super.onMessageReceived(remoteMessage);
16
+ String data = remoteMessage.getData();
17
+ JSONObject jsonObject;
18
+ try {
19
+ jsonObject = new JSONObject(data);
20
+ if (IndigitallCpPlugin.indigitallInterface != null) {
21
+ IndigitallCpPlugin.indigitallInterface.onMessageReceived(jsonObject);
22
+ }
23
+ } catch (JSONException e) {
24
+ e.printStackTrace();
25
+ }
26
+ }
27
+
28
+ @Override
29
+ public void onNewToken(String s) {
30
+ // FirebaseUtils.INSTANCE.setPushToken(this);
31
+ super.onNewToken(s);
32
+ }
33
+
34
+
35
+ }
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -0,0 +1,3 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,7 @@
1
+ (function () {
2
+ 'use strict';
3
+
4
+
5
+
6
+ })();
7
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "indigitall-hms-capacitor-plugin",
3
+ "version": "1.4.0",
4
+ "description": "Capacitor Indigitall Hms Plugin",
5
+ "main": "dist/plugin.cjs.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/esm/index.d.ts",
8
+ "unpkg": "dist/plugin.js",
9
+ "files": [
10
+ "android/src/main/",
11
+ "android/build.gradle",
12
+ "dist/"
13
+ ],
14
+ "author": "sdk@indigitall.com",
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://sdkindigitall@bitbucket.org/indigitallfuente/capacitor-sdk.git.git"
19
+ },
20
+ "bugs": {
21
+ "url": "https://sdkindigitall@bitbucket.org/indigitallfuente/capacitor-sdk.git/issues"
22
+ },
23
+ "keywords": [
24
+ "capacitor",
25
+ "plugin",
26
+ "native"
27
+ ],
28
+ "scripts": {
29
+ "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
30
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
31
+ "verify:android": "cd android && ./gradlew clean build test && cd ..",
32
+ "verify:web": "npm run build",
33
+ "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
34
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
35
+ "eslint": "eslint . --ext ts",
36
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
37
+ "swiftlint": "node-swiftlint",
38
+ "docgen": "docgen --api IndigitallHMSMessagingService --output-readme README.md --output-json dist/docs.json",
39
+ "build": "npm run clean && tsc && rollup -c rollup.config.js",
40
+ "clean": "rimraf ./dist",
41
+ "watch": "tsc --watch",
42
+ "prepublishOnly": "npm run build"
43
+ },
44
+ "devDependencies": {
45
+ "@capacitor/android": "^4.0.0",
46
+ "@capacitor/core": "^4.0.0",
47
+ "@capacitor/docgen": "^0.0.18",
48
+ "@capacitor/ios": "^4.0.0",
49
+ "@ionic/eslint-config": "^0.3.0",
50
+ "@ionic/prettier-config": "^1.0.1",
51
+ "@ionic/swiftlint-config": "^1.1.2",
52
+ "eslint": "^7.11.0",
53
+ "prettier": "~2.3.0",
54
+ "prettier-plugin-java": "~1.0.2",
55
+ "rimraf": "^3.0.2",
56
+ "rollup": "^2.32.0",
57
+ "swiftlint": "^1.0.1",
58
+ "typescript": "~4.1.5"
59
+ },
60
+ "peerDependencies": {
61
+ "@capacitor/core": "^4.0.0"
62
+ },
63
+ "prettier": "@ionic/prettier-config",
64
+ "swiftlint": "@ionic/swiftlint-config",
65
+ "eslintConfig": {
66
+ "extends": "@ionic/eslint-config/recommended"
67
+ },
68
+ "capacitor": {
69
+ "android": {
70
+ "src": "android"
71
+ }
72
+ },
73
+ "dependencies": {
74
+ "indigitall-capacitor-plugin": "file:../sdk"
75
+ }
76
+ }