mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-16 00:00:02 +08:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78fcdc8d80 | ||
|
|
53f7056b16 | ||
|
|
b7701cdb16 | ||
|
|
94a4519f2b | ||
|
|
6fe52b610b | ||
|
|
434a6c8ad3 | ||
|
|
97489ba573 | ||
|
|
f525a25b49 | ||
|
|
add49e8b4d | ||
|
|
4ab87d8abb | ||
|
|
69ff7afb48 | ||
|
|
62a30c7d8f | ||
|
|
dc37d8f71c | ||
|
|
8864d1360a | ||
|
|
613141998a | ||
|
|
c2fbb4fb64 | ||
|
|
f0cf86076c | ||
|
|
a03afcf0fa | ||
|
|
3abe0bb97d | ||
|
|
a5b4632ceb | ||
|
|
1c78f77c0f |
29
CHANGELOG.md
29
CHANGELOG.md
@@ -1,3 +1,32 @@
|
||||
<a name="2.5.1"></a>
|
||||
## [2.5.1](https://github.com/driftyco/ionic-native/compare/v2.5.0...v2.5.1) (2017-02-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **pin-dialog:** add missing errorIndex ([b7701cd](https://github.com/driftyco/ionic-native/commit/b7701cd))
|
||||
|
||||
|
||||
|
||||
<a name="2.5.0"></a>
|
||||
# [2.5.0](https://github.com/driftyco/ionic-native/compare/v2.4.1...v2.5.0) (2017-02-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **file-transfer:** fix return type of upload method ([a5b4632](https://github.com/driftyco/ionic-native/commit/a5b4632)), closes [#1002](https://github.com/driftyco/ionic-native/issues/1002)
|
||||
* **pinterest:** fix PinterestPin interface ([a03afcf](https://github.com/driftyco/ionic-native/commit/a03afcf))
|
||||
* **safari-view-controller:** fix issue caused by calling show without options ([dc37d8f](https://github.com/driftyco/ionic-native/commit/dc37d8f))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **background-geolocation:** add missing properties for Android ([f0cf860](https://github.com/driftyco/ionic-native/commit/f0cf860))
|
||||
* **barcodescanner:** add option disableSuccessBeep ([#1035](https://github.com/driftyco/ionic-native/issues/1035)) ([97489ba](https://github.com/driftyco/ionic-native/commit/97489ba))
|
||||
* **inappbrowser:** add hide function ([#1018](https://github.com/driftyco/ionic-native/issues/1018)) ([4ab87d8](https://github.com/driftyco/ionic-native/commit/4ab87d8))
|
||||
|
||||
|
||||
|
||||
<a name="2.4.1"></a>
|
||||
## [2.4.1](https://github.com/driftyco/ionic-native/compare/v2.4.0...v2.4.1) (2017-01-24)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "2.4.1",
|
||||
"version": "2.5.1",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"main": "dist/es5/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
|
||||
@@ -126,10 +126,14 @@ export interface BackgroundGeolocationConfig {
|
||||
|
||||
/**
|
||||
* ANDROID, WP8 ONLY
|
||||
* The minimum time interval between location updates in seconds.
|
||||
* When using BackgroundGeolocation.LocationProvider.ANDROID_DISTANCE_FILTER_PROVIDER:
|
||||
* The minimum time interval between location updates in milliseconds.
|
||||
* @see Android docs (http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(long,%20float,%20android.location.Criteria,%20android.app.PendingIntent))
|
||||
* and the MS doc (http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.geolocation.geolocator.reportinterval)
|
||||
* for more information
|
||||
* When using BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER:
|
||||
* Rate in milliseconds at which your app prefers to receive location updates.
|
||||
* @see Android docs (https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html#getInterval())
|
||||
*/
|
||||
interval?: number;
|
||||
|
||||
@@ -225,6 +229,28 @@ export interface BackgroundGeolocationConfig {
|
||||
* Defaults to 10000
|
||||
*/
|
||||
maxLocations?: number;
|
||||
|
||||
/**
|
||||
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
|
||||
*
|
||||
* Fastest rate in milliseconds at which your app can handle location updates.
|
||||
* @see Android docs (https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html#getFastestInterval())
|
||||
*/
|
||||
fastestInterval?: number;
|
||||
|
||||
/**
|
||||
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
|
||||
*
|
||||
* Rate in milliseconds at which activity recognition occurs. Larger values will result in fewer activity detections while improving battery life.
|
||||
*/
|
||||
activitiesInterval?: number;
|
||||
|
||||
/**
|
||||
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
|
||||
*
|
||||
* stop() is forced, when the STILL activity is detected (default is true)
|
||||
*/
|
||||
stopOnStillActivity?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,6 +22,11 @@ export interface BarcodeScannerOptions {
|
||||
*/
|
||||
disableAnimations?: boolean;
|
||||
|
||||
/**
|
||||
* Disable success beep. Supported on iOS only.
|
||||
*/
|
||||
disableSuccessBeep?: boolean;
|
||||
|
||||
/**
|
||||
* Prompt text. Supported on Android only.
|
||||
*/
|
||||
|
||||
@@ -173,6 +173,10 @@ export interface FileTransferError {
|
||||
* cd files
|
||||
* ls
|
||||
* ```
|
||||
*
|
||||
* To store files in a different/publicly accessible directory, please refer to the following link
|
||||
* https://github.com/apache/cordova-plugin-file#where-to-store-files
|
||||
*
|
||||
* @interfaces
|
||||
* FileUploadOptions
|
||||
* FileUploadResult
|
||||
@@ -223,7 +227,7 @@ export class Transfer {
|
||||
successIndex: 2,
|
||||
errorIndex: 3
|
||||
})
|
||||
upload(fileUrl: string, url: string, options?: FileUploadOptions, trustAllHosts?: boolean): Promise<FileUploadResult | FileTransferError> {
|
||||
upload(fileUrl: string, url: string, options?: FileUploadOptions, trustAllHosts?: boolean): Promise<FileUploadResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ export class Geolocation {
|
||||
*
|
||||
* ```typescript
|
||||
* var subscription = Geolocation.watchPosition()
|
||||
* .filter((p) => p.code === undefined) //Filter Out Errors
|
||||
* .filter((p) => p.coords !== undefined) //Filter Out Errors
|
||||
* .subscribe(position => {
|
||||
* console.log(position.coords.longitude + ' ' + position.coords.latitude);
|
||||
* });
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Cordova, CordovaInstance, Plugin, InstanceProperty, getPlugin, pluginWarn } from './plugin';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/fromEvent';
|
||||
|
||||
declare var plugin: any;
|
||||
|
||||
@@ -139,12 +140,7 @@ export class GoogleMap {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
|
||||
}
|
||||
);
|
||||
return Observable.fromEvent(this._objectInstance, eventName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -631,12 +627,7 @@ export class GoogleMapsMarker {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
|
||||
}
|
||||
);
|
||||
return Observable.fromEvent(this._objectInstance, eventName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -911,12 +902,7 @@ export class GoogleMapsCircle {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
|
||||
}
|
||||
);
|
||||
return Observable.fromEvent(this._objectInstance, eventName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1055,12 +1041,7 @@ export class GoogleMapsPolyline {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
|
||||
}
|
||||
);
|
||||
return Observable.fromEvent(this._objectInstance, eventName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1200,12 +1181,7 @@ export class GoogleMapsPolygon {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
|
||||
}
|
||||
);
|
||||
return Observable.fromEvent(this._objectInstance, eventName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1347,12 +1323,7 @@ export class GoogleMapsTileOverlay {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
|
||||
}
|
||||
);
|
||||
return Observable.fromEvent(this._objectInstance, eventName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1481,12 +1452,7 @@ export class GoogleMapsGroundOverlay {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
|
||||
}
|
||||
);
|
||||
return Observable.fromEvent(this._objectInstance, eventName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1606,12 +1572,7 @@ export class GoogleMapsKmlOverlay {
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return new Observable(
|
||||
(observer) => {
|
||||
this._objectInstance.addEventListener(eventName, observer.next.bind(observer));
|
||||
return () => this._objectInstance.removeEventListener(eventName, observer.next.bind(observer));
|
||||
}
|
||||
);
|
||||
return Observable.fromEvent(this._objectInstance, eventName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Plugin, Cordova } from './plugin';
|
||||
|
||||
/**
|
||||
* @name Headerolor
|
||||
* @name HeaderColor
|
||||
* @description
|
||||
* Cordova plugin to change color of header in multitask view
|
||||
*
|
||||
|
||||
@@ -72,6 +72,13 @@ export class InAppBrowser {
|
||||
@CordovaInstance({sync: true})
|
||||
close(): void { }
|
||||
|
||||
/**
|
||||
* Hides an InAppBrowser window that is currently shown. Calling this has no effect
|
||||
* if the InAppBrowser was already hidden.
|
||||
*/
|
||||
@CordovaInstance({sync: true})
|
||||
hide(): void { }
|
||||
|
||||
/**
|
||||
* Injects JavaScript code into the InAppBrowser window.
|
||||
* @param script {Object} Details of the script to run, specifying either a file or code key.
|
||||
|
||||
@@ -34,7 +34,8 @@ export class PinDialog {
|
||||
* @returns {Promise<{ buttonIndex: number, input1: string }>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1
|
||||
successIndex: 1,
|
||||
errorIndex: 4 // no error callback
|
||||
})
|
||||
static prompt(message: string, title: string, buttons: string[]): Promise<{ buttonIndex: number, input1: string }> { return; }
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ export interface PinterestPin {
|
||||
/**
|
||||
* The Pin’s image. The default response returns the image’s URL, width and height.
|
||||
*/
|
||||
image?; any;
|
||||
image?: any;
|
||||
/**
|
||||
* Extra information about the Pin for Rich Pins. Includes the Pin type (e.g., article, recipe) and related information (e.g., ingredients, author).
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { get } from '../util';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import 'rxjs/add/observable/fromEvent';
|
||||
|
||||
declare var window;
|
||||
declare var Promise;
|
||||
@@ -86,6 +87,10 @@ export interface CordovaOptions {
|
||||
* Event name, this must be set if eventObservable is set to true
|
||||
*/
|
||||
event?: string;
|
||||
/**
|
||||
* Element to attach the event listener to, this is optional, defaults to `window`
|
||||
*/
|
||||
element?: any;
|
||||
/**
|
||||
* Set to true if the wrapped method returns a promise
|
||||
*/
|
||||
@@ -337,14 +342,12 @@ function wrapInstance(pluginObj: any, methodName: string, opts: any = {}) {
|
||||
|
||||
/**
|
||||
* Wrap the event with an observable
|
||||
* @param event
|
||||
* @param event even name
|
||||
* @param element The element to attach the event listener to
|
||||
* @returns {Observable}
|
||||
*/
|
||||
function wrapEventObservable(event: string): Observable<any> {
|
||||
return new Observable(observer => {
|
||||
window.addEventListener(event, observer.next.bind(observer), false);
|
||||
return () => window.removeEventListener(event, observer.next.bind(observer), false);
|
||||
});
|
||||
function wrapEventObservable(event: string, element: any = window): Observable<any> {
|
||||
return Observable.fromEvent(element, event);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -403,7 +406,7 @@ export const wrap = function(pluginObj: any, methodName: string, opts: CordovaOp
|
||||
} else if (opts.observable) {
|
||||
return wrapObservable(pluginObj, methodName, args, opts);
|
||||
} else if (opts.eventObservable && opts.event) {
|
||||
return wrapEventObservable(opts.event);
|
||||
return wrapEventObservable(opts.event, opts.element);
|
||||
} else if (opts.otherPromise) {
|
||||
return wrapOtherPromise(pluginObj, methodName, args, opts);
|
||||
} else {
|
||||
|
||||
@@ -71,7 +71,10 @@ export class SafariViewController {
|
||||
* @param options {SafariViewControllerOptions} optional
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
})
|
||||
static show(options?: SafariViewControllerOptions): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,9 +21,9 @@ import { Plugin, Cordova } from './plugin';
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Stepcounter',
|
||||
plugin: 'https://github.com/texh/cordova-plugin-stepcounter',
|
||||
plugin: 'https://github.com/Slidee/cordova-plugin-stepcounter',
|
||||
pluginRef: 'stepcounter',
|
||||
repo: 'https://github.com/texh/cordova-plugin-stepcounter',
|
||||
repo: 'https://github.com/Slidee/cordova-plugin-stepcounter',
|
||||
platforms: ['Android']
|
||||
})
|
||||
export class Stepcounter {
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface StreamingAudioOptions {
|
||||
* orientation: 'landscape'
|
||||
* };
|
||||
*
|
||||
* StreamingMedia.('https://path/to/video/stream', options);
|
||||
* StreamingMedia.playVideo('https://path/to/video/stream', options);
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
|
||||
Reference in New Issue
Block a user