capacitor-signal-strength 0.0.1

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.
@@ -0,0 +1,17 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'CapacitorSignalStrength'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.license = package['license']
10
+ s.homepage = package['repository']['url']
11
+ s.author = package['author']
12
+ s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
+ s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
+ s.ios.deployment_target = '13.0'
15
+ s.dependency 'Capacitor'
16
+ s.swift_version = '5.1'
17
+ end
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # capacitor-signal-strength
2
+
3
+ Plugin use to get Android device signal strength
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install capacitor-signal-strength
9
+ npx cap sync
10
+ ```
11
+
12
+ ## API
13
+
14
+ <docgen-index>
15
+
16
+ * [`getdBm()`](#getdbm)
17
+ * [`getPercentage(...)`](#getpercentage)
18
+ * [`getLevel()`](#getlevel)
19
+ * [`checkPermissions()`](#checkpermissions)
20
+ * [`requestPermissions()`](#requestpermissions)
21
+ * [Interfaces](#interfaces)
22
+ * [Type Aliases](#type-aliases)
23
+
24
+ </docgen-index>
25
+
26
+ <docgen-api>
27
+ <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
28
+
29
+ ### getdBm()
30
+
31
+ ```typescript
32
+ getdBm() => Promise<DBm>
33
+ ```
34
+
35
+ **Returns:** <code>Promise&lt;<a href="#dbm">DBm</a>&gt;</code>
36
+
37
+ --------------------
38
+
39
+
40
+ ### getPercentage(...)
41
+
42
+ ```typescript
43
+ getPercentage(options: { connection: ConnectionType; }) => Promise<Percentage>
44
+ ```
45
+
46
+ | Param | Type |
47
+ | ------------- | -------------------------------------------------------------------------- |
48
+ | **`options`** | <code>{ connection: <a href="#connectiontype">ConnectionType</a>; }</code> |
49
+
50
+ **Returns:** <code>Promise&lt;<a href="#percentage">Percentage</a>&gt;</code>
51
+
52
+ --------------------
53
+
54
+
55
+ ### getLevel()
56
+
57
+ ```typescript
58
+ getLevel() => Promise<Level>
59
+ ```
60
+
61
+ **Returns:** <code>Promise&lt;<a href="#level">Level</a>&gt;</code>
62
+
63
+ --------------------
64
+
65
+
66
+ ### checkPermissions()
67
+
68
+ ```typescript
69
+ checkPermissions() => Promise<PermissionStatus>
70
+ ```
71
+
72
+ **Returns:** <code>Promise&lt;<a href="#permissionstatus">PermissionStatus</a>&gt;</code>
73
+
74
+ --------------------
75
+
76
+
77
+ ### requestPermissions()
78
+
79
+ ```typescript
80
+ requestPermissions() => Promise<PermissionStatus>
81
+ ```
82
+
83
+ **Returns:** <code>Promise&lt;<a href="#permissionstatus">PermissionStatus</a>&gt;</code>
84
+
85
+ --------------------
86
+
87
+
88
+ ### Interfaces
89
+
90
+
91
+ #### DBm
92
+
93
+ | Prop | Type |
94
+ | --------- | ------------------- |
95
+ | **`dBm`** | <code>number</code> |
96
+
97
+
98
+ #### Percentage
99
+
100
+ | Prop | Type |
101
+ | ---------------- | ------------------- |
102
+ | **`percentage`** | <code>string</code> |
103
+
104
+
105
+ #### Level
106
+
107
+ | Prop | Type |
108
+ | ----------- | ------------------- |
109
+ | **`level`** | <code>number</code> |
110
+
111
+
112
+ #### PermissionStatus
113
+
114
+ | Prop | Type |
115
+ | ---------- | ----------------------------------------------------------- |
116
+ | **`info`** | <code><a href="#permissionstate">PermissionState</a></code> |
117
+
118
+
119
+ ### Type Aliases
120
+
121
+
122
+ #### ConnectionType
123
+
124
+ The type of network connection that a device might have.
125
+
126
+ <code>'wifi' | 'cellular' | 'none' | 'unknown'</code>
127
+
128
+
129
+ #### PermissionState
130
+
131
+ <code>'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'</code>
132
+
133
+ </docgen-api>
@@ -0,0 +1,58 @@
1
+ ext {
2
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
6
+ }
7
+
8
+ buildscript {
9
+ repositories {
10
+ google()
11
+ mavenCentral()
12
+ }
13
+ dependencies {
14
+ classpath 'com.android.tools.build:gradle:8.0.0'
15
+ }
16
+ }
17
+
18
+ apply plugin: 'com.android.library'
19
+
20
+ android {
21
+ namespace "com.gbvp.androidsignalstrength"
22
+ compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
23
+ defaultConfig {
24
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
25
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
26
+ versionCode 1
27
+ versionName "1.0"
28
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
29
+ }
30
+ buildTypes {
31
+ release {
32
+ minifyEnabled false
33
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
34
+ }
35
+ }
36
+ lintOptions {
37
+ abortOnError false
38
+ }
39
+ compileOptions {
40
+ sourceCompatibility JavaVersion.VERSION_17
41
+ targetCompatibility JavaVersion.VERSION_17
42
+ }
43
+ }
44
+
45
+ repositories {
46
+ google()
47
+ mavenCentral()
48
+ }
49
+
50
+
51
+ dependencies {
52
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
53
+ implementation project(':capacitor-android')
54
+ implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
55
+ testImplementation "junit:junit:$junitVersion"
56
+ androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
57
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
58
+ }
@@ -0,0 +1,6 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <uses-permission android:name="android.permission.READ_PHONE_STATE" />
3
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
4
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
5
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
6
+ </manifest>
@@ -0,0 +1,131 @@
1
+ package com.gbvp.androidsignalstrength;
2
+
3
+ import android.annotation.SuppressLint;
4
+ import android.content.Context;
5
+ import android.location.LocationManager;
6
+ import android.os.Build;
7
+ import android.telephony.CellInfo;
8
+ import android.telephony.CellInfoCdma;
9
+ import android.telephony.CellInfoGsm;
10
+ import android.telephony.CellInfoLte;
11
+ import android.telephony.CellInfoWcdma;
12
+ import android.telephony.CellSignalStrengthCdma;
13
+ import android.telephony.CellSignalStrengthGsm;
14
+ import android.telephony.CellSignalStrengthLte;
15
+ import android.telephony.CellSignalStrengthWcdma;
16
+ import android.telephony.PhoneStateListener;
17
+ import android.telephony.TelephonyManager;
18
+
19
+ import androidx.core.location.LocationManagerCompat;
20
+
21
+ import com.getcapacitor.JSObject;
22
+
23
+ import java.util.List;
24
+
25
+ public class SignalStrength {
26
+
27
+ class MyPhoneStateListener extends PhoneStateListener {
28
+ @Override
29
+ public void onSignalStrengthsChanged(android.telephony.SignalStrength signalStrength) {
30
+ super.onSignalStrengthsChanged(signalStrength);
31
+ asulevel = signalStrength.getGsmSignalStrength();
32
+ }
33
+ }
34
+
35
+ public int asulevel = -1;
36
+ public int asulevelmax = 31;
37
+ public int dBmlevel = 0;
38
+ public String signalLevel;
39
+ private Context context;
40
+
41
+ public SignalStrength(Context context) {
42
+ this.context = context;
43
+ }
44
+
45
+ @SuppressLint("MissingPermission")
46
+ public Boolean isPhoneStateEnabled() {
47
+ Boolean phoneStateEnabled = false;
48
+ TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
49
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
50
+ phoneStateEnabled = tm.isDataEnabled();
51
+ }
52
+
53
+ return phoneStateEnabled;
54
+ }
55
+
56
+ @SuppressLint("MissingPermission")
57
+ public Boolean isLocationServicesEnabled() {
58
+ LocationManager lm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
59
+ return LocationManagerCompat.isLocationEnabled(lm);
60
+ }
61
+
62
+ @SuppressLint("MissingPermission")
63
+ public JSObject getInfo(TelephonyManager tm) {
64
+ JSObject ret = new JSObject();
65
+ List<CellInfo> cellInfoList = tm.getAllCellInfo();
66
+ // Checking if list values are not null
67
+ if (cellInfoList != null) {
68
+ for (final CellInfo info : cellInfoList) {
69
+ if (info instanceof CellInfoGsm) {
70
+ //GSM Network
71
+ CellSignalStrengthGsm cellSignalStrength = ((CellInfoGsm) info).getCellSignalStrength();
72
+ ret.put("dBmlevel", cellSignalStrength.getDbm());
73
+ ret.put("asulevel", cellSignalStrength.getAsuLevel());
74
+ ret.put("signalLevel", cellSignalStrength.getLevel() + "");
75
+ ret.put("asulevelmax", 31);
76
+ } else if (info instanceof CellInfoCdma) {
77
+ //CDMA Network
78
+ CellSignalStrengthCdma cellSignalStrength = ((CellInfoCdma) info).getCellSignalStrength();
79
+ ret.put("dBmlevel", cellSignalStrength.getDbm());
80
+ ret.put("asulevel", cellSignalStrength.getAsuLevel());
81
+ ret.put("signalLevel", cellSignalStrength.getLevel() + "");
82
+ ret.put("asulevelmax", 97);
83
+ } else if (info instanceof CellInfoLte) {
84
+ //LTE Network
85
+ CellSignalStrengthLte cellSignalStrength = ((CellInfoLte) info).getCellSignalStrength();
86
+ ret.put("dBmlevel", cellSignalStrength.getDbm());
87
+ ret.put("asulevel", cellSignalStrength.getAsuLevel());
88
+ ret.put("signalLevel", cellSignalStrength.getLevel() + "");
89
+ ret.put("asulevelmax", 97);
90
+ } else if (info instanceof CellInfoWcdma) {
91
+ //WCDMA Network
92
+ CellSignalStrengthWcdma cellSignalStrength = ((CellInfoWcdma) info).getCellSignalStrength();
93
+ ret.put("dBmlevel", cellSignalStrength.getDbm());
94
+ ret.put("asulevel", cellSignalStrength.getAsuLevel());
95
+ ret.put("signalLevel", cellSignalStrength.getLevel() + "");
96
+ ret.put("asulevelmax", 31);
97
+ } else {
98
+ throw new IllegalArgumentException("Unknown type of cell signal.");
99
+ }
100
+ }
101
+ } else {
102
+ //Mostly for Samsung devices, after checking if the list is indeed empty.
103
+ try {
104
+ MyPhoneStateListener myPhoneStateListener = new SignalStrength.MyPhoneStateListener();
105
+ tm.listen(myPhoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
106
+ int cc = 0;
107
+ while (asulevel == -1) {
108
+ Thread.sleep(200);
109
+ if (cc++ >= 5) {
110
+ break;
111
+ }
112
+ }
113
+ ret.put("asulevelmax", 31);
114
+ ret.put("dBmlevel", -113 + 2 * asulevel);
115
+ tm.listen(myPhoneStateListener, PhoneStateListener.LISTEN_NONE);
116
+ ret.put("signalLevel", String.format("%.0g%n", 1.0 * asulevel / asulevelmax * 4));
117
+ ret.put("asulevel", asulevel);
118
+ } catch (Exception e) {
119
+ throw new IllegalArgumentException(e);
120
+ }
121
+ }
122
+
123
+ return ret;
124
+ }
125
+
126
+ @SuppressWarnings("MissingPermission")
127
+ public TelephonyManager getPhoneState() {
128
+ TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
129
+ return tm;
130
+ }
131
+ }
@@ -0,0 +1,182 @@
1
+ package com.gbvp.androidsignalstrength;
2
+
3
+ import android.Manifest;
4
+ import android.telephony.TelephonyManager;
5
+
6
+ import com.getcapacitor.JSObject;
7
+ import com.getcapacitor.PermissionState;
8
+ import com.getcapacitor.Plugin;
9
+ import com.getcapacitor.PluginCall;
10
+ import com.getcapacitor.PluginMethod;
11
+ import com.getcapacitor.annotation.CapacitorPlugin;
12
+ import com.getcapacitor.annotation.Permission;
13
+ import com.getcapacitor.annotation.PermissionCallback;
14
+
15
+ import java.util.List;
16
+
17
+ @CapacitorPlugin(
18
+ name = "SignalStrength",
19
+ permissions = {
20
+ @Permission(alias = SignalStrengthPlugin.PHONE_STATE, strings = {Manifest.permission.READ_PHONE_STATE}),
21
+ @Permission(alias = SignalStrengthPlugin.LOCATION, strings = {Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}),
22
+ @Permission(alias = SignalStrengthPlugin.COARSE_LOCATION, strings = { Manifest.permission.ACCESS_COARSE_LOCATION })
23
+ }
24
+ )
25
+ public class SignalStrengthPlugin extends Plugin {
26
+
27
+ public static final String PHONE_STATE = "phone_state";
28
+ public static final String LOCATION = "location";
29
+ public static final String COARSE_LOCATION = "coarse_Location";
30
+ private SignalStrength implementation;
31
+ private TelephonyManager tm;
32
+
33
+ @Override
34
+ public void load() {
35
+ implementation = new SignalStrength(getContext());
36
+ tm = implementation.getPhoneState();
37
+ }
38
+
39
+ @PluginMethod
40
+ public void getdBm(final PluginCall call) {
41
+ if (getPermissionState(SignalStrengthPlugin.PHONE_STATE) != PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.LOCATION) != PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.COARSE_LOCATION) != PermissionState.GRANTED) {
42
+ String[] aliases = getAliases(call);
43
+ requestPermissionForAliases(aliases, call, "requestPermissionsDBmCallback");
44
+ } else {
45
+ JSObject obj = implementation.getInfo(tm);
46
+ call.resolve(getJSObjectForDBmInfo(obj.getInteger("dBmlevel")));
47
+ }
48
+ }
49
+
50
+ @PluginMethod
51
+ public void getPercentage(final PluginCall call) {
52
+ if (getPermissionState(SignalStrengthPlugin.PHONE_STATE) != PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.LOCATION) != PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.COARSE_LOCATION) != PermissionState.GRANTED) {
53
+ String[] aliases = getAliases(call);
54
+ requestPermissionForAliases(aliases, call, "requestPermissionsPercentageCallback");
55
+ } else {
56
+ JSObject obj = implementation.getInfo(tm);
57
+ String status = call.getString("connection");
58
+ call.resolve(getJSObjectForPercentageInfo(status, obj));
59
+ }
60
+ }
61
+
62
+ @PluginMethod
63
+ public void getLevel(final PluginCall call) {
64
+ if (getPermissionState(SignalStrengthPlugin.PHONE_STATE) != PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.LOCATION) != PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.COARSE_LOCATION) != PermissionState.GRANTED) {
65
+ String[] aliases = getAliases(call);
66
+ requestPermissionForAliases(aliases, call, "requestPermissionsLevelCallback");
67
+ } else {
68
+ JSObject obj = implementation.getInfo(tm);
69
+ call.resolve(getJSObjectForLevelInfo(obj.getInteger("signalLevel")));
70
+ }
71
+ }
72
+
73
+ @Override
74
+ @PluginMethod
75
+ public void checkPermissions(PluginCall call) {
76
+ if (implementation.isPhoneStateEnabled() && implementation.isLocationServicesEnabled()) {
77
+ super.checkPermissions(call);
78
+ } else {
79
+ call.reject("Permissions are not granted.");
80
+ }
81
+ }
82
+
83
+ @Override
84
+ @PluginMethod
85
+ public void requestPermissions(PluginCall call) {
86
+ if (implementation.isPhoneStateEnabled() && implementation.isLocationServicesEnabled()) {
87
+ super.requestPermissions(call);
88
+ } else {
89
+ call.reject("Permissions are not granted.");
90
+ }
91
+ }
92
+
93
+ @PermissionCallback
94
+ private void requestPermissionsDBmCallback(PluginCall call) {
95
+ if (getPermissionState(SignalStrengthPlugin.PHONE_STATE) == PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.LOCATION) == PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.COARSE_LOCATION) == PermissionState.GRANTED) {
96
+ JSObject obj = implementation.getInfo(tm);
97
+ call.resolve(getJSObjectForDBmInfo(obj.getInteger("dBmlevel")));
98
+ } else {
99
+ call.reject("Failed to retrieve signal strength.");
100
+ }
101
+ }
102
+
103
+ @PermissionCallback
104
+ private void requestPermissionsPercentageCallback(PluginCall call) {
105
+ if (getPermissionState(SignalStrengthPlugin.PHONE_STATE) == PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.LOCATION) == PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.COARSE_LOCATION) == PermissionState.GRANTED) {
106
+ JSObject obj = implementation.getInfo(tm);
107
+ String status = call.getString("connection");
108
+ call.resolve(getJSObjectForPercentageInfo(status, obj));
109
+ } else {
110
+ call.reject("Failed to retrieve signal strength.");
111
+ }
112
+ }
113
+
114
+ @PermissionCallback
115
+ private void requestPermissionsLevelCallback(PluginCall call) {
116
+ if (getPermissionState(SignalStrengthPlugin.PHONE_STATE) == PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.LOCATION) == PermissionState.GRANTED && getPermissionState(SignalStrengthPlugin.COARSE_LOCATION) == PermissionState.GRANTED) {
117
+ JSObject obj = implementation.getInfo(tm);
118
+ call.resolve(getJSObjectForLevelInfo(obj.getInteger("signalLevel")));
119
+ } else {
120
+ call.reject("Failed to retrieve signal strength.");
121
+ }
122
+ }
123
+
124
+ private JSObject getJSObjectForDBmInfo(int dBmlevel) {
125
+ JSObject ret = new JSObject();
126
+ ret.put("dBm", dBmlevel);
127
+
128
+ return ret;
129
+ }
130
+
131
+ // SIGNAL STRENGTH INFO
132
+ /* **********************
133
+ MIN MAX
134
+ CDMA (2g)
135
+ dBm = -100 -75
136
+ asu = 0 97
137
+ LTE (4g)
138
+ dBm = -140 -44
139
+ asu = 0(99) 97
140
+ GSM (3g)
141
+ dBm = -120 -50
142
+ asu = 0(99) 31
143
+ WCDMA(3g)
144
+ dBm = -115 -50
145
+ asu = 0(99) 31
146
+
147
+ LINEAR = 100 * (1 - (((-dBmmax) - (-dBmlevel))/((-dBmmax) - (-dBmmin))));
148
+ NOT LINEAR = (2.0 * (dBmlevel + 100))/100
149
+
150
+ ********************* */
151
+ private JSObject getJSObjectForPercentageInfo(String status, JSObject obj) {
152
+ JSObject ret = new JSObject();
153
+ String result;
154
+
155
+ if (status == "wifi") {
156
+ if (obj.getInteger("dBmlevel") <= -100) {
157
+ result = String.format("%.2f", 0);
158
+ } else if (obj.getInteger("dBmlevel") >= -50) {
159
+ result = String.format("%.2f", 1);
160
+ } else {
161
+ result = String.format("%.2f", (2.0 * (obj.getInteger("dBmlevel") + 100)) / 100);
162
+ }
163
+ } else {
164
+ result = String.format("%.2f", 1.0 * obj.getInteger("asulevel") / obj.getInteger("asulevelmax"));
165
+ }
166
+
167
+ ret.put("percentage", result);
168
+ return ret;
169
+ }
170
+
171
+ private JSObject getJSObjectForLevelInfo(int signalLevel) {
172
+ JSObject ret = new JSObject();
173
+ ret.put("level", signalLevel);
174
+
175
+ return ret;
176
+ }
177
+
178
+ private String[] getAliases(PluginCall call) {
179
+ String[] aliases = {SignalStrengthPlugin.PHONE_STATE, SignalStrengthPlugin.LOCATION, SignalStrengthPlugin.COARSE_LOCATION};
180
+ return aliases;
181
+ }
182
+ }
File without changes
package/dist/docs.json ADDED
@@ -0,0 +1,196 @@
1
+ {
2
+ "api": {
3
+ "name": "SignalStrengthPlugin",
4
+ "slug": "signalstrengthplugin",
5
+ "docs": "",
6
+ "tags": [],
7
+ "methods": [
8
+ {
9
+ "name": "getdBm",
10
+ "signature": "() => Promise<DBm>",
11
+ "parameters": [],
12
+ "returns": "Promise<DBm>",
13
+ "tags": [],
14
+ "docs": "",
15
+ "complexTypes": [
16
+ "DBm"
17
+ ],
18
+ "slug": "getdbm"
19
+ },
20
+ {
21
+ "name": "getPercentage",
22
+ "signature": "(options: { connection: ConnectionType; }) => Promise<Percentage>",
23
+ "parameters": [
24
+ {
25
+ "name": "options",
26
+ "docs": "",
27
+ "type": "{ connection: ConnectionType; }"
28
+ }
29
+ ],
30
+ "returns": "Promise<Percentage>",
31
+ "tags": [],
32
+ "docs": "",
33
+ "complexTypes": [
34
+ "Percentage",
35
+ "ConnectionType"
36
+ ],
37
+ "slug": "getpercentage"
38
+ },
39
+ {
40
+ "name": "getLevel",
41
+ "signature": "() => Promise<Level>",
42
+ "parameters": [],
43
+ "returns": "Promise<Level>",
44
+ "tags": [],
45
+ "docs": "",
46
+ "complexTypes": [
47
+ "Level"
48
+ ],
49
+ "slug": "getlevel"
50
+ },
51
+ {
52
+ "name": "checkPermissions",
53
+ "signature": "() => Promise<PermissionStatus>",
54
+ "parameters": [],
55
+ "returns": "Promise<PermissionStatus>",
56
+ "tags": [],
57
+ "docs": "",
58
+ "complexTypes": [
59
+ "PermissionStatus"
60
+ ],
61
+ "slug": "checkpermissions"
62
+ },
63
+ {
64
+ "name": "requestPermissions",
65
+ "signature": "() => Promise<PermissionStatus>",
66
+ "parameters": [],
67
+ "returns": "Promise<PermissionStatus>",
68
+ "tags": [],
69
+ "docs": "",
70
+ "complexTypes": [
71
+ "PermissionStatus"
72
+ ],
73
+ "slug": "requestpermissions"
74
+ }
75
+ ],
76
+ "properties": []
77
+ },
78
+ "interfaces": [
79
+ {
80
+ "name": "DBm",
81
+ "slug": "dbm",
82
+ "docs": "",
83
+ "tags": [],
84
+ "methods": [],
85
+ "properties": [
86
+ {
87
+ "name": "dBm",
88
+ "tags": [],
89
+ "docs": "",
90
+ "complexTypes": [],
91
+ "type": "number"
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ "name": "Percentage",
97
+ "slug": "percentage",
98
+ "docs": "",
99
+ "tags": [],
100
+ "methods": [],
101
+ "properties": [
102
+ {
103
+ "name": "percentage",
104
+ "tags": [],
105
+ "docs": "",
106
+ "complexTypes": [],
107
+ "type": "string"
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "name": "Level",
113
+ "slug": "level",
114
+ "docs": "",
115
+ "tags": [],
116
+ "methods": [],
117
+ "properties": [
118
+ {
119
+ "name": "level",
120
+ "tags": [],
121
+ "docs": "",
122
+ "complexTypes": [],
123
+ "type": "number"
124
+ }
125
+ ]
126
+ },
127
+ {
128
+ "name": "PermissionStatus",
129
+ "slug": "permissionstatus",
130
+ "docs": "",
131
+ "tags": [],
132
+ "methods": [],
133
+ "properties": [
134
+ {
135
+ "name": "info",
136
+ "tags": [],
137
+ "docs": "",
138
+ "complexTypes": [
139
+ "PermissionState"
140
+ ],
141
+ "type": "PermissionState"
142
+ }
143
+ ]
144
+ }
145
+ ],
146
+ "enums": [],
147
+ "typeAliases": [
148
+ {
149
+ "name": "ConnectionType",
150
+ "slug": "connectiontype",
151
+ "docs": "The type of network connection that a device might have.",
152
+ "types": [
153
+ {
154
+ "text": "'wifi'",
155
+ "complexTypes": []
156
+ },
157
+ {
158
+ "text": "'cellular'",
159
+ "complexTypes": []
160
+ },
161
+ {
162
+ "text": "'none'",
163
+ "complexTypes": []
164
+ },
165
+ {
166
+ "text": "'unknown'",
167
+ "complexTypes": []
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "name": "PermissionState",
173
+ "slug": "permissionstate",
174
+ "docs": "",
175
+ "types": [
176
+ {
177
+ "text": "'prompt'",
178
+ "complexTypes": []
179
+ },
180
+ {
181
+ "text": "'prompt-with-rationale'",
182
+ "complexTypes": []
183
+ },
184
+ {
185
+ "text": "'granted'",
186
+ "complexTypes": []
187
+ },
188
+ {
189
+ "text": "'denied'",
190
+ "complexTypes": []
191
+ }
192
+ ]
193
+ }
194
+ ],
195
+ "pluginConfigs": []
196
+ }
@@ -0,0 +1,23 @@
1
+ import type { PermissionState } from '@capacitor/core';
2
+ import type { ConnectionType } from '@capacitor/network';
3
+ export interface SignalStrengthPlugin {
4
+ getdBm(): Promise<DBm>;
5
+ getPercentage(options: {
6
+ connection: ConnectionType;
7
+ }): Promise<Percentage>;
8
+ getLevel(): Promise<Level>;
9
+ checkPermissions(): Promise<PermissionStatus>;
10
+ requestPermissions(): Promise<PermissionStatus>;
11
+ }
12
+ export interface DBm {
13
+ dBm: number;
14
+ }
15
+ export interface Percentage {
16
+ percentage: string;
17
+ }
18
+ export interface Level {
19
+ level: number;
20
+ }
21
+ export interface PermissionStatus {
22
+ info: PermissionState;
23
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PermissionState } from '@capacitor/core';\nimport type { ConnectionType } from '@capacitor/network';\n\nexport interface SignalStrengthPlugin {\n getdBm(): Promise<DBm>;\n getPercentage(options: { connection: ConnectionType }): Promise<Percentage>;\n getLevel(): Promise<Level>;\n checkPermissions(): Promise<PermissionStatus>;\n requestPermissions(): Promise<PermissionStatus>;\n}\n\nexport interface DBm {\n dBm: number;\n}\n\nexport interface Percentage {\n percentage: string;\n}\n\nexport interface Level {\n level: number;\n}\n\nexport interface PermissionStatus {\n info: PermissionState;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { SignalStrengthPlugin } from './definitions';
2
+ declare const SignalStrength: SignalStrengthPlugin;
3
+ export * from './definitions';
4
+ export { SignalStrength };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const SignalStrength = registerPlugin('SignalStrength', {
3
+ web: () => import('./web').then(m => new m.SignalStrengthWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { SignalStrength };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,cAAc,GAAG,cAAc,CAAuB,gBAAgB,EAAE;IAC5E,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;CAChE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { SignalStrengthPlugin } from './definitions';\n\nconst SignalStrength = registerPlugin<SignalStrengthPlugin>('SignalStrength', {\n web: () => import('./web').then(m => new m.SignalStrengthWeb()),\n});\n\nexport * from './definitions';\nexport { SignalStrength };\n"]}
@@ -0,0 +1,9 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { PermissionStatus, SignalStrengthPlugin } from './definitions';
3
+ export declare class SignalStrengthWeb extends WebPlugin implements SignalStrengthPlugin {
4
+ getdBm(): Promise<any>;
5
+ getPercentage(): Promise<any>;
6
+ getLevel(): Promise<any>;
7
+ checkPermissions(): Promise<PermissionStatus>;
8
+ requestPermissions(): Promise<PermissionStatus>;
9
+ }
@@ -0,0 +1,19 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class SignalStrengthWeb extends WebPlugin {
3
+ getdBm() {
4
+ throw new Error('Method not implemented.');
5
+ }
6
+ getPercentage() {
7
+ throw new Error('Method not implemented.');
8
+ }
9
+ getLevel() {
10
+ throw new Error('Method not implemented.');
11
+ }
12
+ checkPermissions() {
13
+ throw new Error('Method not implemented.');
14
+ }
15
+ requestPermissions() {
16
+ throw new Error('Method not implemented.');
17
+ }
18
+ }
19
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,iBACX,SAAQ,SAAS;IAGjB,MAAM;QACJ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,aAAa;QACX,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,QAAQ;QACN,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,gBAAgB;QACd,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,kBAAkB;QAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { PermissionStatus, SignalStrengthPlugin } from './definitions';\n\nexport class SignalStrengthWeb\n extends WebPlugin\n implements SignalStrengthPlugin\n{\n getdBm(): Promise<any> {\n throw new Error('Method not implemented.');\n }\n getPercentage(): Promise<any> {\n throw new Error('Method not implemented.');\n }\n getLevel(): Promise<any> {\n throw new Error('Method not implemented.');\n }\n checkPermissions(): Promise<PermissionStatus> {\n throw new Error('Method not implemented.');\n }\n requestPermissions(): Promise<PermissionStatus> {\n throw new Error('Method not implemented.');\n }\n}\n"]}
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@capacitor/core');
6
+
7
+ const SignalStrength = core.registerPlugin('SignalStrength', {
8
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.SignalStrengthWeb()),
9
+ });
10
+
11
+ class SignalStrengthWeb extends core.WebPlugin {
12
+ getdBm() {
13
+ throw new Error('Method not implemented.');
14
+ }
15
+ getPercentage() {
16
+ throw new Error('Method not implemented.');
17
+ }
18
+ getLevel() {
19
+ throw new Error('Method not implemented.');
20
+ }
21
+ checkPermissions() {
22
+ throw new Error('Method not implemented.');
23
+ }
24
+ requestPermissions() {
25
+ throw new Error('Method not implemented.');
26
+ }
27
+ }
28
+
29
+ var web = /*#__PURE__*/Object.freeze({
30
+ __proto__: null,
31
+ SignalStrengthWeb: SignalStrengthWeb
32
+ });
33
+
34
+ exports.SignalStrength = SignalStrength;
35
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\r\nconst SignalStrength = registerPlugin('SignalStrength', {\r\n web: () => import('./web').then(m => new m.SignalStrengthWeb()),\r\n});\r\nexport * from './definitions';\r\nexport { SignalStrength };\r\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\r\nexport class SignalStrengthWeb extends WebPlugin {\r\n getdBm() {\r\n throw new Error('Method not implemented.');\r\n }\r\n getPercentage() {\r\n throw new Error('Method not implemented.');\r\n }\r\n getLevel() {\r\n throw new Error('Method not implemented.');\r\n }\r\n checkPermissions() {\r\n throw new Error('Method not implemented.');\r\n }\r\n requestPermissions() {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;AACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACnE,CAAC;;ACFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;AACjD,IAAI,MAAM,GAAG;AACb,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,aAAa,GAAG;AACpB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,gBAAgB,GAAG;AACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,kBAAkB,GAAG;AACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,38 @@
1
+ var capacitorSignalStrength = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ const SignalStrength = core.registerPlugin('SignalStrength', {
5
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.SignalStrengthWeb()),
6
+ });
7
+
8
+ class SignalStrengthWeb extends core.WebPlugin {
9
+ getdBm() {
10
+ throw new Error('Method not implemented.');
11
+ }
12
+ getPercentage() {
13
+ throw new Error('Method not implemented.');
14
+ }
15
+ getLevel() {
16
+ throw new Error('Method not implemented.');
17
+ }
18
+ checkPermissions() {
19
+ throw new Error('Method not implemented.');
20
+ }
21
+ requestPermissions() {
22
+ throw new Error('Method not implemented.');
23
+ }
24
+ }
25
+
26
+ var web = /*#__PURE__*/Object.freeze({
27
+ __proto__: null,
28
+ SignalStrengthWeb: SignalStrengthWeb
29
+ });
30
+
31
+ exports.SignalStrength = SignalStrength;
32
+
33
+ Object.defineProperty(exports, '__esModule', { value: true });
34
+
35
+ return exports;
36
+
37
+ })({}, capacitorExports);
38
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\r\nconst SignalStrength = registerPlugin('SignalStrength', {\r\n web: () => import('./web').then(m => new m.SignalStrengthWeb()),\r\n});\r\nexport * from './definitions';\r\nexport { SignalStrength };\r\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\r\nexport class SignalStrengthWeb extends WebPlugin {\r\n getdBm() {\r\n throw new Error('Method not implemented.');\r\n }\r\n getPercentage() {\r\n throw new Error('Method not implemented.');\r\n }\r\n getLevel() {\r\n throw new Error('Method not implemented.');\r\n }\r\n checkPermissions() {\r\n throw new Error('Method not implemented.');\r\n }\r\n requestPermissions() {\r\n throw new Error('Method not implemented.');\r\n }\r\n}\r\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;IACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACnE,CAAC;;ICFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;IACjD,IAAI,MAAM,GAAG;IACb,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,aAAa,GAAG;IACpB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,QAAQ,GAAG;IACf,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,gBAAgB,GAAG;IACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,kBAAkB,GAAG;IACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>$(PRODUCT_NAME)</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>FMWK</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleVersion</key>
20
+ <string>$(CURRENT_PROJECT_VERSION)</string>
21
+ <key>NSPrincipalClass</key>
22
+ <string></string>
23
+ </dict>
24
+ </plist>
@@ -0,0 +1,8 @@
1
+ import Foundation
2
+
3
+ @objc public class SignalStrength: NSObject {
4
+ @objc public func echo(_ value: String) -> String {
5
+ print(value)
6
+ return value
7
+ }
8
+ }
@@ -0,0 +1,10 @@
1
+ #import <UIKit/UIKit.h>
2
+
3
+ //! Project version number for Plugin.
4
+ FOUNDATION_EXPORT double PluginVersionNumber;
5
+
6
+ //! Project version string for Plugin.
7
+ FOUNDATION_EXPORT const unsigned char PluginVersionString[];
8
+
9
+ // In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
10
+
@@ -0,0 +1,8 @@
1
+ #import <Foundation/Foundation.h>
2
+ #import <Capacitor/Capacitor.h>
3
+
4
+ // Define the plugin using the CAP_PLUGIN Macro, and
5
+ // each method the plugin supports using the CAP_PLUGIN_METHOD macro.
6
+ CAP_PLUGIN(SignalStrengthPlugin, "SignalStrength",
7
+ CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise);
8
+ )
@@ -0,0 +1,18 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ /**
5
+ * Please read the Capacitor iOS Plugin Development Guide
6
+ * here: https://capacitorjs.com/docs/plugins/ios
7
+ */
8
+ @objc(SignalStrengthPlugin)
9
+ public class SignalStrengthPlugin: CAPPlugin {
10
+ private let implementation = SignalStrength()
11
+
12
+ @objc func echo(_ call: CAPPluginCall) {
13
+ let value = call.getString("value") ?? ""
14
+ call.resolve([
15
+ "value": implementation.echo(value)
16
+ ])
17
+ }
18
+ }
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "capacitor-signal-strength",
3
+ "version": "0.0.1",
4
+ "description": "Plugin use to get Android device signal strength",
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
+ "ios/Plugin/",
14
+ "CapacitorSignalStrength.podspec"
15
+ ],
16
+ "author": "Gianpierre Velasquez - Mx",
17
+ "license": "MIT",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/gianpierreVelasquez/Capacitor-AndroidDeviceSignalStrength.git.git"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/gianpierreVelasquez/Capacitor-AndroidDeviceSignalStrength.git/issues"
24
+ },
25
+ "keywords": [
26
+ "capacitor",
27
+ "plugin",
28
+ "native"
29
+ ],
30
+ "scripts": {
31
+ "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
32
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
33
+ "verify:android": "cd android && ./gradlew clean build test && cd ..",
34
+ "verify:web": "npm run build",
35
+ "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
36
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
37
+ "eslint": "eslint . --ext ts",
38
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
39
+ "swiftlint": "node-swiftlint",
40
+ "docgen": "docgen --api SignalStrengthPlugin --output-readme README.md --output-json dist/docs.json",
41
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
42
+ "clean": "rimraf ./dist",
43
+ "watch": "tsc --watch",
44
+ "prepublishOnly": "npm run build"
45
+ },
46
+ "devDependencies": {
47
+ "@capacitor/android": "^5.0.0",
48
+ "@capacitor/core": "^5.6.0",
49
+ "@capacitor/docgen": "^0.0.18",
50
+ "@capacitor/ios": "^5.0.0",
51
+ "@ionic/eslint-config": "^0.3.0",
52
+ "@ionic/prettier-config": "^1.0.1",
53
+ "@ionic/swiftlint-config": "^1.1.2",
54
+ "eslint": "^7.11.0",
55
+ "prettier": "~2.3.0",
56
+ "prettier-plugin-java": "~1.0.2",
57
+ "rimraf": "^3.0.2",
58
+ "rollup": "^2.32.0",
59
+ "swiftlint": "^1.0.1",
60
+ "typescript": "~4.3.5"
61
+ },
62
+ "peerDependencies": {
63
+ "@capacitor/core": "^5.0.0"
64
+ },
65
+ "prettier": "@ionic/prettier-config",
66
+ "swiftlint": "@ionic/swiftlint-config",
67
+ "eslintConfig": {
68
+ "extends": "@ionic/eslint-config/recommended"
69
+ },
70
+ "capacitor": {
71
+ "ios": {
72
+ "src": "ios"
73
+ },
74
+ "android": {
75
+ "src": "android"
76
+ }
77
+ },
78
+ "dependencies": {
79
+ "@capacitor/cli": "^5.6.0",
80
+ "@capacitor/network": "^5.0.6"
81
+ }
82
+ }