@capgo/capacitor-pedometer 7.0.2 → 7.2.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.
- package/README.md +16 -0
- package/android/src/main/java/app/capgo/pedometer/CapacitorPedometerPlugin.java +2 -2
- package/dist/docs.json +19 -0
- package/dist/esm/definitions.d.ts +9 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +3 -0
- package/dist/esm/web.js +3 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +3 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapacitorPedometerPlugin/CapacitorPedometerPlugin.swift +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ For Android 10 (API 29) and above, you need to request the `ACTIVITY_RECOGNITION
|
|
|
38
38
|
* [`requestPermissions()`](#requestpermissions)
|
|
39
39
|
* [`addListener('measurement', ...)`](#addlistenermeasurement-)
|
|
40
40
|
* [`removeAllListeners()`](#removealllisteners)
|
|
41
|
+
* [`getPluginVersion()`](#getpluginversion)
|
|
41
42
|
* [Interfaces](#interfaces)
|
|
42
43
|
* [Type Aliases](#type-aliases)
|
|
43
44
|
|
|
@@ -177,6 +178,21 @@ Remove all listeners for this plugin.
|
|
|
177
178
|
--------------------
|
|
178
179
|
|
|
179
180
|
|
|
181
|
+
### getPluginVersion()
|
|
182
|
+
|
|
183
|
+
```typescript
|
|
184
|
+
getPluginVersion() => Promise<{ version: string; }>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Get the native Capacitor plugin version.
|
|
188
|
+
|
|
189
|
+
**Returns:** <code>Promise<{ version: string; }></code>
|
|
190
|
+
|
|
191
|
+
**Since:** 1.0.0
|
|
192
|
+
|
|
193
|
+
--------------------
|
|
194
|
+
|
|
195
|
+
|
|
180
196
|
### Interfaces
|
|
181
197
|
|
|
182
198
|
|
|
@@ -24,7 +24,7 @@ import com.getcapacitor.annotation.PermissionCallback;
|
|
|
24
24
|
)
|
|
25
25
|
public class CapacitorPedometerPlugin extends Plugin implements SensorEventListener {
|
|
26
26
|
|
|
27
|
-
private final String
|
|
27
|
+
private final String pluginVersion = "7.2.1";
|
|
28
28
|
private static final String PERMISSION_GRANTED = "granted";
|
|
29
29
|
private static final String PERMISSION_DENIED = "denied";
|
|
30
30
|
private static final String PERMISSION_PROMPT = "prompt";
|
|
@@ -237,7 +237,7 @@ public class CapacitorPedometerPlugin extends Plugin implements SensorEventListe
|
|
|
237
237
|
public void getPluginVersion(final PluginCall call) {
|
|
238
238
|
try {
|
|
239
239
|
final JSObject ret = new JSObject();
|
|
240
|
-
ret.put("version", this.
|
|
240
|
+
ret.put("version", this.pluginVersion);
|
|
241
241
|
call.resolve(ret);
|
|
242
242
|
} catch (final Exception e) {
|
|
243
243
|
call.reject("Could not get plugin version", e);
|
package/dist/docs.json
CHANGED
|
@@ -153,6 +153,25 @@
|
|
|
153
153
|
"docs": "Remove all listeners for this plugin.",
|
|
154
154
|
"complexTypes": [],
|
|
155
155
|
"slug": "removealllisteners"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "getPluginVersion",
|
|
159
|
+
"signature": "() => Promise<{ version: string; }>",
|
|
160
|
+
"parameters": [],
|
|
161
|
+
"returns": "Promise<{ version: string; }>",
|
|
162
|
+
"tags": [
|
|
163
|
+
{
|
|
164
|
+
"name": "returns",
|
|
165
|
+
"text": "Promise that resolves with the plugin version"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "since",
|
|
169
|
+
"text": "1.0.0"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"docs": "Get the native Capacitor plugin version.",
|
|
173
|
+
"complexTypes": [],
|
|
174
|
+
"slug": "getpluginversion"
|
|
156
175
|
}
|
|
157
176
|
],
|
|
158
177
|
"properties": []
|
|
@@ -56,6 +56,15 @@ export interface CapacitorPedometerPlugin {
|
|
|
56
56
|
* @since 0.0.1
|
|
57
57
|
*/
|
|
58
58
|
removeAllListeners(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Get the native Capacitor plugin version.
|
|
61
|
+
*
|
|
62
|
+
* @returns Promise that resolves with the plugin version
|
|
63
|
+
* @since 1.0.0
|
|
64
|
+
*/
|
|
65
|
+
getPluginVersion(): Promise<{
|
|
66
|
+
version: string;
|
|
67
|
+
}>;
|
|
59
68
|
}
|
|
60
69
|
/**
|
|
61
70
|
* @since 0.0.1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface CapacitorPedometerPlugin {\n /**\n * Get pedometer measurements for a specified time range.\n *\n * @since 0.0.1\n */\n getMeasurement(options?: GetMeasurementOptions): Promise<Measurement>;\n\n /**\n * Check which pedometer features are available on this device.\n *\n * @since 0.0.1\n */\n isAvailable(): Promise<IsAvailableResult>;\n\n /**\n * Start receiving real-time pedometer measurement updates.\n *\n * On **Android** and **iOS**, the `measurement` event is only fired after calling `startMeasurementUpdates()`.\n *\n * @since 0.0.1\n */\n startMeasurementUpdates(): Promise<void>;\n\n /**\n * Stop receiving real-time pedometer measurement updates.\n *\n * @since 0.0.1\n */\n stopMeasurementUpdates(): Promise<void>;\n\n /**\n * Check permission to access pedometer data.\n *\n * On **Android**, this checks the `ACTIVITY_RECOGNITION` permission.\n * On **iOS**, this checks the motion usage permission.\n *\n * @since 0.0.1\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request permission to access pedometer data.\n *\n * On **Android**, this requests the `ACTIVITY_RECOGNITION` permission.\n * On **iOS**, this requests motion usage permission.\n *\n * @since 0.0.1\n */\n requestPermissions(): Promise<PermissionStatus>;\n\n /**\n * Called when a new pedometer measurement is received.\n *\n * @since 0.0.1\n */\n addListener(eventName: 'measurement', listenerFunc: (event: MeasurementEvent) => void): Promise<PluginListenerHandle>;\n\n /**\n * Remove all listeners for this plugin.\n *\n * @since 0.0.1\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface Measurement {\n /**\n * The number of steps taken by the user.\n *\n * @since 0.0.1\n */\n numberOfSteps?: number;\n\n /**\n * The estimated distance (in meters) traveled by the user.\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n distance?: number;\n\n /**\n * The approximate number of floors ascended.\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n floorsAscended?: number;\n\n /**\n * The approximate number of floors descended.\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n floorsDescended?: number;\n\n /**\n * The current pace (in seconds per meter).\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n currentPace?: number;\n\n /**\n * The current cadence (steps per second).\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n currentCadence?: number;\n\n /**\n * The average active pace (in seconds per meter).\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n averageActivePace?: number;\n\n /**\n * The start time of this measurement (milliseconds since epoch).\n *\n * @since 0.0.1\n */\n startDate?: number;\n\n /**\n * The end time of this measurement (milliseconds since epoch).\n *\n * @since 0.0.1\n */\n endDate?: number;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface GetMeasurementOptions {\n /**\n * The start time for the measurement query (milliseconds since epoch).\n *\n * Required on **iOS**.\n *\n * @since 0.0.1\n */\n start?: number;\n\n /**\n * The end time for the measurement query (milliseconds since epoch).\n *\n * Required on **iOS**.\n *\n * @since 0.0.1\n */\n end?: number;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface IsAvailableResult {\n /**\n * Whether step counting is available.\n *\n * @since 0.0.1\n */\n stepCounting: boolean;\n\n /**\n * Whether distance measurement is available.\n *\n * Only `true` on **iOS** devices that support distance tracking.\n *\n * @since 0.0.1\n */\n distance: boolean;\n\n /**\n * Whether pace measurement is available.\n *\n * Only `true` on **iOS** devices that support pace tracking.\n *\n * @since 0.0.1\n */\n pace: boolean;\n\n /**\n * Whether cadence measurement is available.\n *\n * Only `true` on **iOS** devices that support cadence tracking.\n *\n * @since 0.0.1\n */\n cadence: boolean;\n\n /**\n * Whether floor counting is available.\n *\n * Only `true` on **iOS** devices that support floor tracking.\n *\n * @since 0.0.1\n */\n floorCounting: boolean;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface PermissionStatus {\n /**\n * Permission state for activity recognition.\n *\n * On **Android**, this is the `ACTIVITY_RECOGNITION` permission.\n * On **iOS**, this is the motion usage permission.\n *\n * @since 0.0.1\n */\n activityRecognition: 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied';\n}\n\n/**\n * @since 0.0.1\n */\nexport type MeasurementEvent = Measurement;\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface CapacitorPedometerPlugin {\n /**\n * Get pedometer measurements for a specified time range.\n *\n * @since 0.0.1\n */\n getMeasurement(options?: GetMeasurementOptions): Promise<Measurement>;\n\n /**\n * Check which pedometer features are available on this device.\n *\n * @since 0.0.1\n */\n isAvailable(): Promise<IsAvailableResult>;\n\n /**\n * Start receiving real-time pedometer measurement updates.\n *\n * On **Android** and **iOS**, the `measurement` event is only fired after calling `startMeasurementUpdates()`.\n *\n * @since 0.0.1\n */\n startMeasurementUpdates(): Promise<void>;\n\n /**\n * Stop receiving real-time pedometer measurement updates.\n *\n * @since 0.0.1\n */\n stopMeasurementUpdates(): Promise<void>;\n\n /**\n * Check permission to access pedometer data.\n *\n * On **Android**, this checks the `ACTIVITY_RECOGNITION` permission.\n * On **iOS**, this checks the motion usage permission.\n *\n * @since 0.0.1\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request permission to access pedometer data.\n *\n * On **Android**, this requests the `ACTIVITY_RECOGNITION` permission.\n * On **iOS**, this requests motion usage permission.\n *\n * @since 0.0.1\n */\n requestPermissions(): Promise<PermissionStatus>;\n\n /**\n * Called when a new pedometer measurement is received.\n *\n * @since 0.0.1\n */\n addListener(eventName: 'measurement', listenerFunc: (event: MeasurementEvent) => void): Promise<PluginListenerHandle>;\n\n /**\n * Remove all listeners for this plugin.\n *\n * @since 0.0.1\n */\n removeAllListeners(): Promise<void>;\n\n /**\n * Get the native Capacitor plugin version.\n *\n * @returns Promise that resolves with the plugin version\n * @since 1.0.0\n */\n getPluginVersion(): Promise<{ version: string }>;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface Measurement {\n /**\n * The number of steps taken by the user.\n *\n * @since 0.0.1\n */\n numberOfSteps?: number;\n\n /**\n * The estimated distance (in meters) traveled by the user.\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n distance?: number;\n\n /**\n * The approximate number of floors ascended.\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n floorsAscended?: number;\n\n /**\n * The approximate number of floors descended.\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n floorsDescended?: number;\n\n /**\n * The current pace (in seconds per meter).\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n currentPace?: number;\n\n /**\n * The current cadence (steps per second).\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n currentCadence?: number;\n\n /**\n * The average active pace (in seconds per meter).\n *\n * Only available on **iOS**.\n *\n * @since 0.0.1\n */\n averageActivePace?: number;\n\n /**\n * The start time of this measurement (milliseconds since epoch).\n *\n * @since 0.0.1\n */\n startDate?: number;\n\n /**\n * The end time of this measurement (milliseconds since epoch).\n *\n * @since 0.0.1\n */\n endDate?: number;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface GetMeasurementOptions {\n /**\n * The start time for the measurement query (milliseconds since epoch).\n *\n * Required on **iOS**.\n *\n * @since 0.0.1\n */\n start?: number;\n\n /**\n * The end time for the measurement query (milliseconds since epoch).\n *\n * Required on **iOS**.\n *\n * @since 0.0.1\n */\n end?: number;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface IsAvailableResult {\n /**\n * Whether step counting is available.\n *\n * @since 0.0.1\n */\n stepCounting: boolean;\n\n /**\n * Whether distance measurement is available.\n *\n * Only `true` on **iOS** devices that support distance tracking.\n *\n * @since 0.0.1\n */\n distance: boolean;\n\n /**\n * Whether pace measurement is available.\n *\n * Only `true` on **iOS** devices that support pace tracking.\n *\n * @since 0.0.1\n */\n pace: boolean;\n\n /**\n * Whether cadence measurement is available.\n *\n * Only `true` on **iOS** devices that support cadence tracking.\n *\n * @since 0.0.1\n */\n cadence: boolean;\n\n /**\n * Whether floor counting is available.\n *\n * Only `true` on **iOS** devices that support floor tracking.\n *\n * @since 0.0.1\n */\n floorCounting: boolean;\n}\n\n/**\n * @since 0.0.1\n */\nexport interface PermissionStatus {\n /**\n * Permission state for activity recognition.\n *\n * On **Android**, this is the `ACTIVITY_RECOGNITION` permission.\n * On **iOS**, this is the motion usage permission.\n *\n * @since 0.0.1\n */\n activityRecognition: 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied';\n}\n\n/**\n * @since 0.0.1\n */\nexport type MeasurementEvent = Measurement;\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -7,4 +7,7 @@ export declare class CapacitorPedometerWeb extends WebPlugin implements Capacito
|
|
|
7
7
|
stopMeasurementUpdates(): Promise<void>;
|
|
8
8
|
checkPermissions(): Promise<PermissionStatus>;
|
|
9
9
|
requestPermissions(): Promise<PermissionStatus>;
|
|
10
|
+
getPluginVersion(): Promise<{
|
|
11
|
+
version: string;
|
|
12
|
+
}>;
|
|
10
13
|
}
|
package/dist/esm/web.js
CHANGED
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU5C,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD,KAAK,CAAC,cAAc,CAAC,QAAgC;QACnD,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,OAAO;YACL,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,KAAK;SACrB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,sBAAsB;QAC1B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n CapacitorPedometerPlugin,\n GetMeasurementOptions,\n IsAvailableResult,\n Measurement,\n PermissionStatus,\n} from './definitions';\n\nexport class CapacitorPedometerWeb extends WebPlugin implements CapacitorPedometerPlugin {\n async getMeasurement(_options?: GetMeasurementOptions): Promise<Measurement> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async isAvailable(): Promise<IsAvailableResult> {\n return {\n stepCounting: false,\n distance: false,\n pace: false,\n cadence: false,\n floorCounting: false,\n };\n }\n\n async startMeasurementUpdates(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async stopMeasurementUpdates(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async checkPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async requestPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU5C,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAClD,KAAK,CAAC,cAAc,CAAC,QAAgC;QACnD,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,OAAO;YACL,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,KAAK;SACrB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,sBAAsB;QAC1B,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IACD,KAAK,CAAC,gBAAgB;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n CapacitorPedometerPlugin,\n GetMeasurementOptions,\n IsAvailableResult,\n Measurement,\n PermissionStatus,\n} from './definitions';\n\nexport class CapacitorPedometerWeb extends WebPlugin implements CapacitorPedometerPlugin {\n async getMeasurement(_options?: GetMeasurementOptions): Promise<Measurement> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async isAvailable(): Promise<IsAvailableResult> {\n return {\n stepCounting: false,\n distance: false,\n pace: false,\n cadence: false,\n floorCounting: false,\n };\n }\n\n async startMeasurementUpdates(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async stopMeasurementUpdates(): Promise<void> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async checkPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async requestPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n async getPluginVersion(): Promise<{ version: string }> {\n return { version: 'web' };\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -31,6 +31,9 @@ class CapacitorPedometerWeb extends core.WebPlugin {
|
|
|
31
31
|
async requestPermissions() {
|
|
32
32
|
throw this.unimplemented('Not implemented on web.');
|
|
33
33
|
}
|
|
34
|
+
async getPluginVersion() {
|
|
35
|
+
return { version: 'web' };
|
|
36
|
+
}
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorPedometer = registerPlugin('CapacitorPedometer', {\n web: () => import('./web').then((m) => new m.CapacitorPedometerWeb()),\n});\nexport * from './definitions';\nexport { CapacitorPedometer };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorPedometerWeb extends WebPlugin {\n async getMeasurement(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAvailable() {\n return {\n stepCounting: false,\n distance: false,\n pace: false,\n cadence: false,\n floorCounting: false,\n };\n }\n async startMeasurementUpdates() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopMeasurementUpdates() {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;AAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACzE,CAAC;;ACFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,MAAM,cAAc,CAAC,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,OAAO;AACf,YAAY,YAAY,EAAE,KAAK;AAC/B,YAAY,QAAQ,EAAE,KAAK;AAC3B,YAAY,IAAI,EAAE,KAAK;AACvB,YAAY,OAAO,EAAE,KAAK;AAC1B,YAAY,aAAa,EAAE,KAAK;AAChC,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,uBAAuB,GAAG;AACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,sBAAsB,GAAG;AACnC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorPedometer = registerPlugin('CapacitorPedometer', {\n web: () => import('./web').then((m) => new m.CapacitorPedometerWeb()),\n});\nexport * from './definitions';\nexport { CapacitorPedometer };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorPedometerWeb extends WebPlugin {\n async getMeasurement(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAvailable() {\n return {\n stepCounting: false,\n distance: false,\n pace: false,\n cadence: false,\n floorCounting: false,\n };\n }\n async startMeasurementUpdates() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopMeasurementUpdates() {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;AAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACzE,CAAC;;ACFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,MAAM,cAAc,CAAC,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,OAAO;AACf,YAAY,YAAY,EAAE,KAAK;AAC/B,YAAY,QAAQ,EAAE,KAAK;AAC3B,YAAY,IAAI,EAAE,KAAK;AACvB,YAAY,OAAO,EAAE,KAAK;AAC1B,YAAY,aAAa,EAAE,KAAK;AAChC,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,uBAAuB,GAAG;AACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,sBAAsB,GAAG;AACnC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -30,6 +30,9 @@ var capacitorCapacitorPedometer = (function (exports, core) {
|
|
|
30
30
|
async requestPermissions() {
|
|
31
31
|
throw this.unimplemented('Not implemented on web.');
|
|
32
32
|
}
|
|
33
|
+
async getPluginVersion() {
|
|
34
|
+
return { version: 'web' };
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorPedometer = registerPlugin('CapacitorPedometer', {\n web: () => import('./web').then((m) => new m.CapacitorPedometerWeb()),\n});\nexport * from './definitions';\nexport { CapacitorPedometer };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorPedometerWeb extends WebPlugin {\n async getMeasurement(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAvailable() {\n return {\n stepCounting: false,\n distance: false,\n pace: false,\n cadence: false,\n floorCounting: false,\n };\n }\n async startMeasurementUpdates() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopMeasurementUpdates() {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;IAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACzE,CAAC;;ICFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,MAAM,cAAc,CAAC,QAAQ,EAAE;IACnC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,OAAO;IACf,YAAY,YAAY,EAAE,KAAK;IAC/B,YAAY,QAAQ,EAAE,KAAK;IAC3B,YAAY,IAAI,EAAE,KAAK;IACvB,YAAY,OAAO,EAAE,KAAK;IAC1B,YAAY,aAAa,EAAE,KAAK;IAChC,SAAS;IACT,IAAI;IACJ,IAAI,MAAM,uBAAuB,GAAG;IACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,sBAAsB,GAAG;IACnC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorPedometer = registerPlugin('CapacitorPedometer', {\n web: () => import('./web').then((m) => new m.CapacitorPedometerWeb()),\n});\nexport * from './definitions';\nexport { CapacitorPedometer };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorPedometerWeb extends WebPlugin {\n async getMeasurement(_options) {\n throw this.unimplemented('Not implemented on web.');\n }\n async isAvailable() {\n return {\n stepCounting: false,\n distance: false,\n pace: false,\n cadence: false,\n floorCounting: false,\n };\n }\n async startMeasurementUpdates() {\n throw this.unimplemented('Not implemented on web.');\n }\n async stopMeasurementUpdates() {\n throw this.unimplemented('Not implemented on web.');\n }\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getPluginVersion() {\n return { version: 'web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;IAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACzE,CAAC;;ICFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,MAAM,cAAc,CAAC,QAAQ,EAAE;IACnC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,OAAO;IACf,YAAY,YAAY,EAAE,KAAK;IAC/B,YAAY,QAAQ,EAAE,KAAK;IAC3B,YAAY,IAAI,EAAE,KAAK;IACvB,YAAY,OAAO,EAAE,KAAK;IAC1B,YAAY,aAAa,EAAE,KAAK;IAChC,SAAS;IACT,IAAI;IACJ,IAAI,MAAM,uBAAuB,GAAG;IACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,sBAAsB,GAAG;IACnC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ import Foundation
|
|
|
4
4
|
|
|
5
5
|
@objc(CapacitorPedometerPlugin)
|
|
6
6
|
public class CapacitorPedometerPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
7
|
-
private let
|
|
7
|
+
private let pluginVersion: String = "7.2.1"
|
|
8
8
|
public let identifier = "CapacitorPedometerPlugin"
|
|
9
9
|
public let jsName = "CapacitorPedometer"
|
|
10
10
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
@@ -184,6 +184,6 @@ public class CapacitorPedometerPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
@objc func getPluginVersion(_ call: CAPPluginCall) {
|
|
187
|
-
call.resolve(["version": self.
|
|
187
|
+
call.resolve(["version": self.pluginVersion])
|
|
188
188
|
}
|
|
189
189
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-pedometer",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"description": "Capacitor plugin for accessing pedometer data including steps, distance, pace, cadence, and floors",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|