mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
536a906366 | ||
|
|
7fcafaae81 | ||
|
|
1a7a0e7cc0 | ||
|
|
34bf136703 | ||
|
|
bb798340c5 | ||
|
|
1b04ebb5e2 | ||
|
|
a150d4d522 | ||
|
|
4246d47a6c | ||
|
|
024099a772 | ||
|
|
fff99694ba | ||
|
|
429529a5ee | ||
|
|
e2419a26b2 | ||
|
|
10eb3eeeeb | ||
|
|
533cc4efc9 | ||
|
|
6b433b5373 | ||
|
|
e684db479e | ||
|
|
81c576c28e | ||
|
|
e2f3702d0b | ||
|
|
806766e33e | ||
|
|
432c0e901d | ||
|
|
fb70a24c61 | ||
|
|
202c680643 | ||
|
|
7b94d4fccf | ||
|
|
5b15bb9f46 | ||
|
|
c3930c814a | ||
|
|
57af5c5e73 | ||
|
|
29604d6d3d | ||
|
|
76effe98f8 | ||
|
|
0783520723 | ||
|
|
ef898efcc6 | ||
|
|
fdd12b58b3 | ||
|
|
80047907ea | ||
|
|
3a1034eab0 | ||
|
|
c8586927c3 | ||
|
|
f22c603c30 | ||
|
|
957396b5e5 | ||
|
|
d891c3eea0 | ||
|
|
37aa9a82fe | ||
|
|
392b11bd05 | ||
|
|
d4fe051d56 | ||
|
|
4e0673c8e9 | ||
|
|
0cecf4e43f |
69
CHANGELOG.md
69
CHANGELOG.md
@@ -1,3 +1,72 @@
|
||||
<a name="4.3.0"></a>
|
||||
# [4.3.0](https://github.com/ionic-team/ionic-native/compare/v4.2.1...v4.3.0) (2017-09-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **google-maps:** convert JS classes to Ionic Native ([#1956](https://github.com/ionic-team/ionic-native/issues/1956)) ([57af5c5](https://github.com/ionic-team/ionic-native/commit/57af5c5))
|
||||
* **google-maps:** fix icons property of MarkerClusterOptions ([#1937](https://github.com/ionic-team/ionic-native/issues/1937)) ([8004790](https://github.com/ionic-team/ionic-native/commit/8004790))
|
||||
* **google-maps:** the zoom option is missing in the GoogleMapOptions class ([#1948](https://github.com/ionic-team/ionic-native/issues/1948)) ([ef898ef](https://github.com/ionic-team/ionic-native/commit/ef898ef))
|
||||
* **http:** fix plugin ref ([#1934](https://github.com/ionic-team/ionic-native/issues/1934)) ([3a1034e](https://github.com/ionic-team/ionic-native/commit/3a1034e))
|
||||
* **launch-navigator:** fix navigate method ([#1940](https://github.com/ionic-team/ionic-native/issues/1940)) ([a150d4d](https://github.com/ionic-team/ionic-native/commit/a150d4d))
|
||||
* **stripe:** fix stripe create card token ([#2002](https://github.com/ionic-team/ionic-native/issues/2002)) ([5b15bb9](https://github.com/ionic-team/ionic-native/commit/5b15bb9))
|
||||
* **zeroconf:** extend the ZeroconfResult.action definition ([#1985](https://github.com/ionic-team/ionic-native/issues/1985)) ([e2f3702](https://github.com/ionic-team/ionic-native/commit/e2f3702))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **android-full-screen:** add support for setSystemUiVisiblity ([#1942](https://github.com/ionic-team/ionic-native/issues/1942)) ([4246d47](https://github.com/ionic-team/ionic-native/commit/4246d47))
|
||||
* **document-reader:** add cordova-plugin-documentreader ([#1996](https://github.com/ionic-team/ionic-native/issues/1996)) ([7b94d4f](https://github.com/ionic-team/ionic-native/commit/7b94d4f))
|
||||
* **extended-device-information:** add Extended Device Info plugin ([#1980](https://github.com/ionic-team/ionic-native/issues/1980)) ([806766e](https://github.com/ionic-team/ionic-native/commit/806766e))
|
||||
* **music-controls:** add support for next/prev track and skip forward/backward in control center ([#1927](https://github.com/ionic-team/ionic-native/issues/1927)) ([fff9969](https://github.com/ionic-team/ionic-native/commit/fff9969))
|
||||
* **push:** update PushOptions interfaces to match new version ([#1908](https://github.com/ionic-team/ionic-native/issues/1908)) ([34bf136](https://github.com/ionic-team/ionic-native/commit/34bf136))
|
||||
* **qr-scanner:** added destroy method ([#1916](https://github.com/ionic-team/ionic-native/issues/1916)) ([#1971](https://github.com/ionic-team/ionic-native/issues/1971)) ([10eb3ee](https://github.com/ionic-team/ionic-native/commit/10eb3ee))
|
||||
* **uid:** add UID plugin ([#1946](https://github.com/ionic-team/ionic-native/issues/1946)) ([e2419a2](https://github.com/ionic-team/ionic-native/commit/e2419a2))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **push:** this wrapper will work only with `phonegap-plugin-push@2.0.0`
|
||||
|
||||
|
||||
|
||||
<a name="4.2.1"></a>
|
||||
## [4.2.1](https://github.com/ionic-team/ionic-native/compare/v4.2.0...v4.2.1) (2017-08-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **google-maps:** fix issue when creating new instance of BaseArrayClass ([#1931](https://github.com/ionic-team/ionic-native/issues/1931)) ([957396b](https://github.com/ionic-team/ionic-native/commit/957396b))
|
||||
|
||||
|
||||
|
||||
<a name="4.2.0"></a>
|
||||
# [4.2.0](https://github.com/ionic-team/ionic-native/compare/v4.1.0...v4.2.0) (2017-08-26)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **fingerprint-aio:** add missing FingerprintOptions properties ([#1845](https://github.com/ionic-team/ionic-native/issues/1845)) ([85825c7](https://github.com/ionic-team/ionic-native/commit/85825c7))
|
||||
* **geofence:** remove duplicate onTransitionReceived method ([00c0707](https://github.com/ionic-team/ionic-native/commit/00c0707))
|
||||
* **google-maps:** add missing debug option ([#1832](https://github.com/ionic-team/ionic-native/issues/1832)) ([39ec515](https://github.com/ionic-team/ionic-native/commit/39ec515))
|
||||
* **ms-adal:** make userId optional ([#1894](https://github.com/ionic-team/ionic-native/issues/1894)) ([21045ea](https://github.com/ionic-team/ionic-native/commit/21045ea))
|
||||
* **native-geocoder:** update NativeGeocoderReverse result ([#1840](https://github.com/ionic-team/ionic-native/issues/1840)) ([7c1b409](https://github.com/ionic-team/ionic-native/commit/7c1b409))
|
||||
* **native-spinner:** update pluginRef ([#1859](https://github.com/ionic-team/ionic-native/issues/1859)) ([262e18f](https://github.com/ionic-team/ionic-native/commit/262e18f))
|
||||
* **serial:** add missing options for the open method ([#1844](https://github.com/ionic-team/ionic-native/issues/1844)) ([1acade4](https://github.com/ionic-team/ionic-native/commit/1acade4))
|
||||
* **sqlite:** add optional key parameter to SQLiteDatabaseConfig to support sqlcipher-adapter ([#1917](https://github.com/ionic-team/ionic-native/issues/1917)) ([0c097ba](https://github.com/ionic-team/ionic-native/commit/0c097ba))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **google-maps:** update plugin and fix a few issues ([#1834](https://github.com/ionic-team/ionic-native/issues/1834)) ([c11aec3](https://github.com/ionic-team/ionic-native/commit/c11aec3))
|
||||
* **http:** use a different plugin source with better features ([#1921](https://github.com/ionic-team/ionic-native/issues/1921)) ([a2d3396](https://github.com/ionic-team/ionic-native/commit/a2d3396))
|
||||
* **keychain-touch-id:** add KeychainTouchId plugin ([#1837](https://github.com/ionic-team/ionic-native/issues/1837)) ([a2cc187](https://github.com/ionic-team/ionic-native/commit/a2cc187))
|
||||
* **local-notifications:** add `un` method to unsubscribe from events ([#1871](https://github.com/ionic-team/ionic-native/issues/1871)) ([ce5966b](https://github.com/ionic-team/ionic-native/commit/ce5966b))
|
||||
* **paypal:** add payeeEmail for third party merchants ([#1864](https://github.com/ionic-team/ionic-native/issues/1864)) ([cde87e2](https://github.com/ionic-team/ionic-native/commit/cde87e2))
|
||||
* **push:** add Browser Push notification support ([#1848](https://github.com/ionic-team/ionic-native/issues/1848)) ([aa4c3b3](https://github.com/ionic-team/ionic-native/commit/aa4c3b3))
|
||||
|
||||
|
||||
|
||||
<a name="4.1.0"></a>
|
||||
# [4.1.0](https://github.com/ionic-team/ionic-native/compare/v4.0.1...v4.1.0) (2017-07-21)
|
||||
|
||||
|
||||
18
README.md
18
README.md
@@ -52,38 +52,28 @@ import { NgZone } from '@angular/core';
|
||||
@Component({ ... })
|
||||
export class MyComponent {
|
||||
|
||||
constructor(private geolocation: Geolocation, private platform: Platform, private ngZone: NgZone) {
|
||||
constructor(private geolocation: Geolocation, private platform: Platform) {
|
||||
|
||||
platform.ready().then(() => {
|
||||
|
||||
// get position
|
||||
geolocation.getCurrentPosition().then(pos => {
|
||||
|
||||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
|
||||
|
||||
});
|
||||
|
||||
|
||||
// watch position
|
||||
const watch = geolocation.watchPosition().subscribe(pos => {
|
||||
|
||||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
|
||||
|
||||
// Currently, observables from Ionic Native plugins
|
||||
// need to run inside of zone to trigger change detection
|
||||
ngZone.run(() => {
|
||||
this.position = pos;
|
||||
})
|
||||
|
||||
this.position = pos;
|
||||
});
|
||||
|
||||
// to stop watching
|
||||
watch.unsubscribe();
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
7001
package-lock.json
generated
7001
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "4.1.0",
|
||||
"version": "4.3.0",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"homepage": "https://ionicframework.com/",
|
||||
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|
||||
|
||||
@@ -19,7 +19,7 @@ const ROOT = path.resolve(path.join(__dirname, '../../')), // root ionic-native
|
||||
// dependency versions
|
||||
const ANGULAR_VERSION = '*',
|
||||
RXJS_VERSION = '^5.0.1',
|
||||
MIN_CORE_VERSION = '^3.6.0 || >=4.0.0',
|
||||
MIN_CORE_VERSION = '^4.2.0',
|
||||
IONIC_NATIVE_VERSION = require(path.resolve(ROOT, 'package.json')).version;
|
||||
|
||||
// package dependencies
|
||||
|
||||
@@ -22,6 +22,10 @@ module.exports = function jekyll(renderDocsProcessor) {
|
||||
doc.URL = doc.outputPath.replace('docs//', 'docs/')
|
||||
.replace('/index.md', '')
|
||||
.replace('content/', '');
|
||||
// add trailing slash to plugin pages
|
||||
if(!doc.URL.endsWith("/") && !doc.URL.endsWith(".html")) {
|
||||
doc.URL = doc.URL+'/';
|
||||
}
|
||||
});
|
||||
|
||||
const betaDocs = [];
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* Bit flag values for setSystemUiVisibility()
|
||||
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
|
||||
*/
|
||||
export enum AndroidSystemUiFlags {
|
||||
/** View has requested the system UI (status bar) to be visible (the default). SYSTEM_UI_FLAG_VISIBLE */
|
||||
Visible = 0,
|
||||
/** View has requested the system UI to enter an unobtrusive "low profile" mode. SYSTEM_UI_FLAG_LOW_PROFILE */
|
||||
LowProfile = 1,
|
||||
/** View has requested that the system navigation be temporarily hidden. SYSTEM_UI_FLAG_HIDE_NAVIGATION */
|
||||
HideNavigation = 2,
|
||||
/** View has requested to go into the normal fullscreen mode so that its content can take over the screen while still allowing the user to interact with the application. SYSTEM_UI_FLAG_FULLSCREEN */
|
||||
Fullscreen = 4,
|
||||
/** Requests the navigation bar to draw in a mode that is compatible with light navigation bar backgrounds. SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR */
|
||||
LightNavigationBar = 16,
|
||||
/** When using other layout flags, we would like a stable view of the content insets given to fitSystemWindows(Rect). SYSTEM_UI_FLAG_LAYOUT_STABLE */
|
||||
LayoutStable = 256,
|
||||
/** View would like its window to be laid out as if it has requested SYSTEM_UI_FLAG_HIDE_NAVIGATION, even if it currently hasn't. SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION */
|
||||
LayoutHideNavigation = 512,
|
||||
/** View would like its window to be laid out as if it has requested SYSTEM_UI_FLAG_FULLSCREEN, even if it currently hasn't. SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN */
|
||||
LayoutFullscreen = 1024,
|
||||
/** View would like to remain interactive when hiding the navigation bar with SYSTEM_UI_FLAG_HIDE_NAVIGATION. SYSTEM_UI_FLAG_IMMERSIVE */
|
||||
Immersive = 2048,
|
||||
/** View would like to remain interactive when hiding the status bar with SYSTEM_UI_FLAG_FULLSCREEN and/or hiding the navigation bar with SYSTEM_UI_FLAG_HIDE_NAVIGATION. SYSTEM_UI_FLAG_IMMERSIVE_STICKY */
|
||||
ImmersiveSticky = 4096,
|
||||
/** Requests the status bar to draw in a mode that is compatible with light status bar backgrounds. SYSTEM_UI_FLAG_LIGHT_STATUS_BAR */
|
||||
LightStatusBar = 8192
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Android Full Screen
|
||||
* @description
|
||||
@@ -92,4 +121,13 @@ export class AndroidFullScreen extends IonicNativePlugin {
|
||||
*/
|
||||
@Cordova()
|
||||
immersiveMode(): Promise<void> { return; }
|
||||
|
||||
/**
|
||||
* Manually set the the system UI to a custom mode. This mirrors the Android method of the same name. (Android 4.4+ only).
|
||||
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
|
||||
* @param {AndroidSystemUiFlags} visibility Bitwise-OR of flags in AndroidSystemUiFlags
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
@Cordova()
|
||||
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> { return; }
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
* @name Bluetooth Serial
|
||||
* @description This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino.
|
||||
* @description This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino (not Android to Android or iOS to iOS).
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { BluetoothSerial } from '@ionic-native/bluetooth-serial';
|
||||
|
||||
@@ -10,14 +10,55 @@ import { Injectable } from '@angular/core';
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { CouchbaseLite } from '@ionic-native/couchbase-lite';
|
||||
*
|
||||
* constructor(private couchbase: CouchbaseLite) {
|
||||
*
|
||||
* couchbase.getURL()
|
||||
* .then(url => console.log(url))
|
||||
* .catch(error => console.error(error));
|
||||
*
|
||||
* import { Http } from '@angular/http';
|
||||
* import { Observable } from 'rxjs/Observable'
|
||||
* constructor(private couchbase: CouchbaseLite, private platform:Platform,private _http:Http) {
|
||||
* this.initMethod();
|
||||
* }
|
||||
* url:string;
|
||||
* initMethod() {
|
||||
* this.couchbase.getURL().then((url)=> {
|
||||
* this.url = url;
|
||||
* })
|
||||
* }
|
||||
* getUrl() {
|
||||
* return this.url;
|
||||
* }
|
||||
* createDatabase(database_name:string) {
|
||||
* let url = this.getUrl();
|
||||
* url = url+database_name;
|
||||
* return this._http
|
||||
* .put(url)
|
||||
* .map(data => { this.results = data['results'] })
|
||||
* .catch((error:any) => {
|
||||
* return Observable.throw(error.json() || 'Couchbase Lite error');
|
||||
* })
|
||||
* }
|
||||
*
|
||||
* deleteDatabase(database_name:string) {
|
||||
* let url = this.getUrl();
|
||||
* url = url+database_name;
|
||||
* return this._http
|
||||
* .delete(url)
|
||||
* .map(data => { this.results = data['results'] })
|
||||
* .catch((error:any) => {
|
||||
* return Observable.throw(error.json() || 'Couchbase Lite error');
|
||||
* })
|
||||
* }
|
||||
*
|
||||
* getAllDbs() {
|
||||
* let url = this.getUrl();
|
||||
* url = url+'_all_dbs';
|
||||
* return this._http
|
||||
* .get(url)
|
||||
* .map(data => { this.results = data['results'] })
|
||||
* .catch((error:any) => {
|
||||
* return Observable.throw(error.json() || 'Couchbase Lite error');
|
||||
* })
|
||||
* }
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Extended Device Information
|
||||
* @description
|
||||
* Retrieves additional device information that is not provided by other plugins
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information';
|
||||
*
|
||||
*
|
||||
* constructor(private extendedDeviceInformation: ExtendedDeviceInformation) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* console.log('The Memory is: ' + this.extendedDeviceInformation.memory);
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'ExtendedDeviceInformation',
|
||||
plugin: 'cordova-plugin-extended-device-information',
|
||||
pluginRef: 'extended-device-information',
|
||||
repo: 'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class ExtendedDeviceInformation extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Get the device's memory size
|
||||
*/
|
||||
@CordovaProperty
|
||||
memory: number;
|
||||
|
||||
/**
|
||||
* Get the device's CPU mhz
|
||||
*/
|
||||
@CordovaProperty
|
||||
cpumhz: string;
|
||||
|
||||
/**
|
||||
* Get the total storage
|
||||
*/
|
||||
@CordovaProperty
|
||||
totalstorage: string;
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
* @description
|
||||
* Cordova plugin for Firebase Analytics
|
||||
*
|
||||
* Go yo firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
|
||||
* Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
|
||||
*
|
||||
* NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.
|
||||
*
|
||||
|
||||
@@ -15,7 +15,8 @@ export interface DynamicLinksOptions {
|
||||
* Cordova plugin for Firebase Invites and Firebase Dynamic Links
|
||||
*
|
||||
* Variables APP_DOMAIN and APP_PATH specify web URL where your app will start an activity to handle the link. They also used to setup support for App Indexing.
|
||||
*
|
||||
* Variable REVERSED_CLIENT_ID can be found in your GoogleService-Info.plist under the same key name.
|
||||
* Variable PHOTO_LIBRARY_USAGE_DESCRIPTION specifies required value for NSPhotoLibraryUsageDescription on iOS.
|
||||
* Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
|
||||
*
|
||||
* Preferences:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, CordovaInstance, Plugin, InstanceProperty, InstanceCheck, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, CordovaCheck, CordovaInstance, Plugin, InstanceProperty, InstanceCheck, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/fromEvent';
|
||||
|
||||
@@ -116,6 +116,11 @@ export interface GoogleMapOptions {
|
||||
* Turns the map toolbar on or off. This option is for Android only.
|
||||
*/
|
||||
mapToolbar?: boolean;
|
||||
|
||||
/**
|
||||
* Turns the zoom controller on or off. This option is for Android only.
|
||||
*/
|
||||
zoom?: boolean;
|
||||
};
|
||||
|
||||
gestures?: {
|
||||
@@ -219,7 +224,7 @@ export interface GeocoderResult {
|
||||
};
|
||||
locale?: string;
|
||||
locality?: string;
|
||||
position?: { lat: number; lng: number };
|
||||
position?: ILatLng;
|
||||
postalCode?: string;
|
||||
subAdminArea?: string;
|
||||
subLocality?: string;
|
||||
@@ -338,21 +343,11 @@ export interface MarkerOptions {
|
||||
disableAutoPan?: boolean;
|
||||
}
|
||||
|
||||
export interface MarkerClusterIcon {
|
||||
min: number;
|
||||
max: number;
|
||||
url: string;
|
||||
anchor: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface MarkerClusterOptions {
|
||||
maxZoomLevel?: number;
|
||||
boundsDraw?: boolean;
|
||||
markers: MarkerOptions[];
|
||||
icons: MarkerClusterIcon[];
|
||||
icons: any[];
|
||||
}
|
||||
|
||||
export interface MyLocation {
|
||||
@@ -379,7 +374,7 @@ export interface PolygonOptions {
|
||||
fillColor?: string;
|
||||
visible?: boolean;
|
||||
zIndex?: number;
|
||||
addHole?: Array<Array<LatLng>>;
|
||||
addHole?: Array<Array<ILatLng>>;
|
||||
}
|
||||
|
||||
export interface PolylineOptions {
|
||||
@@ -524,10 +519,6 @@ export const GoogleMapsMapTypeId: { [mapType: string]: MapType; } = {
|
||||
* map: GoogleMap;
|
||||
* mapElement: HTMLElement;
|
||||
* constructor(private googleMaps: GoogleMaps) { }
|
||||
* // Load the map when the platform is ready
|
||||
* this.platform.ready().then(() => {
|
||||
* this.loadMap();
|
||||
* });
|
||||
*
|
||||
* ionViewDidLoad() {
|
||||
* this.loadMap();
|
||||
@@ -618,30 +609,14 @@ export const GoogleMapsMapTypeId: { [mapType: string]: MapType; } = {
|
||||
pluginName: 'GoogleMaps',
|
||||
pluginRef: 'plugin.google.maps',
|
||||
plugin: 'cordova-plugin-googlemaps',
|
||||
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps',
|
||||
install: 'ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"',
|
||||
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps',
|
||||
install: 'ionic cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"',
|
||||
installVariables: ['API_KEY_FOR_ANDROID', 'API_KEY_FOR_IOS'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class GoogleMaps extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Keep a single instance of Environment in memory
|
||||
* @hidden
|
||||
*/
|
||||
_environment: Environment = new Environment();
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
_spherical: Spherical = new Spherical();
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
_encoding: Encoding = new Encoding();
|
||||
|
||||
/**
|
||||
* Creates a new GoogleMap instance
|
||||
* @param element {string | HTMLElement} Element ID or reference to attach the map to
|
||||
@@ -649,31 +624,9 @@ export class GoogleMaps extends IonicNativePlugin {
|
||||
* @return {GoogleMap}
|
||||
*/
|
||||
create(element: string | HTMLElement, options?: GoogleMapOptions): GoogleMap {
|
||||
return new GoogleMap(element, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that returns an instance of Environment class
|
||||
* @return {Environment}
|
||||
*/
|
||||
environment(): Environment {
|
||||
return this._environment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that returns an instance of Spherical class
|
||||
* @returns {Spherical}
|
||||
*/
|
||||
spherical(): Spherical {
|
||||
return this._spherical;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that returns an instance of Encoding class
|
||||
* @returns {Encoding}
|
||||
*/
|
||||
encoding(): Encoding {
|
||||
return this._encoding;
|
||||
let googleMap: GoogleMap = new GoogleMap(element, options);
|
||||
googleMap.set('_overlays', new BaseArrayClass());
|
||||
return googleMap;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -696,21 +649,42 @@ export class BaseClass {
|
||||
*
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@CordovaInstance({
|
||||
destruct: true,
|
||||
observable: true,
|
||||
clearFunction: 'removeEventListener',
|
||||
clearWithArgs: true
|
||||
})
|
||||
addEventListener(eventName: string): Observable<any> { return; }
|
||||
@InstanceCheck({ observable: true })
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable((observer) => {
|
||||
this._objectInstance.on(eventName, (...args: any[]) => {
|
||||
if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) {
|
||||
if (args[args.length - 1].type === 'Map') {
|
||||
args[args.length - 1] = this;
|
||||
} else {
|
||||
args[args.length - 1] = this._objectInstance.getMap().get(args[args.length - 1].getId());
|
||||
}
|
||||
}
|
||||
observer.next(args);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an event listener that works once.
|
||||
*
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance({ destruct: true })
|
||||
addListenerOnce(eventName: string): Promise<any> { return; }
|
||||
@InstanceCheck()
|
||||
addListenerOnce(eventName: string): Promise<any> {
|
||||
return new Promise<any>((resolve) => {
|
||||
this._objectInstance.one(eventName, (...args: any[]) => {
|
||||
if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) {
|
||||
if (args[args.length - 1].type === 'Map') {
|
||||
args[args.length - 1] = this;
|
||||
} else {
|
||||
args[args.length - 1] = this._objectInstance.getMap().get(args[args.length - 1].getId());
|
||||
}
|
||||
}
|
||||
resolve(args);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a value
|
||||
@@ -742,21 +716,42 @@ export class BaseClass {
|
||||
*
|
||||
* @return {Observable<any>}
|
||||
*/
|
||||
@CordovaInstance({
|
||||
observable: true,
|
||||
destruct: true,
|
||||
clearFunction: 'off',
|
||||
clearWithArgs: true
|
||||
})
|
||||
on(eventName: string): Observable<any> { return; }
|
||||
@InstanceCheck({ observable: true })
|
||||
on(eventName: string): Observable<any> {
|
||||
return new Observable((observer) => {
|
||||
this._objectInstance.on(eventName, (...args: any[]) => {
|
||||
if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) {
|
||||
if (args[args.length - 1].type === 'Map') {
|
||||
args[args.length - 1] = this;
|
||||
} else {
|
||||
args[args.length - 1] = this._objectInstance.getMap().get(args[args.length - 1].getId());
|
||||
}
|
||||
}
|
||||
observer.next(args);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Listen to a map event only once.
|
||||
*
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance({ destruct: true })
|
||||
one(eventName: string): Promise<any> { return; };
|
||||
@InstanceCheck()
|
||||
one(eventName: string): Promise<any> {
|
||||
return new Promise<any>((resolve) => {
|
||||
this._objectInstance.one(eventName, (...args: any[]) => {
|
||||
if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) {
|
||||
if (args[args.length - 1].type === 'Map') {
|
||||
args[args.length - 1] = this;
|
||||
} else {
|
||||
args[args.length - 1] = this._objectInstance.getMap().get(args[args.length - 1].getId());
|
||||
}
|
||||
}
|
||||
resolve(args);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all stored values
|
||||
@@ -769,6 +764,19 @@ export class BaseClass {
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
trigger(eventName: string, ...parameters: any[]): void {}
|
||||
|
||||
|
||||
/**
|
||||
* Executes off() and empty()
|
||||
*/
|
||||
@CordovaCheck({ sync: true })
|
||||
destroy(): void {
|
||||
let map: GoogleMap = this._objectInstance.getMap();
|
||||
if (map) {
|
||||
map.get('_overlays').set(this._objectInstance.getId(), undefined);
|
||||
}
|
||||
this._objectInstance.remove();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -788,7 +796,7 @@ export class BaseArrayClass<T> extends BaseClass {
|
||||
if (initialData instanceof GoogleMaps.getPlugin().BaseArrayClass) {
|
||||
this._objectInstance = initialData;
|
||||
} else {
|
||||
this._objectInstance = GoogleMaps.getPlugin().BaseArrayClass(initialData);
|
||||
this._objectInstance = new (GoogleMaps.getPlugin().BaseArrayClass)(initialData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -926,6 +934,13 @@ export class Circle extends BaseClass {
|
||||
this._objectInstance = _objectInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ID of instance.
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
getId(): string { return; }
|
||||
|
||||
/**
|
||||
* Return the map instance.
|
||||
* @return {GoogleMap}
|
||||
@@ -1067,21 +1082,25 @@ export class Circle extends BaseClass {
|
||||
pluginRef: 'plugin.google.maps.environment',
|
||||
repo: ''
|
||||
})
|
||||
export class Environment extends IonicNativePlugin {
|
||||
export class Environment {
|
||||
|
||||
/**
|
||||
* Get the open source software license information for Google Maps Android API v2 and Google Maps SDK for iOS.
|
||||
* Get the open source software license information for Google Maps SDK for iOS.
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getLicenseInfo(): Promise<any> { return; }
|
||||
getLicenseInfo(): Promise<any> {
|
||||
return new Promise<any>((resolve) => {
|
||||
GoogleMaps.getPlugin().environment.getLicenseInfo((text: string) => resolve(text));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies the background color of the app.
|
||||
* @param color
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
setBackgroundColor(color: string): void {}
|
||||
setBackgroundColor(color: string): void {
|
||||
GoogleMaps.getPlugin().environment.setBackgroundColor(color);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1103,7 +1122,7 @@ export class Geocoder {
|
||||
geocode(request: GeocoderRequest): Promise<GeocoderResult[] | BaseArrayClass<GeocoderResult>> {
|
||||
|
||||
if (request.address instanceof Array || Array.isArray(request.address) ||
|
||||
request.position instanceof Array || Array.isArray(request.position)) {
|
||||
request.position instanceof Array || Array.isArray(request.position)) {
|
||||
// -------------------------
|
||||
// Geocoder.geocode({
|
||||
// address: [
|
||||
@@ -1184,8 +1203,9 @@ export class Spherical {
|
||||
* @param locationB {ILatLng}
|
||||
* @return {number}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
computeDistanceBetween(from: ILatLng, to: ILatLng): number { return; }
|
||||
computeDistanceBetween(from: ILatLng, to: ILatLng): number {
|
||||
return GoogleMaps.getPlugin().geometry.spherical.computeDistanceBetween(from, to);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north)
|
||||
@@ -1194,8 +1214,9 @@ export class Spherical {
|
||||
* @param heading {number}
|
||||
* @return {LatLng}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
computeOffset(from: ILatLng, distance: number, heading: number): LatLng { return; }
|
||||
computeOffset(from: ILatLng, distance: number, heading: number): LatLng {
|
||||
return GoogleMaps.getPlugin().geometry.spherical.computeOffset(from, distance, heading);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North. This function returns null when no solution is available.
|
||||
@@ -1204,32 +1225,36 @@ export class Spherical {
|
||||
* @param heading {number} The heading in degrees clockwise from north.
|
||||
* @return {LatLng}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
computeOffsetOrigin(to: ILatLng, distance: number, heading: number): LatLng { return; }
|
||||
computeOffsetOrigin(to: ILatLng, distance: number, heading: number): LatLng {
|
||||
return GoogleMaps.getPlugin().geometry.spherical.computeOffsetOrigin(to, distance, heading);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the length of the given path.
|
||||
* @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}
|
||||
* @return {number}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
computeLength(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number { return; }
|
||||
computeLength(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number {
|
||||
return GoogleMaps.getPlugin().geometry.spherical.computeLength(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the area of a closed path. The computed area uses the same units as the radius.
|
||||
* @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}.
|
||||
* @return {number}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
computeArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number { return; }
|
||||
computeArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number {
|
||||
return GoogleMaps.getPlugin().geometry.spherical.computeArea(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the signed area of a closed path. The signed area may be used to determine the orientation of the path.
|
||||
* @param path {Array<ILatLng> | BaseArrayClass<ILatLng>}.
|
||||
* @return {number}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
computeSignedArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number { return; }
|
||||
computeSignedArea(path: Array<ILatLng> | BaseArrayClass<ILatLng>): number {
|
||||
return GoogleMaps.getPlugin().geometry.spherical.computeSignedArea(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range (-180,180).
|
||||
@@ -1237,8 +1262,9 @@ export class Spherical {
|
||||
* @param to {ILatLng}
|
||||
* @return {number}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
computeHeading(from: ILatLng, to: ILatLng): number { return; }
|
||||
computeHeading(from: ILatLng, to: ILatLng): number {
|
||||
return GoogleMaps.getPlugin().geometry.spherical.computeHeading(from, to);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.
|
||||
@@ -1247,8 +1273,9 @@ export class Spherical {
|
||||
* @param fraction {number} A fraction of the distance to travel from 0.0 to 1.0 .
|
||||
* @return {LatLng}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
interpolate(from: ILatLng, to: ILatLng, fraction: number): LatLng { return; }
|
||||
interpolate(from: ILatLng, to: ILatLng, fraction: number): LatLng {
|
||||
return GoogleMaps.getPlugin().geometry.spherical.interpolate(from, to, fraction);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1426,16 +1453,30 @@ export class GoogleMap extends BaseClass {
|
||||
|
||||
/**
|
||||
* Destroy a map completely
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
remove(): void {}
|
||||
@CordovaInstance()
|
||||
remove(): Promise<any> {
|
||||
this.get('_overlays').forEach((overlayId: string) => this.set(overlayId, null));
|
||||
this.get('_overlays').empty();
|
||||
this.set('_overlays', undefined);
|
||||
return new Promise<any>((resolve) => {
|
||||
this._objectInstance.remove(() => resolve());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all overlays, such as marker
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
clear(): Promise<any> { return; }
|
||||
@InstanceCheck()
|
||||
clear(): Promise<any> {
|
||||
this.get('_overlays').forEach((overlayId: string) => this.set(overlayId, null));
|
||||
this.get('_overlays').empty();
|
||||
return new Promise<any>((resolve) => {
|
||||
this._objectInstance.clear(() => resolve());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the unit from LatLng to the pixels from the left/top of the map div
|
||||
@@ -1526,7 +1567,10 @@ export class GoogleMap extends BaseClass {
|
||||
return new Promise<Marker>((resolve, reject) => {
|
||||
this._objectInstance.addMarker(options, (marker: any) => {
|
||||
if (marker) {
|
||||
resolve(new Marker(this, marker));
|
||||
const overlay: Marker = new Marker(this, marker);
|
||||
this.get('_overlays').push(marker.getId());
|
||||
this.set(marker.getId(), overlay);
|
||||
resolve(overlay);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
@@ -1539,7 +1583,10 @@ export class GoogleMap extends BaseClass {
|
||||
return new Promise<MarkerCluster>((resolve, reject) => {
|
||||
this._objectInstance.addMarkerCluster(options, (markerCluster: any) => {
|
||||
if (markerCluster) {
|
||||
resolve(new MarkerCluster(this, markerCluster));
|
||||
const overlay = new MarkerCluster(this, markerCluster);
|
||||
this.get('_overlays').push(markerCluster.getId());
|
||||
this.set(markerCluster.getId(), overlay);
|
||||
resolve(overlay);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
@@ -1556,7 +1603,10 @@ export class GoogleMap extends BaseClass {
|
||||
return new Promise<Circle>((resolve, reject) => {
|
||||
this._objectInstance.addCircle(options, (circle: any) => {
|
||||
if (circle) {
|
||||
resolve(new Circle(this, circle));
|
||||
const overlay = new Circle(this, circle);
|
||||
this.get('_overlays').push(circle.getId());
|
||||
this.set(circle.getId(), overlay);
|
||||
resolve(overlay);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
@@ -1573,7 +1623,10 @@ export class GoogleMap extends BaseClass {
|
||||
return new Promise<Polygon>((resolve, reject) => {
|
||||
this._objectInstance.addPolygon(options, (polygon: any) => {
|
||||
if (polygon) {
|
||||
resolve(new Polygon(this, polygon));
|
||||
const overlay = new Polygon(this, polygon);
|
||||
this.get('_overlays').push(polygon.getId());
|
||||
this.set(polygon.getId(), overlay);
|
||||
resolve(polygon);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
@@ -1590,7 +1643,10 @@ export class GoogleMap extends BaseClass {
|
||||
return new Promise<Polyline>((resolve, reject) => {
|
||||
this._objectInstance.addPolyline(options, (polyline: any) => {
|
||||
if (polyline) {
|
||||
resolve(new Polyline(this, polyline));
|
||||
const overlay = new Polyline(this, polyline);
|
||||
this.get('_overlays').push(polyline.getId());
|
||||
this.set(polyline.getId(), overlay);
|
||||
resolve(overlay);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
@@ -1606,7 +1662,10 @@ export class GoogleMap extends BaseClass {
|
||||
return new Promise<TileOverlay>((resolve, reject) => {
|
||||
this._objectInstance.addTileOverlay(options, (tileOverlay: any) => {
|
||||
if (tileOverlay) {
|
||||
resolve(new TileOverlay(this, tileOverlay));
|
||||
const overlay = new TileOverlay(this, tileOverlay);
|
||||
this.get('_overlays').push(tileOverlay.getId());
|
||||
this.set(tileOverlay.getId(), overlay);
|
||||
resolve(overlay);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
@@ -1622,7 +1681,10 @@ export class GoogleMap extends BaseClass {
|
||||
return new Promise<GroundOverlay>((resolve, reject) => {
|
||||
this._objectInstance.addGroundOverlay(options, (groundOverlay: any) => {
|
||||
if (groundOverlay) {
|
||||
resolve(new GroundOverlay(this, groundOverlay));
|
||||
const overlay = new GroundOverlay(this, groundOverlay);
|
||||
this.get('_overlays').push(groundOverlay.getId());
|
||||
this.set(groundOverlay.getId(), overlay);
|
||||
resolve(overlay);
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
@@ -1673,6 +1735,13 @@ export class GroundOverlay extends BaseClass {
|
||||
this._objectInstance = _objectInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ID of instance.
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
getId(): string { return; }
|
||||
|
||||
/**
|
||||
* Return the map instance.
|
||||
* @return {GoogleMap}
|
||||
@@ -1765,28 +1834,35 @@ export class GroundOverlay extends BaseClass {
|
||||
/**
|
||||
* Remove the ground overlay
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
remove(): void {}
|
||||
|
||||
@CordovaCheck()
|
||||
remove(): void {
|
||||
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
|
||||
this._objectInstance.remove();
|
||||
this.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'cordova-plugin-googlemaps',
|
||||
pluginName: 'GoogleMaps',
|
||||
pluginRef: 'plugin.google.maps.HtmlInfoWindow',
|
||||
repo: ''
|
||||
plugin: 'cordova-plugin-googlemaps',
|
||||
pluginName: 'GoogleMaps',
|
||||
pluginRef: 'plugin.google.maps.HtmlInfoWindow',
|
||||
repo: ''
|
||||
})
|
||||
export class HtmlInfoWindow<T> extends IonicNativePlugin {
|
||||
private _objectInstance: any;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
if (checkAvailability(HtmlInfoWindow.getPluginRef(), null, HtmlInfoWindow.getPluginName()) === true) {
|
||||
this._objectInstance = new (HtmlInfoWindow.getPlugin())();
|
||||
}
|
||||
constructor(initialData?: any) {
|
||||
super();
|
||||
if (checkAvailability(HtmlInfoWindow.getPluginRef(), null, HtmlInfoWindow.getPluginName()) === true) {
|
||||
if (initialData instanceof GoogleMaps.getPlugin().HtmlInfoWindow) {
|
||||
this._objectInstance = initialData;
|
||||
} else {
|
||||
this._objectInstance = new (HtmlInfoWindow.getPlugin())();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1818,7 +1894,6 @@ export class HtmlInfoWindow<T> extends IonicNativePlugin {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@@ -1837,7 +1912,7 @@ export class Marker extends BaseClass {
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
getId(): number { return; }
|
||||
getId(): string { return; }
|
||||
|
||||
/**
|
||||
* Return the map instance.
|
||||
@@ -1943,8 +2018,12 @@ export class Marker extends BaseClass {
|
||||
/**
|
||||
* Remove the marker.
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
remove(): void {}
|
||||
@CordovaCheck()
|
||||
remove(): void {
|
||||
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
|
||||
this._objectInstance.remove();
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the info window anchor. This defaults to 50% from the left of the image and at the bottom of the image.
|
||||
@@ -2047,14 +2126,31 @@ export class MarkerCluster extends BaseClass {
|
||||
this._objectInstance = _objectInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ID of instance.
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
getId(): string { return; }
|
||||
|
||||
@CordovaInstance({ sync: true })
|
||||
addMarker(marker: MarkerOptions): void {}
|
||||
|
||||
@CordovaInstance({ sync: true })
|
||||
addMarkers(markers: MarkerOptions[]): void {}
|
||||
|
||||
@CordovaInstance({ sync: true })
|
||||
remove(): void {}
|
||||
@InstanceCheck()
|
||||
remove(): void {
|
||||
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
|
||||
this._objectInstance.remove();
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the map instance.
|
||||
* @return {GoogleMap}
|
||||
*/
|
||||
getMap(): any { return this._map; }
|
||||
|
||||
}
|
||||
|
||||
@@ -2071,6 +2167,13 @@ export class Polygon extends BaseClass {
|
||||
this._objectInstance = _objectInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ID of instance.
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
getId(): string { return; }
|
||||
|
||||
/**
|
||||
* Return the map instance.
|
||||
* @return {GoogleMap}
|
||||
@@ -2179,8 +2282,12 @@ export class Polygon extends BaseClass {
|
||||
/**
|
||||
* Remove the polygon.
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
remove(): void {}
|
||||
@InstanceCheck()
|
||||
remove(): void {
|
||||
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
|
||||
this._objectInstance.remove();
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the polygon stroke width
|
||||
@@ -2202,7 +2309,7 @@ export class Polygon extends BaseClass {
|
||||
setGeodesic(geodesic: boolean): void {}
|
||||
|
||||
/**
|
||||
* Return true if the polylgon is geodesic.
|
||||
* Return true if the polygon is geodesic.
|
||||
* @return {boolean}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
@@ -2223,6 +2330,13 @@ export class Polyline extends BaseClass {
|
||||
this._objectInstance = _objectInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ID of instance.
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
getId(): string { return; }
|
||||
|
||||
/**
|
||||
* Return the map instance.
|
||||
* @return {GoogleMap}
|
||||
@@ -2329,9 +2443,12 @@ export class Polyline extends BaseClass {
|
||||
/**
|
||||
* Remove the polyline
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
remove(): void {}
|
||||
|
||||
@InstanceCheck()
|
||||
remove(): void {
|
||||
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
|
||||
this._objectInstance.remove();
|
||||
this.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2347,6 +2464,13 @@ export class TileOverlay extends BaseClass {
|
||||
this._objectInstance = _objectInstance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ID of instance.
|
||||
* @return {string}
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
getId(): string { return; }
|
||||
|
||||
/**
|
||||
* Return the map instance.
|
||||
* @return {GoogleMap}
|
||||
@@ -2418,9 +2542,12 @@ export class TileOverlay extends BaseClass {
|
||||
/**
|
||||
* Remove the tile overlay
|
||||
*/
|
||||
@CordovaInstance({ sync: true })
|
||||
remove(): void {}
|
||||
|
||||
@CordovaCheck()
|
||||
remove(): void {
|
||||
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
|
||||
this._objectInstance.remove();
|
||||
this.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
|
||||
@@ -60,7 +60,7 @@ export interface HTTPResponse {
|
||||
@Plugin({
|
||||
pluginName: 'HTTP',
|
||||
plugin: 'cordova-plugin-advanced-http',
|
||||
pluginRef: 'cordovaHTTP',
|
||||
pluginRef: 'cordova.plugin.http',
|
||||
repo: 'https://github.com/silkimen/cordova-plugin-advanced-http',
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
|
||||
136
src/@ionic-native/plugins/index-app-content/index.ts
Normal file
136
src/@ionic-native/plugins/index-app-content/index.ts
Normal file
@@ -0,0 +1,136 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface IndexItem {
|
||||
domain: string;
|
||||
identifier: string;
|
||||
title: string;
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* Url to image
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* Item keywords
|
||||
*/
|
||||
keywords?: Array<string>;
|
||||
|
||||
/**
|
||||
* Lifetime in minutes
|
||||
*/
|
||||
lifetime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Index App Content
|
||||
* @description
|
||||
* This plugin gives you a Javascript API to interact with Core Spotlight on iOS (=> iOS 9).
|
||||
* You can add, update and delete items to the spotlight search index.
|
||||
* Spotlight Search will include these items in the result list. You can deep-link the search results with your app.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { IndexAppContent } from '@ionic-native/index-app-content';
|
||||
*
|
||||
*
|
||||
* constructor(private indexAppContent: IndexAppContent) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* var items = [
|
||||
* {
|
||||
* domain: 'com.my.domain',
|
||||
* identifier: '88asdf7dsf',
|
||||
* title: 'Foo',
|
||||
* description: 'Bar',
|
||||
* url: 'http://location/of/my/image.jpg',
|
||||
* },
|
||||
* {
|
||||
* domain: 'com.other.domain',
|
||||
* identifier: '9asd67g6a',
|
||||
* title: 'Baz',
|
||||
* description: 'Woot',
|
||||
* url: 'http://location/of/my/image2.jpg',
|
||||
* }
|
||||
* ];
|
||||
*
|
||||
* this.indexAppContent.setItems(items)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'IndexAppContent',
|
||||
plugin: 'cordova-plugin-indexappcontent',
|
||||
pluginRef: 'window.plugins.indexAppContent',
|
||||
repo: 'https://github.com/johanblomgren/cordova-plugin-indexappcontent',
|
||||
platforms: ['iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class IndexAppContent extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* The option to index app content might not be available at all due to device limitations or user settings.
|
||||
* Therefore it's highly recommended to check upfront if indexing is possible.
|
||||
* @return {Promise<boolean>} Returns a promise that resolves with true if indexing is available, false if not
|
||||
*/
|
||||
@Cordova()
|
||||
isIndexingAvailable(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add or change items to spotlight index
|
||||
* @param {Array<IndexItem>} Array of items to index
|
||||
* @return {Promise<any>} Returns if index set was successfull
|
||||
*/
|
||||
@Cordova()
|
||||
setItems(items: Array<IndexItem>): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* If user taps on a search result in spotlight then the app will be launched.
|
||||
* You can register a Javascript handler to get informed when this happens.
|
||||
* @param {IndexItem} Clicked Item
|
||||
* @return {Promise<any>} Returns promise
|
||||
*/
|
||||
@Cordova()
|
||||
onItemPressed(payload: IndexItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all items stored for a given array of domains
|
||||
* @param {Array<string>} Array of domains to clear
|
||||
* @return {Promise<any>} Resolve if successfull
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForDomains(domains: Array<string>): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all items stored for a given array of identifiers
|
||||
* @param {Array<string>} Array of identifiers to clear
|
||||
* @return {Promise<any>} Resolve if successfull
|
||||
*/
|
||||
@Cordova()
|
||||
clearItemsForIdentifiers(identifiers: Array<string>): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* You might want to avoid to update spotlight index too frequently.
|
||||
* Without calling this function a subsequent call to manipulate the index is only possible after 1440 minutes (= 24 hours)!
|
||||
* @param {number} Numeric value => 0
|
||||
*/
|
||||
@Cordova()
|
||||
setIndexingInterval(intervalMinutes: number) {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -313,8 +313,8 @@ export class LaunchNavigator extends IonicNativePlugin {
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
successIndex: 2,
|
||||
errorIndex: 3
|
||||
})
|
||||
navigate(destination: string | number[], options?: LaunchNavigatorOptions): Promise<any> { return; }
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ export interface MusicControlsOptions {
|
||||
dismissable: boolean;
|
||||
hasPrev: boolean;
|
||||
hasNext: boolean;
|
||||
hasSkipForward: boolean;
|
||||
hasSkipBackward: boolean;
|
||||
skipForwardInterval: number;
|
||||
skipBackwardInterval: number;
|
||||
hasClose: boolean;
|
||||
album: string;
|
||||
duration: number;
|
||||
@@ -50,6 +54,10 @@ export interface MusicControlsOptions {
|
||||
* album : 'Absolution' // optional, default: ''
|
||||
* duration : 60, // optional, default: 0
|
||||
* elapsed : 10, // optional, default: 0
|
||||
* hasSkipForward : true, // show skip forward button, optional, default: false
|
||||
* hasSkipBackward : true, // show skip backward button, optional, default: false
|
||||
* skipForwardInterval: 15, // display number for skip forward, optional, default: 0
|
||||
* skipBackwardInterval: 15, // display number for skip backward, optional, default: 0
|
||||
*
|
||||
* // Android only, optional
|
||||
* // text displayed in the status bar when the notification (and the ticker) are updated
|
||||
@@ -89,6 +97,12 @@ export interface MusicControlsOptions {
|
||||
* });
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-skip-forward':
|
||||
* // Do something
|
||||
* break;
|
||||
* case 'music-controls-skip-backward':
|
||||
* // Do something
|
||||
* break;
|
||||
*
|
||||
* // Headset events (Android only)
|
||||
* // All media button events are listed below
|
||||
@@ -164,7 +178,7 @@ export class MusicControls extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Update elapsed time, optionally toggle play/pause:
|
||||
* @param args {Object}
|
||||
* @param args {Object}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['iOS']
|
||||
|
||||
@@ -62,16 +62,10 @@ export interface NotificationEventAdditionalData {
|
||||
}
|
||||
|
||||
export interface IOSPushOptions {
|
||||
/**
|
||||
* Maps to the project number in the Google Developer Console. Setting this
|
||||
* uses GCM for notifications instead of native.
|
||||
*/
|
||||
senderID?: string;
|
||||
|
||||
/**
|
||||
* Whether to use prod or sandbox GCM setting.
|
||||
*/
|
||||
gcmSandbox?: boolean | string;
|
||||
fcmSandbox?: boolean | string;
|
||||
|
||||
/**
|
||||
* If true the device shows an alert on receipt of notification.
|
||||
@@ -137,11 +131,6 @@ export interface CategoryActionData {
|
||||
}
|
||||
|
||||
export interface AndroidPushOptions {
|
||||
/**
|
||||
* Maps to the project number in the Google Developer Console.
|
||||
*/
|
||||
senderID: string;
|
||||
|
||||
/**
|
||||
* The name of a drawable resource to use as the small-icon. The name should
|
||||
* not include the extension.
|
||||
@@ -186,6 +175,16 @@ export interface AndroidPushOptions {
|
||||
* subscribe to a GcmPubSub topic.
|
||||
*/
|
||||
topics?: string[];
|
||||
|
||||
/**
|
||||
* The key to search for text of notification.
|
||||
*/
|
||||
messageKey?: string;
|
||||
|
||||
/**
|
||||
* The key to search for title of notification.
|
||||
*/
|
||||
titleKey?: string;
|
||||
}
|
||||
|
||||
export interface BrowserPushOptions {
|
||||
@@ -244,9 +243,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
|
||||
* // to initialize push notifications
|
||||
*
|
||||
* const options: PushOptions = {
|
||||
* android: {
|
||||
* senderID: '12345679'
|
||||
* },
|
||||
* android: {},
|
||||
* ios: {
|
||||
* alert: 'true',
|
||||
* badge: true,
|
||||
@@ -283,8 +280,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
|
||||
plugin: 'phonegap-plugin-push',
|
||||
pluginRef: 'PushNotification',
|
||||
repo: 'https://github.com/phonegap/phonegap-plugin-push',
|
||||
install: 'ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID=XXXXXXXXX',
|
||||
installVariables: ['SENDER_ID'],
|
||||
install: 'ionic cordova plugin add phonegap-plugin-push',
|
||||
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
@@ -159,6 +159,13 @@ export class QRScanner extends IonicNativePlugin {
|
||||
})
|
||||
enableLight(): Promise<QRScannerStatus> { return; }
|
||||
|
||||
/**
|
||||
* Destroy the scanner instance.
|
||||
* @returns {Promise<QRScannerStatus>}
|
||||
*/
|
||||
@Cordova()
|
||||
destroy(): Promise<QRScannerStatus> { return; }
|
||||
|
||||
/**
|
||||
* Disable the device's light.
|
||||
* @return {Promise<QRScannerStatus>}
|
||||
|
||||
39
src/@ionic-native/plugins/regula-document-reader/index.ts
Normal file
39
src/@ionic-native/plugins/regula-document-reader/index.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @paid
|
||||
* @beta
|
||||
* @name Regula Document Reader
|
||||
* @description
|
||||
* Plugin for reading and validation of identification documents.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { RegulaDocumentReader } from '@ionic-native/regula-document-reader';
|
||||
*
|
||||
* let license; // read regula.license file
|
||||
* RegulaDocumentReader.scanDocument(license).then((result) => {
|
||||
* // read result
|
||||
* })
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Regula Document Reader',
|
||||
plugin: 'cordova-plugin-documentreader',
|
||||
pluginRef: 'DocumentReader',
|
||||
repo: 'https://github.com/regulaforensics/cordova-plugin-documentreader.git',
|
||||
platforms: ['iOS'],
|
||||
install: 'ionic plugin add cordova-plugin-documentreader --variable CAMERA_USAGE_DESCRIPTION="To take photo"',
|
||||
})
|
||||
@Injectable()
|
||||
export class RegulaDocumentReader extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Run the scanner
|
||||
* @param license {any} License data
|
||||
* @return {Promise<string[]>} Returns a promise that resolves when results was got, and fails when not
|
||||
*/
|
||||
@Cordova()
|
||||
scanDocument(license: any): Promise<string[]> { return; }
|
||||
}
|
||||
@@ -79,6 +79,31 @@ export interface StripeBankAccountParams {
|
||||
account_holder_type?: string;
|
||||
}
|
||||
|
||||
export interface StripeCardTokenRes {
|
||||
/**
|
||||
* Card Object.
|
||||
*/
|
||||
card: {
|
||||
brand: string,
|
||||
exp_month: number,
|
||||
exp_year: number,
|
||||
funding: string,
|
||||
last4: string
|
||||
};
|
||||
/**
|
||||
* Token Request Date Time.
|
||||
*/
|
||||
created: string;
|
||||
/**
|
||||
* Card Token.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Source Type (card or account).
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Stripe
|
||||
* @description
|
||||
@@ -102,7 +127,7 @@ export interface StripeBankAccountParams {
|
||||
* };
|
||||
*
|
||||
* this.stripe.createCardToken(card)
|
||||
* .then(token => console.log(token))
|
||||
* .then(token => console.log(token.id))
|
||||
* .catch(error => console.error(error));
|
||||
*
|
||||
* ```
|
||||
@@ -131,10 +156,10 @@ export class Stripe extends IonicNativePlugin {
|
||||
/**
|
||||
* Create Credit Card Token
|
||||
* @param params {StripeCardTokenParams} Credit card information
|
||||
* @return {Promise<string>} returns a promise that resolves with the token, or rejects with an error
|
||||
* @return {Promise<StripeCardTokenRes>} returns a promise that resolves with the token object, or rejects with an error
|
||||
*/
|
||||
@Cordova()
|
||||
createCardToken(params: StripeCardTokenParams): Promise<string> { return; }
|
||||
createCardToken(params: StripeCardTokenParams): Promise<StripeCardTokenRes> { return; }
|
||||
|
||||
/**
|
||||
* Create a bank account token
|
||||
|
||||
@@ -55,9 +55,9 @@ export interface TwitterConnectResponse {
|
||||
pluginName: 'TwitterConnect',
|
||||
plugin: 'twitter-connect-plugin',
|
||||
pluginRef: 'TwitterConnect',
|
||||
repo: 'https://github.com/ManifestWebDesign/twitter-connect-plugin',
|
||||
install: 'ionic cordova plugin add twitter-connect-plugin --variable FABRIC_KEY=fabric_API_key',
|
||||
installVariables: ['FABRIC_KEY'],
|
||||
repo: 'https://github.com/chroa/twitter-connect-plugin',
|
||||
install: 'ionic cordova plugin add https://github.com/chroa/twitter-connect-plugin --variable FABRIC_KEY=<Fabric API Key> --variable TWITTER_KEY=<Twitter Consumer Key> --variable TWITTER_SECRET=<Twitter Consumer Secret>',
|
||||
installVariables: ['FABRIC_KEY', 'TWITTER_KEY', 'TWITTER_SECRET'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
|
||||
69
src/@ionic-native/plugins/uid/index.ts
Normal file
69
src/@ionic-native/plugins/uid/index.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name Uid
|
||||
* @description
|
||||
* Get unique identifiers: UUID, IMEI, IMSI, ICCID and MAC.
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { Uid } from '@ionic-native/uid';
|
||||
* import { AndroidPermissions } from '@ionic-native/android-permissions';
|
||||
*
|
||||
* constructor(private uid: Uid, private androidPermissions: AndroidPermissions) { }
|
||||
*
|
||||
*
|
||||
* async getImei() {
|
||||
* const { hasPermission } = await this.androidPermissions.checkPermission(
|
||||
* this.androidPermissions.PERMISSION.READ_PHONE_STATE
|
||||
* );
|
||||
*
|
||||
* if (!hasPermission) {
|
||||
* const result = await this.androidPermissions.requestPermission(
|
||||
* this.androidPermissions.PERMISSION.READ_PHONE_STATE
|
||||
* );
|
||||
*
|
||||
* if (!result.hasPermission) {
|
||||
* throw new Error('Permissions required');
|
||||
* }
|
||||
*
|
||||
* // ok, a user gave us permission, we can get him identifiers after restart app
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
* return this.uid.IMEI
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Uid',
|
||||
plugin: 'https://github.com/hygieiasoft/cordova-plugin-uid',
|
||||
pluginRef: 'cordova.plugins.uid',
|
||||
repo: 'https://github.com/hygieiasoft/cordova-plugin-uid',
|
||||
platforms: ['Android']
|
||||
})
|
||||
@Injectable()
|
||||
export class Uid extends IonicNativePlugin {
|
||||
|
||||
/** Get the device Universally Unique Identifier (UUID). */
|
||||
@CordovaProperty
|
||||
UUID: string;
|
||||
|
||||
/** Get the device International Mobile Station Equipment Identity (IMEI). */
|
||||
@CordovaProperty
|
||||
IMEI: string;
|
||||
|
||||
/** Get the device International mobile Subscriber Identity (IMSI). */
|
||||
@CordovaProperty
|
||||
IMSI: string;
|
||||
|
||||
/** Get the sim Integrated Circuit Card Identifier (ICCID). */
|
||||
@CordovaProperty
|
||||
ICCID: string;
|
||||
|
||||
/** Get the Media Access Control address (MAC). */
|
||||
@CordovaProperty
|
||||
MAC: string;
|
||||
|
||||
}
|
||||
@@ -14,7 +14,7 @@ export interface ZeroconfService {
|
||||
}
|
||||
|
||||
export interface ZeroconfResult {
|
||||
action: 'registered' | 'added' | 'removed';
|
||||
action: 'registered' | 'added' | 'removed' | 'resolved';
|
||||
service: ZeroconfService;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user