mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 09:01:07 +08:00
Merge branch 'master' of github.com:driftyco/ionic-native
This commit is contained in:
commit
91ee5bde5f
@ -9,6 +9,7 @@ import { AdMob } from './plugins/admob';
|
|||||||
import { AndroidFingerprintAuth } from './plugins/android-fingerprint-auth';
|
import { AndroidFingerprintAuth } from './plugins/android-fingerprint-auth';
|
||||||
import { AppAvailability } from './plugins/appavailability';
|
import { AppAvailability } from './plugins/appavailability';
|
||||||
import { AppRate } from './plugins/apprate';
|
import { AppRate } from './plugins/apprate';
|
||||||
|
import { AppUpdate } from './plugins/app-update';
|
||||||
import { AppVersion } from './plugins/appversion';
|
import { AppVersion } from './plugins/appversion';
|
||||||
import { Badge } from './plugins/badge';
|
import { Badge } from './plugins/badge';
|
||||||
import { BackgroundGeolocation } from './plugins/background-geolocation';
|
import { BackgroundGeolocation } from './plugins/background-geolocation';
|
||||||
@ -132,6 +133,7 @@ export * from './plugins/admob';
|
|||||||
export * from './plugins/android-fingerprint-auth';
|
export * from './plugins/android-fingerprint-auth';
|
||||||
export * from './plugins/appavailability';
|
export * from './plugins/appavailability';
|
||||||
export * from './plugins/apprate';
|
export * from './plugins/apprate';
|
||||||
|
export * from './plugins/app-update';
|
||||||
export * from './plugins/appversion';
|
export * from './plugins/appversion';
|
||||||
export * from './plugins/background-geolocation';
|
export * from './plugins/background-geolocation';
|
||||||
export * from './plugins/backgroundmode';
|
export * from './plugins/backgroundmode';
|
||||||
@ -257,6 +259,7 @@ window['IonicNative'] = {
|
|||||||
AndroidFingerprintAuth,
|
AndroidFingerprintAuth,
|
||||||
AppAvailability,
|
AppAvailability,
|
||||||
AppRate,
|
AppRate,
|
||||||
|
AppUpdate,
|
||||||
AppVersion,
|
AppVersion,
|
||||||
Badge,
|
Badge,
|
||||||
BackgroundGeolocation,
|
BackgroundGeolocation,
|
||||||
|
37
src/plugins/app-update.ts
Normal file
37
src/plugins/app-update.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { Plugin, Cordova } from './plugin';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name AppUpdate
|
||||||
|
* @description
|
||||||
|
* This plugin does self-update for android
|
||||||
|
*
|
||||||
|
* @usage
|
||||||
|
* ```
|
||||||
|
* import { AppUpdate } from 'ionic-native';
|
||||||
|
*
|
||||||
|
* let updateUrl = 'http://your-remote-api';
|
||||||
|
* AppUpdate.checkAppUpdate(updateUrl)
|
||||||
|
* .then((something: any) => doSomething(something))
|
||||||
|
* .catch((error: any) => console.log(error));
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
@Plugin({
|
||||||
|
pluginName: 'AppUpdate',
|
||||||
|
plugin: 'cordova-plugin-app-update',
|
||||||
|
pluginRef: 'AppUpdate',
|
||||||
|
repo: 'https://github.com/vaenow/cordova-plugin-app-update',
|
||||||
|
install: 'ionic plugin add cordova-plugin-app-update --save',
|
||||||
|
platforms: ['Android']
|
||||||
|
})
|
||||||
|
export class AppUpdate {
|
||||||
|
/**
|
||||||
|
* Check and update
|
||||||
|
* @param updateUrl {string} update api url
|
||||||
|
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
callbackOrder: 'reverse'
|
||||||
|
})
|
||||||
|
static checkAppUpdate(updateUrl: string): Promise<any> { return; }
|
||||||
|
}
|
||||||
|
|
@ -48,11 +48,10 @@ export class ScreenOrientation {
|
|||||||
/**
|
/**
|
||||||
* Lock the orientation to the passed value.
|
* Lock the orientation to the passed value.
|
||||||
* See below for accepted values
|
* See below for accepted values
|
||||||
* @param orientation {string} The orientation which should be locked. Accepted values see table below.
|
* @param orientation {string} The orientation which should be locked. Accepted values see table above.
|
||||||
* @returns {Promise<any>} returns a promise that resolves when the screen orientation is locked, and rejects when an error occurs.
|
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ sync: true })
|
||||||
static lockOrientation(orientation: string): Promise<string> { return; }
|
static lockOrientation(orientation: string): void { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unlock and allow all orientations.
|
* Unlock and allow all orientations.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user