chore(build): switch to eslint
This commit is contained in:
parent
922da1b6d4
commit
a1eaeb22f8
13
.eslintrc
Normal file
13
.eslintrc
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"plugins": ["@typescript-eslint", "jsdoc"],
|
||||||
|
"extends": ["plugin:@typescript-eslint/recommended", "prettier", "plugin:jsdoc/recommended"],
|
||||||
|
"rules": {
|
||||||
|
"@typescript-eslint/no-unused-vars": ["off"],
|
||||||
|
"@typescript-eslint/no-explicit-any": ["warn"],
|
||||||
|
"@typescript-eslint/no-empty-function": ["off"],
|
||||||
|
"@typescript-eslint/ban-types": ["warn"],
|
||||||
|
"@typescript-eslint/no-empty-interface": ["warn"],
|
||||||
|
"@typescript-eslint/no-namespace": ["off"]
|
||||||
|
}
|
||||||
|
}
|
14
gulpfile.js
14
gulpfile.js
@ -3,7 +3,7 @@
|
|||||||
const gulp = require('gulp'),
|
const gulp = require('gulp'),
|
||||||
minimist = require('minimist'),
|
minimist = require('minimist'),
|
||||||
rename = require('gulp-rename'),
|
rename = require('gulp-rename'),
|
||||||
tslint = require('gulp-tslint'),
|
eslint = require('gulp-eslint'),
|
||||||
replace = require('gulp-replace'),
|
replace = require('gulp-replace'),
|
||||||
_ = require('lodash');
|
_ = require('lodash');
|
||||||
|
|
||||||
@ -18,18 +18,6 @@ const flagConfig = {
|
|||||||
/* Docs tasks */
|
/* Docs tasks */
|
||||||
require('./scripts/docs/gulp-tasks')(gulp, flags);
|
require('./scripts/docs/gulp-tasks')(gulp, flags);
|
||||||
|
|
||||||
gulp.task('lint', () => {
|
|
||||||
return gulp
|
|
||||||
.src('src/**/*.ts')
|
|
||||||
.pipe(
|
|
||||||
tslint({
|
|
||||||
formatter: 'verbose',
|
|
||||||
configuration: 'tslint.json',
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.pipe(tslint.report());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('plugin:create', () => {
|
gulp.task('plugin:create', () => {
|
||||||
if (flags.n && flags.n !== '') {
|
if (flags.n && flags.n !== '') {
|
||||||
const src = flags.m ? './scripts/templates/wrap-min.tmpl' : './scripts/templates/wrap.tmpl',
|
const src = flags.m ? './scripts/templates/wrap-min.tmpl' : './scripts/templates/wrap.tmpl',
|
||||||
|
2621
package-lock.json
generated
2621
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@ -16,7 +16,7 @@
|
|||||||
"build": "npm run build:core && npm run build:esm && npm run build:ngx && npm run build:es5",
|
"build": "npm run build:core && npm run build:esm && npm run build:ngx && npm run build:es5",
|
||||||
"prebuild": "rimraf -rf dist",
|
"prebuild": "rimraf -rf dist",
|
||||||
"npmpub": "ts-node -P scripts/tsconfig.json scripts/tasks/publish",
|
"npmpub": "ts-node -P scripts/tsconfig.json scripts/tasks/publish",
|
||||||
"lint": "gulp lint",
|
"lint": "eslint src/**/*.ts",
|
||||||
"readmes": "gulp readmes",
|
"readmes": "gulp readmes",
|
||||||
"docs-json": "ts-node -P scripts/tsconfig.json scripts/docs-json",
|
"docs-json": "ts-node -P scripts/tsconfig.json scripts/docs-json",
|
||||||
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
|
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
|
||||||
@ -38,16 +38,19 @@
|
|||||||
"@types/node": "^16.9.1",
|
"@types/node": "^16.9.1",
|
||||||
"@types/rimraf": "^3.0.2",
|
"@types/rimraf": "^3.0.2",
|
||||||
"@types/webpack": "^5.28.0",
|
"@types/webpack": "^5.28.0",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.32.0",
|
||||||
|
"@typescript-eslint/parser": "^4.32.0",
|
||||||
"async-promise-queue": "^1.0.5",
|
"async-promise-queue": "^1.0.5",
|
||||||
"conventional-changelog-cli": "^2.1.1",
|
"conventional-changelog-cli": "^2.1.1",
|
||||||
"cz-conventional-changelog": "^3.3.0",
|
"cz-conventional-changelog": "^3.3.0",
|
||||||
"dgeni": "^0.4.14",
|
"dgeni": "^0.4.14",
|
||||||
"dgeni-packages": "0.16.10",
|
"dgeni-packages": "0.16.10",
|
||||||
|
"eslint-config-prettier": "^8.3.0",
|
||||||
|
"eslint-plugin-jsdoc": "^36.1.0",
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"gulp-rename": "^2.0.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-replace": "^1.1.3",
|
"gulp-replace": "^1.1.3",
|
||||||
"gulp-tslint": "^8.1.4",
|
|
||||||
"husky": "^7.0.1",
|
"husky": "^7.0.1",
|
||||||
"is-ci": "^3.0.0",
|
"is-ci": "^3.0.0",
|
||||||
"jest": "^27.0.6",
|
"jest": "^27.0.6",
|
||||||
@ -61,12 +64,8 @@
|
|||||||
"terser-webpack-plugin": "^5.2.4",
|
"terser-webpack-plugin": "^5.2.4",
|
||||||
"ts-jest": "^27.0.5",
|
"ts-jest": "^27.0.5",
|
||||||
"ts-node": "^10.2.1",
|
"ts-node": "^10.2.1",
|
||||||
"tslint": "~6.1.0",
|
|
||||||
"tslint-config-prettier": "^1.18.0",
|
|
||||||
"tslint-ionic-rules": "0.0.21",
|
|
||||||
"typedoc": "^0.22.4",
|
"typedoc": "^0.22.4",
|
||||||
"typescript": "4.1.6",
|
"typescript": "^4.1.6",
|
||||||
"typescript-tslint-plugin": "^1.0.1",
|
|
||||||
"unminified-webpack-plugin": "^3.0.0",
|
"unminified-webpack-plugin": "^3.0.0",
|
||||||
"webpack": "^5.51.1",
|
"webpack": "^5.51.1",
|
||||||
"winston": "^3.3.3",
|
"winston": "^3.3.3",
|
||||||
|
@ -11,7 +11,8 @@ export class AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a boolean that indicates whether the plugin is installed
|
* Returns a boolean that indicates whether the plugin is installed
|
||||||
* @return {boolean}
|
*
|
||||||
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
static installed(): boolean {
|
static installed(): boolean {
|
||||||
const isAvailable = checkAvailability(this.pluginRef) === true;
|
const isAvailable = checkAvailability(this.pluginRef) === true;
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
export function checkReady() {
|
export function checkReady() {
|
||||||
if (typeof process === 'undefined') {
|
if (typeof process === 'undefined') {
|
||||||
const win: any = typeof window !== 'undefined' ? window : {};
|
const win: any = typeof window !== 'undefined' ? window : {};
|
||||||
|
@ -7,6 +7,9 @@ declare const window: any;
|
|||||||
export const ERR_CORDOVA_NOT_AVAILABLE = { error: 'cordova_not_available' };
|
export const ERR_CORDOVA_NOT_AVAILABLE = { error: 'cordova_not_available' };
|
||||||
export const ERR_PLUGIN_NOT_INSTALLED = { error: 'plugin_not_installed' };
|
export const ERR_PLUGIN_NOT_INSTALLED = { error: 'plugin_not_installed' };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
export function getPromise<T>(callback: (resolve: Function, reject?: Function) => any): Promise<T> {
|
export function getPromise<T>(callback: (resolve: Function, reject?: Function) => any): Promise<T> {
|
||||||
const tryNativePromise = () => {
|
const tryNativePromise = () => {
|
||||||
if (Promise) {
|
if (Promise) {
|
||||||
@ -37,6 +40,12 @@ export function getPromise<T>(callback: (resolve: Function, reject?: Function) =
|
|||||||
return tryNativePromise();
|
return tryNativePromise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param args
|
||||||
|
* @param opts
|
||||||
|
*/
|
||||||
export function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: CordovaOptions = {}) {
|
export function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: CordovaOptions = {}) {
|
||||||
let pluginResult: any, rej: Function;
|
let pluginResult: any, rej: Function;
|
||||||
const p = getPromise((resolve: Function, reject: Function) => {
|
const p = getPromise((resolve: Function, reject: Function) => {
|
||||||
@ -64,6 +73,12 @@ export function wrapPromise(pluginObj: any, methodName: string, args: any[], opt
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param args
|
||||||
|
* @param opts
|
||||||
|
*/
|
||||||
function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
|
function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
|
||||||
return getPromise((resolve: Function, reject: Function) => {
|
return getPromise((resolve: Function, reject: Function) => {
|
||||||
const pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts);
|
const pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts);
|
||||||
@ -79,6 +94,12 @@ function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts:
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param args
|
||||||
|
* @param opts
|
||||||
|
*/
|
||||||
function wrapObservable(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
|
function wrapObservable(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
|
||||||
return new Observable((observer) => {
|
return new Observable((observer) => {
|
||||||
let pluginResult;
|
let pluginResult;
|
||||||
@ -136,6 +157,7 @@ function wrapObservable(pluginObj: any, methodName: string, args: any[], opts: a
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrap the event with an observable
|
* Wrap the event with an observable
|
||||||
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param event event name
|
* @param event event name
|
||||||
* @param element The element to attach the event listener to
|
* @param element The element to attach the event listener to
|
||||||
@ -151,7 +173,8 @@ function wrapEventObservable(event: string, element: any): Observable<any> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if plugin/cordova is available
|
* Checks if plugin/cordova is available
|
||||||
* @return {boolean | { error: string } }
|
*
|
||||||
|
* @returns {boolean | { error: string } }
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export function checkAvailability(
|
export function checkAvailability(
|
||||||
@ -164,8 +187,13 @@ export function checkAvailability(
|
|||||||
methodName?: string,
|
methodName?: string,
|
||||||
pluginName?: string
|
pluginName?: string
|
||||||
): boolean | { error: string };
|
): boolean | { error: string };
|
||||||
|
/**
|
||||||
|
* @param plugin
|
||||||
|
* @param methodName
|
||||||
|
* @param pluginName
|
||||||
|
*/
|
||||||
export function checkAvailability(plugin: any, methodName?: string, pluginName?: string): boolean | { error: string } {
|
export function checkAvailability(plugin: any, methodName?: string, pluginName?: string): boolean | { error: string } {
|
||||||
let pluginRef, pluginInstance, pluginPackage;
|
let pluginRef, pluginPackage;
|
||||||
|
|
||||||
if (typeof plugin === 'string') {
|
if (typeof plugin === 'string') {
|
||||||
pluginRef = plugin;
|
pluginRef = plugin;
|
||||||
@ -175,7 +203,7 @@ export function checkAvailability(plugin: any, methodName?: string, pluginName?:
|
|||||||
pluginPackage = plugin.constructor.getPluginInstallName();
|
pluginPackage = plugin.constructor.getPluginInstallName();
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginInstance = getPlugin(pluginRef);
|
const pluginInstance = getPlugin(pluginRef);
|
||||||
|
|
||||||
if (!pluginInstance || (!!methodName && typeof pluginInstance[methodName] === 'undefined')) {
|
if (!pluginInstance || (!!methodName && typeof pluginInstance[methodName] === 'undefined')) {
|
||||||
if (typeof window === 'undefined' || !window.cordova) {
|
if (typeof window === 'undefined' || !window.cordova) {
|
||||||
@ -192,12 +220,21 @@ export function checkAvailability(plugin: any, methodName?: string, pluginName?:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if _objectInstance exists and has the method/property
|
* Checks if _objectInstance exists and has the method/property
|
||||||
|
*
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export function instanceAvailability(pluginObj: any, methodName?: string): boolean {
|
export function instanceAvailability(pluginObj: any, methodName?: string): boolean {
|
||||||
return pluginObj._objectInstance && (!methodName || typeof pluginObj._objectInstance[methodName] !== 'undefined');
|
return pluginObj._objectInstance && (!methodName || typeof pluginObj._objectInstance[methodName] !== 'undefined');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param args
|
||||||
|
* @param opts
|
||||||
|
* @param resolve
|
||||||
|
* @param reject
|
||||||
|
*/
|
||||||
export function setIndex(args: any[], opts: any = {}, resolve?: Function, reject?: Function): any {
|
export function setIndex(args: any[], opts: any = {}, resolve?: Function, reject?: Function): any {
|
||||||
// ignore resolve and reject in case sync
|
// ignore resolve and reject in case sync
|
||||||
if (opts.sync) {
|
if (opts.sync) {
|
||||||
@ -258,6 +295,14 @@ export function setIndex(args: any[], opts: any = {}, resolve?: Function, reject
|
|||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param args
|
||||||
|
* @param opts
|
||||||
|
* @param resolve
|
||||||
|
* @param reject
|
||||||
|
*/
|
||||||
export function callCordovaPlugin(
|
export function callCordovaPlugin(
|
||||||
pluginObj: any,
|
pluginObj: any,
|
||||||
methodName: string,
|
methodName: string,
|
||||||
@ -274,12 +319,21 @@ export function callCordovaPlugin(
|
|||||||
|
|
||||||
if (availabilityCheck === true) {
|
if (availabilityCheck === true) {
|
||||||
const pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());
|
const pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());
|
||||||
|
// eslint-disable-next-line prefer-spread
|
||||||
return pluginInstance[methodName].apply(pluginInstance, args);
|
return pluginInstance[methodName].apply(pluginInstance, args);
|
||||||
} else {
|
} else {
|
||||||
return availabilityCheck;
|
return availabilityCheck;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param args
|
||||||
|
* @param opts
|
||||||
|
* @param resolve
|
||||||
|
* @param reject
|
||||||
|
*/
|
||||||
export function callInstance(
|
export function callInstance(
|
||||||
pluginObj: any,
|
pluginObj: any,
|
||||||
methodName: string,
|
methodName: string,
|
||||||
@ -291,10 +345,14 @@ export function callInstance(
|
|||||||
args = setIndex(args, opts, resolve, reject);
|
args = setIndex(args, opts, resolve, reject);
|
||||||
|
|
||||||
if (instanceAvailability(pluginObj, methodName)) {
|
if (instanceAvailability(pluginObj, methodName)) {
|
||||||
|
// eslint-disable-next-line prefer-spread
|
||||||
return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
|
return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginRef
|
||||||
|
*/
|
||||||
export function getPlugin(pluginRef: string): any {
|
export function getPlugin(pluginRef: string): any {
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
return get(window, pluginRef);
|
return get(window, pluginRef);
|
||||||
@ -302,6 +360,10 @@ export function getPlugin(pluginRef: string): any {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param element
|
||||||
|
* @param path
|
||||||
|
*/
|
||||||
export function get(element: Element | Window, path: string) {
|
export function get(element: Element | Window, path: string) {
|
||||||
const paths: string[] = path.split('.');
|
const paths: string[] = path.split('.');
|
||||||
let obj: any = element;
|
let obj: any = element;
|
||||||
@ -314,6 +376,11 @@ export function get(element: Element | Window, path: string) {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginName
|
||||||
|
* @param plugin
|
||||||
|
* @param method
|
||||||
|
*/
|
||||||
export function pluginWarn(pluginName: string, plugin?: string, method?: string): void {
|
export function pluginWarn(pluginName: string, plugin?: string, method?: string): void {
|
||||||
if (method) {
|
if (method) {
|
||||||
console.warn(
|
console.warn(
|
||||||
@ -357,6 +424,9 @@ export function cordovaWarn(pluginName: string, method?: string): void {
|
|||||||
export type WrapFn = (...args: any[]) => any;
|
export type WrapFn = (...args: any[]) => any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param opts
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export const wrap = (pluginObj: any, methodName: string, opts: CordovaOptions = {}): WrapFn => {
|
export const wrap = (pluginObj: any, methodName: string, opts: CordovaOptions = {}): WrapFn => {
|
||||||
@ -377,6 +447,9 @@ export const wrap = (pluginObj: any, methodName: string, opts: CordovaOptions =
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param opts
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export function wrapInstance(pluginObj: any, methodName: string, opts: any = {}): Function {
|
export function wrapInstance(pluginObj: any, methodName: string, opts: any = {}): Function {
|
||||||
|
@ -2,6 +2,10 @@ import { Observable, Observer } from 'rxjs';
|
|||||||
|
|
||||||
import { checkAvailability, getPlugin } from './common';
|
import { checkAvailability, getPlugin } from './common';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
*/
|
||||||
function overrideFunction(pluginObj: any, methodName: string): Observable<any> {
|
function overrideFunction(pluginObj: any, methodName: string): Observable<any> {
|
||||||
return new Observable((observer: Observer<any>) => {
|
return new Observable((observer: Observer<any>) => {
|
||||||
const availabilityCheck = checkAvailability(pluginObj, methodName);
|
const availabilityCheck = checkAvailability(pluginObj, methodName);
|
||||||
@ -17,6 +21,11 @@ function overrideFunction(pluginObj: any, methodName: string): Observable<any> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param args
|
||||||
|
*/
|
||||||
export function cordovaFunctionOverride(pluginObj: any, methodName: string, args: IArguments | any[] = []) {
|
export function cordovaFunctionOverride(pluginObj: any, methodName: string, args: IArguments | any[] = []) {
|
||||||
return overrideFunction(pluginObj, methodName);
|
return overrideFunction(pluginObj, methodName);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
import { wrapInstance } from './common';
|
import { wrapInstance } from './common';
|
||||||
import { CordovaOptions } from './interfaces';
|
import { CordovaOptions } from './interfaces';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param config
|
||||||
|
* @param args
|
||||||
|
*/
|
||||||
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
|
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
|
||||||
args = Array.from(args);
|
args = Array.from(args);
|
||||||
return wrapInstance(pluginObj, methodName, config).apply(this, args);
|
return wrapInstance(pluginObj, methodName, config).apply(this, args);
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import { checkAvailability, getPlugin } from './common';
|
import { checkAvailability, getPlugin } from './common';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param key
|
||||||
|
*/
|
||||||
export function cordovaPropertyGet(pluginObj: any, key: string) {
|
export function cordovaPropertyGet(pluginObj: any, key: string) {
|
||||||
if (checkAvailability(pluginObj, key) === true) {
|
if (checkAvailability(pluginObj, key) === true) {
|
||||||
return getPlugin(pluginObj.constructor.getPluginRef())[key];
|
return getPlugin(pluginObj.constructor.getPluginRef())[key];
|
||||||
@ -7,6 +11,11 @@ export function cordovaPropertyGet(pluginObj: any, key: string) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param key
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
export function cordovaPropertySet(pluginObj: any, key: string, value: any) {
|
export function cordovaPropertySet(pluginObj: any, key: string, value: any) {
|
||||||
if (checkAvailability(pluginObj, key) === true) {
|
if (checkAvailability(pluginObj, key) === true) {
|
||||||
getPlugin(pluginObj.constructor.getPluginRef())[key] = value;
|
getPlugin(pluginObj.constructor.getPluginRef())[key] = value;
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
import { wrap } from './common';
|
import { wrap } from './common';
|
||||||
import { CordovaOptions } from './interfaces';
|
import { CordovaOptions } from './interfaces';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param methodName
|
||||||
|
* @param config
|
||||||
|
* @param args
|
||||||
|
*/
|
||||||
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
|
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
|
||||||
return wrap(pluginObj, methodName, config).apply(this, args);
|
return wrap(pluginObj, methodName, config).apply(this, args);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param key
|
||||||
|
*/
|
||||||
export function instancePropertyGet(pluginObj: any, key: string) {
|
export function instancePropertyGet(pluginObj: any, key: string) {
|
||||||
if (pluginObj._objectInstance && pluginObj._objectInstance[key]) {
|
if (pluginObj._objectInstance && pluginObj._objectInstance[key]) {
|
||||||
return pluginObj._objectInstance[key];
|
return pluginObj._objectInstance[key];
|
||||||
@ -5,6 +9,11 @@ export function instancePropertyGet(pluginObj: any, key: string) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pluginObj
|
||||||
|
* @param key
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
export function instancePropertySet(pluginObj: any, key: string, value: any) {
|
export function instancePropertySet(pluginObj: any, key: string, value: any) {
|
||||||
if (pluginObj._objectInstance) {
|
if (pluginObj._objectInstance) {
|
||||||
pluginObj._objectInstance[key] = value;
|
pluginObj._objectInstance[key] = value;
|
||||||
|
@ -4,6 +4,8 @@ declare const window: any;
|
|||||||
* Initialize the ionic.native Angular module if we're running in ng1.
|
* Initialize the ionic.native Angular module if we're running in ng1.
|
||||||
* This iterates through the list of registered plugins and dynamically
|
* This iterates through the list of registered plugins and dynamically
|
||||||
* creates Angular 1 services of the form $cordovaSERVICE, ex: $cordovaStatusBar.
|
* creates Angular 1 services of the form $cordovaSERVICE, ex: $cordovaStatusBar.
|
||||||
|
*
|
||||||
|
* @param plugins
|
||||||
*/
|
*/
|
||||||
export function initAngular1(plugins: any) {
|
export function initAngular1(plugins: any) {
|
||||||
if (typeof window !== 'undefined' && window.angular) {
|
if (typeof window !== 'undefined' && window.angular) {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
declare const window: any;
|
declare const window: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param element
|
||||||
|
* @param path
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export function get(element: Element | Window, path: string) {
|
export function get(element: Element | Window, path: string) {
|
||||||
@ -16,6 +18,7 @@ export function get(element: Element | Window, path: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param callback
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
export function getPromise(callback: Function = () => {}): Promise<any> {
|
export function getPromise(callback: Function = () => {}): Promise<any> {
|
||||||
|
@ -271,7 +271,6 @@ export interface DataCaptureResult {
|
|||||||
* @description
|
* @description
|
||||||
* This plugin allows to use the Text Capture and Data Capture features of
|
* This plugin allows to use the Text Capture and Data Capture features of
|
||||||
* ABBYY Real-Time Recognition SDK (RTR SDK) in apps.
|
* ABBYY Real-Time Recognition SDK (RTR SDK) in apps.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AbbyyRTR } from '@awesome-cordova-plugins/abbyy-rtr/ngx';
|
* import { AbbyyRTR } from '@awesome-cordova-plugins/abbyy-rtr/ngx';
|
||||||
@ -305,8 +304,9 @@ export interface DataCaptureResult {
|
|||||||
export class AbbyyRTR extends AwesomeCordovaNativePlugin {
|
export class AbbyyRTR extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Opens a modal dialog with controls for the Text Capture scenario.
|
* Opens a modal dialog with controls for the Text Capture scenario.
|
||||||
|
*
|
||||||
* @param {TextCaptureOptions} options
|
* @param {TextCaptureOptions} options
|
||||||
* @return {Promise<TextCaptureResult>}
|
* @returns {Promise<TextCaptureResult>}
|
||||||
*/
|
*/
|
||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
startTextCapture(options: TextCaptureOptions): Promise<TextCaptureResult> {
|
startTextCapture(options: TextCaptureOptions): Promise<TextCaptureResult> {
|
||||||
@ -323,8 +323,9 @@ export class AbbyyRTR extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a modal dialog with controls for the Data Capture scenario.
|
* Opens a modal dialog with controls for the Data Capture scenario.
|
||||||
|
*
|
||||||
* @param {DataCaptureOptions} options
|
* @param {DataCaptureOptions} options
|
||||||
* @return {Promise<DataCaptureResult>}
|
* @returns {Promise<DataCaptureResult>}
|
||||||
*/
|
*/
|
||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
startDataCapture(options: DataCaptureOptions): Promise<DataCaptureResult> {
|
startDataCapture(options: DataCaptureOptions): Promise<DataCaptureResult> {
|
||||||
|
@ -59,7 +59,6 @@ export interface ActionSheetOptions {
|
|||||||
* The ActionSheet plugin shows a native list of options the user can choose from.
|
* The ActionSheet plugin shows a native list of options the user can choose from.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-actionsheet).
|
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-actionsheet).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { ActionSheet, ActionSheetOptions } from '@awesome-cordova-plugins/action-sheet/ngx';
|
* import { ActionSheet, ActionSheetOptions } from '@awesome-cordova-plugins/action-sheet/ngx';
|
||||||
@ -116,6 +115,7 @@ export class ActionSheet extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a native ActionSheet component. See below for options.
|
* Show a native ActionSheet component. See below for options.
|
||||||
|
*
|
||||||
* @param {ActionSheetOptions} [options] Options See table below
|
* @param {ActionSheetOptions} [options] Options See table below
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves with the index of the
|
* @returns {Promise<any>} Returns a Promise that resolves with the index of the
|
||||||
* button pressed (1 based, so 1, 2, 3, etc.)
|
* button pressed (1 based, so 1, 2, 3, etc.)
|
||||||
@ -127,6 +127,7 @@ export class ActionSheet extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Programmatically hide the native ActionSheet
|
* Programmatically hide the native ActionSheet
|
||||||
|
*
|
||||||
* @param {ActionSheetOptions} [options] Options See table below
|
* @param {ActionSheetOptions} [options] Options See table below
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves when the actionsheet is closed
|
* @returns {Promise<any>} Returns a Promise that resolves when the actionsheet is closed
|
||||||
*/
|
*/
|
||||||
|
@ -454,7 +454,6 @@ export enum AdjustAdRevenueSource {
|
|||||||
* This is the Ionic Cordova SDK of Adjust™. You can read more about Adjust™ at adjust.com.
|
* This is the Ionic Cordova SDK of Adjust™. You can read more about Adjust™ at adjust.com.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `com.adjust.sdk`. For more info, please see the [Adjust Cordova SDK](https://github.com/adjust/cordova_sdk)
|
* Requires Cordova plugin: `com.adjust.sdk`. For more info, please see the [Adjust Cordova SDK](https://github.com/adjust/cordova_sdk)
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@awesome-cordova-plugins/adjust/ngx';
|
* import { Adjust, AdjustConfig, AdjustEnvironment } from '@awesome-cordova-plugins/adjust/ngx';
|
||||||
@ -499,6 +498,7 @@ export enum AdjustAdRevenueSource {
|
|||||||
export class Adjust extends AwesomeCordovaNativePlugin {
|
export class Adjust extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* This method initializes Adjust SDK
|
* This method initializes Adjust SDK
|
||||||
|
*
|
||||||
* @param {AdjustConig} config Adjust config object used as starting options
|
* @param {AdjustConig} config Adjust config object used as starting options
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -506,6 +506,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method tracks an event
|
* This method tracks an event
|
||||||
|
*
|
||||||
* @param {AdjustEvent} event Adjust event object to be tracked
|
* @param {AdjustEvent} event Adjust event object to be tracked
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -513,6 +514,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method tracks App Store subscription
|
* This method tracks App Store subscription
|
||||||
|
*
|
||||||
* @param {AdjustAppStoreSubscription} subscription Adjust App Store subscription object to be tracked
|
* @param {AdjustAppStoreSubscription} subscription Adjust App Store subscription object to be tracked
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -520,6 +522,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method tracks Play Store subscription
|
* This method tracks Play Store subscription
|
||||||
|
*
|
||||||
* @param {AdjustPlayStoreSubscription} subscription Adjust Play Store subscription object to be tracked
|
* @param {AdjustPlayStoreSubscription} subscription Adjust Play Store subscription object to be tracked
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -527,6 +530,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method tracks third party sharing choice
|
* This method tracks third party sharing choice
|
||||||
|
*
|
||||||
* @param {AdjustThirdPartySharing} thirdPartySharing Adjust third party sharing object to be tracked
|
* @param {AdjustThirdPartySharing} thirdPartySharing Adjust third party sharing object to be tracked
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -534,6 +538,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method tracks ad revenue data
|
* This method tracks ad revenue data
|
||||||
|
*
|
||||||
* @param {AdjustAdRevenueSource} source Ad revenue source
|
* @param {AdjustAdRevenueSource} source Ad revenue source
|
||||||
* @param {string} payload Ad revenue JSON string payload
|
* @param {string} payload Ad revenue JSON string payload
|
||||||
*/
|
*/
|
||||||
@ -541,6 +546,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method tracks ad revenue data
|
* This method tracks ad revenue data
|
||||||
|
*
|
||||||
* @param {AdjustAdRevenue} adRevenue Adjust ad revenue object
|
* @param {AdjustAdRevenue} adRevenue Adjust ad revenue object
|
||||||
*/
|
*/
|
||||||
trackAdRevenue(adRevenue: AdjustAdRevenue): void;
|
trackAdRevenue(adRevenue: AdjustAdRevenue): void;
|
||||||
@ -551,6 +557,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method tracks measurement consent choice
|
* This method tracks measurement consent choice
|
||||||
|
*
|
||||||
* @param {boolean} measurementConsent set measurement consent to true or false
|
* @param {boolean} measurementConsent set measurement consent to true or false
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -558,6 +565,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method sets offline mode on or off
|
* This method sets offline mode on or off
|
||||||
|
*
|
||||||
* @param {boolean} enabled set to true for offline mode on
|
* @param {boolean} enabled set to true for offline mode on
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -565,6 +573,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* By making this call, the Adjust SDK will try to find if there is any new attribution info inside of the deep link and if any, it will be sent to the Adjust backend.
|
* By making this call, the Adjust SDK will try to find if there is any new attribution info inside of the deep link and if any, it will be sent to the Adjust backend.
|
||||||
|
*
|
||||||
* @param {string} url URL of the deeplink
|
* @param {string} url URL of the deeplink
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -572,6 +581,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* You can disable/enable the Adjust SDK from tracking by invoking this method
|
* You can disable/enable the Adjust SDK from tracking by invoking this method
|
||||||
|
*
|
||||||
* @param {boolean} enabled set to false to disable SDK
|
* @param {boolean} enabled set to false to disable SDK
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -580,6 +590,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* To send us the push notification token, add the following call to Adjust whenever you get your token in the app or when it gets updated.
|
* To send us the push notification token, add the following call to Adjust whenever you get your token in the app or when it gets updated.
|
||||||
* Push tokens are used for Audience Builder and client callbacks, and they are required for the upcoming uninstall tracking feature.
|
* Push tokens are used for Audience Builder and client callbacks, and they are required for the upcoming uninstall tracking feature.
|
||||||
|
*
|
||||||
* @param {string} pushToken push token value
|
* @param {string} pushToken push token value
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -587,6 +598,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the Adjust SDK is currently enabled by calling this function
|
* Check if the Adjust SDK is currently enabled by calling this function
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -610,7 +622,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function used to get Google AdId
|
* Function used to get Google AdId
|
||||||
* @return {Promise<string>} Returns a promise with google AdId value
|
*
|
||||||
|
* @returns {Promise<string>} Returns a promise with google AdId value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getGoogleAdId(): Promise<string> {
|
getGoogleAdId(): Promise<string> {
|
||||||
@ -619,7 +632,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If you need to obtain the Amazon Advertising ID, you can make a call to this function.
|
* If you need to obtain the Amazon Advertising ID, you can make a call to this function.
|
||||||
* @return {Promise<string>} Returns a promise with anazib adv. ID
|
*
|
||||||
|
* @returns {Promise<string>} Returns a promise with anazib adv. ID
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAmazonAdId(): Promise<string> {
|
getAmazonAdId(): Promise<string> {
|
||||||
@ -628,7 +642,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* To obtain the IDFA, call this function
|
* To obtain the IDFA, call this function
|
||||||
* @return {Promise<string>} Returns a promise with IDFA string value
|
*
|
||||||
|
* @returns {Promise<string>} Returns a promise with IDFA string value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getIdfa(): Promise<string> {
|
getIdfa(): Promise<string> {
|
||||||
@ -638,7 +653,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* For every device with your app installed on it, the Adjust backend generates a unique Adjust device identifier (adid).
|
* For every device with your app installed on it, the Adjust backend generates a unique Adjust device identifier (adid).
|
||||||
* In order to obtain this identifier, call this function
|
* In order to obtain this identifier, call this function
|
||||||
* @return {Promise<string>} Returns a promise with adid value
|
*
|
||||||
|
* @returns {Promise<string>} Returns a promise with adid value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAdid(): Promise<string> {
|
getAdid(): Promise<string> {
|
||||||
@ -647,7 +663,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If you want to access information about a user's current attribution whenever you need it, you can make a call to this function
|
* If you want to access information about a user's current attribution whenever you need it, you can make a call to this function
|
||||||
* @return {Promise<AdjustAttribution>} Returns a promise with AdjustAttribution object
|
*
|
||||||
|
* @returns {Promise<AdjustAttribution>} Returns a promise with AdjustAttribution object
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAttribution(): Promise<AdjustAttribution> {
|
getAttribution(): Promise<AdjustAttribution> {
|
||||||
@ -656,7 +673,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the information about version of the SDK used
|
* Get the information about version of the SDK used
|
||||||
* @return {Promise<string>} Returns a promise with sdk version information
|
*
|
||||||
|
* @returns {Promise<string>} Returns a promise with sdk version information
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getSdkVersion(): Promise<string> {
|
getSdkVersion(): Promise<string> {
|
||||||
@ -665,6 +683,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method used to add session callback parameters
|
* Method used to add session callback parameters
|
||||||
|
*
|
||||||
* @param key key
|
* @param key key
|
||||||
* @param value value
|
* @param value value
|
||||||
*/
|
*/
|
||||||
@ -673,6 +692,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a specific session callback parameter by passing the desiring key to this method
|
* Remove a specific session callback parameter by passing the desiring key to this method
|
||||||
|
*
|
||||||
* @param key key
|
* @param key key
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -686,6 +706,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method used to add session partner parameters
|
* Method used to add session partner parameters
|
||||||
|
*
|
||||||
* @param key key
|
* @param key key
|
||||||
* @param value value
|
* @param value value
|
||||||
*/
|
*/
|
||||||
@ -694,6 +715,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a specific session partner parameter by passing the desiring key to this method
|
* Remove a specific session partner parameter by passing the desiring key to this method
|
||||||
|
*
|
||||||
* @param key key
|
* @param key key
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -714,7 +736,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Request Adjust SDK to show pop up dialog for asking user's consent to be tracked.
|
* Request Adjust SDK to show pop up dialog for asking user's consent to be tracked.
|
||||||
* In order to do this, call this function
|
* In order to do this, call this function
|
||||||
* @return {Promise<number>} Returns a promise with user's consent value
|
*
|
||||||
|
* @returns {Promise<number>} Returns a promise with user's consent value
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestTrackingAuthorizationWithCompletionHandler(): Promise<number> {
|
requestTrackingAuthorizationWithCompletionHandler(): Promise<number> {
|
||||||
@ -723,6 +746,7 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* You can update SKAdNetwork conversion value with calling this method
|
* You can update SKAdNetwork conversion value with calling this method
|
||||||
|
*
|
||||||
* @param {number} conversionValue conversion value for the user
|
* @param {number} conversionValue conversion value for the user
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -730,7 +754,8 @@ export class Adjust extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* To obtain the app tracking authorization status in iOS, call this function
|
* To obtain the app tracking authorization status in iOS, call this function
|
||||||
* @return {Promise<number>} Returns a promise with app tracking authorization status
|
*
|
||||||
|
* @returns {Promise<number>} Returns a promise with app tracking authorization status
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAppTrackingAuthorizationStatus(): Promise<number> {
|
getAppTrackingAuthorizationStatus(): Promise<number> {
|
||||||
|
@ -129,7 +129,6 @@ export interface AdExtras {
|
|||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* AdMobOptions
|
* AdMobOptions
|
||||||
* AdExtras
|
* AdExtras
|
||||||
@ -171,6 +170,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a banner
|
* Create a banner
|
||||||
|
*
|
||||||
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
|
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves when the banner is created
|
* @returns {Promise<any>} Returns a Promise that resolves when the banner is created
|
||||||
*/
|
*/
|
||||||
@ -189,6 +189,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show banner at position
|
* Show banner at position
|
||||||
|
*
|
||||||
* @param {number} position Position. Use `AdMobPro.AD_POSITION` to set values.
|
* @param {number} position Position. Use `AdMobPro.AD_POSITION` to set values.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -198,6 +199,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show banner at custom position
|
* Show banner at custom position
|
||||||
|
*
|
||||||
* @param {number} x Offset from screen left.
|
* @param {number} x Offset from screen left.
|
||||||
* @param {number} y Offset from screen top.
|
* @param {number} y Offset from screen top.
|
||||||
*/
|
*/
|
||||||
@ -216,6 +218,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare interstitial banner
|
* Prepare interstitial banner
|
||||||
|
*
|
||||||
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
|
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves when interstitial is prepared
|
* @returns {Promise<any>} Returns a Promise that resolves when interstitial is prepared
|
||||||
*/
|
*/
|
||||||
@ -234,6 +237,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare a reward video ad
|
* Prepare a reward video ad
|
||||||
|
*
|
||||||
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
|
* @param {string | AdMobOptions} adIdOrOptions Ad ID or Options
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves when the ad is prepared
|
* @returns {Promise<any>} Returns a Promise that resolves when the ad is prepared
|
||||||
*/
|
*/
|
||||||
@ -252,6 +256,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the values for configuration and targeting
|
* Sets the values for configuration and targeting
|
||||||
|
*
|
||||||
* @param {AdMobOptions} options Options
|
* @param {AdMobOptions} options Options
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves when the options have been set
|
* @returns {Promise<any>} Returns a Promise that resolves when the options have been set
|
||||||
*/
|
*/
|
||||||
@ -262,6 +267,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get user ad settings
|
* Get user ad settings
|
||||||
|
*
|
||||||
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
|
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -271,6 +277,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered when failed to receive Ad
|
* Triggered when failed to receive Ad
|
||||||
|
*
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -284,6 +291,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered when Ad received
|
* Triggered when Ad received
|
||||||
|
*
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -297,6 +305,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered when Ad will be showed on screen
|
* Triggered when Ad will be showed on screen
|
||||||
|
*
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -310,6 +319,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered when user click the Ad, and will jump out of your App
|
* Triggered when user click the Ad, and will jump out of your App
|
||||||
|
*
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -323,6 +333,7 @@ export class AdMobPro extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered when dismiss the Ad and back to your App
|
* Triggered when dismiss the Ad and back to your App
|
||||||
|
*
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -135,14 +135,13 @@ export interface AdMobEvent {
|
|||||||
* Most complete Admob plugin with support for [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads.
|
* Most complete Admob plugin with support for [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads.
|
||||||
* Monetize your apps and games with AdMob ads, using latest Google AdMob SDK. With this plugin you can show AdMob ads easily!
|
* Monetize your apps and games with AdMob ads, using latest Google AdMob SDK. With this plugin you can show AdMob ads easily!
|
||||||
*
|
*
|
||||||
* **Supports:**
|
* Supports:**
|
||||||
* - Banner ads (top and bottom)
|
* - Banner ads (top and bottom)
|
||||||
* - Interstitial ads
|
* - Interstitial ads
|
||||||
* - Rewarded ads
|
* - Rewarded ads
|
||||||
* - [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads
|
* - [Tappx](http://www.tappx.com/?h=dec334d63287772de859bdb4e977fce6) ads
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* **Note:** No ads will be served on apps with package name `io.ionic.starter`. This is the default package name for new `ionic` apps. Make sure to rename the package name so ads can be displayed.
|
* Note:** No ads will be served on apps with package name `io.ionic.starter`. This is the default package name for new `ionic` apps. Make sure to rename the package name so ads can be displayed.
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Admob, AdmobOptions } from '@awesome-cordova-plugins/admob';
|
* import { Admob, AdmobOptions } from '@awesome-cordova-plugins/admob';
|
||||||
*
|
*
|
||||||
@ -295,6 +294,7 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* This enum represents AdMob's supported ad sizes.
|
* This enum represents AdMob's supported ad sizes.
|
||||||
* Use one of these constants as adSize option when calling createBannerView
|
* Use one of these constants as adSize option when calling createBannerView
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty()
|
||||||
@ -308,6 +308,7 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This enum represents AdMob's supported ad types
|
* This enum represents AdMob's supported ad types
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty()
|
||||||
@ -320,8 +321,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Set the options to start displaying ads.
|
* Set the options to start displaying ads.
|
||||||
* Although it is not required to call this method, as options can be specified in other methods, it is highly recommended
|
* Although it is not required to call this method, as options can be specified in other methods, it is highly recommended
|
||||||
|
*
|
||||||
* @param options {AdmobOptions} Some param to configure something
|
* @param options {AdmobOptions} Some param to configure something
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the options are set
|
* @returns {Promise<any>} Returns a promise that resolves when the options are set
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setOptions(options: AdmobOptions | AdmobWebOptions): Promise<any> {
|
setOptions(options: AdmobOptions | AdmobWebOptions): Promise<any> {
|
||||||
@ -330,8 +332,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new banner ad view. Call this method in order to be able to start showing banners
|
* Creates a new banner ad view. Call this method in order to be able to start showing banners
|
||||||
|
*
|
||||||
* @param options {AdmobOptions} (Optional) Setup options
|
* @param options {AdmobOptions} (Optional) Setup options
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the banner view is created
|
* @returns {Promise<any>} Returns a promise that resolves when the banner view is created
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
createBannerView(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
createBannerView(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
||||||
@ -340,8 +343,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show banner ads. You must call createBannerView first, otherwise it will result in failure callback and no ads will be shown
|
* Show banner ads. You must call createBannerView first, otherwise it will result in failure callback and no ads will be shown
|
||||||
|
*
|
||||||
* @param show {boolean} (Optional) Indicates whether to show or hide banner ads. Defaults to `true`
|
* @param show {boolean} (Optional) Indicates whether to show or hide banner ads. Defaults to `true`
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the banner shown or hidden
|
* @returns {Promise<any>} Returns a promise that resolves when the banner shown or hidden
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showBannerAd(show?: boolean): Promise<any> {
|
showBannerAd(show?: boolean): Promise<any> {
|
||||||
@ -360,8 +364,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
* If `options.autoShowInterstitial` is set to `true` (default), the ad will automatically be displayed.
|
* If `options.autoShowInterstitial` is set to `true` (default), the ad will automatically be displayed.
|
||||||
* Otherwise you need to subscribe to `onAdLoaded()` event and call `showInterstitialAd()` after it will be raised specifying that an interstitial ad is available.
|
* Otherwise you need to subscribe to `onAdLoaded()` event and call `showInterstitialAd()` after it will be raised specifying that an interstitial ad is available.
|
||||||
* If you already called `requestInterstitialAd()` but the interstitial has never been shown, the successive calls to `requestInterstitialAd()` will result in the ad being inmediately available (the one that was obtained on the first call)
|
* If you already called `requestInterstitialAd()` but the interstitial has never been shown, the successive calls to `requestInterstitialAd()` will result in the ad being inmediately available (the one that was obtained on the first call)
|
||||||
|
*
|
||||||
* @param options {AdmobOptions} (Optional) Setup options
|
* @param options {AdmobOptions} (Optional) Setup options
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the interstitial ad is loaded
|
* @returns {Promise<any>} Returns a promise that resolves when the interstitial ad is loaded
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestInterstitialAd(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
requestInterstitialAd(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
||||||
@ -370,7 +375,8 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show an interstitial ad. Call it after `requestInterstitialAd()` and `onAdLoaded()` event raised.
|
* Show an interstitial ad. Call it after `requestInterstitialAd()` and `onAdLoaded()` event raised.
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the interstitial ad is shown
|
*
|
||||||
|
* @returns {Promise<any>} Returns a promise that resolves when the interstitial ad is shown
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showInterstitialAd(): Promise<any> {
|
showInterstitialAd(): Promise<any> {
|
||||||
@ -382,8 +388,9 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
* If `options.autoShowRewarded` is set to `true` (default), the ad will automatically be displayed.
|
* If `options.autoShowRewarded` is set to `true` (default), the ad will automatically be displayed.
|
||||||
* Otherwise you need to subscribe to `onAdLoaded()` enent and call `showRewardedAd()` after it will be raised specifying that a rewarded ad is available.
|
* Otherwise you need to subscribe to `onAdLoaded()` enent and call `showRewardedAd()` after it will be raised specifying that a rewarded ad is available.
|
||||||
* If you already called `requestRewardedAd()` but the rewarded has never been shown, the successive calls to `requestRewardedAd()` will result in the ad being inmediately available (the one that was obtained on the first call)
|
* If you already called `requestRewardedAd()` but the rewarded has never been shown, the successive calls to `requestRewardedAd()` will result in the ad being inmediately available (the one that was obtained on the first call)
|
||||||
|
*
|
||||||
* @param options {AdmobOptions} (Optional) Setup options
|
* @param options {AdmobOptions} (Optional) Setup options
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the rewarded ad is loaded
|
* @returns {Promise<any>} Returns a promise that resolves when the rewarded ad is loaded
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestRewardedAd(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
requestRewardedAd(options?: AdmobOptions | AdmobWebOptions): Promise<any> {
|
||||||
@ -392,7 +399,8 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a rewarded ad
|
* Show a rewarded ad
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the rewarded ad is shown
|
*
|
||||||
|
* @returns {Promise<any>} Returns a promise that resolves when the rewarded ad is shown
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showRewardedAd(): Promise<any> {
|
showRewardedAd(): Promise<any> {
|
||||||
@ -402,13 +410,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Called when an ad is received.
|
* Called when an ad is received.
|
||||||
*
|
*
|
||||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
* WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* document.addEventListener(window.admob.events.onAdLoaded, () => { });
|
* document.addEventListener(window.admob.events.onAdLoaded, () => { });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||||
|
*
|
||||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is received
|
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is received
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -423,13 +432,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Called when an ad request failed.
|
* Called when an ad request failed.
|
||||||
*
|
*
|
||||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
* WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* document.addEventListener(window.admob.events.onAdFailedToLoad, () => { });
|
* document.addEventListener(window.admob.events.onAdFailedToLoad, () => { });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||||
|
*
|
||||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad request is failed
|
* @returns {Observable<AdMobEvent>} Returns an observable when an ad request is failed
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -445,13 +455,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
* Called when an ad opens an overlay that covers the screen.
|
* Called when an ad opens an overlay that covers the screen.
|
||||||
* Please note that onPause cordova event is raised when an interstitial is shown.
|
* Please note that onPause cordova event is raised when an interstitial is shown.
|
||||||
*
|
*
|
||||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
* WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* document.addEventListener(window.admob.events.onAdOpened, () => { });
|
* document.addEventListener(window.admob.events.onAdOpened, () => { });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||||
|
*
|
||||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is opened
|
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is opened
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -467,13 +478,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
* Called when the user is about to return to the application after clicking on an ad.
|
* Called when the user is about to return to the application after clicking on an ad.
|
||||||
* Please note that onResume cordova event is raised when an interstitial is closed.
|
* Please note that onResume cordova event is raised when an interstitial is closed.
|
||||||
*
|
*
|
||||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
* WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* document.addEventListener(window.admob.events.onAdClosed, () => { });
|
* document.addEventListener(window.admob.events.onAdClosed, () => { });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||||
|
*
|
||||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is closed
|
* @returns {Observable<AdMobEvent>} Returns an observable when an ad is closed
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -487,9 +499,10 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the user leaves the application after clicking an ad (e.g., to go to the browser)
|
* Called when the user leaves the application after clicking an ad (e.g., to go to the browser)
|
||||||
|
*
|
||||||
* @returns {Observable<AdMobEvent>} Returns an observable when an ad leaves the application.
|
* @returns {Observable<AdMobEvent>} Returns an observable when an ad leaves the application.
|
||||||
*
|
*
|
||||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
* WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* document.addEventListener(window.admob.events.onAdLeftApplication, () => { });
|
* document.addEventListener(window.admob.events.onAdLeftApplication, () => { });
|
||||||
@ -510,13 +523,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Called when the user has been rewarded by an ad.
|
* Called when the user has been rewarded by an ad.
|
||||||
*
|
*
|
||||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
* WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* document.addEventListener(window.admob.events.onRewardedAd, () => { });
|
* document.addEventListener(window.admob.events.onRewardedAd, () => { });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||||
|
*
|
||||||
* @returns {Observable<AdMobEvent>} Returns an observable when the user rewards an ad
|
* @returns {Observable<AdMobEvent>} Returns an observable when the user rewards an ad
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -531,13 +545,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Called when the video of a rewarded ad started.
|
* Called when the video of a rewarded ad started.
|
||||||
*
|
*
|
||||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
* WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* document.addEventListener(window.admob.events.onRewardedAdVideoStarted, () => { });
|
* document.addEventListener(window.admob.events.onRewardedAdVideoStarted, () => { });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||||
|
*
|
||||||
* @returns {Observable<AdMobEvent>} Returns an observable when the video is started
|
* @returns {Observable<AdMobEvent>} Returns an observable when the video is started
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -552,13 +567,14 @@ export class Admob extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Called when the video of a rewarded ad has completed.
|
* Called when the video of a rewarded ad has completed.
|
||||||
*
|
*
|
||||||
* *WARNING*: only **ionic^4**. Older versions of ionic, use:
|
* WARNING*: only **ionic^4**. Older versions of ionic, use:
|
||||||
*
|
*
|
||||||
* ```js
|
* ```js
|
||||||
* document.addEventListener(window.admob.events.onRewardedAdVideoCompleted, () => { });
|
* document.addEventListener(window.admob.events.onRewardedAdVideoCompleted, () => { });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Please refer to the documentation on https://admob-ionic.com/Events.
|
* Please refer to the documentation on https://admob-ionic.com/Events.
|
||||||
|
*
|
||||||
* @returns {Observable<AdMobEvent>} Returns an observable when the video is completed
|
* @returns {Observable<AdMobEvent>} Returns an observable when the video is completed
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -7,7 +7,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* This cordova ionic plugin allows you to perform AES 256 encryption and decryption on the plain text.
|
* This cordova ionic plugin allows you to perform AES 256 encryption and decryption on the plain text.
|
||||||
* It's a cross-platform plugin which supports both Android and iOS.
|
* It's a cross-platform plugin which supports both Android and iOS.
|
||||||
* The encryption and decryption are performed on the device native layer so that the performance is much faster.
|
* The encryption and decryption are performed on the device native layer so that the performance is much faster.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AES256 } from '@awesome-cordova-plugins/aes-256/ngx';
|
* import { AES256 } from '@awesome-cordova-plugins/aes-256/ngx';
|
||||||
@ -35,12 +34,12 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* * this.aes256.generateSecureKey('random password 12345')
|
* this.aes256.generateSecureKey('random password 12345')
|
||||||
* .then(res => console.log('Secure Key : ',res))
|
* .then(res => console.log('Secure Key : ',res))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* * this.aes256.generateSecureIV('random password 12345')
|
* this.aes256.generateSecureIV('random password 12345')
|
||||||
* .then(res => console.log('Secure IV : ',res))
|
* .then(res => console.log('Secure IV : ',res))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
@ -58,10 +57,11 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class AES256 extends AwesomeCordovaNativePlugin {
|
export class AES256 extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* This function used to perform the aes256 encryption
|
* This function used to perform the aes256 encryption
|
||||||
|
*
|
||||||
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 encryption.
|
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 encryption.
|
||||||
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 encryption.
|
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 encryption.
|
||||||
* @param {string} data A string which will be encrypted
|
* @param {string} data A string which will be encrypted
|
||||||
* @return {Promise<string>} Returns a promise that resolves when encryption happens. The success response will returns encrypted data.
|
* @returns {Promise<string>} Returns a promise that resolves when encryption happens. The success response will returns encrypted data.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
encrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
|
encrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
|
||||||
@ -70,10 +70,11 @@ export class AES256 extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function used to perform the aes256 decryption
|
* This function used to perform the aes256 decryption
|
||||||
|
*
|
||||||
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 decryption.
|
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 decryption.
|
||||||
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 decryption.
|
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 decryption.
|
||||||
* @param {string} data An AES256 encrypted data which will be decrypted.
|
* @param {string} data An AES256 encrypted data which will be decrypted.
|
||||||
* @return {Promise<string>} Returns a promise that resolves when decryption happens. The success response will returns decrypted data.
|
* @returns {Promise<string>} Returns a promise that resolves when decryption happens. The success response will returns decrypted data.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
decrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
|
decrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
|
||||||
@ -83,8 +84,9 @@ export class AES256 extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* This function used to generate a secure key based on an password. Perfect if you want to delegate the key generation for encryption to the plugin.
|
* This function used to generate a secure key based on an password. Perfect if you want to delegate the key generation for encryption to the plugin.
|
||||||
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
|
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
|
||||||
|
*
|
||||||
* @param {string} password A random string, which will be used as input for a PBKDF2 function
|
* @param {string} password A random string, which will be used as input for a PBKDF2 function
|
||||||
* @return {Promise<string>} Returns a promise that resolves when key is generated.
|
* @returns {Promise<string>} Returns a promise that resolves when key is generated.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
generateSecureKey(password: string): Promise<string> {
|
generateSecureKey(password: string): Promise<string> {
|
||||||
@ -94,8 +96,9 @@ export class AES256 extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* This function used to generate a secure IV based on an password. Perfect if you want to delegate the IV generation for encryption to the plugin.
|
* This function used to generate a secure IV based on an password. Perfect if you want to delegate the IV generation for encryption to the plugin.
|
||||||
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
|
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
|
||||||
|
*
|
||||||
* @param {string} password A random string, which will be used as input for a PBKDF2 function
|
* @param {string} password A random string, which will be used as input for a PBKDF2 function
|
||||||
* @return {Promise<string>} Returns a promise that resolves when IV is generated.
|
* @returns {Promise<string>} Returns a promise that resolves when IV is generated.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
generateSecureIV(password: string): Promise<string> {
|
generateSecureIV(password: string): Promise<string> {
|
||||||
|
@ -16,7 +16,6 @@ import { Observable } from 'rxjs';
|
|||||||
* Paytm All-in-One SDK provides a swift, secure and seamless payment experience to your users by invoking the Paytm app (if installed on your user’s smartphone) to complete payment for your order.
|
* Paytm All-in-One SDK provides a swift, secure and seamless payment experience to your users by invoking the Paytm app (if installed on your user’s smartphone) to complete payment for your order.
|
||||||
* Paytm All-in-One SDK enables payment acceptance via Paytm wallet, Paytm Payments Bank, saved Debit/Credit cards, Net Banking, BHIM UPI and EMI as available in your customer’s Paytm account. If Paytm app is not installed on a customer's device, the transaction will be processed via web view within the All-in-One SDK.
|
* Paytm All-in-One SDK enables payment acceptance via Paytm wallet, Paytm Payments Bank, saved Debit/Credit cards, Net Banking, BHIM UPI and EMI as available in your customer’s Paytm account. If Paytm app is not installed on a customer's device, the transaction will be processed via web view within the All-in-One SDK.
|
||||||
* For more information about Paytm All-in-One SDK, please visit https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/
|
* For more information about Paytm All-in-One SDK, please visit https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AllInOneSDK } from '@awesome-cordova-plugins/all-in-one-sdk/ngx';
|
* import { AllInOneSDK } from '@awesome-cordova-plugins/all-in-one-sdk/ngx';
|
||||||
@ -39,7 +38,6 @@ import { Observable } from 'rxjs';
|
|||||||
* After adding the plugin, open the iOS project, you can find the same at <projectName>/platforms/ios.
|
* After adding the plugin, open the iOS project, you can find the same at <projectName>/platforms/ios.
|
||||||
* In case merchant don’t have callback URL, Add an entry into Info.plist LSApplicationQueriesSchemes(Array) Item 0 (String)-> paytm
|
* In case merchant don’t have callback URL, Add an entry into Info.plist LSApplicationQueriesSchemes(Array) Item 0 (String)-> paytm
|
||||||
* Add a URL Scheme “paytm”+”MID”
|
* Add a URL Scheme “paytm”+”MID”
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'AllInOneSDK',
|
pluginName: 'AllInOneSDK',
|
||||||
@ -53,8 +51,9 @@ export class AllInOneSDK extends AwesomeCordovaNativePlugin {
|
|||||||
* This function checks if Paytm Application is available on the device.
|
* This function checks if Paytm Application is available on the device.
|
||||||
* If Paytm exists then it invokes Paytm Application with the parameters sent and creates an order.
|
* If Paytm exists then it invokes Paytm Application with the parameters sent and creates an order.
|
||||||
* If the Paytm Application is not available the transaction is continued on a webView within All-in-One SDK.
|
* If the Paytm Application is not available the transaction is continued on a webView within All-in-One SDK.
|
||||||
|
*
|
||||||
* @param options {PaymentIntentModel} These parameters are required and will be used to create an order.
|
* @param options {PaymentIntentModel} These parameters are required and will be used to create an order.
|
||||||
* @return {Promise<PaytmResponse>} Returns a promise that resolves when a transaction completes(both failed and successful).
|
* @returns {Promise<PaytmResponse>} Returns a promise that resolves when a transaction completes(both failed and successful).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
startTransaction(options: PaymentIntentModel | PaymentAssistIntentModel): Promise<PaytmResponse> {
|
startTransaction(options: PaymentIntentModel | PaymentAssistIntentModel): Promise<PaytmResponse> {
|
||||||
|
@ -5,7 +5,6 @@ import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@a
|
|||||||
* @name Analytics Firebase
|
* @name Analytics Firebase
|
||||||
* @description
|
* @description
|
||||||
* Google Analytics Firebase plugin for Ionic Native apps.
|
* Google Analytics Firebase plugin for Ionic Native apps.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AnalyticsFirebase } from '@awesome-cordova-plugins/analytics-firebase';
|
* import { AnalyticsFirebase } from '@awesome-cordova-plugins/analytics-firebase';
|
||||||
@ -65,6 +64,7 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* This enum represents AnalyticsFirebase default events.
|
* This enum represents AnalyticsFirebase default events.
|
||||||
* Use one of these default events or a custom event
|
* Use one of these default events or a custom event
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty()
|
||||||
@ -105,6 +105,7 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* This enum represents AnalyticsFirebase default params.
|
* This enum represents AnalyticsFirebase default params.
|
||||||
* Use one of these default params or a custom param
|
* Use one of these default params or a custom param
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty()
|
||||||
@ -168,7 +169,7 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* @param eventName {string} The event name
|
* @param eventName {string} The event name
|
||||||
* @param eventParams {object} (Optional) The event params
|
* @param eventParams {object} (Optional) The event params
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the event is logged
|
* @returns {Promise<any>} Returns a promise that resolves when the event is logged
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
logEvent(eventName: string, eventParams?: object): Promise<any> {
|
logEvent(eventName: string, eventParams?: object): Promise<any> {
|
||||||
@ -177,7 +178,8 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all analytics data for this app from the device and resets the app instance id
|
* Clears all analytics data for this app from the device and resets the app instance id
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the analytics data is cleared
|
*
|
||||||
|
* @returns {Promise<any>} Returns a promise that resolves when the analytics data is cleared
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
resetAnalyticsData(): Promise<any> {
|
resetAnalyticsData(): Promise<any> {
|
||||||
@ -186,8 +188,10 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether analytics collection is enabled for this app on this device. This setting is persisted across app sessions. By default it is enabled
|
* Sets whether analytics collection is enabled for this app on this device. This setting is persisted across app sessions. By default it is enabled
|
||||||
|
*
|
||||||
* @param screenName {boolean} The value of the collection
|
* @param screenName {boolean} The value of the collection
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the collection is enabled/disabled
|
* @param enabled
|
||||||
|
* @returns {Promise<any>} Returns a promise that resolves when the collection is enabled/disabled
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setAnalyticsCollectionEnabled(enabled: boolean): Promise<any> {
|
setAnalyticsCollectionEnabled(enabled: boolean): Promise<any> {
|
||||||
@ -197,8 +201,9 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Sets the current screen name, which specifies the current visual context in your app.
|
* Sets the current screen name, which specifies the current visual context in your app.
|
||||||
* This helps identify the areas in your app where users spend their time and how they interact with your app
|
* This helps identify the areas in your app where users spend their time and how they interact with your app
|
||||||
|
*
|
||||||
* @param screenName {string} The screen name
|
* @param screenName {string} The screen name
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the current screen is setted
|
* @returns {Promise<any>} Returns a promise that resolves when the current screen is setted
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setCurrentScreen(screenName: string): Promise<any> {
|
setCurrentScreen(screenName: string): Promise<any> {
|
||||||
@ -207,8 +212,10 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the minimum engagement time required before starting a session. The default value is 10000 (10 seconds)
|
* Sets the minimum engagement time required before starting a session. The default value is 10000 (10 seconds)
|
||||||
|
*
|
||||||
* @param screenName {number} The duration in milliseconds
|
* @param screenName {number} The duration in milliseconds
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the minimum session duration is set
|
* @param milliseconds
|
||||||
|
* @returns {Promise<any>} Returns a promise that resolves when the minimum session duration is set
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setMinimumSessionDuration(milliseconds: number): Promise<any> {
|
setMinimumSessionDuration(milliseconds: number): Promise<any> {
|
||||||
@ -217,8 +224,10 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the duration of inactivity that terminates the current session. The default value is 1800000 (30 minutes)
|
* Sets the duration of inactivity that terminates the current session. The default value is 1800000 (30 minutes)
|
||||||
|
*
|
||||||
* @param screenName {number} The duration in milliseconds
|
* @param screenName {number} The duration in milliseconds
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the session timeout duration is set
|
* @param milliseconds
|
||||||
|
* @returns {Promise<any>} Returns a promise that resolves when the session timeout duration is set
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setSessionTimeoutDuration(milliseconds: number): Promise<any> {
|
setSessionTimeoutDuration(milliseconds: number): Promise<any> {
|
||||||
@ -227,8 +236,9 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the user ID property. This feature must be used in accordance with Google's Privacy Policy
|
* Sets the user ID property. This feature must be used in accordance with Google's Privacy Policy
|
||||||
|
*
|
||||||
* @param userId {string} The user id
|
* @param userId {string} The user id
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the user id is setted
|
* @returns {Promise<any>} Returns a promise that resolves when the user id is setted
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setUserId(userId: string): Promise<any> {
|
setUserId(userId: string): Promise<any> {
|
||||||
@ -237,9 +247,10 @@ export class AnalyticsFirebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a user property to a given value. Up to 25 user property names are supported. Once set, user property values persist throughout the app lifecycle and across sessions
|
* Sets a user property to a given value. Up to 25 user property names are supported. Once set, user property values persist throughout the app lifecycle and across sessions
|
||||||
|
*
|
||||||
* @param userPropertyName {string} The user property name
|
* @param userPropertyName {string} The user property name
|
||||||
* @param userPropertyValue {string} The user property value
|
* @param userPropertyValue {string} The user property value
|
||||||
* @return {Promise<any>} Returns a promise that resolves when the user property setted
|
* @returns {Promise<any>} Returns a promise that resolves when the user property setted
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setUserProperty(userPropertyName: string, userPropertyValue: string): Promise<any> {
|
setUserProperty(userPropertyName: string, userPropertyValue: string): Promise<any> {
|
||||||
|
@ -155,7 +155,6 @@ export interface AndroidExoPlayerControllerConfig {
|
|||||||
* Cordova media player plugin using Google's ExoPlayer framework.
|
* Cordova media player plugin using Google's ExoPlayer framework.
|
||||||
*
|
*
|
||||||
* https://github.com/google/ExoPlayer
|
* https://github.com/google/ExoPlayer
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AndroidExoPlayer } from '@awesome-cordova-plugins/android-exoplayer/ngx';
|
* import { AndroidExoPlayer } from '@awesome-cordova-plugins/android-exoplayer/ngx';
|
||||||
@ -167,7 +166,6 @@ export interface AndroidExoPlayerControllerConfig {
|
|||||||
* this.androidExoPlayer.show({url: 'http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube'});
|
* this.androidExoPlayer.show({url: 'http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube'});
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* AndroidExoPlayerParams
|
* AndroidExoPlayerParams
|
||||||
* AndroidExoplayerState
|
* AndroidExoplayerState
|
||||||
@ -184,8 +182,9 @@ export interface AndroidExoPlayerControllerConfig {
|
|||||||
export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Show the player.
|
* Show the player.
|
||||||
|
*
|
||||||
* @param {AndroidExoPlayerParams} parameters Parameters
|
* @param {AndroidExoPlayerParams} parameters Parameters
|
||||||
* @return {Observable<AndroidExoplayerState>}
|
* @returns {Observable<AndroidExoplayerState>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -200,9 +199,10 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch stream without disposing of the player.
|
* Switch stream without disposing of the player.
|
||||||
|
*
|
||||||
* @param {string} url The url of the new stream.
|
* @param {string} url The url of the new stream.
|
||||||
* @param {AndroidExoPlayerControllerConfig} controller Configuration of the controller.
|
* @param {AndroidExoPlayerControllerConfig} controller Configuration of the controller.
|
||||||
* @return {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setStream(url: string, controller: AndroidExoPlayerControllerConfig): Promise<void> {
|
setStream(url: string, controller: AndroidExoPlayerControllerConfig): Promise<void> {
|
||||||
@ -211,7 +211,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Will pause if playing and play if paused
|
* Will pause if playing and play if paused
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
playPause(): Promise<void> {
|
playPause(): Promise<void> {
|
||||||
@ -220,7 +221,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop playing.
|
* Stop playing.
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stop(): Promise<void> {
|
stop(): Promise<void> {
|
||||||
@ -229,8 +231,9 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Jump to a particular position.
|
* Jump to a particular position.
|
||||||
|
*
|
||||||
* @param {number} milliseconds Position in stream in milliseconds
|
* @param {number} milliseconds Position in stream in milliseconds
|
||||||
* @return {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
seekTo(milliseconds: number): Promise<void> {
|
seekTo(milliseconds: number): Promise<void> {
|
||||||
@ -239,8 +242,9 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Jump to a particular time relative to the current position.
|
* Jump to a particular time relative to the current position.
|
||||||
|
*
|
||||||
* @param {number} milliseconds Time in milliseconds
|
* @param {number} milliseconds Time in milliseconds
|
||||||
* @return {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
seekBy(milliseconds: number): Promise<void> {
|
seekBy(milliseconds: number): Promise<void> {
|
||||||
@ -249,7 +253,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current player state.
|
* Get the current player state.
|
||||||
* @return {Promise<AndroidExoplayerState>}
|
*
|
||||||
|
* @returns {Promise<AndroidExoplayerState>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getState(): Promise<AndroidExoplayerState> {
|
getState(): Promise<AndroidExoplayerState> {
|
||||||
@ -258,7 +263,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the controller.
|
* Show the controller.
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showController(): Promise<void> {
|
showController(): Promise<void> {
|
||||||
@ -267,7 +273,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the controller.
|
* Hide the controller.
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hideController(): Promise<void> {
|
hideController(): Promise<void> {
|
||||||
@ -276,8 +283,9 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the controller configuration.
|
* Update the controller configuration.
|
||||||
|
*
|
||||||
* @param {AndroidExoPlayerControllerConfig} controller Configuration of the controller.
|
* @param {AndroidExoPlayerControllerConfig} controller Configuration of the controller.
|
||||||
* @return {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setController(controller: AndroidExoPlayerControllerConfig): Promise<void> {
|
setController(controller: AndroidExoPlayerControllerConfig): Promise<void> {
|
||||||
@ -286,7 +294,8 @@ export class AndroidExoplayer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Close and dispose of player, call before destroy.
|
* Close and dispose of player, call before destroy.
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
close(): Promise<void> {
|
close(): Promise<void> {
|
||||||
|
@ -3,6 +3,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Bit flag values for setSystemUiVisibility()
|
* Bit flag values for setSystemUiVisibility()
|
||||||
|
*
|
||||||
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
|
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
|
||||||
*/
|
*/
|
||||||
export enum AndroidSystemUiFlags {
|
export enum AndroidSystemUiFlags {
|
||||||
@ -59,7 +60,8 @@ export enum AndroidSystemUiFlags {
|
|||||||
export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Is this plugin supported?
|
* Is this plugin supported?
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isSupported(): Promise<void> {
|
isSupported(): Promise<void> {
|
||||||
@ -68,7 +70,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Is immersive mode supported?
|
* Is immersive mode supported?
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isImmersiveModeSupported(): Promise<boolean> {
|
isImmersiveModeSupported(): Promise<boolean> {
|
||||||
@ -77,7 +80,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The width of the screen in immersive mode.
|
* The width of the screen in immersive mode.
|
||||||
* @return {Promise<number>}
|
*
|
||||||
|
* @returns {Promise<number>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
immersiveWidth(): Promise<number> {
|
immersiveWidth(): Promise<number> {
|
||||||
@ -86,7 +90,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The height of the screen in immersive mode.
|
* The height of the screen in immersive mode.
|
||||||
* @return {Promise<number>}
|
*
|
||||||
|
* @returns {Promise<number>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
immersiveHeight(): Promise<number> {
|
immersiveHeight(): Promise<number> {
|
||||||
@ -95,7 +100,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide system UI until user interacts.
|
* Hide system UI until user interacts.
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
leanMode(): Promise<void> {
|
leanMode(): Promise<void> {
|
||||||
@ -104,7 +110,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show system UI.
|
* Show system UI.
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showSystemUI(): Promise<void> {
|
showSystemUI(): Promise<void> {
|
||||||
@ -113,7 +120,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend your app underneath the status bar (Android 4.4+ only).
|
* Extend your app underneath the status bar (Android 4.4+ only).
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showUnderStatusBar(): Promise<void> {
|
showUnderStatusBar(): Promise<void> {
|
||||||
@ -122,7 +130,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend your app underneath the system UI (Android 4.4+ only).
|
* Extend your app underneath the system UI (Android 4.4+ only).
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
showUnderSystemUI(): Promise<void> {
|
showUnderSystemUI(): Promise<void> {
|
||||||
@ -131,7 +140,8 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide system UI and keep it hidden (Android 4.4+ only).
|
* Hide system UI and keep it hidden (Android 4.4+ only).
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
immersiveMode(): Promise<void> {
|
immersiveMode(): Promise<void> {
|
||||||
@ -140,9 +150,10 @@ export class AndroidFullScreen extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Manually set the the system UI to a custom mode. This mirrors the Android method of the same name. (Android 4.4+ only).
|
* 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)
|
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
|
||||||
* @param {AndroidSystemUiFlags} visibility Bitwise-OR of flags in AndroidSystemUiFlags
|
* @param {AndroidSystemUiFlags} visibility Bitwise-OR of flags in AndroidSystemUiFlags
|
||||||
* @return {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> {
|
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> {
|
||||||
|
@ -7,7 +7,6 @@ import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-pl
|
|||||||
* This plugin enables developers to get the cutout and android devices inset sizes
|
* This plugin enables developers to get the cutout and android devices inset sizes
|
||||||
* It is based on the cordova plugin developed by @tobspr: https://github.com/tobspr/cordova-plugin-android-notch
|
* It is based on the cordova plugin developed by @tobspr: https://github.com/tobspr/cordova-plugin-android-notch
|
||||||
* This plugin works on all android versions, but we can only detect notches starting from Android 9.
|
* This plugin works on all android versions, but we can only detect notches starting from Android 9.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AndroidNotch } from '@awesome-cordova-plugins/android-notch/ngx';
|
* import { AndroidNotch } from '@awesome-cordova-plugins/android-notch/ngx';
|
||||||
@ -52,7 +51,7 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns true if the android device has cutout
|
* Returns true if the android device has cutout
|
||||||
*
|
*
|
||||||
* @return {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasCutout(): Promise<boolean> {
|
hasCutout(): Promise<boolean> {
|
||||||
@ -62,7 +61,7 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns the heigth of the top inset
|
* Returns the heigth of the top inset
|
||||||
*
|
*
|
||||||
* @return {Promise<number>}
|
* @returns {Promise<number>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getInsetTop(): Promise<number> {
|
getInsetTop(): Promise<number> {
|
||||||
@ -72,7 +71,7 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns the heigth of the right inset
|
* Returns the heigth of the right inset
|
||||||
*
|
*
|
||||||
* @return {Promise<number>}
|
* @returns {Promise<number>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getInsetRight(): Promise<number> {
|
getInsetRight(): Promise<number> {
|
||||||
@ -81,7 +80,8 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the heigth of the bottom inset
|
* Returns the heigth of the bottom inset
|
||||||
* @return {Promise<number>}
|
*
|
||||||
|
* @returns {Promise<number>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getInsetBottom(): Promise<number> {
|
getInsetBottom(): Promise<number> {
|
||||||
@ -90,7 +90,8 @@ export class AndroidNotch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the heigth of the left inset
|
* Returns the heigth of the left inset
|
||||||
* @return {Promise<number>}
|
*
|
||||||
|
* @returns {Promise<number>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getInsetLeft(): Promise<number> {
|
getInsetLeft(): Promise<number> {
|
||||||
|
@ -8,7 +8,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* This plugin is designed to support Android new permissions checking mechanism.
|
* This plugin is designed to support Android new permissions checking mechanism.
|
||||||
*
|
*
|
||||||
* You can find all permissions here: https://developer.android.com/reference/android/Manifest.permission.html
|
* You can find all permissions here: https://developer.android.com/reference/android/Manifest.permission.html
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* import { AndroidPermissions } from '@awesome-cordova-plugins/android-permissions/ngx';
|
* import { AndroidPermissions } from '@awesome-cordova-plugins/android-permissions/ngx';
|
||||||
@ -195,8 +194,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check permission
|
* Check permission
|
||||||
|
*
|
||||||
* @param {string} permission The name of the permission
|
* @param {string} permission The name of the permission
|
||||||
* @return {Promise<AndroidPermissionResponse>} Returns a promise
|
* @returns {Promise<AndroidPermissionResponse>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
checkPermission(permission: string): Promise<AndroidPermissionResponse> {
|
checkPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||||
@ -205,8 +205,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request permission
|
* Request permission
|
||||||
|
*
|
||||||
* @param {string} permission The name of the permission to request
|
* @param {string} permission The name of the permission to request
|
||||||
* @return {Promise<AndroidPermissionResponse>}
|
* @returns {Promise<AndroidPermissionResponse>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestPermission(permission: string): Promise<AndroidPermissionResponse> {
|
requestPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||||
@ -215,8 +216,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request permissions
|
* Request permissions
|
||||||
|
*
|
||||||
* @param {string[]} permissions An array with permissions
|
* @param {string[]} permissions An array with permissions
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestPermissions(permissions: string[]): Promise<any> {
|
requestPermissions(permissions: string[]): Promise<any> {
|
||||||
@ -225,8 +227,9 @@ export class AndroidPermissions extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function still works now, will not support in the future.
|
* This function still works now, will not support in the future.
|
||||||
|
*
|
||||||
* @param {string} permission The name of the permission
|
* @param {string} permission The name of the permission
|
||||||
* @return {Promise<AndroidPermissionResponse>} Returns a promise
|
* @returns {Promise<AndroidPermissionResponse>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasPermission(permission: string): Promise<AndroidPermissionResponse> {
|
hasPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||||
|
@ -13,7 +13,6 @@ export interface AnylineOptions {
|
|||||||
* @name Anyline
|
* @name Anyline
|
||||||
* @description
|
* @description
|
||||||
* Anyline provides an easy-to-use SDK for applications to enable Optical Character Recognition (OCR) on mobile devices.
|
* Anyline provides an easy-to-use SDK for applications to enable Optical Character Recognition (OCR) on mobile devices.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Anyline } from '@awesome-cordova-plugins/anyline/ngx';
|
* import { Anyline } from '@awesome-cordova-plugins/anyline/ngx';
|
||||||
@ -41,8 +40,9 @@ export interface AnylineOptions {
|
|||||||
export class Anyline extends AwesomeCordovaNativePlugin {
|
export class Anyline extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Scan
|
* Scan
|
||||||
|
*
|
||||||
* @param options {AnylineOptions} Scanning options
|
* @param options {AnylineOptions} Scanning options
|
||||||
* @return {Promise<any>} Returns a promise that resolves when Code is captured
|
* @returns {Promise<any>} Returns a promise that resolves when Code is captured
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
scan(options: AnylineOptions): Promise<any> {
|
scan(options: AnylineOptions): Promise<any> {
|
||||||
|
@ -7,7 +7,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* This plugin allows you to check if an app is installed on the user's device. It requires an URI Scheme (e.g. twitter://) on iOS or a Package Name (e.g com.twitter.android) on Android.
|
* This plugin allows you to check if an app is installed on the user's device. It requires an URI Scheme (e.g. twitter://) on iOS or a Package Name (e.g com.twitter.android) on Android.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: cordova-plugin-appavailability. For more info, please see the [AppAvailability plugin docs](https://github.com/ohh2ahh/AppAvailability).
|
* Requires Cordova plugin: cordova-plugin-appavailability. For more info, please see the [AppAvailability plugin docs](https://github.com/ohh2ahh/AppAvailability).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppAvailability } from '@awesome-cordova-plugins/app-availability/ngx';
|
* import { AppAvailability } from '@awesome-cordova-plugins/app-availability/ngx';
|
||||||
@ -43,6 +42,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class AppAvailability extends AwesomeCordovaNativePlugin {
|
export class AppAvailability extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Checks if an app is available on device
|
* Checks if an app is available on device
|
||||||
|
*
|
||||||
* @param {string} app Package name on android, or URI scheme on iOS
|
* @param {string} app Package name on android, or URI scheme on iOS
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,6 @@ export interface StringMap {
|
|||||||
* All the information captured is available in the App Center portal for you to analyze the data.
|
* All the information captured is available in the App Center portal for you to analyze the data.
|
||||||
*
|
*
|
||||||
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/analytics/cordova
|
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/analytics/cordova
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppCenterAnalytics } from '@awesome-cordova-plugins/app-center-analytics/ngx';
|
* import { AppCenterAnalytics } from '@awesome-cordova-plugins/app-center-analytics/ngx';
|
||||||
@ -47,6 +46,7 @@ export class AppCenterAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
* Tracks an custom event.
|
* Tracks an custom event.
|
||||||
* You can send up to 200 distinct event names. Also, there is a maximum limit of 256 characters per event name
|
* You can send up to 200 distinct event names. Also, there is a maximum limit of 256 characters per event name
|
||||||
* and 64 characters per event property name and event property value.
|
* and 64 characters per event property name and event property value.
|
||||||
|
*
|
||||||
* @param {string} eventName Event name
|
* @param {string} eventName Event name
|
||||||
* @param {StringMap} properties Event properties
|
* @param {StringMap} properties Event properties
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
@ -58,6 +58,7 @@ export class AppCenterAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if App Center Analytics is enabled
|
* Check if App Center Analytics is enabled
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -67,6 +68,7 @@ export class AppCenterAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable App Center Analytics at runtime
|
* Enable or disable App Center Analytics at runtime
|
||||||
|
*
|
||||||
* @param {boolean} shouldEnable Set value
|
* @param {boolean} shouldEnable Set value
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
|
@ -37,7 +37,6 @@ export interface AppCenterCrashReportDevice {
|
|||||||
* All the information captured is available in the App Center portal for you to analyze the data.
|
* All the information captured is available in the App Center portal for you to analyze the data.
|
||||||
*
|
*
|
||||||
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/crashes/cordova
|
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/crashes/cordova
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppCenterCrashes } from '@awesome-cordova-plugins/app-center-crashes/ngx';
|
* import { AppCenterCrashes } from '@awesome-cordova-plugins/app-center-crashes/ngx';
|
||||||
@ -70,6 +69,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* App Center Crashes provides you with an API to generate a test crash for easy testing of the SDK.
|
* App Center Crashes provides you with an API to generate a test crash for easy testing of the SDK.
|
||||||
* This API can only be used in test/beta apps and won't do anything in production apps.
|
* This API can only be used in test/beta apps and won't do anything in production apps.
|
||||||
|
*
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -77,6 +77,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* At any time after starting the SDK, you can check if the app crashed in the previous launch
|
* At any time after starting the SDK, you can check if the app crashed in the previous launch
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -86,6 +87,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Details about the last crash
|
* Details about the last crash
|
||||||
|
*
|
||||||
* @returns {Promise<AppCenterCrashReport>}
|
* @returns {Promise<AppCenterCrashReport>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -95,6 +97,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if App Center Crashes is enabled
|
* Check if App Center Crashes is enabled
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -104,6 +107,7 @@ export class AppCenterCrashes extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable App Center Crashes at runtime
|
* Enable or disable App Center Crashes at runtime
|
||||||
|
*
|
||||||
* @param {boolean} shouldEnable Set value
|
* @param {boolean} shouldEnable Set value
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @description
|
* @description
|
||||||
* Generates a low memory warning.
|
* Generates a low memory warning.
|
||||||
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
|
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { LowMemory } from '@awesome-cordova-plugins/app-center-low-memory/ngx';
|
* import { LowMemory } from '@awesome-cordova-plugins/app-center-low-memory/ngx';
|
||||||
@ -32,6 +31,7 @@ export class LowMemory extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Generates a low memory warning.
|
* Generates a low memory warning.
|
||||||
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
|
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
|
||||||
|
*
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -7,7 +7,6 @@ import { Observable } from 'rxjs';
|
|||||||
* @description
|
* @description
|
||||||
*
|
*
|
||||||
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/push/cordova
|
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/push/cordova
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppCenterPush } from '@awesome-cordova-plugins/app-center-push/ngx';
|
* import { AppCenterPush } from '@awesome-cordova-plugins/app-center-push/ngx';
|
||||||
@ -36,6 +35,7 @@ import { Observable } from 'rxjs';
|
|||||||
export class AppCenterPush extends AwesomeCordovaNativePlugin {
|
export class AppCenterPush extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Subscribe to an event
|
* Subscribe to an event
|
||||||
|
*
|
||||||
* @param {string} eventName Event name
|
* @param {string} eventName Event name
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@ -48,6 +48,7 @@ export class AppCenterPush extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Check if App Center Push is enabled
|
* Check if App Center Push is enabled
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -57,6 +58,7 @@ export class AppCenterPush extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable App Center Push at runtime
|
* Enable or disable App Center Push at runtime
|
||||||
|
*
|
||||||
* @param {boolean} shouldEnable Set value
|
* @param {boolean} shouldEnable Set value
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
|
@ -8,7 +8,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* Exposes additional shared APIs for App Center.
|
* Exposes additional shared APIs for App Center.
|
||||||
*
|
*
|
||||||
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova
|
* For more info, please see https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppCenter } from '@awesome-cordova-plugins/app-center-shared/ngx';
|
* import { AppCenter } from '@awesome-cordova-plugins/app-center-shared/ngx';
|
||||||
@ -42,6 +41,7 @@ export class AppCenter extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns AppCenter UUID.
|
* Returns AppCenter UUID.
|
||||||
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-installations
|
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-installations
|
||||||
|
*
|
||||||
* @returns {Promise<string>} Install ID
|
* @returns {Promise<string>} Install ID
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -52,6 +52,7 @@ export class AppCenter extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Set a user ID that's used to augment crash reports.
|
* Set a user ID that's used to augment crash reports.
|
||||||
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-users
|
* For more info, please see: https://docs.microsoft.com/en-us/appcenter/sdk/other-apis/cordova#identify-users
|
||||||
|
*
|
||||||
* @param {string} userId Ex. "your-user-id"
|
* @param {string} userId Ex. "your-user-id"
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
|
@ -6,7 +6,6 @@ import { Injectable } from '@angular/core';
|
|||||||
* @name App Preferences
|
* @name App Preferences
|
||||||
* @description
|
* @description
|
||||||
* This plugin allows you to read and write app preferences
|
* This plugin allows you to read and write app preferences
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppPreferences } from '@awesome-cordova-plugins/app-preferences/ngx';
|
* import { AppPreferences } from '@awesome-cordova-plugins/app-preferences/ngx';
|
||||||
@ -18,7 +17,6 @@ import { Injectable } from '@angular/core';
|
|||||||
* this.appPreferences.fetch('key').then((res) => { console.log(res); });
|
* this.appPreferences.fetch('key').then((res) => { console.log(res); });
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'AppPreferences',
|
pluginName: 'AppPreferences',
|
||||||
@ -34,7 +32,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* @param {string} dict Dictionary for key (OPTIONAL)
|
* @param {string} dict Dictionary for key (OPTIONAL)
|
||||||
* @param {string} key Key
|
* @param {string} key Key
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
@ -49,7 +47,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {string} dict Dictionary for key (OPTIONAL)
|
* @param {string} dict Dictionary for key (OPTIONAL)
|
||||||
* @param {string} key Key
|
* @param {string} key Key
|
||||||
* @param {any} value Value
|
* @param {any} value Value
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
@ -63,7 +61,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* @param {string} dict Dictionary for key (OPTIONAL)
|
* @param {string} dict Dictionary for key (OPTIONAL)
|
||||||
* @param {string} key Key
|
* @param {string} key Key
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
@ -75,7 +73,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Clear preferences
|
* Clear preferences
|
||||||
*
|
*
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
@ -87,7 +85,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Show native preferences interface
|
* Show native preferences interface
|
||||||
*
|
*
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
@ -100,7 +98,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
* Show native preferences interface
|
* Show native preferences interface
|
||||||
*
|
*
|
||||||
* @param {boolean} subscribe true value to subscribe, false - unsubscribe
|
* @param {boolean} subscribe true value to subscribe, false - unsubscribe
|
||||||
* @return {Observable<any>} Returns an observable
|
* @returns {Observable<any>} Returns an observable
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -113,6 +111,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
* Return named configuration context
|
* Return named configuration context
|
||||||
* In iOS you'll get a suite configuration, on Android — named file
|
* In iOS you'll get a suite configuration, on Android — named file
|
||||||
* Supports: Android, iOS
|
* Supports: Android, iOS
|
||||||
|
*
|
||||||
* @param {string} suiteName suite name
|
* @param {string} suiteName suite name
|
||||||
* @returns {Object} Custom object, bound to that suite
|
* @returns {Object} Custom object, bound to that suite
|
||||||
*/
|
*/
|
||||||
@ -135,6 +134,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Return cloud synchronized configuration context
|
* Return cloud synchronized configuration context
|
||||||
* Currently supports Windows and iOS/macOS
|
* Currently supports Windows and iOS/macOS
|
||||||
|
*
|
||||||
* @returns {Object} Custom object, bound to that suite
|
* @returns {Object} Custom object, bound to that suite
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -147,6 +147,7 @@ export class AppPreferences extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Return default configuration context
|
* Return default configuration context
|
||||||
* Currently supports Windows and iOS/macOS
|
* Currently supports Windows and iOS/macOS
|
||||||
|
*
|
||||||
* @returns {Object} Custom Object, bound to that suite
|
* @returns {Object} Custom Object, bound to that suite
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -205,7 +205,6 @@ export interface AppUrls {
|
|||||||
* The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.
|
* The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: cordova-plugin-apprate. For more info, please see the [AppRate plugin docs](https://github.com/pushandplay/cordova-plugin-apprate).
|
* Requires Cordova plugin: cordova-plugin-apprate. For more info, please see the [AppRate plugin docs](https://github.com/pushandplay/cordova-plugin-apprate).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppRate } from '@awesome-cordova-plugins/app-rate/ngx';
|
* import { AppRate } from '@awesome-cordova-plugins/app-rate/ngx';
|
||||||
@ -236,13 +235,11 @@ export interface AppUrls {
|
|||||||
*
|
*
|
||||||
* this.appRate.promptForRating(false);
|
* this.appRate.promptForRating(false);
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* AppRatePreferences
|
* AppRatePreferences
|
||||||
* AppUrls
|
* AppUrls
|
||||||
* AppRateCallbacks
|
* AppRateCallbacks
|
||||||
* AppRateCustomLocal
|
* AppRateCustomLocal
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'AppRate',
|
pluginName: 'AppRate',
|
||||||
@ -261,7 +258,9 @@ export class AppRate extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set preferences
|
* Set preferences
|
||||||
* @return void
|
*
|
||||||
|
* @param pref
|
||||||
|
* @returns void
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setPreferences(pref: AppRatePreferences): void {
|
setPreferences(pref: AppRatePreferences): void {
|
||||||
@ -270,7 +269,8 @@ export class AppRate extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get preferences
|
* Get preferences
|
||||||
* @return AppRatePreferences
|
*
|
||||||
|
* @returns AppRatePreferences
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getPreferences(): AppRatePreferences {
|
getPreferences(): AppRatePreferences {
|
||||||
@ -279,6 +279,7 @@ export class AppRate extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompts the user for rating
|
* Prompts the user for rating
|
||||||
|
*
|
||||||
* @param {boolean} immediately Show the rating prompt immediately.
|
* @param {boolean} immediately Show the rating prompt immediately.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -8,7 +8,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* Reads the version of your app from the target build settings.
|
* Reads the version of your app from the target build settings.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `cordova-plugin-app-version`. For more info, please see the [Cordova App Version docs](https://github.com/whiteoctober/cordova-plugin-app-version).
|
* Requires Cordova plugin: `cordova-plugin-app-version`. For more info, please see the [Cordova App Version docs](https://github.com/whiteoctober/cordova-plugin-app-version).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppVersion } from '@awesome-cordova-plugins/app-version/ngx';
|
* import { AppVersion } from '@awesome-cordova-plugins/app-version/ngx';
|
||||||
@ -36,6 +35,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class AppVersion extends AwesomeCordovaNativePlugin {
|
export class AppVersion extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Returns the name of the app, e.g.: "My Awesome App"
|
* Returns the name of the app, e.g.: "My Awesome App"
|
||||||
|
*
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -45,6 +45,7 @@ export class AppVersion extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the package name of the app, e.g.: "com.example.myawesomeapp"
|
* Returns the package name of the app, e.g.: "com.example.myawesomeapp"
|
||||||
|
*
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -56,6 +57,7 @@ export class AppVersion extends AwesomeCordovaNativePlugin {
|
|||||||
* Returns the build identifier of the app.
|
* Returns the build identifier of the app.
|
||||||
* In iOS a string with the build version like "1.6095"
|
* In iOS a string with the build version like "1.6095"
|
||||||
* In Android a number generated from the version string, like 10203 for version "1.2.3"
|
* In Android a number generated from the version string, like 10203 for version "1.2.3"
|
||||||
|
*
|
||||||
* @returns {Promise<string | number>}
|
* @returns {Promise<string | number>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -65,6 +67,7 @@ export class AppVersion extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the version of the app, e.g.: "1.2.3"
|
* Returns the version of the app, e.g.: "1.2.3"
|
||||||
|
*
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -35,7 +35,6 @@ export interface WatchExistData {
|
|||||||
* @name Apple Wallet
|
* @name Apple Wallet
|
||||||
* @description
|
* @description
|
||||||
* A Cordova plugin that enables users from Add Payment Cards to their Apple Wallet.
|
* A Cordova plugin that enables users from Add Payment Cards to their Apple Wallet.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { AppleWallet } from '@awesome-cordova-plugins/apple-wallet/ngx';
|
* import { AppleWallet } from '@awesome-cordova-plugins/apple-wallet/ngx';
|
||||||
@ -156,7 +155,8 @@ export interface WatchExistData {
|
|||||||
export class AppleWallet extends AwesomeCordovaNativePlugin {
|
export class AppleWallet extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Simple call to determine if the current device supports Apple Pay and has a supported card installed.
|
* Simple call to determine if the current device supports Apple Pay and has a supported card installed.
|
||||||
* @return {Promise<boolean>}
|
*
|
||||||
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isAvailable(): Promise<boolean> {
|
isAvailable(): Promise<boolean> {
|
||||||
@ -165,8 +165,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple call to check Card Eligibility
|
* Simple call to check Card Eligibility
|
||||||
|
*
|
||||||
* @param {string} primaryAccountIdentifier
|
* @param {string} primaryAccountIdentifier
|
||||||
* @return {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
checkCardEligibility(primaryAccountIdentifier: string): Promise<boolean> {
|
checkCardEligibility(primaryAccountIdentifier: string): Promise<boolean> {
|
||||||
@ -175,8 +176,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple call to checkCardEligibilityBySuffix
|
* Simple call to checkCardEligibilityBySuffix
|
||||||
|
*
|
||||||
* @param {string} cardSuffix
|
* @param {string} cardSuffix
|
||||||
* @return {Promise<PairedDevicesFlags>}
|
* @returns {Promise<PairedDevicesFlags>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
checkCardEligibilityBySuffix(cardSuffix: string): Promise<boolean> {
|
checkCardEligibilityBySuffix(cardSuffix: string): Promise<boolean> {
|
||||||
@ -185,7 +187,8 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple call to check out if there is any paired Watches so that you can toggle visibility of 'Add to Watch' button
|
* Simple call to check out if there is any paired Watches so that you can toggle visibility of 'Add to Watch' button
|
||||||
* @return {Promise<WatchExistData>}
|
*
|
||||||
|
* @returns {Promise<WatchExistData>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
checkPairedDevices(): Promise<WatchExistData> {
|
checkPairedDevices(): Promise<WatchExistData> {
|
||||||
@ -194,8 +197,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple call to check paired devices with a card by its suffix
|
* Simple call to check paired devices with a card by its suffix
|
||||||
|
*
|
||||||
* @param {string} cardSuffix
|
* @param {string} cardSuffix
|
||||||
* @return {Promise<PairedDevicesFlags>}
|
* @returns {Promise<PairedDevicesFlags>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
checkPairedDevicesBySuffix(cardSuffix: string): Promise<PairedDevicesFlags> {
|
checkPairedDevicesBySuffix(cardSuffix: string): Promise<PairedDevicesFlags> {
|
||||||
@ -204,8 +208,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
|
* Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
|
||||||
|
*
|
||||||
* @param {cardData} data
|
* @param {cardData} data
|
||||||
* @return {Promise<SignatureCertificatesData>}
|
* @returns {Promise<SignatureCertificatesData>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
startAddPaymentPass(data: CardData): Promise<SignatureCertificatesData> {
|
startAddPaymentPass(data: CardData): Promise<SignatureCertificatesData> {
|
||||||
@ -214,8 +219,9 @@ export class AppleWallet extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple completion handler that takes encrypted card data returned from your server side, in order to get the final response from Apple to know if the card is added succesfully or not.
|
* Simple completion handler that takes encrypted card data returned from your server side, in order to get the final response from Apple to know if the card is added succesfully or not.
|
||||||
|
*
|
||||||
* @param {encryptedCardData} data
|
* @param {encryptedCardData} data
|
||||||
* @return {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
completeAddPaymentPass(data: EncryptedCardData): Promise<string> {
|
completeAddPaymentPass(data: EncryptedCardData): Promise<string> {
|
||||||
|
@ -132,7 +132,6 @@ export interface ApproovLoggableToken {
|
|||||||
*
|
*
|
||||||
* Note: This plugin extends the pre-existing [cordova-advanced-http-plugin](https://github.com/silkimen/cordova-plugin-advanced-http),
|
* Note: This plugin extends the pre-existing [cordova-advanced-http-plugin](https://github.com/silkimen/cordova-plugin-advanced-http),
|
||||||
* we have only added approov functionality on top of it. All credit goes to the actual plugin developer.
|
* we have only added approov functionality on top of it. All credit goes to the actual plugin developer.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { ApproovHttp } from '@awesome-cordova-plugins/http/ngx';
|
* import { ApproovHttp } from '@awesome-cordova-plugins/http/ngx';
|
||||||
@ -172,6 +171,7 @@ export interface ApproovLoggableToken {
|
|||||||
export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* This enum represents the internal error codes which can be returned in a HTTPResponse object.
|
* This enum represents the internal error codes which can be returned in a HTTPResponse object.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
@CordovaProperty()
|
@CordovaProperty()
|
||||||
@ -188,6 +188,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This returns an object representing a basic HTTP Authorization header of the form.
|
* This returns an object representing a basic HTTP Authorization header of the form.
|
||||||
|
*
|
||||||
* @param username {string} Username
|
* @param username {string} Username
|
||||||
* @param password {string} Password
|
* @param password {string} Password
|
||||||
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'}
|
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'}
|
||||||
@ -199,6 +200,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
|
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
|
||||||
|
*
|
||||||
* @param username {string} Username
|
* @param username {string} Username
|
||||||
* @param password {string} Password
|
* @param password {string} Password
|
||||||
*/
|
*/
|
||||||
@ -207,6 +209,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all headers defined for a given hostname.
|
* Get all headers defined for a given hostname.
|
||||||
|
*
|
||||||
* @param host {string} The hostname
|
* @param host {string} The hostname
|
||||||
* @returns {string} return all headers defined for the hostname
|
* @returns {string} return all headers defined for the hostname
|
||||||
*/
|
*/
|
||||||
@ -217,6 +220,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a header for all future requests. Takes a hostname, a header and a value.
|
* Set a header for all future requests. Takes a hostname, a header and a value.
|
||||||
|
*
|
||||||
* @param host {string} The hostname to be used for scoping this header
|
* @param host {string} The hostname to be used for scoping this header
|
||||||
* @param header {string} The name of the header
|
* @param header {string} The name of the header
|
||||||
* @param value {string} The value of the header
|
* @param value {string} The value of the header
|
||||||
@ -226,6 +230,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the name of the data serializer which will be used for all future POST and PUT requests.
|
* Get the name of the data serializer which will be used for all future POST and PUT requests.
|
||||||
|
*
|
||||||
* @returns {string} returns the name of the configured data serializer
|
* @returns {string} returns the name of the configured data serializer
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -235,6 +240,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the data serializer which will be used for all future POST, PUT and PATCH requests. Takes a string representing the name of the serializer.
|
* Set the data serializer which will be used for all future POST, PUT and PATCH requests. Takes a string representing the name of the serializer.
|
||||||
|
*
|
||||||
* @param serializer {string} The name of the serializer.
|
* @param serializer {string} The name of the serializer.
|
||||||
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setdataserializer
|
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setdataserializer
|
||||||
*/
|
*/
|
||||||
@ -243,6 +249,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a custom cookie.
|
* Add a custom cookie.
|
||||||
|
*
|
||||||
* @param url {string} Scope of the cookie
|
* @param url {string} Scope of the cookie
|
||||||
* @param cookie {string} RFC compliant cookie string
|
* @param cookie {string} RFC compliant cookie string
|
||||||
*/
|
*/
|
||||||
@ -257,6 +264,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove cookies for given URL.
|
* Remove cookies for given URL.
|
||||||
|
*
|
||||||
* @param url {string}
|
* @param url {string}
|
||||||
* @param cb
|
* @param cb
|
||||||
*/
|
*/
|
||||||
@ -265,6 +273,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve cookie string for given URL.
|
* Resolve cookie string for given URL.
|
||||||
|
*
|
||||||
* @param url {string}
|
* @param url {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -274,6 +283,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get global request timeout value in seconds.
|
* Get global request timeout value in seconds.
|
||||||
|
*
|
||||||
* @returns {number} returns the global request timeout value
|
* @returns {number} returns the global request timeout value
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -283,6 +293,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set global request timeout value in seconds.
|
* Set global request timeout value in seconds.
|
||||||
|
*
|
||||||
* @param timeout {number} The timeout in seconds. Default 60
|
* @param timeout {number} The timeout in seconds. Default 60
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -290,6 +301,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve if it should follow redirects automatically.
|
* Resolve if it should follow redirects automatically.
|
||||||
|
*
|
||||||
* @returns {boolean} returns true if it is configured to follow redirects automatically
|
* @returns {boolean} returns true if it is configured to follow redirects automatically
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -299,6 +311,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure if it should follow redirects automatically.
|
* Configure if it should follow redirects automatically.
|
||||||
|
*
|
||||||
* @param follow {boolean} Set to false to disable following redirects automatically
|
* @param follow {boolean} Set to false to disable following redirects automatically
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -310,6 +323,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
* legacy: use legacy default behavior (< 2.0.3), excluding user installed CA certs (only for Android);
|
* legacy: use legacy default behavior (< 2.0.3), excluding user installed CA certs (only for Android);
|
||||||
* nocheck: disable SSL certificate checking and hostname verification, trusting all certs (meant to be used only for testing purposes);
|
* nocheck: disable SSL certificate checking and hostname verification, trusting all certs (meant to be used only for testing purposes);
|
||||||
* pinned: trust only provided certificates;
|
* pinned: trust only provided certificates;
|
||||||
|
*
|
||||||
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setservertrustmode
|
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setservertrustmode
|
||||||
* @param {string} mode server trust mode
|
* @param {string} mode server trust mode
|
||||||
*/
|
*/
|
||||||
@ -320,6 +334,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a POST request
|
* Make a POST request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param body {Object} The body of the request
|
* @param body {Object} The body of the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -332,6 +347,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a sync POST request
|
* Make a sync POST request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param body {Object} The body of the request
|
* @param body {Object} The body of the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -355,6 +371,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a GET request
|
* Make a GET request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param parameters {Object} Parameters to send with the request
|
* @param parameters {Object} Parameters to send with the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -367,6 +384,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a sync GET request
|
* Make a sync GET request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param parameters {Object} Parameters to send with the request
|
* @param parameters {Object} Parameters to send with the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -390,6 +408,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a PUT request
|
* Make a PUT request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param body {Object} The body of the request
|
* @param body {Object} The body of the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -402,6 +421,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a sync PUT request
|
* Make a sync PUT request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param body {Object} The body of the request
|
* @param body {Object} The body of the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -425,6 +445,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a PATCH request
|
* Make a PATCH request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param body {Object} The body of the request
|
* @param body {Object} The body of the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -437,6 +458,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a sync PATCH request
|
* Make a sync PATCH request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param body {Object} The body of the request
|
* @param body {Object} The body of the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -460,6 +482,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a DELETE request
|
* Make a DELETE request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param parameters {Object} Parameters to send with the request
|
* @param parameters {Object} Parameters to send with the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -472,6 +495,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a sync DELETE request
|
* Make a sync DELETE request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param parameters {Object} Parameters to send with the request
|
* @param parameters {Object} Parameters to send with the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -495,6 +519,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a HEAD request
|
* Make a HEAD request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param parameters {Object} Parameters to send with the request
|
* @param parameters {Object} Parameters to send with the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -507,6 +532,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a sync HEAD request
|
* Make a sync HEAD request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param parameters {Object} Parameters to send with the request
|
* @param parameters {Object} Parameters to send with the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -530,6 +556,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make an OPTIONS request
|
* Make an OPTIONS request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param parameters {Object} Parameters to send with the request
|
* @param parameters {Object} Parameters to send with the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -542,6 +569,7 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Make an sync OPTIONS request
|
* Make an sync OPTIONS request
|
||||||
|
*
|
||||||
* @param url {string} The url to send the request to
|
* @param url {string} The url to send the request to
|
||||||
* @param parameters {Object} Parameters to send with the request
|
* @param parameters {Object} Parameters to send with the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
@ -655,7 +683,6 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
* @param options.filePath {string} file path(s) to be used during upload and download see uploadFile and downloadFile for detailed information
|
* @param options.filePath {string} file path(s) to be used during upload and download see uploadFile and downloadFile for detailed information
|
||||||
* @param options.name {string} name(s) to be used during upload see uploadFile for detailed information
|
* @param options.name {string} name(s) to be used during upload see uploadFile for detailed information
|
||||||
* @param options.responseType {string} response type, defaults to text
|
* @param options.responseType {string} response type, defaults to text
|
||||||
*
|
|
||||||
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -691,7 +718,6 @@ export class ApproovHttp extends AwesomeCordovaNativePlugin {
|
|||||||
* @param options.responseType {string} response type, defaults to text
|
* @param options.responseType {string} response type, defaults to text
|
||||||
* @param success {function} A callback that is called when the request succeed
|
* @param success {function} A callback that is called when the request succeed
|
||||||
* @param failure {function} A callback that is called when the request failed
|
* @param failure {function} A callback that is called when the request failed
|
||||||
*
|
|
||||||
* @returns {string} returns a string that represents the requestId
|
* @returns {string} returns a string that represents the requestId
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -54,7 +54,6 @@ export interface AppsflyerInviteOptions {
|
|||||||
* @name Appsflyer
|
* @name Appsflyer
|
||||||
* @description
|
* @description
|
||||||
* Appsflyer Cordova SDK support for Attribution
|
* Appsflyer Cordova SDK support for Attribution
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Appsflyer } from '@awesome-cordova-plugins/appsflyer/ngx';
|
* import { Appsflyer } from '@awesome-cordova-plugins/appsflyer/ngx';
|
||||||
@ -68,7 +67,6 @@ export interface AppsflyerInviteOptions {
|
|||||||
* this.appsflyer.initSdk(options);
|
* this.appsflyer.initSdk(options);
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* AppsflyerOptions
|
* AppsflyerOptions
|
||||||
* AppsflyerEvent
|
* AppsflyerEvent
|
||||||
@ -86,6 +84,7 @@ export interface AppsflyerInviteOptions {
|
|||||||
export class Appsflyer extends AwesomeCordovaNativePlugin {
|
export class Appsflyer extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* initialize the SDK
|
* initialize the SDK
|
||||||
|
*
|
||||||
* @param {AppsflyerOptions} options
|
* @param {AppsflyerOptions} options
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -96,6 +95,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* These in-app events help you track how loyal users discover your app, and attribute them to specific campaigns/media-sources. Please take the time define the event/s you want to measure to allow you to track ROI (Return on Investment) and LTV (Lifetime Value).
|
* These in-app events help you track how loyal users discover your app, and attribute them to specific campaigns/media-sources. Please take the time define the event/s you want to measure to allow you to track ROI (Return on Investment) and LTV (Lifetime Value).
|
||||||
|
*
|
||||||
* @param {string} eventName custom event name, is presented in your dashboard
|
* @param {string} eventName custom event name, is presented in your dashboard
|
||||||
* @param {AppsflyerEvent} eventValues event details
|
* @param {AppsflyerEvent} eventValues event details
|
||||||
*/
|
*/
|
||||||
@ -104,6 +104,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
|
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
|
||||||
|
*
|
||||||
* @param {string} customerUserId user id
|
* @param {string} customerUserId user id
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -111,13 +112,16 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
|
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
|
||||||
|
*
|
||||||
* @param {boolean} customerUserId In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning.
|
* @param {boolean} customerUserId In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning.
|
||||||
|
* @param isStopTracking
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
Stop(isStopTracking: boolean): void {}
|
Stop(isStopTracking: boolean): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the data from Attribution
|
* Get the data from Attribution
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -138,6 +142,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows to pass GCM/FCM Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
|
* Allows to pass GCM/FCM Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
|
||||||
|
*
|
||||||
* @param {string} token GCM/FCM ProjectNumber
|
* @param {string} token GCM/FCM ProjectNumber
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -145,6 +150,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* (iOS) Allows to pass APN Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
|
* (iOS) Allows to pass APN Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
|
||||||
|
*
|
||||||
* @param {string} token APN Token
|
* @param {string} token APN Token
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -160,6 +166,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* End User Opt-Out (Optional) AppsFlyer provides you a method to opt‐out specific users from AppsFlyer analytics. This method complies with the latest privacy requirements and complies with Facebook data and privacy policies. Default is FALSE, meaning tracking is enabled by default.
|
* End User Opt-Out (Optional) AppsFlyer provides you a method to opt‐out specific users from AppsFlyer analytics. This method complies with the latest privacy requirements and complies with Facebook data and privacy policies. Default is FALSE, meaning tracking is enabled by default.
|
||||||
|
*
|
||||||
* @param {boolean} disable Set to true to opt-out user from tracking
|
* @param {boolean} disable Set to true to opt-out user from tracking
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -167,6 +174,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set AppsFlyer’s OneLink ID. Setting a valid OneLink ID will result in shortened User Invite links, when one is generated. The OneLink ID can be obtained on the AppsFlyer Dashboard.
|
* Set AppsFlyer’s OneLink ID. Setting a valid OneLink ID will result in shortened User Invite links, when one is generated. The OneLink ID can be obtained on the AppsFlyer Dashboard.
|
||||||
|
*
|
||||||
* @param {string} oneLinkId OneLink ID
|
* @param {string} oneLinkId OneLink ID
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -174,6 +182,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allowing your existing users to invite their friends and contacts as new users to your app can be a key growth factor for your app. AppsFlyer allows you to track and attribute new installs originating from user invites within your app.
|
* Allowing your existing users to invite their friends and contacts as new users to your app can be a key growth factor for your app. AppsFlyer allows you to track and attribute new installs originating from user invites within your app.
|
||||||
|
*
|
||||||
* @param {AppsflyerInviteOptions} options Parameters for Invite link
|
* @param {AppsflyerInviteOptions} options Parameters for Invite link
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -184,6 +193,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this call to track an impression use the following API call. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
|
* Use this call to track an impression use the following API call. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
|
||||||
|
*
|
||||||
* @param {string} appId Promoted Application ID
|
* @param {string} appId Promoted Application ID
|
||||||
* @param {string} campaign Promoted Campaign
|
* @param {string} campaign Promoted Campaign
|
||||||
*/
|
*/
|
||||||
@ -192,6 +202,7 @@ export class Appsflyer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this call to track the click and launch the app store's app page (via Browser)
|
* Use this call to track the click and launch the app store's app page (via Browser)
|
||||||
|
*
|
||||||
* @param {string} appId Promoted Application ID
|
* @param {string} appId Promoted Application ID
|
||||||
* @param {string} campaign Promoted Campaign
|
* @param {string} campaign Promoted Campaign
|
||||||
* @param {Object} options Additional Parameters to track
|
* @param {Object} options Additional Parameters to track
|
||||||
|
@ -14,7 +14,6 @@ export interface BackgroundFetchConfig {
|
|||||||
* iOS Background Fetch Implementation. See: https://developer.apple.com/reference/uikit/uiapplication#1657399
|
* iOS Background Fetch Implementation. See: https://developer.apple.com/reference/uikit/uiapplication#1657399
|
||||||
* iOS Background Fetch is basically an API which wakes up your app about every 15 minutes (during the user's prime-time hours) and provides your app exactly 30s of background running-time. This plugin will execute your provided callbackFn whenever a background-fetch event occurs. There is no way to increase the rate which a fetch-event occurs and this plugin sets the rate to the most frequent possible value of UIApplicationBackgroundFetchIntervalMinimum -- iOS determines the rate automatically based upon device usage and time-of-day (ie: fetch-rate is about ~15min during prime-time hours; less frequently when the user is presumed to be sleeping, at 3am for example).
|
* iOS Background Fetch is basically an API which wakes up your app about every 15 minutes (during the user's prime-time hours) and provides your app exactly 30s of background running-time. This plugin will execute your provided callbackFn whenever a background-fetch event occurs. There is no way to increase the rate which a fetch-event occurs and this plugin sets the rate to the most frequent possible value of UIApplicationBackgroundFetchIntervalMinimum -- iOS determines the rate automatically based upon device usage and time-of-day (ie: fetch-rate is about ~15min during prime-time hours; less frequently when the user is presumed to be sleeping, at 3am for example).
|
||||||
* For more detail, please see https://github.com/transistorsoft/cordova-plugin-background-fetch
|
* For more detail, please see https://github.com/transistorsoft/cordova-plugin-background-fetch
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
@ -48,7 +47,6 @@ export interface BackgroundFetchConfig {
|
|||||||
* ```
|
* ```
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* BackgroundFetchConfig
|
* BackgroundFetchConfig
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'BackgroundFetch',
|
pluginName: 'BackgroundFetch',
|
||||||
@ -63,7 +61,7 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
|
|||||||
* Configures the plugin's fetch callbackFn
|
* Configures the plugin's fetch callbackFn
|
||||||
*
|
*
|
||||||
* @param {BackgroundFetchConfig} config Configuration for plugin
|
* @param {BackgroundFetchConfig} config Configuration for plugin
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
@ -75,6 +73,7 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Start the background-fetch API.
|
* Start the background-fetch API.
|
||||||
* Your callbackFn provided to #configure will be executed each time a background-fetch event occurs. NOTE the #configure method automatically calls #start. You do not have to call this method after you #configure the plugin
|
* Your callbackFn provided to #configure will be executed each time a background-fetch event occurs. NOTE the #configure method automatically calls #start. You do not have to call this method after you #configure the plugin
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -84,6 +83,7 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop the background-fetch API from firing fetch events. Your callbackFn provided to #configure will no longer be executed.
|
* Stop the background-fetch API from firing fetch events. Your callbackFn provided to #configure will no longer be executed.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -93,6 +93,8 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* You MUST call this method in your fetch callbackFn provided to #configure in order to signal to iOS that your fetch action is complete. iOS provides only 30s of background-time for a fetch-event -- if you exceed this 30s, iOS will kill your app.
|
* You MUST call this method in your fetch callbackFn provided to #configure in order to signal to iOS that your fetch action is complete. iOS provides only 30s of background-time for a fetch-event -- if you exceed this 30s, iOS will kill your app.
|
||||||
|
*
|
||||||
|
* @param taskId
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true,
|
sync: true,
|
||||||
@ -101,6 +103,7 @@ export class BackgroundFetch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the status of the background-fetch
|
* Return the status of the background-fetch
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -305,6 +305,7 @@ export interface BackgroundGeolocationConfig {
|
|||||||
*
|
*
|
||||||
* Platform: Android
|
* Platform: Android
|
||||||
* Provider: all
|
* Provider: all
|
||||||
|
*
|
||||||
* @default "Background tracking"
|
* @default "Background tracking"
|
||||||
*/
|
*/
|
||||||
notificationTitle?: string;
|
notificationTitle?: string;
|
||||||
@ -493,7 +494,6 @@ export declare enum BackgroundGeolocationIOSActivity {
|
|||||||
* @description
|
* @description
|
||||||
* This plugin provides foreground and background geolocation with battery-saving "circular region monitoring" and "stop detection". For
|
* This plugin provides foreground and background geolocation with battery-saving "circular region monitoring" and "stop detection". For
|
||||||
* more detail, please see https://github.com/mauron85/cordova-plugin-background-geolocation
|
* more detail, please see https://github.com/mauron85/cordova-plugin-background-geolocation
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
*
|
*
|
||||||
* BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
|
* BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
|
||||||
@ -551,7 +551,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
* Configure the plugin.
|
* Configure the plugin.
|
||||||
*
|
*
|
||||||
* @param options {BackgroundGeolocationConfig} options An object of type Config
|
* @param options {BackgroundGeolocationConfig} options An object of type Config
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
configure(options: BackgroundGeolocationConfig): Promise<any> {
|
configure(options: BackgroundGeolocationConfig): Promise<any> {
|
||||||
@ -561,6 +561,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Turn ON the background-geolocation system.
|
* Turn ON the background-geolocation system.
|
||||||
* The user will be tracked whenever they suspend the app.
|
* The user will be tracked whenever they suspend the app.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -570,6 +571,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn OFF background-tracking
|
* Turn OFF background-tracking
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -579,6 +581,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Inform the native plugin that you're finished, the background-task may be completed
|
* Inform the native plugin that you're finished, the background-task may be completed
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -590,6 +593,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Force the plugin to enter "moving" or "stationary" state
|
* Force the plugin to enter "moving" or "stationary" state
|
||||||
|
*
|
||||||
* @param isMoving {boolean}
|
* @param isMoving {boolean}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -602,6 +606,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup configuration
|
* Setup configuration
|
||||||
|
*
|
||||||
* @param options {BackgroundGeolocationConfig}
|
* @param options {BackgroundGeolocationConfig}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -614,6 +619,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns current stationaryLocation if available. null if not
|
* Returns current stationaryLocation if available. null if not
|
||||||
|
*
|
||||||
* @returns {Promise<Location>}
|
* @returns {Promise<Location>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -626,6 +632,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Add a stationary-region listener. Whenever the devices enters "stationary-mode",
|
* Add a stationary-region listener. Whenever the devices enters "stationary-mode",
|
||||||
* your #success callback will be executed with #location param containing #radius of region
|
* your #success callback will be executed with #location param containing #radius of region
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -637,6 +644,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if location is enabled on the device
|
* Check if location is enabled on the device
|
||||||
|
*
|
||||||
* @returns {Promise<number>} Returns a promise with int argument that takes values 0, 1 (true).
|
* @returns {Promise<number>} Returns a promise with int argument that takes values 0, 1 (true).
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -662,6 +670,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
* Method can be used to detect user changes in location services settings.
|
* Method can be used to detect user changes in location services settings.
|
||||||
* If user enable or disable location services then success callback will be executed.
|
* If user enable or disable location services then success callback will be executed.
|
||||||
* In case or (SettingNotFoundException) fail callback will be executed.
|
* In case or (SettingNotFoundException) fail callback will be executed.
|
||||||
|
*
|
||||||
* @returns {Observable<number>}
|
* @returns {Observable<number>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -674,6 +683,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop watching for location mode changes.
|
* Stop watching for location mode changes.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -690,6 +700,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
* by the system
|
* by the system
|
||||||
* or
|
* or
|
||||||
* - option.debug is true
|
* - option.debug is true
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -701,6 +712,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
|
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -710,6 +722,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete stored location by given locationId.
|
* Delete stored location by given locationId.
|
||||||
|
*
|
||||||
* @param locationId {number}
|
* @param locationId {number}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -722,6 +735,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete all stored locations.
|
* Delete all stored locations.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -753,8 +767,10 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
|
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
|
||||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
|
|
||||||
*
|
*
|
||||||
|
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
|
||||||
|
* @param fromId
|
||||||
|
* @param minLevel
|
||||||
* @param limit {number} Limits the number of entries
|
* @param limit {number} Limits the number of entries
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -769,8 +785,8 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
|
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
|
||||||
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
|
|
||||||
*
|
*
|
||||||
|
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -820,6 +836,8 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* End background task indentified by taskKey (iOS only)
|
* End background task indentified by taskKey (iOS only)
|
||||||
|
*
|
||||||
|
* @param taskKey
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['IOS'],
|
platforms: ['IOS'],
|
||||||
@ -870,6 +888,7 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
* Register event listener.
|
* Register event listener.
|
||||||
*
|
*
|
||||||
* Triggered when server responded with "<code>285 Updates Not Required</code>" to post/sync request.
|
* Triggered when server responded with "<code>285 Updates Not Required</code>" to post/sync request.
|
||||||
|
*
|
||||||
* @param event
|
* @param event
|
||||||
* @param callbackFn
|
* @param callbackFn
|
||||||
*/
|
*/
|
||||||
@ -884,6 +903,8 @@ export class BackgroundGeolocation extends AwesomeCordovaNativePlugin {
|
|||||||
* Unregister all event listeners for given event.
|
* Unregister all event listeners for given event.
|
||||||
*
|
*
|
||||||
* If parameter <code>event</code> is not provided then all event listeners will be removed.
|
* If parameter <code>event</code> is not provided then all event listeners will be removed.
|
||||||
|
*
|
||||||
|
* @param event
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
removeAllListeners(event?: BackgroundGeolocationEvents): Promise<any> {
|
removeAllListeners(event?: BackgroundGeolocationEvents): Promise<any> {
|
||||||
|
@ -65,7 +65,6 @@ export interface BackgroundModeConfiguration {
|
|||||||
*
|
*
|
||||||
* this.backgroundMode.enable();
|
* this.backgroundMode.enable();
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* BackgroundModeConfiguration
|
* BackgroundModeConfiguration
|
||||||
*/
|
*/
|
||||||
@ -102,8 +101,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
* Enable or disable the background mode.
|
* Enable or disable the background mode.
|
||||||
*
|
*
|
||||||
* @param enable {boolean} The status to set for.
|
* @param enable {boolean} The status to set for.
|
||||||
*
|
* @returns {void}
|
||||||
* @return {void}
|
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true,
|
sync: true,
|
||||||
@ -115,8 +113,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* @param event {string} event The event's name.
|
* @param event {string} event The event's name.
|
||||||
* @param args {array} The callback's arguments.
|
* @param args {array} The callback's arguments.
|
||||||
*
|
* @returns {string}
|
||||||
* @return {string}
|
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true,
|
sync: true,
|
||||||
@ -127,6 +124,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if background mode is enabled or not.
|
* Checks if background mode is enabled or not.
|
||||||
|
*
|
||||||
* @returns {boolean} returns a boolean that indicates if the background mode is enabled.
|
* @returns {boolean} returns a boolean that indicates if the background mode is enabled.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -138,6 +136,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Can be used to get the information if the background mode is active.
|
* Can be used to get the information if the background mode is active.
|
||||||
|
*
|
||||||
* @returns {boolean} returns a boolean that indicates if the background mode is active.
|
* @returns {boolean} returns a boolean that indicates if the background mode is active.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -150,6 +149,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Overwrite the default settings.
|
* Overwrite the default settings.
|
||||||
* Available only for Android platform.
|
* Available only for Android platform.
|
||||||
|
*
|
||||||
* @param overrides {BackgroundModeConfiguration} Dict of options to be overridden.
|
* @param overrides {BackgroundModeConfiguration} Dict of options to be overridden.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -161,6 +161,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Modify the displayed information.
|
* Modify the displayed information.
|
||||||
* Available only for Android platform.
|
* Available only for Android platform.
|
||||||
|
*
|
||||||
* @param {BackgroundModeConfiguration} [options] Any options you want to update. See table below.
|
* @param {BackgroundModeConfiguration} [options] Any options you want to update. See table below.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -172,6 +173,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Register callback for given event.
|
* Register callback for given event.
|
||||||
* > Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
* > Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
||||||
|
*
|
||||||
* @param event {string} Event name
|
* @param event {string} Event name
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@ -186,6 +188,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
|
||||||
|
*
|
||||||
* @param event {string} Event name
|
* @param event {string} Event name
|
||||||
* @param callback {function} The function to be exec as callback.
|
* @param callback {function} The function to be exec as callback.
|
||||||
* @returns {Observable<any>}
|
* @returns {Observable<any>}
|
||||||
@ -242,6 +245,7 @@ export class BackgroundMode extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If the screen is off.
|
* If the screen is off.
|
||||||
|
*
|
||||||
* @param fn {function} Callback function to invoke with boolean arg.
|
* @param fn {function} Callback function to invoke with boolean arg.
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
|
@ -77,7 +77,6 @@ export class FileTransferManager {
|
|||||||
* @name BackgroundUpload
|
* @name BackgroundUpload
|
||||||
* @description
|
* @description
|
||||||
* This plugin does something
|
* This plugin does something
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { BackgroundUpload } from '@awesome-cordova-plugins/background-upload/ngx';
|
* import { BackgroundUpload } from '@awesome-cordova-plugins/background-upload/ngx';
|
||||||
|
@ -10,7 +10,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* Requires Cordova plugin: cordova-plugin-badge. For more info, please see the [Badge plugin docs](https://github.com/katzer/cordova-plugin-badge).
|
* Requires Cordova plugin: cordova-plugin-badge. For more info, please see the [Badge plugin docs](https://github.com/katzer/cordova-plugin-badge).
|
||||||
*
|
*
|
||||||
* Android Note: Badges have historically only been a feature implemented by third party launchers and not visible unless one of those launchers was being used (E.G. Samsung or Nova Launcher) and if enabled by the user. As of Android 8 (Oreo), [notification badges](https://developer.android.com/training/notify-user/badges) were introduced officially to reflect unread notifications. This plugin is unlikely to work as expected on devices running Android 8 or newer. Please see the [local notifications plugin docs](https://github.com/katzer/cordova-plugin-local-notifications) for more information on badge use with notifications.
|
* Android Note: Badges have historically only been a feature implemented by third party launchers and not visible unless one of those launchers was being used (E.G. Samsung or Nova Launcher) and if enabled by the user. As of Android 8 (Oreo), [notification badges](https://developer.android.com/training/notify-user/badges) were introduced officially to reflect unread notifications. This plugin is unlikely to work as expected on devices running Android 8 or newer. Please see the [local notifications plugin docs](https://github.com/katzer/cordova-plugin-local-notifications) for more information on badge use with notifications.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Badge } from '@awesome-cordova-plugins/badge/ngx';
|
* import { Badge } from '@awesome-cordova-plugins/badge/ngx';
|
||||||
@ -35,6 +34,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class Badge extends AwesomeCordovaNativePlugin {
|
export class Badge extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Clear the badge of the app icon.
|
* Clear the badge of the app icon.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -44,6 +44,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the badge of the app icon.
|
* Set the badge of the app icon.
|
||||||
|
*
|
||||||
* @param {number} badgeNumber The new badge number.
|
* @param {number} badgeNumber The new badge number.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -54,6 +55,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the badge of the app icon.
|
* Get the badge of the app icon.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -63,6 +65,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Increase the badge number.
|
* Increase the badge number.
|
||||||
|
*
|
||||||
* @param {number} increaseBy Count to add to the current badge number
|
* @param {number} increaseBy Count to add to the current badge number
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -73,6 +76,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Decrease the badge number.
|
* Decrease the badge number.
|
||||||
|
*
|
||||||
* @param {number} decreaseBy Count to subtract from the current badge number
|
* @param {number} decreaseBy Count to subtract from the current badge number
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -83,6 +87,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check support to show badges.
|
* Check support to show badges.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -92,6 +97,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the app has permission to show badges.
|
* Determine if the app has permission to show badges.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -101,6 +107,7 @@ export class Badge extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Register permission to set badge notifications
|
* Register permission to set badge notifications
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -86,7 +86,6 @@ export interface BarcodeScanResult {
|
|||||||
* The Barcode Scanner Plugin opens a camera view and automatically scans a barcode, returning the data back to you.
|
* The Barcode Scanner Plugin opens a camera view and automatically scans a barcode, returning the data back to you.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `phonegap-plugin-barcodescanner`. For more info, please see the [BarcodeScanner plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
|
* Requires Cordova plugin: `phonegap-plugin-barcodescanner`. For more info, please see the [BarcodeScanner plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { BarcodeScanner } from '@awesome-cordova-plugins/barcode-scanner/ngx';
|
* import { BarcodeScanner } from '@awesome-cordova-plugins/barcode-scanner/ngx';
|
||||||
@ -129,6 +128,7 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the barcode scanner.
|
* Open the barcode scanner.
|
||||||
|
*
|
||||||
* @param {BarcodeScannerOptions} [options] Optional options to pass to the scanner
|
* @param {BarcodeScannerOptions} [options] Optional options to pass to the scanner
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves with scanner data, or rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves with scanner data, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@ -142,6 +142,7 @@ export class BarcodeScanner extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Encodes data into a barcode.
|
* Encodes data into a barcode.
|
||||||
* NOTE: not well supported on Android
|
* NOTE: not well supported on Android
|
||||||
|
*
|
||||||
* @param {string} type Type of encoding
|
* @param {string} type Type of encoding
|
||||||
* @param {any} data Data to encode
|
* @param {any} data Data to encode
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
|
@ -18,7 +18,6 @@ export interface BatteryStatusResponse {
|
|||||||
* @name Battery Status
|
* @name Battery Status
|
||||||
* @description
|
* @description
|
||||||
* Requires Cordova plugin: cordova-plugin-batterystatus. For more info, please see the [BatteryStatus plugin docs](https://github.com/apache/cordova-plugin-battery-status).
|
* Requires Cordova plugin: cordova-plugin-batterystatus. For more info, please see the [BatteryStatus plugin docs](https://github.com/apache/cordova-plugin-battery-status).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { BatteryStatus } from '@awesome-cordova-plugins/battery-status/ngx';
|
* import { BatteryStatus } from '@awesome-cordova-plugins/battery-status/ngx';
|
||||||
@ -51,6 +50,7 @@ export interface BatteryStatusResponse {
|
|||||||
export class BatteryStatus extends AwesomeCordovaNativePlugin {
|
export class BatteryStatus extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Watch the change in battery level
|
* Watch the change in battery level
|
||||||
|
*
|
||||||
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
|
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -63,6 +63,7 @@ export class BatteryStatus extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch when the battery level goes low
|
* Watch when the battery level goes low
|
||||||
|
*
|
||||||
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
|
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -75,6 +76,7 @@ export class BatteryStatus extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch when the battery level goes to critical
|
* Watch when the battery level goes to critical
|
||||||
|
*
|
||||||
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
|
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @name BioCatch
|
* @name BioCatch
|
||||||
* @description
|
* @description
|
||||||
* BioCatch SDK Cordova support
|
* BioCatch SDK Cordova support
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { BioCatch } from '@awesome-cordova-plugins/biocatch';
|
* import { BioCatch } from '@awesome-cordova-plugins/biocatch';
|
||||||
@ -33,10 +32,11 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class BioCatch extends AwesomeCordovaNativePlugin {
|
export class BioCatch extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Start a session
|
* Start a session
|
||||||
|
*
|
||||||
* @param customerSessionID {String} Customer session id
|
* @param customerSessionID {String} Customer session id
|
||||||
* @param wupUrl {String} WUP server URL
|
* @param wupUrl {String} WUP server URL
|
||||||
* @param publicKey {String} Public Key
|
* @param publicKey {String} Public Key
|
||||||
* @return {Promise<void>} Returns a promise
|
* @returns {Promise<void>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
start(customerSessionID: string | null, wupUrl: string, publicKey: string | null): Promise<void> {
|
start(customerSessionID: string | null, wupUrl: string, publicKey: string | null): Promise<void> {
|
||||||
@ -45,7 +45,8 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Pause the session
|
* Pause the session
|
||||||
* @return {Promise<void>} Returns a promise
|
*
|
||||||
|
* @returns {Promise<void>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
pause(): Promise<void> {
|
pause(): Promise<void> {
|
||||||
@ -54,7 +55,8 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resume the session
|
* Resume the session
|
||||||
* @return {Promise<void>} Returns a promise
|
*
|
||||||
|
* @returns {Promise<void>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
resume(): Promise<void> {
|
resume(): Promise<void> {
|
||||||
@ -63,7 +65,8 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop the session
|
* Stop the session
|
||||||
* @return {Promise<void>} Returns a promise
|
*
|
||||||
|
* @returns {Promise<void>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stop(): Promise<void> {
|
stop(): Promise<void> {
|
||||||
@ -72,7 +75,8 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset the session
|
* Reset the session
|
||||||
* @return {Promise<void>} Returns a promise
|
*
|
||||||
|
* @returns {Promise<void>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
resetSession(): Promise<void> {
|
resetSession(): Promise<void> {
|
||||||
@ -81,8 +85,9 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the session context
|
* Change the session context
|
||||||
|
*
|
||||||
* @param contextName {String} Context name
|
* @param contextName {String} Context name
|
||||||
* @return {Promise<void>} Returns a promise
|
* @returns {Promise<void>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
changeContext(contextName: string): Promise<void> {
|
changeContext(contextName: string): Promise<void> {
|
||||||
@ -91,8 +96,9 @@ export class BioCatch extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the customer session ID
|
* Update the customer session ID
|
||||||
|
*
|
||||||
* @param customerSessionID {String}
|
* @param customerSessionID {String}
|
||||||
* @return {Promise<void>} Returns a promise
|
* @returns {Promise<void>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
updateCustomerSessionID(customerSessionID: string | null): Promise<void> {
|
updateCustomerSessionID(customerSessionID: string | null): Promise<void> {
|
||||||
|
@ -6,7 +6,6 @@ import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-pl
|
|||||||
* @description
|
* @description
|
||||||
* This plugin capture biometric(Iris and Fingerprint) and validate the user.
|
* This plugin capture biometric(Iris and Fingerprint) and validate the user.
|
||||||
* May be used in Banking domain
|
* May be used in Banking domain
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { BiometricWrapper } from '@awesome-cordova-plugins/biometric-wrapper/ngx';
|
* import { BiometricWrapper } from '@awesome-cordova-plugins/biometric-wrapper/ngx';
|
||||||
@ -37,7 +36,9 @@ import { Plugin, Cordova, AwesomeCordovaNativePlugin } from '@awesome-cordova-pl
|
|||||||
export class BiometricWrapper extends AwesomeCordovaNativePlugin {
|
export class BiometricWrapper extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* This function activate iris activity
|
* This function activate iris activity
|
||||||
* @return {Promise<any>} Returns a promise that resolves when iris data captured
|
*
|
||||||
|
* @param args
|
||||||
|
* @returns {Promise<any>} Returns a promise that resolves when iris data captured
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
activateIris(args: any): Promise<any> {
|
activateIris(args: any): Promise<any> {
|
||||||
@ -46,7 +47,9 @@ export class BiometricWrapper extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function activate fingerprint activity
|
* This function activate fingerprint activity
|
||||||
* @return {Promise<any>} Returns a promise that resolves when FP data captured
|
*
|
||||||
|
* @param args
|
||||||
|
* @returns {Promise<any>} Returns a promise that resolves when FP data captured
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
activateFingerprint(args: any): Promise<any> {
|
activateFingerprint(args: any): Promise<any> {
|
||||||
|
@ -23,7 +23,6 @@ export interface BLEScanOptions {
|
|||||||
* Advertising information is returned when scanning for peripherals. Service, characteristic, and property info is returned when connecting to a peripheral. All access is via service and characteristic UUIDs. The plugin manages handles internally.
|
* Advertising information is returned when scanning for peripherals. Service, characteristic, and property info is returned when connecting to a peripheral. All access is via service and characteristic UUIDs. The plugin manages handles internally.
|
||||||
*
|
*
|
||||||
* Simultaneous connections to multiple peripherals are supported.
|
* Simultaneous connections to multiple peripherals are supported.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
*
|
*
|
||||||
* ```typescript
|
* ```typescript
|
||||||
@ -171,7 +170,6 @@ export interface BLEScanOptions {
|
|||||||
* ## UUIDs
|
* ## UUIDs
|
||||||
*
|
*
|
||||||
* UUIDs are always strings and not numbers. Some 16-bit UUIDs, such as '2220' look like integers, but they're not. (The integer 2220 is 0x8AC in hex.) This isn't a problem with 128 bit UUIDs since they look like strings 82b9e6e1-593a-456f-be9b-9215160ebcac. All 16-bit UUIDs should also be passed to methods as strings.
|
* UUIDs are always strings and not numbers. Some 16-bit UUIDs, such as '2220' look like integers, but they're not. (The integer 2220 is 0x8AC in hex.) This isn't a problem with 128 bit UUIDs since they look like strings 82b9e6e1-593a-456f-be9b-9215160ebcac. All 16-bit UUIDs should also be passed to methods as strings.
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* BLEScanOptions
|
* BLEScanOptions
|
||||||
*/
|
*/
|
||||||
@ -231,6 +229,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports).
|
* Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports).
|
||||||
|
*
|
||||||
* @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices
|
* @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices
|
||||||
* @param {BLEScanOptions} options Options
|
* @param {BLEScanOptions} options Options
|
||||||
* @returns {Observable<any>} Returns an Observable that notifies of each peripheral discovered.
|
* @returns {Observable<any>} Returns an Observable that notifies of each peripheral discovered.
|
||||||
@ -265,6 +264,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set device pin.
|
* Set device pin.
|
||||||
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* BLE.setPin(pin).subscribe(success => {
|
* BLE.setPin(pin).subscribe(success => {
|
||||||
@ -275,7 +275,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
* @param {string} pin Pin of the device as a string
|
* @param {string} pin Pin of the device as a string
|
||||||
* @return {Observable<any>} Returns an Observable that notifies of success/failure.
|
* @returns {Observable<any>} Returns an Observable that notifies of success/failure.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -286,6 +286,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a peripheral.
|
* Connect to a peripheral.
|
||||||
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* BLE.connect('12:34:56:78:9A:BC').subscribe(peripheralData => {
|
* BLE.connect('12:34:56:78:9A:BC').subscribe(peripheralData => {
|
||||||
@ -296,7 +297,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @return {Observable<any>} Returns an Observable that notifies of connect/disconnect.
|
* @returns {Observable<any>} Returns an Observable that notifies of connect/disconnect.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -331,8 +332,8 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {function} connectCallback function that is called with peripheral data when the devices connects
|
* @param {Function} connectCallback function that is called with peripheral data when the devices connects
|
||||||
* @param {function} disconnectCallback function that is called with peripheral data when the devices disconnects
|
* @param {Function} disconnectCallback function that is called with peripheral data when the devices disconnects
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
autoConnect(deviceId: string, connectCallback: any, disconnectCallback: any) {
|
autoConnect(deviceId: string, connectCallback: any, disconnectCallback: any) {
|
||||||
@ -342,6 +343,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Request MTU size.
|
* Request MTU size.
|
||||||
* May be used to fix the Error 14 "Unlikely" on write requests with more than 20 bytes.
|
* May be used to fix the Error 14 "Unlikely" on write requests with more than 20 bytes.
|
||||||
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* BLE.requestMtu('12:34:56:78:9A:BC', 512).then(() => {
|
* BLE.requestMtu('12:34:56:78:9A:BC', 512).then(() => {
|
||||||
@ -352,7 +354,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* ```
|
* ```
|
||||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {number} mtuSize The new MTU size. (23 - 517, default is usually 23. Max recommended: 512)
|
* @param {number} mtuSize The new MTU size. (23 - 517, default is usually 23. Max recommended: 512)
|
||||||
* @return {Promise<any>} Returns a Promise.
|
* @returns {Promise<any>} Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestMtu(deviceId: string, mtuSize: number): Promise<any> {
|
requestMtu(deviceId: string, mtuSize: number): Promise<any> {
|
||||||
@ -364,6 +366,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* This method may fix a issue of old cached services and characteristics.
|
* This method may fix a issue of old cached services and characteristics.
|
||||||
* NOTE Since this uses an undocumented API it's not guaranteed to work.
|
* NOTE Since this uses an undocumented API it's not guaranteed to work.
|
||||||
* If you choose a too low delay time (timeoutMillis) the method could fail.
|
* If you choose a too low delay time (timeoutMillis) the method could fail.
|
||||||
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* BLE.refreshDeviceCache('12:34:56:78:9A:BC', 10000).then(discoveredServices => {
|
* BLE.refreshDeviceCache('12:34:56:78:9A:BC', 10000).then(discoveredServices => {
|
||||||
@ -374,7 +377,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* ```
|
* ```
|
||||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {number} timeoutMillis Delay in milliseconds after refresh before discovering services.
|
* @param {number} timeoutMillis Delay in milliseconds after refresh before discovering services.
|
||||||
* @return {Promise<any>} Returns a Promise.
|
* @returns {Promise<any>} Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
refreshDeviceCache(deviceId: string, timeoutMillis: number): Promise<any> {
|
refreshDeviceCache(deviceId: string, timeoutMillis: number): Promise<any> {
|
||||||
@ -383,6 +386,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from a peripheral.
|
* Disconnect from a peripheral.
|
||||||
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* BLE.disconnect('12:34:56:78:9A:BC').then(() => {
|
* BLE.disconnect('12:34:56:78:9A:BC').then(() => {
|
||||||
@ -390,7 +394,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @return {Promise<any>} Returns a Promise
|
* @returns {Promise<any>} Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
disconnect(deviceId: string): Promise<any> {
|
disconnect(deviceId: string): Promise<any> {
|
||||||
@ -403,7 +407,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {string} serviceUUID UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristicUUID UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @return {Promise<any>} Returns a Promise
|
* @returns {Promise<any>} Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
read(deviceId: string, serviceUUID: string, characteristicUUID: string): Promise<any> {
|
read(deviceId: string, serviceUUID: string, characteristicUUID: string): Promise<any> {
|
||||||
@ -412,6 +416,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the value of a characteristic.
|
* Write the value of a characteristic.
|
||||||
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* // send 1 byte to switch a light on
|
* // send 1 byte to switch a light on
|
||||||
@ -436,7 +441,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {string} serviceUUID UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristicUUID UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
|
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
|
||||||
* @return {Promise<any>} Returns a Promise
|
* @returns {Promise<any>} Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
write(deviceId: string, serviceUUID: string, characteristicUUID: string, value: ArrayBuffer): Promise<any> {
|
write(deviceId: string, serviceUUID: string, characteristicUUID: string, value: ArrayBuffer): Promise<any> {
|
||||||
@ -450,7 +455,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {string} serviceUUID UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristicUUID UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
|
* @param {ArrayBuffer} value Data to write to the characteristic, as an ArrayBuffer.
|
||||||
* @return {Promise<any>} Returns a Promise
|
* @returns {Promise<any>} Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
writeWithoutResponse(
|
writeWithoutResponse(
|
||||||
@ -471,11 +476,10 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* console.log(String.fromCharCode.apply(null, new Uint8Array(buffer));
|
* console.log(String.fromCharCode.apply(null, new Uint8Array(buffer));
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
* @param {string} serviceUUID UUID of the BLE service
|
* @param {string} serviceUUID UUID of the BLE service
|
||||||
* @param {string} characteristicUUID UUID of the BLE characteristic
|
* @param {string} characteristicUUID UUID of the BLE characteristic
|
||||||
* @return {Observable<any>} Returns an Observable that notifies of characteristic changes.
|
* @returns {Observable<any>} Returns an Observable that notifies of characteristic changes.
|
||||||
* The observer emit an array with data at index 0 and sequence order at index 1.
|
* The observer emit an array with data at index 0 and sequence order at index 1.
|
||||||
* The sequence order is always undefined on iOS. On android it leave the client to check the sequence order and reorder if needed
|
* The sequence order is always undefined on iOS. On android it leave the client to check the sequence order and reorder if needed
|
||||||
*/
|
*/
|
||||||
@ -539,8 +543,7 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* console.log("Bluetooth is " + state);
|
* console.log("Bluetooth is " + state);
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*
|
* @returns {Observable<any>} Returns an Observable that notifies when the Bluetooth is enabled or disabled on the device.
|
||||||
* @return {Observable<any>} Returns an Observable that notifies when the Bluetooth is enabled or disabled on the device.
|
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -585,7 +588,6 @@ export class BLE extends AwesomeCordovaNativePlugin {
|
|||||||
* Read the RSSI value on the device connection.
|
* Read the RSSI value on the device connection.
|
||||||
*
|
*
|
||||||
* @param {string} deviceId UUID or MAC address of the peripheral
|
* @param {string} deviceId UUID or MAC address of the peripheral
|
||||||
*
|
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -53,7 +53,6 @@ export interface BluetoothClassicSerialPortDevice {
|
|||||||
*
|
*
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'BluetoothClassicSerialPort',
|
pluginName: 'BluetoothClassicSerialPort',
|
||||||
@ -66,6 +65,7 @@ export interface BluetoothClassicSerialPortDevice {
|
|||||||
export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Connect to a Bluetooth device
|
* Connect to a Bluetooth device
|
||||||
|
*
|
||||||
* @param {string} deviceId Identifier of the remote device.
|
* @param {string} deviceId Identifier of the remote device.
|
||||||
* @param {string} deviceId this is the MAC address.
|
* @param {string} deviceId this is the MAC address.
|
||||||
* @param {string|string[]} interfaceId Identifier of the remote device
|
* @param {string|string[]} interfaceId Identifier of the remote device
|
||||||
@ -82,6 +82,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a Bluetooth device
|
* Connect to a Bluetooth device
|
||||||
|
*
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @param {string} deviceId Identifier of the remote device.
|
* @param {string} deviceId Identifier of the remote device.
|
||||||
* @param {number} deviceId this is the connection ID
|
* @param {number} deviceId this is the connection ID
|
||||||
@ -99,6 +100,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect insecurely to a Bluetooth device
|
* Connect insecurely to a Bluetooth device
|
||||||
|
*
|
||||||
* @param {string} deviceId Identifier of the remote device. For Android this is the MAC address
|
* @param {string} deviceId Identifier of the remote device. For Android this is the MAC address
|
||||||
* @param {string | string[]} interfaceArray This identifies the serial port to connect to. For Android this is the SPP_UUID.
|
* @param {string | string[]} interfaceArray This identifies the serial port to connect to. For Android this is the SPP_UUID.
|
||||||
* @returns {Promise<any>} Subscribe to connect.
|
* @returns {Promise<any>} Subscribe to connect.
|
||||||
@ -113,6 +115,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from the connected device
|
* Disconnect from the connected device
|
||||||
|
*
|
||||||
* @param {string} interfaceId The interface to Disconnect
|
* @param {string} interfaceId The interface to Disconnect
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -123,6 +126,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from all the connected device
|
* Disconnect from all the connected device
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -134,6 +138,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes data to the serial port
|
* Writes data to the serial port
|
||||||
|
*
|
||||||
* @param {string} interfaceId The interface to send the data to
|
* @param {string} interfaceId The interface to send the data to
|
||||||
* @param {ArrayBuffer | string | number[] | Uint8Array} data ArrayBuffer of data
|
* @param {ArrayBuffer | string | number[] | Uint8Array} data ArrayBuffer of data
|
||||||
* @returns {Promise<any>} returns a promise when data has been written
|
* @returns {Promise<any>} returns a promise when data has been written
|
||||||
@ -147,6 +152,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the number of bytes of data available
|
* Gets the number of bytes of data available
|
||||||
|
*
|
||||||
* @param {string} interfaceId The interface to check
|
* @param {string} interfaceId The interface to check
|
||||||
* @returns {Promise<any>} returns a promise that contains the available bytes
|
* @returns {Promise<any>} returns a promise that contains the available bytes
|
||||||
*/
|
*/
|
||||||
@ -159,6 +165,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function read reads the data from the buffer. The data is passed to the success callback as a String. Calling read when no data is available will pass an empty String to the callback.
|
* Function read reads the data from the buffer. The data is passed to the success callback as a String. Calling read when no data is available will pass an empty String to the callback.
|
||||||
|
*
|
||||||
* @param {string} interfaceId The interface to read
|
* @param {string} interfaceId The interface to read
|
||||||
* @returns {Promise<any>} returns a promise with data from the buffer
|
* @returns {Promise<any>} returns a promise with data from the buffer
|
||||||
*/
|
*/
|
||||||
@ -171,6 +178,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads data from the buffer until it reaches a delimiter
|
* Reads data from the buffer until it reaches a delimiter
|
||||||
|
*
|
||||||
* @param {string} interfaceId The interface to read
|
* @param {string} interfaceId The interface to read
|
||||||
* @param {string} delimiter string that you want to search until
|
* @param {string} delimiter string that you want to search until
|
||||||
* @returns {Observable<any>} returns a promise
|
* @returns {Observable<any>} returns a promise
|
||||||
@ -184,6 +192,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified when data is received
|
* Subscribe to be notified when data is received
|
||||||
|
*
|
||||||
* @param {string | string[]} interfaceId The interface to subscribe to
|
* @param {string | string[]} interfaceId The interface to subscribe to
|
||||||
* @param {string} delimiter the string you want to watch for
|
* @param {string} delimiter the string you want to watch for
|
||||||
* @returns {Observable<any>} returns an observable.
|
* @returns {Observable<any>} returns an observable.
|
||||||
@ -198,6 +207,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unsubscribe from a subscription
|
* Unsubscribe from a subscription
|
||||||
|
*
|
||||||
* @param {string | string[]} interfaceId The interface to unsubscribe from
|
* @param {string | string[]} interfaceId The interface to unsubscribe from
|
||||||
* @returns {Promise<any>} returns an promise.
|
* @returns {Promise<any>} returns an promise.
|
||||||
*/
|
*/
|
||||||
@ -210,6 +220,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified when data is received
|
* Subscribe to be notified when data is received
|
||||||
|
*
|
||||||
* @param {string | string[]} interfaceId The interface to subscribe to
|
* @param {string | string[]} interfaceId The interface to subscribe to
|
||||||
* @returns {Observable<any>} returns an observable
|
* @returns {Observable<any>} returns an observable
|
||||||
*/
|
*/
|
||||||
@ -223,6 +234,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unsubscribe from a subscription
|
* Unsubscribe from a subscription
|
||||||
|
*
|
||||||
* @param {string | string[]} interfaceId The interface to unsubscribe from
|
* @param {string | string[]} interfaceId The interface to unsubscribe from
|
||||||
* @returns {Promise<any>} returns an promise.
|
* @returns {Promise<any>} returns an promise.
|
||||||
*/
|
*/
|
||||||
@ -235,6 +247,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears data in buffer
|
* Clears data in buffer
|
||||||
|
*
|
||||||
* @param {string} interfaceId The interface to clear data
|
* @param {string} interfaceId The interface to clear data
|
||||||
* @returns {Promise<any>} returns a promise when completed
|
* @returns {Promise<any>} returns a promise when completed
|
||||||
*/
|
*/
|
||||||
@ -247,6 +260,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists bonded devices
|
* Lists bonded devices
|
||||||
|
*
|
||||||
* @returns {Promise<BluetoothClassicSerialPortDevice>} returns a promise
|
* @returns {Promise<BluetoothClassicSerialPortDevice>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -258,6 +272,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports the connection status
|
* Reports the connection status
|
||||||
|
*
|
||||||
* @param {string} interfaceId The interface to check
|
* @param {string} interfaceId The interface to check
|
||||||
* @returns {Promise<boolean>} returns a promise
|
* @returns {Promise<boolean>} returns a promise
|
||||||
*/
|
*/
|
||||||
@ -270,6 +285,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports if bluetooth is enabled
|
* Reports if bluetooth is enabled
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -281,6 +297,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the Bluetooth settings on the device
|
* Show the Bluetooth settings on the device
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -292,6 +309,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Bluetooth on the device
|
* Enable Bluetooth on the device
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -303,6 +321,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Discover unpaired devices
|
* Discover unpaired devices
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -314,6 +333,7 @@ export class BluetoothClassicSerialPort extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
|
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
|
||||||
|
*
|
||||||
* @returns {Observable<any>} Returns an observable
|
* @returns {Observable<any>} Returns an observable
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -426,7 +426,6 @@ export interface AdapterInfo {
|
|||||||
* This plugin has the most complete implementation for interacting with Bluetooth LE devices on Android, iOS and partially Windows.
|
* This plugin has the most complete implementation for interacting with Bluetooth LE devices on Android, iOS and partially Windows.
|
||||||
* It's a wrap around [randdusing/cordova-plugin-bluetoothle](https://github.com/randdusing/cordova-plugin-bluetoothle/blob/master/readme.md) cordova plugin for Ionic.
|
* It's a wrap around [randdusing/cordova-plugin-bluetoothle](https://github.com/randdusing/cordova-plugin-bluetoothle/blob/master/readme.md) cordova plugin for Ionic.
|
||||||
* It supports peripheral **and** central modes and covers most of the API methods available on Android and iOS.
|
* It supports peripheral **and** central modes and covers most of the API methods available on Android and iOS.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { BluetoothLE } from '@awesome-cordova-plugins/bluetooth-le/ngx';
|
* import { BluetoothLE } from '@awesome-cordova-plugins/bluetooth-le/ngx';
|
||||||
@ -446,7 +445,6 @@ export interface AdapterInfo {
|
|||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'BluetoothLE',
|
pluginName: 'BluetoothLE',
|
||||||
@ -532,6 +530,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name retrieveConnected
|
* @name retrieveConnected
|
||||||
|
* @param params
|
||||||
|
* @param params.services
|
||||||
* Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan.
|
* Retrieved paired Bluetooth LE devices. In iOS, devices that are "paired" to will not return during a normal scan.
|
||||||
* Callback is "instant" compared to a scan.
|
* Callback is "instant" compared to a scan.
|
||||||
* @param {{ services: string[] }} An array of service IDs to filter the retrieval by. If no service IDs are specified, no devices will be returned.
|
* @param {{ services: string[] }} An array of service IDs to filter the retrieval by. If no service IDs are specified, no devices will be returned.
|
||||||
@ -544,6 +544,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name bond (Android)
|
* @name bond (Android)
|
||||||
|
* @param params.address
|
||||||
* Bond with a device.
|
* Bond with a device.
|
||||||
* The device doesn't need to be connected to initiate bonding. Android support only.
|
* The device doesn't need to be connected to initiate bonding. Android support only.
|
||||||
* @param {{ address: string }} params The address/identifier provided by the scan's return object
|
* @param {{ address: string }} params The address/identifier provided by the scan's return object
|
||||||
@ -562,6 +563,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name unbond (Android)
|
* @name unbond (Android)
|
||||||
|
* @param params.address
|
||||||
* Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only.
|
* Unbond with a device. The device doesn't need to be connected to initiate bonding. Android support only.
|
||||||
* @param {{address: string}} params The address/identifier
|
* @param {{address: string}} params The address/identifier
|
||||||
* @returns {Promise<{ status: DeviceInfo }>}
|
* @returns {Promise<{ status: DeviceInfo }>}
|
||||||
@ -579,7 +581,6 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
* @param connectSuccess The success callback that is passed with device object
|
* @param connectSuccess The success callback that is passed with device object
|
||||||
* @param connectError The callback that will be triggered when the connect operation fails
|
* @param connectError The callback that will be triggered when the connect operation fails
|
||||||
* @param params The connection params
|
* @param params The connection params
|
||||||
*
|
|
||||||
* @param {ConnectionParams} params
|
* @param {ConnectionParams} params
|
||||||
* @returns {(Observable<{ status: DeviceInfo }>)}
|
* @returns {(Observable<{ status: DeviceInfo }>)}
|
||||||
* success: device object with status
|
* success: device object with status
|
||||||
@ -592,6 +593,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name reconnect
|
* @name reconnect
|
||||||
|
* @param params.address
|
||||||
* Reconnect to a previously connected Bluetooth device
|
* Reconnect to a previously connected Bluetooth device
|
||||||
* @param {{address: string}} params The address/identifier
|
* @param {{address: string}} params The address/identifier
|
||||||
* @returns {(Observable<DeviceInfo>)}
|
* @returns {(Observable<DeviceInfo>)}
|
||||||
@ -603,6 +605,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name disconnect
|
* @name disconnect
|
||||||
|
* @param params.address
|
||||||
* Disconnect from a Bluetooth LE device.
|
* Disconnect from a Bluetooth LE device.
|
||||||
* Note: It's simpler to just call close(). Starting with iOS 10, disconnecting before closing seems required!
|
* Note: It's simpler to just call close(). Starting with iOS 10, disconnecting before closing seems required!
|
||||||
* @param {{address: string}} params The address/identifier
|
* @param {{address: string}} params The address/identifier
|
||||||
@ -615,6 +618,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name close
|
* @name close
|
||||||
|
* @param params.address
|
||||||
* Close/dispose a Bluetooth LE device.
|
* Close/dispose a Bluetooth LE device.
|
||||||
* Prior to 2.7.0, you needed to disconnect to the device before closing, but this is no longer the case.
|
* Prior to 2.7.0, you needed to disconnect to the device before closing, but this is no longer the case.
|
||||||
* Starting with iOS 10, disconnecting before closing seems required!
|
* Starting with iOS 10, disconnecting before closing seems required!
|
||||||
@ -628,6 +632,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name discover
|
* @name discover
|
||||||
|
* @param params.address
|
||||||
|
* @param params.clearCache
|
||||||
* Discover all the devices services, characteristics and descriptors.
|
* Discover all the devices services, characteristics and descriptors.
|
||||||
* Doesn't need to be called again after disconnecting and then reconnecting.
|
* Doesn't need to be called again after disconnecting and then reconnecting.
|
||||||
* If using iOS, you shouldn't use discover and services/characteristics/descriptors on the same device.
|
* If using iOS, you shouldn't use discover and services/characteristics/descriptors on the same device.
|
||||||
@ -647,6 +653,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name services (iOS)
|
* @name services (iOS)
|
||||||
|
* @param params.address
|
||||||
|
* @param params.services
|
||||||
* Discover the device's services.
|
* Discover the device's services.
|
||||||
* Not providing an array of services will return all services and take longer to discover. iOS support only.
|
* Not providing an array of services will return all services and take longer to discover. iOS support only.
|
||||||
* @param {{address: string, services: string[]}} params
|
* @param {{address: string, services: string[]}} params
|
||||||
@ -764,6 +772,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name rssi
|
* @name rssi
|
||||||
|
* @param params.address
|
||||||
* Read RSSI of a connected device. RSSI is also returned with scanning.
|
* Read RSSI of a connected device. RSSI is also returned with scanning.
|
||||||
* @param {{ address: string }} params
|
* @param {{ address: string }} params
|
||||||
* @returns {Promise< RSSI >}
|
* @returns {Promise< RSSI >}
|
||||||
@ -775,6 +784,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name mtu (Android, Android 5+)
|
* @name mtu (Android, Android 5+)
|
||||||
|
* @param params.address
|
||||||
|
* @param params.mtu
|
||||||
* Set MTU of a connected device. Android only.
|
* Set MTU of a connected device. Android only.
|
||||||
* @param {{ address: string, mtu: number }} params
|
* @param {{ address: string, mtu: number }} params
|
||||||
* @returns {Promise< MTU >}
|
* @returns {Promise< MTU >}
|
||||||
@ -786,6 +797,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name requestConnectionPriority (Android, Android 5+)
|
* @name requestConnectionPriority (Android, Android 5+)
|
||||||
|
* @param params.address
|
||||||
|
* @param params.connectionPriority
|
||||||
* Request a change in the connection priority to improve throughput when transfer large amounts of data via BLE.
|
* Request a change in the connection priority to improve throughput when transfer large amounts of data via BLE.
|
||||||
* Android support only. iOS will return error.
|
* Android support only. iOS will return error.
|
||||||
* @param {{ address: string, connectionPriority: ConnectionPriority }} params
|
* @param {{ address: string, connectionPriority: ConnectionPriority }} params
|
||||||
@ -828,6 +841,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name isBonded (Android)
|
* @name isBonded (Android)
|
||||||
|
* @param params.address
|
||||||
* Determine whether the device is bonded or not, or error if not initialized. Android support only.
|
* Determine whether the device is bonded or not, or error if not initialized. Android support only.
|
||||||
* @param {{ address: string }} params
|
* @param {{ address: string }} params
|
||||||
* @returns {Promise<BondedStatus>}
|
* @returns {Promise<BondedStatus>}
|
||||||
@ -839,6 +853,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name wasConnected
|
* @name wasConnected
|
||||||
|
* @param params.address
|
||||||
* Determine whether the device was connected, or error if not initialized.
|
* Determine whether the device was connected, or error if not initialized.
|
||||||
* @param {{ address: string }} params
|
* @param {{ address: string }} params
|
||||||
* @returns {Promise<PrevConnectionStatus>}
|
* @returns {Promise<PrevConnectionStatus>}
|
||||||
@ -850,6 +865,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name isConnected
|
* @name isConnected
|
||||||
|
* @param params.address
|
||||||
* Determine whether the device is connected, or error if not initialized or never connected to device
|
* Determine whether the device is connected, or error if not initialized or never connected to device
|
||||||
* @param {{ address: string }} params
|
* @param {{ address: string }} params
|
||||||
* @returns {Promise<CurrConnectionStatus>}
|
* @returns {Promise<CurrConnectionStatus>}
|
||||||
@ -861,6 +877,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name isDiscovered
|
* @name isDiscovered
|
||||||
|
* @param params.address
|
||||||
* Determine whether the device's characteristics and descriptors have been discovered, or error if not initialized or not connected to device.
|
* Determine whether the device's characteristics and descriptors have been discovered, or error if not initialized or not connected to device.
|
||||||
* @param {{ address: string }} params
|
* @param {{ address: string }} params
|
||||||
* @returns {Promise<DiscoverStatus>}
|
* @returns {Promise<DiscoverStatus>}
|
||||||
@ -926,6 +943,8 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name addService
|
* @name addService
|
||||||
|
* @param params.service
|
||||||
|
* @param params.characteristics
|
||||||
* Add a service with characteristics and descriptors. If more than one service is added, add them sequentially
|
* Add a service with characteristics and descriptors. If more than one service is added, add them sequentially
|
||||||
* @param {{ service: string, characteristics: Characteristic[] }} params
|
* @param {{ service: string, characteristics: Characteristic[] }} params
|
||||||
* @returns {Promise<{ service: string, status: Status }>}
|
* @returns {Promise<{ service: string, status: Status }>}
|
||||||
@ -940,6 +959,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name removeService
|
* @name removeService
|
||||||
|
* @param params.service
|
||||||
* Remove a service
|
* Remove a service
|
||||||
* @param {{ service: string }} params
|
* @param {{ service: string }} params
|
||||||
* @returns {Promise<{ service: string, status: Status }>}
|
* @returns {Promise<{ service: string, status: Status }>}
|
||||||
@ -1018,6 +1038,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name encodedStringToBytes
|
* @name encodedStringToBytes
|
||||||
|
* @param value
|
||||||
* Helper function to convert a base64 encoded string from a characteristic or descriptor value into a uint8Array object
|
* Helper function to convert a base64 encoded string from a characteristic or descriptor value into a uint8Array object
|
||||||
* @param {string} str
|
* @param {string} str
|
||||||
* @returns {Uint8Array}
|
* @returns {Uint8Array}
|
||||||
@ -1029,6 +1050,7 @@ export class BluetoothLE extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name bytesToEncodedString
|
* @name bytesToEncodedString
|
||||||
|
* @param value
|
||||||
* Helper function to convert a unit8Array to a base64 encoded string for a characteric or descriptor write
|
* Helper function to convert a unit8Array to a base64 encoded string for a characteric or descriptor write
|
||||||
* @param {Uint8Array} bytes
|
* @param {Uint8Array} bytes
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
|
@ -41,6 +41,7 @@ import { Observable } from 'rxjs';
|
|||||||
export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Connect to a Bluetooth device
|
* Connect to a Bluetooth device
|
||||||
|
*
|
||||||
* @param {string} macAddress_or_uuid Identifier of the remote device
|
* @param {string} macAddress_or_uuid Identifier of the remote device
|
||||||
* @returns {Observable<any>} Subscribe to connect, unsubscribe to disconnect.
|
* @returns {Observable<any>} Subscribe to connect, unsubscribe to disconnect.
|
||||||
*/
|
*/
|
||||||
@ -55,6 +56,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect insecurely to a Bluetooth device
|
* Connect insecurely to a Bluetooth device
|
||||||
|
*
|
||||||
* @param {string} macAddress Identifier of the remote device
|
* @param {string} macAddress Identifier of the remote device
|
||||||
* @returns {Observable<any>} Subscribe to connect, unsubscribe to disconnect.
|
* @returns {Observable<any>} Subscribe to connect, unsubscribe to disconnect.
|
||||||
*/
|
*/
|
||||||
@ -69,6 +71,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from the connected device
|
* Disconnect from the connected device
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -78,6 +81,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes data to the serial port
|
* Writes data to the serial port
|
||||||
|
*
|
||||||
* @param {any} data ArrayBuffer of data
|
* @param {any} data ArrayBuffer of data
|
||||||
* @returns {Promise<any>} returns a promise when data has been written
|
* @returns {Promise<any>} returns a promise when data has been written
|
||||||
*/
|
*/
|
||||||
@ -90,6 +94,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the number of bytes of data available
|
* Gets the number of bytes of data available
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise that contains the available bytes
|
* @returns {Promise<any>} returns a promise that contains the available bytes
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -101,6 +106,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads data from the buffer
|
* Reads data from the buffer
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise with data from the buffer
|
* @returns {Promise<any>} returns a promise with data from the buffer
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -112,6 +118,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads data from the buffer until it reaches a delimiter
|
* Reads data from the buffer until it reaches a delimiter
|
||||||
|
*
|
||||||
* @param {string} delimiter string that you want to search until
|
* @param {string} delimiter string that you want to search until
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@ -124,6 +131,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified when data is received
|
* Subscribe to be notified when data is received
|
||||||
|
*
|
||||||
* @param {string} delimiter the string you want to watch for
|
* @param {string} delimiter the string you want to watch for
|
||||||
* @returns {Observable<any>} returns an observable.
|
* @returns {Observable<any>} returns an observable.
|
||||||
*/
|
*/
|
||||||
@ -138,6 +146,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified when data is received
|
* Subscribe to be notified when data is received
|
||||||
|
*
|
||||||
* @returns {Observable<any>} returns an observable
|
* @returns {Observable<any>} returns an observable
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -151,6 +160,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears data in buffer
|
* Clears data in buffer
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise when completed
|
* @returns {Promise<any>} returns a promise when completed
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -162,6 +172,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists bonded devices
|
* Lists bonded devices
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -173,6 +184,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports if bluetooth is enabled
|
* Reports if bluetooth is enabled
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -184,6 +196,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reports the connection status
|
* Reports the connection status
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -195,6 +208,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the RSSI from the connected peripheral
|
* Reads the RSSI from the connected peripheral
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -206,6 +220,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the Bluetooth settings on the device
|
* Show the Bluetooth settings on the device
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -217,6 +232,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Bluetooth on the device
|
* Enable Bluetooth on the device
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -228,6 +244,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Discover unpaired devices
|
* Discover unpaired devices
|
||||||
|
*
|
||||||
* @returns {Promise<any>} returns a promise
|
* @returns {Promise<any>} returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -239,6 +256,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
|
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
|
||||||
|
*
|
||||||
* @returns {Observable<any>} Returns an observable
|
* @returns {Observable<any>} Returns an observable
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -252,6 +270,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the human readable device name that is broadcasted to other devices
|
* Sets the human readable device name that is broadcasted to other devices
|
||||||
|
*
|
||||||
* @param {string} newName Desired name of device
|
* @param {string} newName Desired name of device
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -262,6 +281,7 @@ export class BluetoothSerial extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes the device discoverable by other devices
|
* Makes the device discoverable by other devices
|
||||||
|
*
|
||||||
* @param {number} discoverableDuration Desired number of seconds device should be discoverable for
|
* @param {number} discoverableDuration Desired number of seconds device should be discoverable for
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -51,7 +51,6 @@ export interface BranchUniversalObject {
|
|||||||
* @name BranchIo
|
* @name BranchIo
|
||||||
* @description
|
* @description
|
||||||
* Branch.io is an attribution service for deeplinking and invitation links
|
* Branch.io is an attribution service for deeplinking and invitation links
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* import { BranchIo } from '@awesome-cordova-plugins/branch-io/ngx';
|
* import { BranchIo } from '@awesome-cordova-plugins/branch-io/ngx';
|
||||||
@ -60,13 +59,11 @@ export interface BranchUniversalObject {
|
|||||||
* constructor(private branch: BranchIo) { }
|
* constructor(private branch: BranchIo) { }
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* BranchIoPromise
|
* BranchIoPromise
|
||||||
* BranchIoAnalytics
|
* BranchIoAnalytics
|
||||||
* BranchIoProperties
|
* BranchIoProperties
|
||||||
* BranchUniversalObject
|
* BranchUniversalObject
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'BranchIo',
|
pluginName: 'BranchIo',
|
||||||
@ -79,8 +76,9 @@ export interface BranchUniversalObject {
|
|||||||
export class BranchIo extends AwesomeCordovaNativePlugin {
|
export class BranchIo extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* for development and debugging only
|
* for development and debugging only
|
||||||
|
*
|
||||||
* @param {boolean} enable Enable debug
|
* @param {boolean} enable Enable debug
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
setDebug(enable: boolean): Promise<any> {
|
setDebug(enable: boolean): Promise<any> {
|
||||||
@ -89,8 +87,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable tracking
|
* Disable tracking
|
||||||
|
*
|
||||||
* @param {boolean} disable disable tracking
|
* @param {boolean} disable disable tracking
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
disableTracking(disable: boolean): Promise<any> {
|
disableTracking(disable: boolean): Promise<any> {
|
||||||
@ -99,7 +98,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes Branch
|
* Initializes Branch
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
initSession(): Promise<BranchIoPromise> {
|
initSession(): Promise<BranchIoPromise> {
|
||||||
@ -108,7 +108,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes Branch with callback
|
* Initializes Branch with callback
|
||||||
* @return {Observable<any>}
|
*
|
||||||
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ observable: true })
|
@Cordova({ observable: true })
|
||||||
initSessionWithCallback(): Observable<BranchIoPromise> {
|
initSessionWithCallback(): Observable<BranchIoPromise> {
|
||||||
@ -117,7 +118,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Request Metadata
|
* Set Request Metadata
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
setRequestMetadata(): Promise<any> {
|
setRequestMetadata(): Promise<any> {
|
||||||
@ -126,8 +128,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* for better Android matching
|
* for better Android matching
|
||||||
|
*
|
||||||
* @param {string} linkDomain LinkDomain at branch
|
* @param {string} linkDomain LinkDomain at branch
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
setCookieBasedMatching(linkDomain: string): Promise<any> {
|
setCookieBasedMatching(linkDomain: string): Promise<any> {
|
||||||
@ -136,7 +139,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* First data
|
* First data
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getFirstReferringParams(): Promise<any> {
|
getFirstReferringParams(): Promise<any> {
|
||||||
@ -145,7 +149,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Latest data
|
* Latest data
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
getLatestReferringParams(): Promise<any> {
|
getLatestReferringParams(): Promise<any> {
|
||||||
@ -154,8 +159,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set identy of user
|
* Set identy of user
|
||||||
|
*
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
setIdentity(userId: string): Promise<any> {
|
setIdentity(userId: string): Promise<any> {
|
||||||
@ -164,7 +170,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Logout user
|
* Logout user
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
logout(): Promise<any> {
|
logout(): Promise<any> {
|
||||||
@ -173,9 +180,10 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a custom event
|
* Registers a custom event
|
||||||
|
*
|
||||||
* @param {string} eventName
|
* @param {string} eventName
|
||||||
* @param {any} metaData
|
* @param {any} metaData
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
userCompletedAction(eventName: string, metaData: any): Promise<any> {
|
userCompletedAction(eventName: string, metaData: any): Promise<any> {
|
||||||
@ -184,10 +192,11 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send Commerce Event
|
* Send Commerce Event
|
||||||
|
*
|
||||||
* @deprecated since v.3.1.0. As of https://help.branch.io/developers-hub/docs/cordova-phonegap-ionic#track-commerce
|
* @deprecated since v.3.1.0. As of https://help.branch.io/developers-hub/docs/cordova-phonegap-ionic#track-commerce
|
||||||
* @param {string} event
|
* @param {string} event
|
||||||
* @param {any} metaData
|
* @param {any} metaData
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
sendCommerceEvent(event: string, metaData: any): Promise<any> {
|
sendCommerceEvent(event: string, metaData: any): Promise<any> {
|
||||||
@ -196,9 +205,10 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Send Branch Event
|
* Send Branch Event
|
||||||
|
*
|
||||||
* @param {string} event
|
* @param {string} event
|
||||||
* @param {any} metaData
|
* @param {any} metaData
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
sendBranchEvent(event: string, metaData: any): Promise<any> {
|
sendBranchEvent(event: string, metaData: any): Promise<any> {
|
||||||
@ -207,8 +217,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* create a branchUniversalObj variable to reference with other Branch methods
|
* create a branchUniversalObj variable to reference with other Branch methods
|
||||||
|
*
|
||||||
* @param {BranchIoProperties} properties
|
* @param {BranchIoProperties} properties
|
||||||
* @return {Promise<BranchUniversalObject>}
|
* @returns {Promise<BranchUniversalObject>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
createBranchUniversalObject(properties: BranchIoProperties): Promise<BranchUniversalObject> {
|
createBranchUniversalObject(properties: BranchIoProperties): Promise<BranchUniversalObject> {
|
||||||
@ -217,8 +228,9 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Load credits
|
* Load credits
|
||||||
|
*
|
||||||
* @param {any} bucket
|
* @param {any} bucket
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
loadRewards(bucket: any): Promise<any> {
|
loadRewards(bucket: any): Promise<any> {
|
||||||
@ -227,9 +239,10 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Redeem Rewards
|
* Redeem Rewards
|
||||||
|
*
|
||||||
* @param {string} value
|
* @param {string} value
|
||||||
* @param {any} bucket
|
* @param {any} bucket
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
redeemRewards(value: string, bucket: any): Promise<any> {
|
redeemRewards(value: string, bucket: any): Promise<any> {
|
||||||
@ -238,7 +251,8 @@ export class BranchIo extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show credit history
|
* Show credit history
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ otherPromise: true })
|
@Cordova({ otherPromise: true })
|
||||||
creditHistory(): Promise<any> {
|
creditHistory(): Promise<any> {
|
||||||
|
@ -20,7 +20,6 @@ export type EventData = object | AndroidData | null;
|
|||||||
* @name Broadcaster
|
* @name Broadcaster
|
||||||
* @description
|
* @description
|
||||||
* This plugin adds exchanging events between native code and your app.
|
* This plugin adds exchanging events between native code and your app.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Broadcaster } from '@awesome-cordova-plugins/broadcaster/ngx';
|
* import { Broadcaster } from '@awesome-cordova-plugins/broadcaster/ngx';
|
||||||
@ -48,9 +47,10 @@ export type EventData = object | AndroidData | null;
|
|||||||
export class Broadcaster extends AwesomeCordovaNativePlugin {
|
export class Broadcaster extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* This function listen to an event sent from the native code
|
* This function listen to an event sent from the native code
|
||||||
|
*
|
||||||
* @param {string} eventName
|
* @param {string} eventName
|
||||||
* @param {boolean} isGlobal Valid only for Android. It allows to listen for global messages(i.e. intents)
|
* @param {boolean} isGlobal Valid only for Android. It allows to listen for global messages(i.e. intents)
|
||||||
* @return {Observable<any>} Returns an observable to watch when an event is received
|
* @returns {Observable<any>} Returns an observable to watch when an event is received
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -63,13 +63,14 @@ export class Broadcaster extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function sends data to the native code
|
* This function sends data to the native code
|
||||||
|
*
|
||||||
* @param {string} eventName
|
* @param {string} eventName
|
||||||
* @param {boolean} isGlobalOrEventData means that message is global (valid only on Android)
|
* @param {boolean} isGlobalOrEventData means that message is global (valid only on Android)
|
||||||
* @param {AndroidData} isGlobalOrEventData allows to specify 'flags` and 'category' (valid only on Android)
|
* @param {AndroidData} isGlobalOrEventData allows to specify 'flags` and 'category' (valid only on Android)
|
||||||
* @param {object} isGlobalOrEventData allows to specify a generic object containing custom event data (all platform)
|
* @param {object} isGlobalOrEventData allows to specify a generic object containing custom event data (all platform)
|
||||||
* @param {AndroidData} [data] if isGlobal is set, allows to specify 'flags` and 'category' if isGlobal is set (valid only on Android)
|
* @param {AndroidData} [data] if isGlobal is set, allows to specify 'flags` and 'category' if isGlobal is set (valid only on Android)
|
||||||
* @param {object} [data] if isGlobal is set, allows to specify a generic object containing custom event data (all platform)
|
* @param {object} [data] if isGlobal is set, allows to specify a generic object containing custom event data (all platform)
|
||||||
* @return {Promise<any>} Returns a promise that resolves when an event is successfully fired
|
* @returns {Promise<any>} Returns a promise that resolves when an event is successfully fired
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
fireNativeEvent(eventName: string, isGlobalOrEventData: boolean | EventData, data?: EventData): Promise<any> {
|
fireNativeEvent(eventName: string, isGlobalOrEventData: boolean | EventData, data?: EventData): Promise<any> {
|
||||||
|
@ -5,7 +5,6 @@ import { Plugin, CordovaProperty, AwesomeCordovaNativePlugin } from '@awesome-co
|
|||||||
* @name Build Info
|
* @name Build Info
|
||||||
* @description
|
* @description
|
||||||
* This plugin provides build information.
|
* This plugin provides build information.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* import { BuildInfo } from '@awesome-cordova-plugins/build-info/ngx';
|
* import { BuildInfo } from '@awesome-cordova-plugins/build-info/ngx';
|
||||||
|
@ -63,8 +63,6 @@ export interface NameOrOptions {
|
|||||||
* This plugin allows you to add events to the Calendar of the mobile device.
|
* This plugin allows you to add events to the Calendar of the mobile device.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `cordova-plugin-calendar`. For more info, please see the [Calendar plugin docs](https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin).
|
* Requires Cordova plugin: `cordova-plugin-calendar`. For more info, please see the [Calendar plugin docs](https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin).
|
||||||
*
|
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Calendar } from '@awesome-cordova-plugins/calendar/ngx';
|
* import { Calendar } from '@awesome-cordova-plugins/calendar/ngx';
|
||||||
@ -99,6 +97,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
* - You've already granted permission
|
* - You've already granted permission
|
||||||
*
|
*
|
||||||
* If this returns false, you should call the `requestReadWritePermission` function
|
* If this returns false, you should call the `requestReadWritePermission` function
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -108,6 +107,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we have read permission
|
* Check if we have read permission
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -117,6 +117,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we have write permission
|
* Check if we have write permission
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -126,6 +127,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request write permission
|
* Request write permission
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -135,6 +137,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request read permission
|
* Request read permission
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -144,6 +147,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests read/write permissions
|
* Requests read/write permissions
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -164,6 +168,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a calendar. (iOS only)
|
* Delete a calendar. (iOS only)
|
||||||
|
*
|
||||||
* @param {string} name Name of the calendar to delete.
|
* @param {string} name Name of the calendar to delete.
|
||||||
* @returns {Promise<any>} Returns a Promise
|
* @returns {Promise<any>} Returns a Promise
|
||||||
*/
|
*/
|
||||||
@ -175,7 +180,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns the default calendar options.
|
* Returns the default calendar options.
|
||||||
*
|
*
|
||||||
* @return {CalendarOptions} Returns an object with the default calendar options
|
* @returns {CalendarOptions} Returns an object with the default calendar options
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true,
|
sync: true,
|
||||||
@ -187,7 +192,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns options for a custom calender with specific color
|
* Returns options for a custom calender with specific color
|
||||||
*
|
*
|
||||||
* @return {NameOrOptions} Returns an object with the default options
|
* @returns {NameOrOptions} Returns an object with the default options
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true,
|
sync: true,
|
||||||
@ -198,6 +203,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Silently create an event.
|
* Silently create an event.
|
||||||
|
*
|
||||||
* @param {string} [title] The event title
|
* @param {string} [title] The event title
|
||||||
* @param {string} [location] The event location
|
* @param {string} [location] The event location
|
||||||
* @param {string} [notes] The event notes
|
* @param {string} [notes] The event notes
|
||||||
@ -294,6 +300,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Find an event with additional options.
|
* Find an event with additional options.
|
||||||
|
*
|
||||||
* @param {string} [title] The event title
|
* @param {string} [title] The event title
|
||||||
* @param {string} [location] The event location
|
* @param {string} [location] The event location
|
||||||
* @param {string} [notes] The event notes
|
* @param {string} [notes] The event notes
|
||||||
@ -330,6 +337,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all calendars.
|
* Get a list of all calendars.
|
||||||
|
*
|
||||||
* @returns {Promise<any>} A Promise that resolves with the list of calendars, or rejects with an error.
|
* @returns {Promise<any>} A Promise that resolves with the list of calendars, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -339,6 +347,8 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all future events in the specified calendar. (iOS only)
|
* Get a list of all future events in the specified calendar. (iOS only)
|
||||||
|
*
|
||||||
|
* @param calendarName
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves with the list of events, or rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves with the list of events, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -361,7 +371,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {string} [newNotes] The new event notes
|
* @param {string} [newNotes] The new event notes
|
||||||
* @param {Date} [newStartDate] The new event start date
|
* @param {Date} [newStartDate] The new event start date
|
||||||
* @param {Date} [newEndDate] The new event end date
|
* @param {Date} [newEndDate] The new event end date
|
||||||
* @return Returns a Promise
|
* @returns Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS'],
|
platforms: ['iOS'],
|
||||||
@ -396,7 +406,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {Date} [newEndDate] The new event end date
|
* @param {Date} [newEndDate] The new event end date
|
||||||
* @param {CalendarOptions} [filterOptions] Event Options, see `getCalendarOptions`
|
* @param {CalendarOptions} [filterOptions] Event Options, see `getCalendarOptions`
|
||||||
* @param {CalendarOptions} [newOptions] New event options, see `getCalendarOptions`
|
* @param {CalendarOptions} [newOptions] New event options, see `getCalendarOptions`
|
||||||
* @return Returns a Promise
|
* @returns Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS'],
|
platforms: ['iOS'],
|
||||||
@ -426,7 +436,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {string} [notes] The event notes
|
* @param {string} [notes] The event notes
|
||||||
* @param {Date} [startDate] The event start date
|
* @param {Date} [startDate] The event start date
|
||||||
* @param {Date} [endDate] The event end date
|
* @param {Date} [endDate] The event end date
|
||||||
* @return Returns a Promise
|
* @returns Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteEvent(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date): Promise<any> {
|
deleteEvent(title?: string, location?: string, notes?: string, startDate?: Date, endDate?: Date): Promise<any> {
|
||||||
@ -442,7 +452,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {Date} [startDate] The event start date
|
* @param {Date} [startDate] The event start date
|
||||||
* @param {Date} [endDate] The event end date
|
* @param {Date} [endDate] The event end date
|
||||||
* @param {string} calendarName
|
* @param {string} calendarName
|
||||||
* @return Returns a Promise
|
* @returns Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS'],
|
platforms: ['iOS'],
|
||||||
@ -463,7 +473,7 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* @param {string} [id] The event id
|
* @param {string} [id] The event id
|
||||||
* @param {Date} [fromDate] The date where it start deleting from
|
* @param {Date} [fromDate] The date where it start deleting from
|
||||||
* @return Returns a Promise
|
* @returns Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteEventById(id: string, fromDate?: Date): Promise<any> {
|
deleteEventById(id: string, fromDate?: Date): Promise<any> {
|
||||||
@ -472,8 +482,9 @@ export class Calendar extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the calendar at the specified date.
|
* Open the calendar at the specified date.
|
||||||
|
*
|
||||||
* @param {Date} date The date you want to open the calendar on
|
* @param {Date} date The date you want to open the calendar on
|
||||||
* @return {Promise<any>} Promise returns a promise
|
* @returns {Promise<any>} Promise returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
openCalendar(date: Date): Promise<any> {
|
openCalendar(date: Date): Promise<any> {
|
||||||
|
@ -16,7 +16,6 @@ export interface CallDirectoryLog {
|
|||||||
* @description
|
* @description
|
||||||
* This plugin can add phone numbers to an Callkit call directory extension. Call `reloadExtension` after using `addIdentification` and `removeIdentification`
|
* This plugin can add phone numbers to an Callkit call directory extension. Call `reloadExtension` after using `addIdentification` and `removeIdentification`
|
||||||
* to process the changes in the call directory extension.
|
* to process the changes in the call directory extension.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CallDirectory } from '@awesome-cordova-plugins/call-directory/ngx';
|
* import { CallDirectory } from '@awesome-cordova-plugins/call-directory/ngx';
|
||||||
@ -34,7 +33,6 @@ export interface CallDirectoryLog {
|
|||||||
* .then(res: string) => console.log(res))
|
* .then(res: string) => console.log(res))
|
||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @Interfaces
|
* @Interfaces
|
||||||
* CallDirectoryItem
|
* CallDirectoryItem
|
||||||
* CallDirectoryLog
|
* CallDirectoryLog
|
||||||
@ -53,7 +51,8 @@ export interface CallDirectoryLog {
|
|||||||
export class CallDirectory extends AwesomeCordovaNativePlugin {
|
export class CallDirectory extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Check if the call directory extension is available and enabled
|
* Check if the call directory extension is available and enabled
|
||||||
* @return {Promise<boolean>} Returns a promise with result
|
*
|
||||||
|
* @returns {Promise<boolean>} Returns a promise with result
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isAvailable(): Promise<boolean> {
|
isAvailable(): Promise<boolean> {
|
||||||
@ -62,8 +61,9 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add identification numbers
|
* Add identification numbers
|
||||||
|
*
|
||||||
* @param {CallDirectoryItem[]} items Set of numbers with labels
|
* @param {CallDirectoryItem[]} items Set of numbers with labels
|
||||||
* @return {Promise<any>} Returns a promise that resolves when numbers are added
|
* @returns {Promise<any>} Returns a promise that resolves when numbers are added
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addIdentification(items: CallDirectoryItem[]): Promise<any> {
|
addIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||||
@ -72,8 +72,9 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove identification numbers
|
* Remove identification numbers
|
||||||
|
*
|
||||||
* @param {CallDirectoryItem[]} items Set of numbers with arbitrary label
|
* @param {CallDirectoryItem[]} items Set of numbers with arbitrary label
|
||||||
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
|
* @returns {Promise<any>} Returns a promise that resolves when numbers are removed
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
removeIdentification(items: CallDirectoryItem[]): Promise<any> {
|
removeIdentification(items: CallDirectoryItem[]): Promise<any> {
|
||||||
@ -82,7 +83,8 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove all items from call directory. Refreshes immediately.
|
* Remove all items from call directory. Refreshes immediately.
|
||||||
* @return {Promise<any>} Returns a promise after refresh with message
|
*
|
||||||
|
* @returns {Promise<any>} Returns a promise after refresh with message
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
removeAllIdentification(): Promise<any> {
|
removeAllIdentification(): Promise<any> {
|
||||||
@ -91,7 +93,8 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all numbers and labels in call directory
|
* Get all numbers and labels in call directory
|
||||||
* @return {CallDirectoryItem[]} Returns a promise that resolves with an array of all items
|
*
|
||||||
|
* @returns {CallDirectoryItem[]} Returns a promise that resolves with an array of all items
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAllItems(): Promise<CallDirectoryItem[]> {
|
getAllItems(): Promise<CallDirectoryItem[]> {
|
||||||
@ -100,7 +103,8 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reload extension to process queued changes
|
* Reload extension to process queued changes
|
||||||
* @return {Promise<string>} Returns a promise after refresh with message
|
*
|
||||||
|
* @returns {Promise<string>} Returns a promise after refresh with message
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
reloadExtension(): Promise<string> {
|
reloadExtension(): Promise<string> {
|
||||||
@ -109,7 +113,8 @@ export class CallDirectory extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get log from plugin and call directory extension
|
* Get log from plugin and call directory extension
|
||||||
* @return {Promise<CallDirectoryLog>} Returns a promise with an object of log messages
|
*
|
||||||
|
* @returns {Promise<CallDirectoryLog>} Returns a promise with an object of log messages
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getLog(): Promise<CallDirectoryLog> {
|
getLog(): Promise<CallDirectoryLog> {
|
||||||
|
@ -5,8 +5,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @name Call Number
|
* @name Call Number
|
||||||
* @description
|
* @description
|
||||||
* Call a number directly from your Cordova/Ionic application.
|
* Call a number directly from your Cordova/Ionic application.
|
||||||
* **NOTE**: The iOS Simulator (and maybe Android Simulators) do not provide access to the phone subsystem.
|
* NOTE**: The iOS Simulator (and maybe Android Simulators) do not provide access to the phone subsystem.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CallNumber } from '@awesome-cordova-plugins/call-number/ngx';
|
* import { CallNumber } from '@awesome-cordova-plugins/call-number/ngx';
|
||||||
@ -33,9 +32,10 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class CallNumber extends AwesomeCordovaNativePlugin {
|
export class CallNumber extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Calls a phone number
|
* Calls a phone number
|
||||||
|
*
|
||||||
* @param {string} numberToCall The phone number to call as a string
|
* @param {string} numberToCall The phone number to call as a string
|
||||||
* @param {boolean} bypassAppChooser Set to true to bypass the app chooser and go directly to dialer
|
* @param {boolean} bypassAppChooser Set to true to bypass the app chooser and go directly to dialer
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
@ -46,7 +46,8 @@ export class CallNumber extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if call feature is available
|
* Check if call feature is available
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isCallSupported(): Promise<any> {
|
isCallSupported(): Promise<any> {
|
||||||
|
@ -60,7 +60,6 @@ export interface CameraPreviewPictureOptions {
|
|||||||
* Showing camera preview in HTML
|
* Showing camera preview in HTML
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git`. For more info, please see the [Cordova Camera Preview docs](https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview).
|
* Requires Cordova plugin: `https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git`. For more info, please see the [Cordova Camera Preview docs](https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CameraPreview, CameraPreviewPictureOptions, CameraPreviewOptions, CameraPreviewDimensions } from '@awesome-cordova-plugins/camera-preview/ngx';
|
* import { CameraPreview, CameraPreviewPictureOptions, CameraPreviewOptions, CameraPreviewDimensions } from '@awesome-cordova-plugins/camera-preview/ngx';
|
||||||
@ -132,7 +131,6 @@ export interface CameraPreviewPictureOptions {
|
|||||||
* this.cameraPreview.stopCamera();
|
* this.cameraPreview.stopCamera();
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* CameraPreviewOptions
|
* CameraPreviewOptions
|
||||||
* CameraPreviewPictureOptions
|
* CameraPreviewPictureOptions
|
||||||
@ -192,8 +190,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the camera preview instance.
|
* Starts the camera preview instance.
|
||||||
|
*
|
||||||
* @param {CameraPreviewOptions} options
|
* @param {CameraPreviewOptions} options
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -205,8 +204,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the camera video instance.
|
* Starts the camera video instance.
|
||||||
|
*
|
||||||
* @param {any} options
|
* @param {any} options
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -218,7 +218,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops the camera preview instance. (iOS & Android)
|
* Stops the camera preview instance. (iOS & Android)
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopCamera(): Promise<any> {
|
stopCamera(): Promise<any> {
|
||||||
@ -227,7 +228,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops the camera video instance. (iOS & Android)
|
* Stops the camera video instance. (iOS & Android)
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopRecordVideo(): Promise<any> {
|
stopRecordVideo(): Promise<any> {
|
||||||
@ -236,7 +238,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch from the rear camera and front camera, if available.
|
* Switch from the rear camera and front camera, if available.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
switchCamera(): Promise<any> {
|
switchCamera(): Promise<any> {
|
||||||
@ -245,7 +248,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hide the camera preview box.
|
* Hide the camera preview box.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hide(): Promise<any> {
|
hide(): Promise<any> {
|
||||||
@ -254,7 +258,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the camera preview box.
|
* Show the camera preview box.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
show(): Promise<any> {
|
show(): Promise<any> {
|
||||||
@ -263,8 +268,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Take the picture (base64)
|
* Take the picture (base64)
|
||||||
|
*
|
||||||
* @param {CameraPreviewPictureOptions} [options] size and quality of the picture to take
|
* @param {CameraPreviewPictureOptions} [options] size and quality of the picture to take
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -276,8 +282,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Take a snapshot of preview window (size specified in startCamera options)
|
* Take a snapshot of preview window (size specified in startCamera options)
|
||||||
|
*
|
||||||
* @param {CameraPreviewPictureOptions} [options] quality of the picture to take
|
* @param {CameraPreviewPictureOptions} [options] quality of the picture to take
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -290,9 +297,10 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Set camera color effect.
|
* Set camera color effect.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @param {string} effect name : 'none' (iOS & Android), 'aqua' (Android), 'blackboard' (Android), 'mono' (iOS & Android), 'negative' (iOS & Android), 'posterize' (iOS & Android), 'sepia' (iOS & Android), 'solarize' (Android) or 'whiteboard' (Android)
|
* @param {string} effect name : 'none' (iOS & Android), 'aqua' (Android), 'blackboard' (Android), 'mono' (iOS & Android), 'negative' (iOS & Android), 'posterize' (iOS & Android), 'sepia' (iOS & Android), 'solarize' (Android) or 'whiteboard' (Android)
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -304,8 +312,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the zoom (Android)
|
* Set the zoom (Android)
|
||||||
|
*
|
||||||
* @param [zoom] {number} Zoom value
|
* @param [zoom] {number} Zoom value
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -317,7 +326,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the maximum zoom (Android)
|
* Get the maximum zoom (Android)
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getMaxZoom(): Promise<any> {
|
getMaxZoom(): Promise<any> {
|
||||||
@ -326,7 +336,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current zoom (Android)
|
* Get current zoom (Android)
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getZoom(): Promise<any> {
|
getZoom(): Promise<any> {
|
||||||
@ -335,8 +346,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the preview Size
|
* Set the preview Size
|
||||||
|
*
|
||||||
* @param {CameraPreviewDimensions} [dimensions]
|
* @param {CameraPreviewDimensions} [dimensions]
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -348,7 +360,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get focus mode
|
* Get focus mode
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getFocusMode(): Promise<any> {
|
getFocusMode(): Promise<any> {
|
||||||
@ -357,8 +370,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the focus mode
|
* Set the focus mode
|
||||||
|
*
|
||||||
* @param {string} [focusMode] 'fixed', 'auto', 'continuous-picture', 'continuous-video' (iOS & Android), 'edof', 'infinity', 'macro' (Android Only)
|
* @param {string} [focusMode] 'fixed', 'auto', 'continuous-picture', 'continuous-video' (iOS & Android), 'edof', 'infinity', 'macro' (Android Only)
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -370,7 +384,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get supported focus modes
|
* Get supported focus modes
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getSupportedFocusModes(): Promise<any> {
|
getSupportedFocusModes(): Promise<any> {
|
||||||
@ -379,7 +394,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current flash mode
|
* Get the current flash mode
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getFlashMode(): Promise<any> {
|
getFlashMode(): Promise<any> {
|
||||||
@ -388,8 +404,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the flash mode
|
* Set the flash mode
|
||||||
|
*
|
||||||
* @param {string} [flashMode] 'off' (iOS & Android), 'on' (iOS & Android), 'auto' (iOS & Android), 'torch' (Android)
|
* @param {string} [flashMode] 'off' (iOS & Android), 'on' (iOS & Android), 'auto' (iOS & Android), 'torch' (Android)
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -401,7 +418,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get supported flash modes
|
* Get supported flash modes
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getSupportedFlashModes(): Promise<any> {
|
getSupportedFlashModes(): Promise<any> {
|
||||||
@ -410,7 +428,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get supported picture sizes
|
* Get supported picture sizes
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getSupportedPictureSizes(): Promise<any> {
|
getSupportedPictureSizes(): Promise<any> {
|
||||||
@ -419,7 +438,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get exposure mode
|
* Get exposure mode
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getExposureMode(): Promise<any> {
|
getExposureMode(): Promise<any> {
|
||||||
@ -428,7 +448,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get exposure modes
|
* Get exposure modes
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getExposureModes(): Promise<any> {
|
getExposureModes(): Promise<any> {
|
||||||
@ -437,8 +458,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set exposure mode
|
* Set exposure mode
|
||||||
|
*
|
||||||
* @param {string} [lock]
|
* @param {string} [lock]
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -450,7 +472,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get exposure compensation (Android)
|
* Get exposure compensation (Android)
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getExposureCompensation(): Promise<any> {
|
getExposureCompensation(): Promise<any> {
|
||||||
@ -459,8 +482,9 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set exposure compensation (Android)
|
* Set exposure compensation (Android)
|
||||||
|
*
|
||||||
* @param {number} [exposureCompensation]
|
* @param {number} [exposureCompensation]
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -472,7 +496,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get exposure compensation range (Android)
|
* Get exposure compensation range (Android)
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getExposureCompensationRange(): Promise<any> {
|
getExposureCompensationRange(): Promise<any> {
|
||||||
@ -481,9 +506,10 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set specific focus point. Note, this assumes the camera is full-screen.
|
* Set specific focus point. Note, this assumes the camera is full-screen.
|
||||||
|
*
|
||||||
* @param {number} xPoint
|
* @param {number} xPoint
|
||||||
* @param {number} yPoint
|
* @param {number} yPoint
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
tapToFocus(xPoint: number, yPoint: number): Promise<any> {
|
tapToFocus(xPoint: number, yPoint: number): Promise<any> {
|
||||||
@ -492,7 +518,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a listener for the back event for the preview
|
* Add a listener for the back event for the preview
|
||||||
* @return {Promise<any>} if back button pressed
|
*
|
||||||
|
* @returns {Promise<any>} if back button pressed
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
onBackButton(): Promise<any> {
|
onBackButton(): Promise<any> {
|
||||||
@ -501,7 +528,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return in use device camera fov
|
* Return in use device camera fov
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getHorizontalFOV(): Promise<any> {
|
getHorizontalFOV(): Promise<any> {
|
||||||
@ -510,7 +538,8 @@ export class CameraPreview extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the characteristics of all available cameras
|
* Get the characteristics of all available cameras
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getCameraCharacteristics(): Promise<any> {
|
getCameraCharacteristics(): Promise<any> {
|
||||||
|
@ -136,7 +136,6 @@ export enum Direction {
|
|||||||
* </config-file>
|
* </config-file>
|
||||||
* ```
|
* ```
|
||||||
* inside of the <platform name='ios> section
|
* inside of the <platform name='ios> section
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
|
* import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
|
||||||
@ -243,6 +242,7 @@ export class Camera extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Take a picture or video, or load one from the library.
|
* Take a picture or video, or load one from the library.
|
||||||
|
*
|
||||||
* @param {CameraOptions} [options] Options that you want to pass to the camera. Encoding type, quality, etc. Platform-specific quirks are described in the [Cordova plugin docs](https://github.com/apache/cordova-plugin-camera#cameraoptions-errata-).
|
* @param {CameraOptions} [options] Options that you want to pass to the camera. Encoding type, quality, etc. Platform-specific quirks are described in the [Cordova plugin docs](https://github.com/apache/cordova-plugin-camera#cameraoptions-errata-).
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error.
|
||||||
*/
|
*/
|
||||||
@ -256,6 +256,7 @@ export class Camera extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
||||||
* Applies only when the value of Camera.sourceType equals Camera.PictureSourceType.CAMERA and the Camera.destinationType equals Camera.DestinationType.FILE_URI.
|
* Applies only when the value of Camera.sourceType equals Camera.PictureSourceType.CAMERA and the Camera.destinationType equals Camera.DestinationType.FILE_URI.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -145,7 +145,6 @@ export interface Phone {
|
|||||||
* @name Checkout
|
* @name Checkout
|
||||||
* @description
|
* @description
|
||||||
* Checkout.com cordova plugin
|
* Checkout.com cordova plugin
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Checkout } from '@awesome-cordova-plugins/checkout/ngx';
|
* import { Checkout } from '@awesome-cordova-plugins/checkout/ngx';
|
||||||
@ -191,8 +190,9 @@ export interface Phone {
|
|||||||
export class Checkout extends AwesomeCordovaNativePlugin {
|
export class Checkout extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Initialize Frames plugin in Sandbox mode
|
* Initialize Frames plugin in Sandbox mode
|
||||||
|
*
|
||||||
* @param publicKey {string} Merchant's sandbox public key
|
* @param publicKey {string} Merchant's sandbox public key
|
||||||
* @return {Promise<any>} Returns a promise that resolves when Frames initiation is completed
|
* @returns {Promise<any>} Returns a promise that resolves when Frames initiation is completed
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
initSandboxClient(publicKey: string): Promise<any> {
|
initSandboxClient(publicKey: string): Promise<any> {
|
||||||
@ -201,8 +201,9 @@ export class Checkout extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize Frames plugin in Live mode
|
* Initialize Frames plugin in Live mode
|
||||||
|
*
|
||||||
* @param publicKey {string} Merchant's live public key
|
* @param publicKey {string} Merchant's live public key
|
||||||
* @return {Promise<any>} Returns a promise that resolves when Frames initiation is completed
|
* @returns {Promise<any>} Returns a promise that resolves when Frames initiation is completed
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
initLiveClient(publicKey: string): Promise<any> {
|
initLiveClient(publicKey: string): Promise<any> {
|
||||||
@ -211,8 +212,9 @@ export class Checkout extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Exchange card details for a reference token that can be used later to request a card payment from your backend. Tokens are single use and expire after 15 minutes.
|
* Exchange card details for a reference token that can be used later to request a card payment from your backend. Tokens are single use and expire after 15 minutes.
|
||||||
|
*
|
||||||
* @param ckoCardTokenRequest {CkoCardTokenRequest} Card tokenization request object
|
* @param ckoCardTokenRequest {CkoCardTokenRequest} Card tokenization request object
|
||||||
* @return {Promise<CkoCardTokenResponse>} Returns a promise that resolves when Token response object
|
* @returns {Promise<CkoCardTokenResponse>} Returns a promise that resolves when Token response object
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
generateToken(ckoCardTokenRequest: CkoCardTokenRequest): Promise<CkoCardTokenResponse> {
|
generateToken(ckoCardTokenRequest: CkoCardTokenRequest): Promise<CkoCardTokenResponse> {
|
||||||
|
@ -25,7 +25,6 @@ export interface ChooserResult {
|
|||||||
* </edit-config>
|
* </edit-config>
|
||||||
* </platform>
|
* </platform>
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Chooser } from '@awesome-cordova-plugins/chooser/ngx';
|
* import { Chooser } from '@awesome-cordova-plugins/chooser/ngx';
|
||||||
@ -41,7 +40,6 @@ export interface ChooserResult {
|
|||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* ChooserResult
|
* ChooserResult
|
||||||
*/
|
*/
|
||||||
@ -56,8 +54,9 @@ export interface ChooserResult {
|
|||||||
export class Chooser extends AwesomeCordovaNativePlugin {
|
export class Chooser extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Displays native prompt for user to select a file.
|
* Displays native prompt for user to select a file.
|
||||||
|
*
|
||||||
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||||
* @return {Promise<any>} Promise containing selected file's raw binary data,
|
* @returns {Promise<any>} Promise containing selected file's raw binary data,
|
||||||
* base64-encoded data: URI, MIME type, display name, and original URI.
|
* base64-encoded data: URI, MIME type, display name, and original URI.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -66,6 +65,7 @@ export class Chooser extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Displays native prompt for user to select a file.
|
* Displays native prompt for user to select a file.
|
||||||
|
*
|
||||||
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
|
||||||
* @returns {Promise<any>} Promise containing selected file's MIME type, display name, and original URI.
|
* @returns {Promise<any>} Promise containing selected file's MIME type, display name, and original URI.
|
||||||
* If user cancels, promise will be resolved as undefined.
|
* If user cancels, promise will be resolved as undefined.
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||||
|
|
||||||
declare var clevertap: any;
|
declare let clevertap: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name CleverTap
|
* @name CleverTap
|
||||||
* @description
|
* @description
|
||||||
* Cordova Plugin that wraps CleverTap SDK for Android and iOS
|
* Cordova Plugin that wraps CleverTap SDK for Android and iOS
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CleverTap } from '@awesome-cordova-plugins/clevertap/ngx';
|
* import { CleverTap } from '@awesome-cordova-plugins/clevertap/ngx';
|
||||||
@ -29,6 +28,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
* notify device ready
|
* notify device ready
|
||||||
* NOTE: in iOS use to be notified of launch Push Notification or Deep Link
|
* NOTE: in iOS use to be notified of launch Push Notification or Deep Link
|
||||||
* in Android use only in android phonegap build projects
|
* in Android use only in android phonegap build projects
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -43,6 +43,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Personalization
|
* Personalization
|
||||||
* Enables the Personalization API
|
* Enables the Personalization API
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -53,6 +54,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Personalization
|
* Personalization
|
||||||
* Disables the Personalization API
|
* Disables the Personalization API
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -62,6 +64,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables tracking opt out for the currently active user.
|
* Enables tracking opt out for the currently active user.
|
||||||
|
*
|
||||||
* @param optOut {boolean}
|
* @param optOut {boolean}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -72,6 +75,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets CleverTap SDK to offline mode.
|
* Sets CleverTap SDK to offline mode.
|
||||||
|
*
|
||||||
* @param offline {boolean}
|
* @param offline {boolean}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -82,6 +86,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables the reporting of device network related information, including IP address. This reporting is disabled by default.
|
* Enables the reporting of device network related information, including IP address. This reporting is disabled by default.
|
||||||
|
*
|
||||||
* @param enable {boolean}
|
* @param enable {boolean}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -96,6 +101,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers for push notifications
|
* Registers for push notifications
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -105,6 +111,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the device's push token
|
* Sets the device's push token
|
||||||
|
*
|
||||||
* @param token {string}
|
* @param token {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -115,6 +122,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the device's Xiaomi push token
|
* Sets the device's Xiaomi push token
|
||||||
|
*
|
||||||
* @param token {string}
|
* @param token {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -125,6 +133,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the device's Baidu push token
|
* Sets the device's Baidu push token
|
||||||
|
*
|
||||||
* @param token {string}
|
* @param token {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -135,6 +144,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the device's Huawei push token
|
* Sets the device's Huawei push token
|
||||||
|
*
|
||||||
* @param token {string}
|
* @param token {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -145,6 +155,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Notification Channel for Android O+
|
* Create Notification Channel for Android O+
|
||||||
|
*
|
||||||
* @param extras {any}
|
* @param extras {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -155,6 +166,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Notification Channel for Android O+
|
* Create Notification Channel for Android O+
|
||||||
|
*
|
||||||
* @param channelID {string}
|
* @param channelID {string}
|
||||||
* @param channelName {string}
|
* @param channelName {string}
|
||||||
* @param channelDescription {string}
|
* @param channelDescription {string}
|
||||||
@ -175,6 +187,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Notification Channel for Android O+
|
* Create Notification Channel for Android O+
|
||||||
|
*
|
||||||
* @param channelID {string}
|
* @param channelID {string}
|
||||||
* @param channelName {string}
|
* @param channelName {string}
|
||||||
* @param channelDescription {string}
|
* @param channelDescription {string}
|
||||||
@ -197,6 +210,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Notification Channel with Group ID for Android O+
|
* Create Notification Channel with Group ID for Android O+
|
||||||
|
*
|
||||||
* @param channelID {string}
|
* @param channelID {string}
|
||||||
* @param channelName {string}
|
* @param channelName {string}
|
||||||
* @param channelDescription {string}
|
* @param channelDescription {string}
|
||||||
@ -220,12 +234,14 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Notification Channel with Group ID for Android O+
|
* Create Notification Channel with Group ID for Android O+
|
||||||
|
*
|
||||||
* @param channelID {string}
|
* @param channelID {string}
|
||||||
* @param channelName {string}
|
* @param channelName {string}
|
||||||
* @param channelDescription {string}
|
* @param channelDescription {string}
|
||||||
* @param importance {number}
|
* @param importance {number}
|
||||||
* @param groupId {string}
|
* @param groupId {string}
|
||||||
* @param showBadge {boolean}
|
* @param showBadge {boolean}
|
||||||
|
* @param sound
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -243,6 +259,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Notification Channel Group for Android O+
|
* Create Notification Channel Group for Android O+
|
||||||
|
*
|
||||||
* @param groupID {string}
|
* @param groupID {string}
|
||||||
* @param groupName {string}
|
* @param groupName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -254,6 +271,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete Notification Channel for Android O+
|
* Delete Notification Channel for Android O+
|
||||||
|
*
|
||||||
* @param channelID {string}
|
* @param channelID {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -264,6 +282,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete Notification Group for Android O+
|
* Delete Notification Group for Android O+
|
||||||
|
*
|
||||||
* @param groupID {string}
|
* @param groupID {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -278,6 +297,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Record Screen View
|
* Record Screen View
|
||||||
|
*
|
||||||
* @param screenName {string}
|
* @param screenName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -288,6 +308,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Record Event with Name
|
* Record Event with Name
|
||||||
|
*
|
||||||
* @param eventName {string}
|
* @param eventName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -298,6 +319,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Record Event with Name and Event properties
|
* Record Event with Name and Event properties
|
||||||
|
*
|
||||||
* @param eventName {string}
|
* @param eventName {string}
|
||||||
* @param eventProps {any}
|
* @param eventProps {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -309,6 +331,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Record Charged Event with Details and Items
|
* Record Charged Event with Details and Items
|
||||||
|
*
|
||||||
* @param details {any} object with transaction details
|
* @param details {any} object with transaction details
|
||||||
* @param items {any} array of items purchased
|
* @param items {any} array of items purchased
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -320,6 +343,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Event First Time
|
* Get Event First Time
|
||||||
|
*
|
||||||
* @param eventName {string}
|
* @param eventName {string}
|
||||||
* callback returns epoch seconds or -1
|
* callback returns epoch seconds or -1
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -331,6 +355,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Event Last Time
|
* Get Event Last Time
|
||||||
|
*
|
||||||
* @param eventName {string}
|
* @param eventName {string}
|
||||||
* callback returns epoch seconds or -1
|
* callback returns epoch seconds or -1
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -342,6 +367,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Event Number of Occurrences
|
* Get Event Number of Occurrences
|
||||||
|
*
|
||||||
* @param eventName {string}
|
* @param eventName {string}
|
||||||
* calls back with int or -1
|
* calls back with int or -1
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -353,6 +379,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Event Details
|
* Get Event Details
|
||||||
|
*
|
||||||
* @param eventName {string}
|
* @param eventName {string}
|
||||||
* calls back with object {"eventName": <string>, "firstTime":<epoch seconds>, "lastTime": <epoch seconds>, "count": <int>} or empty object
|
* calls back with object {"eventName": <string>, "firstTime":<epoch seconds>, "lastTime": <epoch seconds>, "count": <int>} or empty object
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -365,6 +392,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get Event History
|
* Get Event History
|
||||||
* calls back with object {"eventName1":<event1 details object>, "eventName2":<event2 details object>}
|
* calls back with object {"eventName1":<event1 details object>, "eventName2":<event2 details object>}
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -389,6 +417,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
* for, among other things, more fine-grained geo-targeting and segmentation purposes.
|
* for, among other things, more fine-grained geo-targeting and segmentation purposes.
|
||||||
* Note: on iOS the call to CleverTapSDK must be made on the main thread due to LocationManager restrictions, but the CleverTapSDK method itself is non-blocking.
|
* Note: on iOS the call to CleverTapSDK must be made on the main thread due to LocationManager restrictions, but the CleverTapSDK method itself is non-blocking.
|
||||||
* calls back with {lat:lat, lon:lon} lat and lon are floats
|
* calls back with {lat:lat, lon:lon} lat and lon are floats
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -398,6 +427,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set location
|
* Set location
|
||||||
|
*
|
||||||
* @param lat {number}
|
* @param lat {number}
|
||||||
* @param lon {number}
|
* @param lon {number}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -424,6 +454,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
* and data relating to the old user removed, and a new session is started
|
* and data relating to the old user removed, and a new session is started
|
||||||
* for the new user and data for that user refreshed via a network call to CleverTap.
|
* for the new user and data for that user refreshed via a network call to CleverTap.
|
||||||
* In addition, any global frequency caps are reset as part of the switch.
|
* In addition, any global frequency caps are reset as part of the switch.
|
||||||
|
*
|
||||||
* @param profile {any} object
|
* @param profile {any} object
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -434,6 +465,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set profile attributes
|
* Set profile attributes
|
||||||
|
*
|
||||||
* @param profile {any} object
|
* @param profile {any} object
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -444,6 +476,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set profile attributes from facebook user
|
* Set profile attributes from facebook user
|
||||||
|
*
|
||||||
* @param profile {any} facebook graph user object
|
* @param profile {any} facebook graph user object
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -454,6 +487,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set profile attributes rom google plus user
|
* Set profile attributes rom google plus user
|
||||||
|
*
|
||||||
* @param profile {any} google plus user object
|
* @param profile {any} google plus user object
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -464,6 +498,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get User Profile Property
|
* Get User Profile Property
|
||||||
|
*
|
||||||
* @param propertyName {string}
|
* @param propertyName {string}
|
||||||
* calls back with value of propertyName or false
|
* calls back with value of propertyName or false
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -476,6 +511,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get a unique CleverTap identifier suitable for use with install attribution providers.
|
* Get a unique CleverTap identifier suitable for use with install attribution providers.
|
||||||
* calls back with unique CleverTap attribution identifier
|
* calls back with unique CleverTap attribution identifier
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -486,6 +522,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get User Profile CleverTapID
|
* Get User Profile CleverTapID
|
||||||
* calls back with CleverTapID or false
|
* calls back with CleverTapID or false
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -495,6 +532,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the property specified by key from the user profile
|
* Remove the property specified by key from the user profile
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -505,6 +543,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method for setting a multi-value user profile property
|
* Method for setting a multi-value user profile property
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @param values {any} array of strings
|
* @param values {any} array of strings
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -516,6 +555,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method for adding a value to a multi-value user profile property
|
* Method for adding a value to a multi-value user profile property
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @param value {string}
|
* @param value {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -527,6 +567,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method for adding values to a multi-value user profile property
|
* Method for adding values to a multi-value user profile property
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @param values {any} array of strings
|
* @param values {any} array of strings
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -538,6 +579,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method for removing a value from a multi-value user profile property
|
* Method for removing a value from a multi-value user profile property
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @param value {string}
|
* @param value {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -549,6 +591,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method for removing a value from a multi-value user profile property
|
* Method for removing a value from a multi-value user profile property
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @param values {any} array of strings
|
* @param values {any} array of strings
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -565,6 +608,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get Session Elapsed Time
|
* Get Session Elapsed Time
|
||||||
* calls back with seconds
|
* calls back with seconds
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -575,6 +619,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get Session Total Visits
|
* Get Session Total Visits
|
||||||
* calls back with with int or -1
|
* calls back with with int or -1
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -585,6 +630,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get Session Screen Count
|
* Get Session Screen Count
|
||||||
* calls back with with int
|
* calls back with with int
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -595,6 +641,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get Session Previous Visit Time
|
* Get Session Previous Visit Time
|
||||||
* calls back with with epoch seconds or -1
|
* calls back with with epoch seconds or -1
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -605,6 +652,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Get Sesssion Referrer UTM details
|
* Get Sesssion Referrer UTM details
|
||||||
* object {"source": <string>, "medium": <string>, "campaign": <string>} or empty object
|
* object {"source": <string>, "medium": <string>, "campaign": <string>} or empty object
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -614,6 +662,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to manually track the utm details for an incoming install referrer
|
* Call this to manually track the utm details for an incoming install referrer
|
||||||
|
*
|
||||||
* @param source {string}
|
* @param source {string}
|
||||||
* @param medium {string}
|
* @param medium {string}
|
||||||
* @param campaign {string}
|
* @param campaign {string}
|
||||||
@ -653,6 +702,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this method to open the App Inbox
|
* Call this method to open the App Inbox
|
||||||
|
*
|
||||||
* @param styleConfig : any or empty object
|
* @param styleConfig : any or empty object
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -662,6 +712,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Fetch all Inbox Messages
|
* Call this to Fetch all Inbox Messages
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -671,6 +722,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Fetch all Unread Inbox Messages
|
* Call this to Fetch all Unread Inbox Messages
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -680,6 +732,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Fetch Inbox Message For Id
|
* Call this to Fetch Inbox Message For Id
|
||||||
|
*
|
||||||
* @param messageId {string}
|
* @param messageId {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -690,6 +743,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Delete Inbox Message For Id
|
* Call this to Delete Inbox Message For Id
|
||||||
|
*
|
||||||
* @param messageId {string}
|
* @param messageId {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -700,6 +754,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Mark Read Inbox Message For Id
|
* Call this to Mark Read Inbox Message For Id
|
||||||
|
*
|
||||||
* @param messageId {string}
|
* @param messageId {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -710,6 +765,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Mark Push Inbox Notification Viewed Event for Id
|
* Call this to Mark Push Inbox Notification Viewed Event for Id
|
||||||
|
*
|
||||||
* @param messageId {string}
|
* @param messageId {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -720,6 +776,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Mark Push Inbox Notification Clicked Event for Id
|
* Call this to Mark Push Inbox Notification Clicked Event for Id
|
||||||
|
*
|
||||||
* @param messageId {string}
|
* @param messageId {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -730,6 +787,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to SetUIEditor Connection
|
* Call this to SetUIEditor Connection
|
||||||
|
*
|
||||||
* @param enabled {boolean}
|
* @param enabled {boolean}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -740,6 +798,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register Boolean Variable
|
* Call this to Register Boolean Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -750,6 +809,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register Double Variable
|
* Call this to Register Double Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -760,6 +820,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register Integer Variable
|
* Call this to Register Integer Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -770,6 +831,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register String Variable
|
* Call this to Register String Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -780,6 +842,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register List of Boolean Variable
|
* Call this to Register List of Boolean Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -790,6 +853,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register List of Double Variable
|
* Call this to Register List of Double Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -800,6 +864,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register List of Integer Variable
|
* Call this to Register List of Integer Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -810,6 +875,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register List of String Variable
|
* Call this to Register List of String Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -820,6 +886,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register Map of Boolean Variable
|
* Call this to Register Map of Boolean Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -830,6 +897,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register Map of Double Variable
|
* Call this to Register Map of Double Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -840,6 +908,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register Map of Integer Variable
|
* Call this to Register Map of Integer Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -850,6 +919,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Register Map of String Variable
|
* Call this to Register Map of String Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -860,6 +930,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Boolean Variable
|
* Call this to Get Boolean Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {boolean}
|
* @param defaultValue {boolean}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -871,6 +942,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Double Variable
|
* Call this to Get Double Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {number}
|
* @param defaultValue {number}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -882,6 +954,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Integer Variable
|
* Call this to Get Integer Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {number}
|
* @param defaultValue {number}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -893,6 +966,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get String Variable
|
* Call this to Get String Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {string}
|
* @param defaultValue {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -904,6 +978,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get List of Boolean Variable
|
* Call this to Get List of Boolean Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {any}
|
* @param defaultValue {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -915,6 +990,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get List of Double Variable
|
* Call this to Get List of Double Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {any}
|
* @param defaultValue {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -926,6 +1002,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get List of Integer Variable
|
* Call this to Get List of Integer Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {any}
|
* @param defaultValue {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -937,6 +1014,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get List of String Variable
|
* Call this to Get List of String Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {any}
|
* @param defaultValue {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -948,6 +1026,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to get Map of Boolean Variable
|
* Call this to get Map of Boolean Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {any}
|
* @param defaultValue {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -959,6 +1038,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Map of Double Variable
|
* Call this to Get Map of Double Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {any}
|
* @param defaultValue {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -970,6 +1050,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Map of Integer Variable
|
* Call this to Get Map of Integer Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {any}
|
* @param defaultValue {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -981,6 +1062,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Map of String Variable
|
* Call this to Get Map of String Variable
|
||||||
|
*
|
||||||
* @param varName {string}
|
* @param varName {string}
|
||||||
* @param defaultValue {any}
|
* @param defaultValue {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -992,6 +1074,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get All Display Units
|
* Call this to Get All Display Units
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -1001,6 +1084,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Display Unit For Id
|
* Call this to Get Display Unit For Id
|
||||||
|
*
|
||||||
* @param id {string}
|
* @param id {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1011,6 +1095,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Push DisplayUnit Viewed Event for ID
|
* Call this to Push DisplayUnit Viewed Event for ID
|
||||||
|
*
|
||||||
* @param id {string}
|
* @param id {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1021,6 +1106,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Push DisplayUnit Clicked Event for ID
|
* Call this to Push DisplayUnit Clicked Event for ID
|
||||||
|
*
|
||||||
* @param id {string}
|
* @param id {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1031,6 +1117,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Feature Flag for key
|
* Call this to Get Feature Flag for key
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @param defaultValue {string}
|
* @param defaultValue {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -1042,6 +1129,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Set Defaults for Product Config
|
* Call this to Set Defaults for Product Config
|
||||||
|
*
|
||||||
* @param defaults {any}
|
* @param defaults {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1052,6 +1140,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this for Product Config Fetch
|
* Call this for Product Config Fetch
|
||||||
|
*
|
||||||
* @param defaults {any}
|
* @param defaults {any}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1062,6 +1151,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this for Product Config Fetch with Min Interval
|
* Call this for Product Config Fetch with Min Interval
|
||||||
|
*
|
||||||
* @param timeInterval {number}
|
* @param timeInterval {number}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1072,6 +1162,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this for Product Config Activate
|
* Call this for Product Config Activate
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -1081,6 +1172,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this for Product Config Fetch and Activate
|
* Call this for Product Config Fetch and Activate
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -1090,6 +1182,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to set Product Config Fetch with Min Interval
|
* Call this to set Product Config Fetch with Min Interval
|
||||||
|
*
|
||||||
* @param timeInterval {number}
|
* @param timeInterval {number}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1100,6 +1193,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Last Fetch Time Interval
|
* Call this to Get Last Fetch Time Interval
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -1109,6 +1203,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get String
|
* Call this to Get String
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1119,6 +1214,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Boolean
|
* Call this to Get Boolean
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1129,6 +1225,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Long
|
* Call this to Get Long
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1139,6 +1236,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Get Double
|
* Call this to Get Double
|
||||||
|
*
|
||||||
* @param key {string}
|
* @param key {string}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -1149,6 +1247,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this to Reset Product Config
|
* Call this to Reset Product Config
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -1161,6 +1260,7 @@ export class CleverTap extends AwesomeCordovaNativePlugin {
|
|||||||
******************/
|
******************/
|
||||||
/**
|
/**
|
||||||
* 0 is off, 1 is info, 2 is debug, default is 1
|
* 0 is off, 1 is info, 2 is debug, default is 1
|
||||||
|
*
|
||||||
* @param level {number}
|
* @param level {number}
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
|
@ -5,8 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @premier clipboard
|
* @premier clipboard
|
||||||
* @description
|
* @description
|
||||||
* Clipboard management plugin for Cordova that supports iOS, Android, and Windows Phone 8.
|
* Clipboard management plugin for Cordova that supports iOS, Android, and Windows Phone 8.
|
||||||
*
|
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Clipboard } from '@awesome-cordova-plugins/clipboard/ngx';
|
* import { Clipboard } from '@awesome-cordova-plugins/clipboard/ngx';
|
||||||
@ -41,6 +39,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class Clipboard extends AwesomeCordovaNativePlugin {
|
export class Clipboard extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Copies the given text
|
* Copies the given text
|
||||||
|
*
|
||||||
* @param {string} text Text that gets copied on the system clipboard
|
* @param {string} text Text that gets copied on the system clipboard
|
||||||
* @returns {Promise<any>} Returns a promise after the text has been copied
|
* @returns {Promise<any>} Returns a promise after the text has been copied
|
||||||
*/
|
*/
|
||||||
@ -51,6 +50,7 @@ export class Clipboard extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Pastes the text stored in clipboard
|
* Pastes the text stored in clipboard
|
||||||
|
*
|
||||||
* @returns {Promise<any>} Returns a promise after the text has been pasted
|
* @returns {Promise<any>} Returns a promise after the text has been pasted
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -60,6 +60,7 @@ export class Clipboard extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear the text stored in clipboard
|
* Clear the text stored in clipboard
|
||||||
|
*
|
||||||
* @returns {Promise<any>} Returns a promise after the text has been cleaned
|
* @returns {Promise<any>} Returns a promise after the text has been cleaned
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @name Cloud Settings
|
* @name Cloud Settings
|
||||||
* @description
|
* @description
|
||||||
* Stores app settings in cloud storage so if the user re-installs the app or installs it on a different device, the settings will be restored and available in the new installation.
|
* Stores app settings in cloud storage so if the user re-installs the app or installs it on a different device, the settings will be restored and available in the new installation.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CloudSettings } from '@awesome-cordova-plugins/cloud-settings/ngx';
|
* import { CloudSettings } from '@awesome-cordova-plugins/cloud-settings/ngx';
|
||||||
@ -41,7 +40,8 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class CloudSettings extends AwesomeCordovaNativePlugin {
|
export class CloudSettings extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Indicates if any stored cloud settings currently exist for the current user.
|
* Indicates if any stored cloud settings currently exist for the current user.
|
||||||
* @return {Promise<boolean>} Will be passed a boolean flag which indicates whether an store settings exist for the user.
|
*
|
||||||
|
* @returns {Promise<boolean>} Will be passed a boolean flag which indicates whether an store settings exist for the user.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
exists(): Promise<boolean> {
|
exists(): Promise<boolean> {
|
||||||
@ -50,10 +50,11 @@ export class CloudSettings extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves the settings to cloud backup.
|
* Saves the settings to cloud backup.
|
||||||
|
*
|
||||||
* @param {object} settings - a JSON structure representing the user settings to save to cloud backup.
|
* @param {object} settings - a JSON structure representing the user settings to save to cloud backup.
|
||||||
* @param {boolean} [overwrite] - (optional) if true, existing settings will be replaced rather than updated. Defaults to false.
|
* @param {boolean} [overwrite] - (optional) if true, existing settings will be replaced rather than updated. Defaults to false.
|
||||||
* If false, existing settings will be merged with the new settings passed to this function.
|
* If false, existing settings will be merged with the new settings passed to this function.
|
||||||
* @return {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
|
* @returns {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -65,7 +66,8 @@ export class CloudSettings extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the current settings.
|
* Loads the current settings.
|
||||||
* @return {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
|
*
|
||||||
|
* @returns {Promise<any>} Will be passed a single object argument which contains the saved settings as a JSON object.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
load(): Promise<any> {
|
load(): Promise<any> {
|
||||||
@ -74,6 +76,7 @@ export class CloudSettings extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a function which will be called if/when settings on the device have been updated from the cloud.
|
* Registers a function which will be called if/when settings on the device have been updated from the cloud.
|
||||||
|
*
|
||||||
* @param {Function} handler - callback function to invoke when device settings have been updated from the cloud.
|
* @param {Function} handler - callback function to invoke when device settings have been updated from the cloud.
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -81,7 +84,8 @@ export class CloudSettings extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Outputs verbose log messages from the native plugin components to the JS console.
|
* Outputs verbose log messages from the native plugin components to the JS console.
|
||||||
* @return {Promise<void>}
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
enableDebug(): Promise<void> {
|
enableDebug(): Promise<void> {
|
||||||
|
@ -249,7 +249,6 @@ interface CodePushCordovaPlugin {
|
|||||||
* The callback will be called only once, and the possible statuses are defined by the SyncStatus enum.
|
* The callback will be called only once, and the possible statuses are defined by the SyncStatus enum.
|
||||||
* @param {SyncOptions} [syncOptions] Optional SyncOptions parameter configuring the behavior of the sync operation.
|
* @param {SyncOptions} [syncOptions] Optional SyncOptions parameter configuring the behavior of the sync operation.
|
||||||
* @param {SuccessCallback<DownloadProgress>} [downloadProgress] Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
|
* @param {SuccessCallback<DownloadProgress>} [downloadProgress] Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
sync(
|
sync(
|
||||||
syncCallback?: SuccessCallback<SyncStatus>,
|
syncCallback?: SuccessCallback<SyncStatus>,
|
||||||
@ -441,7 +440,6 @@ export interface DownloadProgress {
|
|||||||
* CodePush plugin for Cordova by Microsoft that supports iOS and Android.
|
* CodePush plugin for Cordova by Microsoft that supports iOS and Android.
|
||||||
*
|
*
|
||||||
* For more info, please see https://github.com/Dellos7/example-cordova-code-push-plugin
|
* For more info, please see https://github.com/Dellos7/example-cordova-code-push-plugin
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CodePush } from '@awesome-cordova-plugins/code-push/ngx';
|
* import { CodePush } from '@awesome-cordova-plugins/code-push/ngx';
|
||||||
@ -481,6 +479,7 @@ export class CodePush extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Gets the pending package information, if any. A pending package is one that has been installed but the application still runs the old code.
|
* Gets the pending package information, if any. A pending package is one that has been installed but the application still runs the old code.
|
||||||
* This happens only after a package has been installed using ON_NEXT_RESTART or ON_NEXT_RESUME mode, but the application was not restarted/resumed yet.
|
* This happens only after a package has been installed using ON_NEXT_RESTART or ON_NEXT_RESUME mode, but the application was not restarted/resumed yet.
|
||||||
|
*
|
||||||
* @returns {Promise<ILocalPackage>}
|
* @returns {Promise<ILocalPackage>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -516,6 +515,7 @@ export class CodePush extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Reloads the application. If there is a pending update package installed using ON_NEXT_RESTART or ON_NEXT_RESUME modes, the update
|
* Reloads the application. If there is a pending update package installed using ON_NEXT_RESTART or ON_NEXT_RESUME modes, the update
|
||||||
* will be immediately visible to the user. Otherwise, calling this function will simply reload the current version of the application.
|
* will be immediately visible to the user. Otherwise, calling this function will simply reload the current version of the application.
|
||||||
|
*
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -541,7 +541,6 @@ export class CodePush extends AwesomeCordovaNativePlugin {
|
|||||||
* @param {SyncOptions} [syncOptions] Optional SyncOptions parameter configuring the behavior of the sync operation.
|
* @param {SyncOptions} [syncOptions] Optional SyncOptions parameter configuring the behavior of the sync operation.
|
||||||
* @param {SuccessCallback<DownloadProgress>} [downloadProgress] Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
|
* @param {SuccessCallback<DownloadProgress>} [downloadProgress] Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
|
||||||
* @returns {Observable<SyncStatus>}
|
* @returns {Observable<SyncStatus>}
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
|
@ -12,7 +12,6 @@ import {
|
|||||||
* @name CustomUISDK
|
* @name CustomUISDK
|
||||||
* @description
|
* @description
|
||||||
* This plugin is used to access Paytm's native CustomUISDK framework's apis.
|
* This plugin is used to access Paytm's native CustomUISDK framework's apis.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { CustomUISDK } from '@awesome-cordova-plugins/custom-uisdk/ngx';
|
* import { CustomUISDK } from '@awesome-cordova-plugins/custom-uisdk/ngx';
|
||||||
@ -38,9 +37,10 @@ import {
|
|||||||
export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* This function show dialog to ask user permision to fetch authcode
|
* This function show dialog to ask user permision to fetch authcode
|
||||||
|
*
|
||||||
* @param clientId {string} unique id give to each merchant
|
* @param clientId {string} unique id give to each merchant
|
||||||
* @param mid {string} merchant id
|
* @param mid {string} merchant id
|
||||||
* @return {Promise<string>} Returns authcode
|
* @returns {Promise<string>} Returns authcode
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
fetchAuthCode(clientId: string, mid: string): Promise<string> {
|
fetchAuthCode(clientId: string, mid: string): Promise<string> {
|
||||||
@ -49,7 +49,8 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function check that paytm app is installed or not
|
* This function check that paytm app is installed or not
|
||||||
* @return {Promise<boolean>} Returns installed - true or not -false
|
*
|
||||||
|
* @returns {Promise<boolean>} Returns installed - true or not -false
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isPaytmAppInstalled(): Promise<boolean> {
|
isPaytmAppInstalled(): Promise<boolean> {
|
||||||
@ -58,7 +59,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mid {string} merchant id
|
* @param mid {string} merchant id
|
||||||
* @return {Promise<boolean>} Returns if has payment methods - true or not -false
|
* @returns {Promise<boolean>} Returns if has payment methods - true or not -false
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
checkHasInstrument(mid: string): Promise<boolean> {
|
checkHasInstrument(mid: string): Promise<boolean> {
|
||||||
@ -87,7 +88,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
goForWalletTransaction(paymentFlow: string): Promise<any> {
|
goForWalletTransaction(paymentFlow: string): Promise<any> {
|
||||||
@ -95,7 +96,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
appInvoke(): Promise<any> {
|
appInvoke(): Promise<any> {
|
||||||
@ -113,7 +114,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
* @param emiChannelId {string} emi plan id
|
* @param emiChannelId {string} emi plan id
|
||||||
* @param authMode {string} authentication mode 'otp' 'pin'
|
* @param authMode {string} authentication mode 'otp' 'pin'
|
||||||
* @param saveCard {boolean} save card for next time
|
* @param saveCard {boolean} save card for next time
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
goForNewCardTransaction(
|
goForNewCardTransaction(
|
||||||
@ -140,7 +141,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
* @param issuingBankCode {string} issuing bank code
|
* @param issuingBankCode {string} issuing bank code
|
||||||
* @param emiChannelId {string} emi plan id
|
* @param emiChannelId {string} emi plan id
|
||||||
* @param authMode {string} authentication mode 'otp' 'pin'
|
* @param authMode {string} authentication mode 'otp' 'pin'
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
goForSavedCardTransaction(
|
goForSavedCardTransaction(
|
||||||
@ -159,7 +160,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* @param netBankingCode {string} bank channel code
|
* @param netBankingCode {string} bank channel code
|
||||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
goForNetBankingTransaction(netBankingCode: string, paymentFlow: string): Promise<any> {
|
goForNetBankingTransaction(netBankingCode: string, paymentFlow: string): Promise<any> {
|
||||||
@ -170,7 +171,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
* @param upiCode {string} upi code
|
* @param upiCode {string} upi code
|
||||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||||
* @param saveVPA {boolean} save vpa for future transaction
|
* @param saveVPA {boolean} save vpa for future transaction
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
goForUpiCollectTransaction(upiCode: string, paymentFlow: string, saveVPA: boolean): Promise<any> {
|
goForUpiCollectTransaction(upiCode: string, paymentFlow: string, saveVPA: boolean): Promise<any> {
|
||||||
@ -178,7 +179,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Promise<any>} Returns upi app list names
|
* @returns {Promise<any>} Returns upi app list names
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getUpiIntentList(): Promise<any> {
|
getUpiIntentList(): Promise<any> {
|
||||||
@ -188,7 +189,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* @param appName {string} upi app name
|
* @param appName {string} upi app name
|
||||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
goForUpiIntentTransaction(appName: string, paymentFlow: string): Promise<any> {
|
goForUpiIntentTransaction(appName: string, paymentFlow: string): Promise<any> {
|
||||||
@ -200,7 +201,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
* @param paymentFlow {string} payment type NONE, ADDANDPAY
|
||||||
* @param bankAccountJson {{}} bank account json object
|
* @param bankAccountJson {{}} bank account json object
|
||||||
* @param merchantDetailsJson {{}} merchant detail json
|
* @param merchantDetailsJson {{}} merchant detail json
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
goForUpiPushTransaction(
|
goForUpiPushTransaction(
|
||||||
@ -215,7 +216,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* @param vpaName {string} vpa name
|
* @param vpaName {string} vpa name
|
||||||
* @param bankAccountJson {{}} bank account json object
|
* @param bankAccountJson {{}} bank account json object
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
fetchUpiBalance(bankAccountJson: {}, vpaName: string): Promise<any> {
|
fetchUpiBalance(bankAccountJson: {}, vpaName: string): Promise<any> {
|
||||||
@ -225,7 +226,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* @param vpaName {string} vpa name
|
* @param vpaName {string} vpa name
|
||||||
* @param bankAccountJson {{}} bank account json object
|
* @param bankAccountJson {{}} bank account json object
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setUpiMpin(bankAccountJson: {}, vpaName: string): Promise<any> {
|
setUpiMpin(bankAccountJson: {}, vpaName: string): Promise<any> {
|
||||||
@ -238,7 +239,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
* @param token {string} token fetch from api
|
* @param token {string} token fetch from api
|
||||||
* @param mid {string} merchant id
|
* @param mid {string} merchant id
|
||||||
* @param referenceId {string} reference id
|
* @param referenceId {string} reference id
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getBin(cardSixDigit: string, tokenType: string, token: string, mid: string, referenceId: string): Promise<any> {
|
getBin(cardSixDigit: string, tokenType: string, token: string, mid: string, referenceId: string): Promise<any> {
|
||||||
@ -251,7 +252,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
* @param mid {string} merchant id
|
* @param mid {string} merchant id
|
||||||
* @param orderId {string} order id required only if token type is TXN_TOKEN
|
* @param orderId {string} order id required only if token type is TXN_TOKEN
|
||||||
* @param referenceId {string} reference id required only if token type is ACCESS
|
* @param referenceId {string} reference id required only if token type is ACCESS
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
fetchNBList(tokenType: string, token: string, mid: string, orderId: string, referenceId: string): Promise<any> {
|
fetchNBList(tokenType: string, token: string, mid: string, orderId: string, referenceId: string): Promise<any> {
|
||||||
@ -261,7 +262,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* @param channelCode {string} bank channel code
|
* @param channelCode {string} bank channel code
|
||||||
* @param cardType {string} card type debit or credit
|
* @param cardType {string} card type debit or credit
|
||||||
* @return {Promise<any>} Returns object of response
|
* @returns {Promise<any>} Returns object of response
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
fetchEmiDetails(channelCode: string, cardType: string): Promise<any> {
|
fetchEmiDetails(channelCode: string, cardType: string): Promise<any> {
|
||||||
@ -269,7 +270,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Promise<any>} Returns last successfully used net backing code
|
* @returns {Promise<any>} Returns last successfully used net backing code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -278,7 +279,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Promise<any>} Returns last successfully used vpa code
|
* @returns {Promise<any>} Returns last successfully used vpa code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -289,7 +290,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* @param clientId {string} unique id give to each merchant
|
* @param clientId {string} unique id give to each merchant
|
||||||
* @param authCode {string} fetched auth code
|
* @param authCode {string} fetched auth code
|
||||||
* @return {Promise<any>} Returns last successfully used vpa code
|
* @returns {Promise<any>} Returns last successfully used vpa code
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isAuthCodeValid(clientId: string, authCode: string): Promise<any> {
|
isAuthCodeValid(clientId: string, authCode: string): Promise<any> {
|
||||||
@ -297,7 +298,7 @@ export class CustomUISDK extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {Promise<any>} Returns current environment
|
* @returns {Promise<any>} Returns current environment
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getEnvironment(): Promise<string> {
|
getEnvironment(): Promise<string> {
|
||||||
|
@ -36,7 +36,6 @@ export interface DeeplinkOptions {
|
|||||||
*
|
*
|
||||||
* Please read the [ionic plugin deeplinks docs](https://github.com/ionic-team/ionic-plugin-deeplinks) for iOS and Android integration.
|
* Please read the [ionic plugin deeplinks docs](https://github.com/ionic-team/ionic-plugin-deeplinks) for iOS and Android integration.
|
||||||
* You must add `universal-links` to your `config.xml` and set up Apple App Site Association (AASA) for iOS and Asset Links for Android.
|
* You must add `universal-links` to your `config.xml` and set up Apple App Site Association (AASA) for iOS and Asset Links for Android.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Deeplinks } from '@awesome-cordova-plugins/deeplinks/ngx';
|
* import { Deeplinks } from '@awesome-cordova-plugins/deeplinks/ngx';
|
||||||
@ -78,7 +77,6 @@ export interface DeeplinkOptions {
|
|||||||
*
|
*
|
||||||
* See the [Ionic Deeplinks Demo](https://github.com/ionic-team/ionic2-deeplinks-demo/blob/master/app/app.ts) for an example of how to
|
* See the [Ionic Deeplinks Demo](https://github.com/ionic-team/ionic2-deeplinks-demo/blob/master/app/app.ts) for an example of how to
|
||||||
* retrieve the `NavController` reference at runtime.
|
* retrieve the `NavController` reference at runtime.
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* DeeplinkMatch
|
* DeeplinkMatch
|
||||||
*/
|
*/
|
||||||
@ -125,11 +123,8 @@ export class Deeplinks extends AwesomeCordovaNativePlugin {
|
|||||||
* paths takes an object of the form { 'path': data }. If a deeplink
|
* paths takes an object of the form { 'path': data }. If a deeplink
|
||||||
* matches the path, the resulting path-data pair will be returned in the
|
* matches the path, the resulting path-data pair will be returned in the
|
||||||
* promise result which you can then use to navigate in the app as you see fit.
|
* promise result which you can then use to navigate in the app as you see fit.
|
||||||
*
|
|
||||||
* @param {Object} paths
|
* @param {Object} paths
|
||||||
*
|
|
||||||
* @param {DeeplinkOptions} options
|
* @param {DeeplinkOptions} options
|
||||||
*
|
|
||||||
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
|
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
|
||||||
* errors if a deeplink comes through that does not match a given path.
|
* errors if a deeplink comes through that does not match a given path.
|
||||||
*/
|
*/
|
||||||
|
@ -16,7 +16,6 @@ export interface AndroidAccount {
|
|||||||
* @name Device Accounts
|
* @name Device Accounts
|
||||||
* @description
|
* @description
|
||||||
* Gets the Google accounts associated with the Android device
|
* Gets the Google accounts associated with the Android device
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { DeviceAccounts } from '@awesome-cordova-plugins/device-accounts/ngx';
|
* import { DeviceAccounts } from '@awesome-cordova-plugins/device-accounts/ngx';
|
||||||
@ -44,6 +43,7 @@ export interface AndroidAccount {
|
|||||||
export class DeviceAccounts extends AwesomeCordovaNativePlugin {
|
export class DeviceAccounts extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Gets all accounts registered on the Android Device
|
* Gets all accounts registered on the Android Device
|
||||||
|
*
|
||||||
* @returns {Promise<AndroidAccount[]>}
|
* @returns {Promise<AndroidAccount[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -53,6 +53,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all accounts registered on Android device for requested type
|
* Get all accounts registered on Android device for requested type
|
||||||
|
*
|
||||||
* @param {string} type
|
* @param {string} type
|
||||||
* @returns {Promise<AndroidAccount[]>}
|
* @returns {Promise<AndroidAccount[]>}
|
||||||
*/
|
*/
|
||||||
@ -63,6 +64,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all emails registered on Android device (accounts with 'com.google' type)
|
* Get all emails registered on Android device (accounts with 'com.google' type)
|
||||||
|
*
|
||||||
* @returns {Promise<string[]>}
|
* @returns {Promise<string[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -72,6 +74,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the first email registered on Android device
|
* Get the first email registered on Android device
|
||||||
|
*
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -81,6 +84,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get permissions for access to email registered on Android device 8.0+
|
* Get permissions for access to email registered on Android device 8.0+
|
||||||
|
*
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -90,6 +94,7 @@ export class DeviceAccounts extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get permissions for access to email registered on Android device 8.0+ for requested type
|
* Get permissions for access to email registered on Android device 8.0+ for requested type
|
||||||
|
*
|
||||||
* @param {string} type
|
* @param {string} type
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
|
@ -35,7 +35,6 @@ export interface DeviceMotionAccelerometerOptions {
|
|||||||
* @name Device Motion
|
* @name Device Motion
|
||||||
* @description
|
* @description
|
||||||
* Requires Cordova plugin: `cordova-plugin-device-motion`. For more info, please see the [Device Motion docs](https://github.com/apache/cordova-plugin-device-motion).
|
* Requires Cordova plugin: `cordova-plugin-device-motion`. For more info, please see the [Device Motion docs](https://github.com/apache/cordova-plugin-device-motion).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { DeviceMotion, DeviceMotionAccelerationData } from '@awesome-cordova-plugins/device-motion/ngx';
|
* import { DeviceMotion, DeviceMotionAccelerationData } from '@awesome-cordova-plugins/device-motion/ngx';
|
||||||
@ -84,6 +83,7 @@ export interface DeviceMotionAccelerometerOptions {
|
|||||||
export class DeviceMotion extends AwesomeCordovaNativePlugin {
|
export class DeviceMotion extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Get the current acceleration along the x, y, and z axes.
|
* Get the current acceleration along the x, y, and z axes.
|
||||||
|
*
|
||||||
* @returns {Promise<DeviceMotionAccelerationData>} Returns object with x, y, z, and timestamp properties
|
* @returns {Promise<DeviceMotionAccelerationData>} Returns object with x, y, z, and timestamp properties
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -93,6 +93,7 @@ export class DeviceMotion extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
||||||
|
*
|
||||||
* @param {AccelerometerOptions} options list of options for the accelerometer.
|
* @param {AccelerometerOptions} options list of options for the accelerometer.
|
||||||
* @returns {Observable<DeviceMotionAccelerationData>} Observable returns an observable that you can subscribe to
|
* @returns {Observable<DeviceMotionAccelerationData>} Observable returns an observable that you can subscribe to
|
||||||
*/
|
*/
|
||||||
|
@ -40,7 +40,6 @@ export interface DeviceOrientationCompassOptions {
|
|||||||
* @name Device Orientation
|
* @name Device Orientation
|
||||||
* @description
|
* @description
|
||||||
* Requires Cordova plugin: `cordova-plugin-device-orientation`. For more info, please see the [Device Orientation docs](https://github.com/apache/cordova-plugin-device-orientation).
|
* Requires Cordova plugin: `cordova-plugin-device-orientation`. For more info, please see the [Device Orientation docs](https://github.com/apache/cordova-plugin-device-orientation).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* // DeviceOrientationCompassHeading is an interface for compass
|
* // DeviceOrientationCompassHeading is an interface for compass
|
||||||
@ -90,6 +89,7 @@ export interface DeviceOrientationCompassOptions {
|
|||||||
export class DeviceOrientation extends AwesomeCordovaNativePlugin {
|
export class DeviceOrientation extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Get the current compass heading.
|
* Get the current compass heading.
|
||||||
|
*
|
||||||
* @returns {Promise<DeviceOrientationCompassHeading>}
|
* @returns {Promise<DeviceOrientationCompassHeading>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -101,6 +101,7 @@ export class DeviceOrientation extends AwesomeCordovaNativePlugin {
|
|||||||
* Get the device current heading at a regular interval
|
* Get the device current heading at a regular interval
|
||||||
*
|
*
|
||||||
* Stop the watch by unsubscribing from the observable
|
* Stop the watch by unsubscribing from the observable
|
||||||
|
*
|
||||||
* @param {DeviceOrientationCompassOptions} [options] Options for compass. Frequency and Filter. Optional
|
* @param {DeviceOrientationCompassOptions} [options] Options for compass. Frequency and Filter. Optional
|
||||||
* @returns {Observable<DeviceOrientationCompassHeading>} Returns an observable that contains the compass heading
|
* @returns {Observable<DeviceOrientationCompassHeading>} Returns an observable that contains the compass heading
|
||||||
*/
|
*/
|
||||||
|
@ -8,7 +8,6 @@ declare const window: any;
|
|||||||
* @premier device
|
* @premier device
|
||||||
* @description
|
* @description
|
||||||
* Access information about the underlying device and platform.
|
* Access information about the underlying device and platform.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Device } from '@awesome-cordova-plugins/device/ngx';
|
* import { Device } from '@awesome-cordova-plugins/device/ngx';
|
||||||
|
@ -23,7 +23,6 @@ export interface UpdateOptions {
|
|||||||
* @name Dfu Update
|
* @name Dfu Update
|
||||||
* @description
|
* @description
|
||||||
* This plugin is a Wrapper to use Nordic Semiconductor's Device Firmware Update (DFU) service to update a Bluetooth LE device.
|
* This plugin is a Wrapper to use Nordic Semiconductor's Device Firmware Update (DFU) service to update a Bluetooth LE device.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { DfuUpdate } from '@awesome-cordova-plugins/dfu-update/ngx';
|
* import { DfuUpdate } from '@awesome-cordova-plugins/dfu-update/ngx';
|
||||||
@ -53,8 +52,9 @@ export interface UpdateOptions {
|
|||||||
export class DfuUpdate extends AwesomeCordovaNativePlugin {
|
export class DfuUpdate extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Start the Firmware-Update-Process
|
* Start the Firmware-Update-Process
|
||||||
|
*
|
||||||
* @param options - Options for the process
|
* @param options - Options for the process
|
||||||
* @return {Observable<any>} Returns a Observable that emits when something happens
|
* @returns {Observable<any>} Returns a Observable that emits when something happens
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
|
@ -5,7 +5,6 @@ import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@a
|
|||||||
* @name Diagnostic
|
* @name Diagnostic
|
||||||
* @description
|
* @description
|
||||||
* Checks whether device hardware features are enabled or available to the app, e.g. camera, GPS, wifi
|
* Checks whether device hardware features are enabled or available to the app, e.g. camera, GPS, wifi
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Diagnostic } from '@awesome-cordova-plugins/diagnostic/ngx';
|
* import { Diagnostic } from '@awesome-cordova-plugins/diagnostic/ngx';
|
||||||
@ -32,7 +31,6 @@ import { Cordova, CordovaProperty, AwesomeCordovaNativePlugin, Plugin } from '@a
|
|||||||
* }).catch(e => console.error(e));
|
* }).catch(e => console.error(e));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'Diagnostic',
|
pluginName: 'Diagnostic',
|
||||||
@ -158,6 +156,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if app is able to access device location.
|
* Checks if app is able to access device location.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -168,6 +167,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled.
|
* Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled.
|
||||||
* On Android this requires permission. `<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />`
|
* On Android this requires permission. `<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />`
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -178,6 +178,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the
|
* Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the
|
||||||
* application is authorized to use it.
|
* application is authorized to use it.
|
||||||
|
*
|
||||||
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
|
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
|
||||||
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
|
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -190,6 +191,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile)
|
* Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile)
|
||||||
* On Android this requires permission <uses-permission android:name="android.permission.BLUETOOTH" />
|
* On Android this requires permission <uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -223,6 +225,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the WiFi setting is set to enabled, and is the same as `isWifiAvailable()`
|
* Returns true if the WiFi setting is set to enabled, and is the same as `isWifiAvailable()`
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'Windows 10'] })
|
@Cordova({ platforms: ['Android', 'Windows 10'] })
|
||||||
@ -233,6 +236,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Enables/disables WiFi on the device.
|
* Enables/disables WiFi on the device.
|
||||||
* Requires `ACCESS_WIFI_STATE` and `CHANGE_WIFI_STATE` permissions on Android
|
* Requires `ACCESS_WIFI_STATE` and `CHANGE_WIFI_STATE` permissions on Android
|
||||||
|
*
|
||||||
* @param {boolean} state
|
* @param {boolean} state
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -244,6 +248,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Enables/disables Bluetooth on the device.
|
* Enables/disables Bluetooth on the device.
|
||||||
* Requires `BLUETOOTH` and `BLUETOOTH_ADMIN` permissions on Android
|
* Requires `BLUETOOTH` and `BLUETOOTH_ADMIN` permissions on Android
|
||||||
|
*
|
||||||
* @param {boolean} state
|
* @param {boolean} state
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -256,6 +261,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the device setting for location is on. On Android this returns true if Location Mode is switched on. On iOS this returns true if Location Services is switched on.
|
* Returns true if the device setting for location is on. On Android this returns true if Location Mode is switched on. On iOS this returns true if Location Services is switched on.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -266,6 +272,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use location.
|
* Checks if the application is authorized to use location.
|
||||||
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -275,6 +282,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the location authorization status for the application.
|
* Returns the location authorization status for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -296,6 +304,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if camera hardware is present on device.
|
* Checks if camera hardware is present on device.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -306,6 +315,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use the camera.
|
* Checks if the application is authorized to use the camera.
|
||||||
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time.
|
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time.
|
||||||
|
*
|
||||||
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
|
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
|
||||||
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
|
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -317,6 +327,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the camera authorization status for the application.
|
* Returns the camera authorization status for the application.
|
||||||
|
*
|
||||||
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
|
* @param {boolean} [externalStorage] Android only: If true, checks permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
|
||||||
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
|
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -328,6 +339,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests camera authorization for the application.
|
* Requests camera authorization for the application.
|
||||||
|
*
|
||||||
* @param {boolean} [externalStorage] Android only: If true, requests permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
|
* @param {boolean} [externalStorage] Android only: If true, requests permission for READ_EXTERNAL_STORAGE in addition to CAMERA run-time permission.
|
||||||
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
|
* cordova-plugin-camera@2.2+ requires both of these permissions. Defaults to true.
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -339,6 +351,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use the microphone.
|
* Checks if the application is authorized to use the microphone.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -348,6 +361,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the microphone authorization status for the application.
|
* Returns the microphone authorization status for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -357,6 +371,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests microphone authorization for the application.
|
* Requests microphone authorization for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -366,6 +381,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use contacts (address book).
|
* Checks if the application is authorized to use contacts (address book).
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -375,6 +391,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the contacts authorization status for the application.
|
* Returns the contacts authorization status for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -384,6 +401,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests contacts authorization for the application.
|
* Requests contacts authorization for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -399,6 +417,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* Notes for iOS:
|
* Notes for iOS:
|
||||||
* - This relates to Calendar Events (not Calendar Reminders)
|
* - This relates to Calendar Events (not Calendar Reminders)
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -445,6 +464,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
* Opens settings page for this app.
|
* Opens settings page for this app.
|
||||||
* On Android, this opens the "App Info" page in the Settings app.
|
* On Android, this opens the "App Info" page in the Settings app.
|
||||||
* On iOS, this opens the app settings page in the Settings app. This works only on iOS 8+ - iOS 7 and below will invoke the errorCallback.
|
* On iOS, this opens the app settings page in the Settings app. This works only on iOS 8+ - iOS 7 and below will invoke the errorCallback.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -454,6 +474,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the state of Bluetooth on the device.
|
* Returns the state of Bluetooth on the device.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'] })
|
@Cordova({ platforms: ['Android', 'iOS'] })
|
||||||
@ -463,6 +484,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a function to be called when a change in Bluetooth state occurs.
|
* Registers a function to be called when a change in Bluetooth state occurs.
|
||||||
|
*
|
||||||
* @param {Function} handler
|
* @param {Function} handler
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
|
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
|
||||||
@ -470,6 +492,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a function to be called when a change in Location state occurs.
|
* Registers a function to be called when a change in Location state occurs.
|
||||||
|
*
|
||||||
* @param {Function} handler
|
* @param {Function} handler
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
|
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
|
||||||
@ -480,6 +503,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if high-accuracy locations are available to the app from GPS hardware.
|
* Checks if high-accuracy locations are available to the app from GPS hardware.
|
||||||
* Returns true if Location mode is enabled and is set to "Device only" or "High accuracy" AND if the app is authorized to use location.
|
* Returns true if Location mode is enabled and is set to "Device only" or "High accuracy" AND if the app is authorized to use location.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -492,6 +516,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
* Returns true if Location mode is enabled and is set to either:
|
* Returns true if Location mode is enabled and is set to either:
|
||||||
* - Device only = GPS hardware only (high accuracy)
|
* - Device only = GPS hardware only (high accuracy)
|
||||||
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -502,6 +527,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if low-accuracy locations are available to the app from network triangulation/WiFi access points.
|
* Checks if low-accuracy locations are available to the app from network triangulation/WiFi access points.
|
||||||
* Returns true if Location mode is enabled and is set to "Battery saving" or "High accuracy" AND if the app is authorized to use location.
|
* Returns true if Location mode is enabled and is set to "Battery saving" or "High accuracy" AND if the app is authorized to use location.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -514,6 +540,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
* Returns true if Location mode is enabled and is set to either:
|
* Returns true if Location mode is enabled and is set to either:
|
||||||
* - Battery saving = network triangulation and Wifi network IDs (low accuracy)
|
* - Battery saving = network triangulation and Wifi network IDs (low accuracy)
|
||||||
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -523,6 +550,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current location mode setting for the device.
|
* Returns the current location mode setting for the device.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -533,6 +561,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns the current authorization status for a given permission.
|
* Returns the current authorization status for a given permission.
|
||||||
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
||||||
|
*
|
||||||
* @param permission
|
* @param permission
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -544,6 +573,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns the current authorization status for multiple permissions.
|
* Returns the current authorization status for multiple permissions.
|
||||||
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
||||||
|
*
|
||||||
* @param {any[]} permissions
|
* @param {any[]} permissions
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -555,6 +585,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Requests app to be granted authorization for a runtime permission.
|
* Requests app to be granted authorization for a runtime permission.
|
||||||
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will have no effect as the permissions are already granted at installation time.
|
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will have no effect as the permissions are already granted at installation time.
|
||||||
|
*
|
||||||
* @param permission
|
* @param permission
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -566,6 +597,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Requests app to be granted authorization for multiple runtime permissions.
|
* Requests app to be granted authorization for multiple runtime permissions.
|
||||||
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
|
||||||
|
*
|
||||||
* @param {any[]} permissions
|
* @param {any[]} permissions
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -579,6 +611,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
* Note that only one request can be made concurrently because the native API cannot handle concurrent requests,
|
* Note that only one request can be made concurrently because the native API cannot handle concurrent requests,
|
||||||
* so the plugin will invoke the error callback if attempting to make more than one simultaneous request.
|
* so the plugin will invoke the error callback if attempting to make more than one simultaneous request.
|
||||||
* Multiple permission requests should be grouped into a single call since the native API is setup to handle batch requests of multiple permission groups.
|
* Multiple permission requests should be grouped into a single call since the native API is setup to handle batch requests of multiple permission groups.
|
||||||
|
*
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -589,6 +622,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Registers a function to be called when a runtime permission request has completed.
|
* Registers a function to be called when a runtime permission request has completed.
|
||||||
* Pass in a falsy value to de-register the currently registered function.
|
* Pass in a falsy value to de-register the currently registered function.
|
||||||
|
*
|
||||||
* @param {Function} handler
|
* @param {Function} handler
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -599,6 +633,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if the device setting for Bluetooth is switched on.
|
* Checks if the device setting for Bluetooth is switched on.
|
||||||
* This requires `BLUETOOTH` permission on Android
|
* This requires `BLUETOOTH` permission on Android
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -608,6 +643,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the device has Bluetooth capabilities.
|
* Checks if the device has Bluetooth capabilities.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -617,6 +653,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the device has Bluetooth Low Energy (LE) capabilities.
|
* Checks if the device has Bluetooth Low Energy (LE) capabilities.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -626,6 +663,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the device supports Bluetooth Low Energy (LE) Peripheral mode.
|
* Checks if the device supports Bluetooth Low Energy (LE) Peripheral mode.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -635,6 +673,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use external storage.
|
* Checks if the application is authorized to use external storage.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -644,6 +683,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* CReturns the external storage authorization status for the application.
|
* CReturns the external storage authorization status for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -653,6 +693,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests external storage authorization for the application.
|
* Requests external storage authorization for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -695,6 +736,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if NFC hardware is present on device.
|
* Checks if NFC hardware is present on device.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -705,6 +747,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if the device setting for NFC is switched on.
|
* Checks if the device setting for NFC is switched on.
|
||||||
* Note: this operation does not require NFC permission in the manifest.
|
* Note: this operation does not require NFC permission in the manifest.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -715,6 +758,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Checks if NFC is available to the app. Returns true if the device has NFC capabilities AND if NFC setting is switched on.
|
* Checks if NFC is available to the app. Returns true if the device has NFC capabilities AND if NFC setting is switched on.
|
||||||
* Note: this operation does not require NFC permission in the manifest.
|
* Note: this operation does not require NFC permission in the manifest.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -724,7 +768,9 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a function to be called when a change in NFC state occurs. Pass in a falsy value to de-register the currently registered function.
|
* Registers a function to be called when a change in NFC state occurs. Pass in a falsy value to de-register the currently registered function.
|
||||||
|
*
|
||||||
* @param {Function} hander callback function to be called when NFC state changes
|
* @param {Function} hander callback function to be called when NFC state changes
|
||||||
|
* @param handler
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -735,6 +781,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the device data roaming setting is enabled.
|
* Checks if the device data roaming setting is enabled.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -744,6 +791,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the device setting for ADB(debug) is switched on.
|
* Checks if the device setting for ADB(debug) is switched on.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -753,6 +801,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the device is rooted.
|
* Checks if the device is rooted.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android'] })
|
@Cordova({ platforms: ['Android'] })
|
||||||
@ -764,6 +813,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use the Camera Roll in Photos app.
|
* Checks if the application is authorized to use the Camera Roll in Photos app.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -773,6 +823,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the authorization status for the application to use the Camera Roll in Photos app.
|
* Returns the authorization status for the application to use the Camera Roll in Photos app.
|
||||||
|
*
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -784,6 +835,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
* Requests camera roll authorization for the application.
|
* Requests camera roll authorization for the application.
|
||||||
* Should only be called if authorization status is NOT_REQUESTED.
|
* Should only be called if authorization status is NOT_REQUESTED.
|
||||||
* Calling it when in any other state will have no effect.
|
* Calling it when in any other state will have no effect.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -793,6 +845,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if remote (push) notifications are enabled.
|
* Checks if remote (push) notifications are enabled.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS', 'Android'] })
|
@Cordova({ platforms: ['iOS', 'Android'] })
|
||||||
@ -802,6 +855,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if the app is registered for remote (push) notifications on the device.
|
* Indicates if the app is registered for remote (push) notifications on the device.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -812,6 +866,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Returns the authorization status for the application to use Remote Notifications.
|
* Returns the authorization status for the application to use Remote Notifications.
|
||||||
* Note: Works on iOS 10+ only (iOS 9 and below will invoke the error callback).
|
* Note: Works on iOS 10+ only (iOS 9 and below will invoke the error callback).
|
||||||
|
*
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -821,6 +876,9 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests reminders authorization for the application.
|
* Requests reminders authorization for the application.
|
||||||
|
*
|
||||||
|
* @param types
|
||||||
|
* @param omitRegistration
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -831,6 +889,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Indicates the current setting of notification types for the app in the Settings app.
|
* Indicates the current setting of notification types for the app in the Settings app.
|
||||||
* Note: on iOS 8+, if "Allow Notifications" switch is OFF, all types will be returned as disabled.
|
* Note: on iOS 8+, if "Allow Notifications" switch is OFF, all types will be returned as disabled.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -840,6 +899,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the application is authorized to use reminders.
|
* Checks if the application is authorized to use reminders.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -849,6 +909,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the reminders authorization status for the application.
|
* Returns the reminders authorization status for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -858,6 +919,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests reminders authorization for the application.
|
* Requests reminders authorization for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -867,6 +929,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the application is authorized for background refresh.
|
* Checks if the application is authorized for background refresh.
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -876,6 +939,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the background refresh authorization status for the application.
|
* Returns the background refresh authorization status for the application.
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
@ -887,7 +951,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
* Requests Bluetooth authorization for the application.
|
* Requests Bluetooth authorization for the application.
|
||||||
*
|
*
|
||||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestbluetoothauthorization)
|
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestbluetoothauthorization)
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
requestBluetoothAuthorization(): Promise<any> {
|
requestBluetoothAuthorization(): Promise<any> {
|
||||||
@ -896,7 +961,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if motion tracking is available on the current device.
|
* Checks if motion tracking is available on the current device.
|
||||||
* @return {Promise<boolean>}
|
*
|
||||||
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
isMotionAvailable(): Promise<boolean> {
|
isMotionAvailable(): Promise<boolean> {
|
||||||
@ -908,7 +974,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
* There's no direct way to determine if authorization was granted or denied, so the Pedometer API must be used to indirectly determine this:
|
* There's no direct way to determine if authorization was granted or denied, so the Pedometer API must be used to indirectly determine this:
|
||||||
* therefore, if the device supports motion tracking but not Pedometer Event Tracking, the outcome of requesting motion detection cannot be determined.
|
* therefore, if the device supports motion tracking but not Pedometer Event Tracking, the outcome of requesting motion detection cannot be determined.
|
||||||
*
|
*
|
||||||
* @return {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
isMotionRequestOutcomeAvailable(): Promise<boolean> {
|
isMotionRequestOutcomeAvailable(): Promise<boolean> {
|
||||||
@ -920,7 +986,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestmotionauthorization)
|
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestmotionauthorization)
|
||||||
*
|
*
|
||||||
* @return {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
requestMotionAuthorization(): Promise<string> {
|
requestMotionAuthorization(): Promise<string> {
|
||||||
@ -932,7 +998,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getmotionauthorizationstatus)
|
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getmotionauthorizationstatus)
|
||||||
*
|
*
|
||||||
* @return {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
getMotionAuthorizationStatus(): Promise<string> {
|
getMotionAuthorizationStatus(): Promise<string> {
|
||||||
@ -944,7 +1010,7 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getlocationaccuracyauthorization)
|
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getlocationaccuracyauthorization)
|
||||||
*
|
*
|
||||||
* @return {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platform: ['iOS'] })
|
@Cordova({ platform: ['iOS'] })
|
||||||
getLocationAccuracyAuthorization(): Promise<string> {
|
getLocationAccuracyAuthorization(): Promise<string> {
|
||||||
@ -956,7 +1022,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
*
|
*
|
||||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requesttemporaryfullaccuracyauthorization)
|
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requesttemporaryfullaccuracyauthorization)
|
||||||
*
|
*
|
||||||
* @return {Promise<string>}
|
* @param purpose
|
||||||
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'] })
|
@Cordova({ platforms: ['iOS'] })
|
||||||
requestTemporaryFullAccuracyAuthorization(purpose: string): Promise<string> {
|
requestTemporaryFullAccuracyAuthorization(purpose: string): Promise<string> {
|
||||||
@ -967,6 +1034,8 @@ export class Diagnostic extends AwesomeCordovaNativePlugin {
|
|||||||
* Registers a function to be called when a change in location accuracy authorization occurs on iOS 14+.
|
* Registers a function to be called when a change in location accuracy authorization occurs on iOS 14+.
|
||||||
*
|
*
|
||||||
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#registerLocationAccuracyAuthorizationChangeHandler)
|
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#registerLocationAccuracyAuthorizationChangeHandler)
|
||||||
|
*
|
||||||
|
* @param handler
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['iOS'], sync: true })
|
@Cordova({ platforms: ['iOS'], sync: true })
|
||||||
registerLocationAccuracyAuthorizationChangeHandler(handler: Function): void {}
|
registerLocationAccuracyAuthorizationChangeHandler(handler: Function): void {}
|
||||||
|
@ -20,7 +20,6 @@ export interface DialogsPromptCallback {
|
|||||||
* This plugin gives you ability to access and customize the device native dialogs.
|
* This plugin gives you ability to access and customize the device native dialogs.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `cordova-plugin-dialogs`. For more info, please see the [Dialogs plugin docs](https://github.com/apache/cordova-plugin-dialogs).
|
* Requires Cordova plugin: `cordova-plugin-dialogs`. For more info, please see the [Dialogs plugin docs](https://github.com/apache/cordova-plugin-dialogs).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Dialogs } from '@awesome-cordova-plugins/dialogs/ngx';
|
* import { Dialogs } from '@awesome-cordova-plugins/dialogs/ngx';
|
||||||
@ -49,6 +48,7 @@ export interface DialogsPromptCallback {
|
|||||||
export class Dialogs extends AwesomeCordovaNativePlugin {
|
export class Dialogs extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Shows a custom alert or dialog box.
|
* Shows a custom alert or dialog box.
|
||||||
|
*
|
||||||
* @param {string} message Dialog message.
|
* @param {string} message Dialog message.
|
||||||
* @param {string} [title] Dialog title. (Optional, defaults to Alert)
|
* @param {string} [title] Dialog title. (Optional, defaults to Alert)
|
||||||
* @param {string} [buttonName] Button name. (Optional, defaults to OK)
|
* @param {string} [buttonName] Button name. (Optional, defaults to OK)
|
||||||
@ -64,6 +64,7 @@ export class Dialogs extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a customizable confirmation dialog box.
|
* Displays a customizable confirmation dialog box.
|
||||||
|
*
|
||||||
* @param {string} message Dialog message.
|
* @param {string} message Dialog message.
|
||||||
* @param {string} [title] Dialog title. (Optional, defaults to Confirm)
|
* @param {string} [title] Dialog title. (Optional, defaults to Confirm)
|
||||||
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
|
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
|
||||||
@ -79,6 +80,7 @@ export class Dialogs extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a native dialog box that is more customizable than the browser's prompt function.
|
* Displays a native dialog box that is more customizable than the browser's prompt function.
|
||||||
|
*
|
||||||
* @param {string} [message] Dialog message.
|
* @param {string} [message] Dialog message.
|
||||||
* @param {string} [title] Dialog title. (Optional, defaults to Prompt)
|
* @param {string} [title] Dialog title. (Optional, defaults to Prompt)
|
||||||
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
|
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
|
||||||
@ -100,6 +102,7 @@ export class Dialogs extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The device plays a beep sound.
|
* The device plays a beep sound.
|
||||||
|
*
|
||||||
* @param {numbers} times The number of times to repeat the beep.
|
* @param {numbers} times The number of times to repeat the beep.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -4,7 +4,6 @@ import { Injectable } from '@angular/core';
|
|||||||
/**
|
/**
|
||||||
* @name DNS
|
* @name DNS
|
||||||
* @description A plugin for Apache Cordova that enables applications to manually resolve hostnames into an underlying network address. This is mostly useful for determining whether there is a problem with the device's DNS server configuration.
|
* @description A plugin for Apache Cordova that enables applications to manually resolve hostnames into an underlying network address. This is mostly useful for determining whether there is a problem with the device's DNS server configuration.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { DNS } from '@awesome-cordova-plugins/dns/ngx';
|
* import { DNS } from '@awesome-cordova-plugins/dns/ngx';
|
||||||
@ -32,6 +31,7 @@ import { Injectable } from '@angular/core';
|
|||||||
export class DNS extends AwesomeCordovaNativePlugin {
|
export class DNS extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Resolve hostnames into an underlying network address.
|
* Resolve hostnames into an underlying network address.
|
||||||
|
*
|
||||||
* @param hostname
|
* @param hostname
|
||||||
* @returns {Promise<string>} Returns a promise that resolves with the resolution.
|
* @returns {Promise<string>} Returns a promise that resolves with the resolution.
|
||||||
*/
|
*/
|
||||||
|
@ -7,7 +7,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
*
|
*
|
||||||
* Opens the file picker on iOS for the user to select a file, returns a file URI.
|
* Opens the file picker on iOS for the user to select a file, returns a file URI.
|
||||||
* Allows the user to upload files from iCloud
|
* Allows the user to upload files from iCloud
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { DocumentPicker } from '@awesome-cordova-plugins/document-picker/ngx';
|
* import { DocumentPicker } from '@awesome-cordova-plugins/document-picker/ngx';
|
||||||
@ -33,6 +32,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class DocumentPicker extends AwesomeCordovaNativePlugin {
|
export class DocumentPicker extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Open a file
|
* Open a file
|
||||||
|
*
|
||||||
* @param {string} [option] files between 'image', 'pdf' or 'all'
|
* @param {string} [option] files between 'image', 'pdf' or 'all'
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
|
@ -48,7 +48,6 @@ export interface DocumentScannerOptions {
|
|||||||
* @name Document Scanner
|
* @name Document Scanner
|
||||||
* @description
|
* @description
|
||||||
* This plugin processes images of documents, compensating for perspective.
|
* This plugin processes images of documents, compensating for perspective.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { DocumentScanner, DocumentScannerOptions } from '@awesome-cordova-plugins/document-scanner';
|
* import { DocumentScanner, DocumentScannerOptions } from '@awesome-cordova-plugins/document-scanner';
|
||||||
@ -64,7 +63,6 @@ export interface DocumentScannerOptions {
|
|||||||
* .catch((error: any) => console.error(error));
|
* .catch((error: any) => console.error(error));
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* DocumentScannerOptions
|
* DocumentScannerOptions
|
||||||
* @enums
|
* @enums
|
||||||
@ -81,8 +79,9 @@ export interface DocumentScannerOptions {
|
|||||||
export class DocumentScanner extends AwesomeCordovaNativePlugin {
|
export class DocumentScanner extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Scan a document
|
* Scan a document
|
||||||
|
*
|
||||||
* @param opts {DocumentScannerOptions} optional parameter for controlling scanning
|
* @param opts {DocumentScannerOptions} optional parameter for controlling scanning
|
||||||
* @return {Promise<string>} file URL of scanned document image
|
* @returns {Promise<string>} file URL of scanned document image
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
|
@ -33,7 +33,6 @@ export interface DocumentViewerOptions {
|
|||||||
* @name Document Viewer
|
* @name Document Viewer
|
||||||
* @description
|
* @description
|
||||||
* This plugin offers a slim API to view PDF files which are either stored in the apps assets folder (/www/*) or in any other file system directory available via the cordova file plugin.
|
* This plugin offers a slim API to view PDF files which are either stored in the apps assets folder (/www/*) or in any other file system directory available via the cordova file plugin.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { DocumentViewer } from '@awesome-cordova-plugins/document-viewer/ngx';
|
* import { DocumentViewer } from '@awesome-cordova-plugins/document-viewer/ngx';
|
||||||
@ -49,7 +48,6 @@ export interface DocumentViewerOptions {
|
|||||||
* this.document.viewDocument('assets/myFile.pdf', 'application/pdf', options)
|
* this.document.viewDocument('assets/myFile.pdf', 'application/pdf', options)
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* DocumentViewerOptions
|
* DocumentViewerOptions
|
||||||
*/
|
*/
|
||||||
|
@ -54,8 +54,6 @@ export interface EmailComposerOptions {
|
|||||||
* @description
|
* @description
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: cordova-plugin-email-composer. For more info, please see the [Email Composer plugin docs](https://github.com/hypery2k/cordova-email-plugin).
|
* Requires Cordova plugin: cordova-plugin-email-composer. For more info, please see the [Email Composer plugin docs](https://github.com/hypery2k/cordova-email-plugin).
|
||||||
*
|
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { EmailComposer } from '@awesome-cordova-plugins/email-composer/ngx';
|
* import { EmailComposer } from '@awesome-cordova-plugins/email-composer/ngx';
|
||||||
@ -133,7 +131,8 @@ export interface EmailComposerOptions {
|
|||||||
export class EmailComposer extends AwesomeCordovaNativePlugin {
|
export class EmailComposer extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Checks if the app has a permission to access email accounts information
|
* Checks if the app has a permission to access email accounts information
|
||||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
*
|
||||||
|
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
@ -145,7 +144,8 @@ export class EmailComposer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Request permission to access email accounts information
|
* Request permission to access email accounts information
|
||||||
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
*
|
||||||
|
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 0,
|
successIndex: 0,
|
||||||
|
@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-plugins/core';
|
||||||
|
|
||||||
export interface Attributes {
|
export interface Attributes {
|
||||||
[index: string]: String;
|
[index: string]: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -11,7 +11,6 @@ export interface Attributes {
|
|||||||
* API for interacting with the Crashlytics kit.
|
* API for interacting with the Crashlytics kit.
|
||||||
*
|
*
|
||||||
* https://docs.fabric.io/crashlytics/index.html
|
* https://docs.fabric.io/crashlytics/index.html
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Crashlytics } from '@awesome-cordova-plugins/fabric/ngx';
|
* import { Crashlytics } from '@awesome-cordova-plugins/fabric/ngx';
|
||||||
@ -45,6 +44,7 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Add logging that will be sent with your crash data. This logging will not show up
|
* Add logging that will be sent with your crash data. This logging will not show up
|
||||||
* in the system.log and will only be visible in your Crashlytics dashboard.
|
* in the system.log and will only be visible in your Crashlytics dashboard.
|
||||||
|
*
|
||||||
* @param message {string}
|
* @param message {string}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -62,6 +62,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to log a non-fatal error message (Android only).
|
* Used to log a non-fatal error message (Android only).
|
||||||
|
*
|
||||||
|
* @param message
|
||||||
|
* @param stacktrace
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
sendNonFatalCrash(message: string, stacktrace?: any): void {
|
sendNonFatalCrash(message: string, stacktrace?: any): void {
|
||||||
@ -70,6 +73,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to record a non-fatal error message (iOS only).
|
* Used to record a non-fatal error message (iOS only).
|
||||||
|
*
|
||||||
|
* @param message
|
||||||
|
* @param code
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
recordError(message: string, code: number): void {
|
recordError(message: string, code: number): void {
|
||||||
@ -78,6 +84,8 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the user's identifier for logging to Crashlytics backend.
|
* Sets the user's identifier for logging to Crashlytics backend.
|
||||||
|
*
|
||||||
|
* @param userId
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setUserIdentifier(userId: string): void {
|
setUserIdentifier(userId: string): void {
|
||||||
@ -86,6 +94,8 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the user's name for logging to Crashlytics backend.
|
* Sets the user's name for logging to Crashlytics backend.
|
||||||
|
*
|
||||||
|
* @param userName
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setUserName(userName: string): void {
|
setUserName(userName: string): void {
|
||||||
@ -94,6 +104,8 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the user's email address for logging to Crashlytics backend.
|
* Sets the user's email address for logging to Crashlytics backend.
|
||||||
|
*
|
||||||
|
* @param email
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setUserEmail(email: string): void {
|
setUserEmail(email: string): void {
|
||||||
@ -102,6 +114,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a custom key/value pair for logging to Crashlytics backend.
|
* Sets a custom key/value pair for logging to Crashlytics backend.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @param key
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setStringValueForKey(value: string, key: string): void {
|
setStringValueForKey(value: string, key: string): void {
|
||||||
@ -110,6 +125,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a custom key/value pair for logging to Crashlytics backend.
|
* Sets a custom key/value pair for logging to Crashlytics backend.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @param key
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setIntValueForKey(value: number, key: string): void {
|
setIntValueForKey(value: number, key: string): void {
|
||||||
@ -118,6 +136,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a custom key/value pair for logging to Crashlytics backend.
|
* Sets a custom key/value pair for logging to Crashlytics backend.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @param key
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setBoolValueForKey(value: boolean, key: string): void {
|
setBoolValueForKey(value: boolean, key: string): void {
|
||||||
@ -126,6 +147,9 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets a custom key/value pair for logging to Crashlytics backend.
|
* Sets a custom key/value pair for logging to Crashlytics backend.
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @param key
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setFloatValueForKey(value: number, key: string): void {
|
setFloatValueForKey(value: number, key: string): void {
|
||||||
@ -139,7 +163,6 @@ export class Crashlytics extends AwesomeCordovaNativePlugin {
|
|||||||
* API for interacting with the Answers kit.
|
* API for interacting with the Answers kit.
|
||||||
*
|
*
|
||||||
* https://docs.fabric.io/crashlytics/index.html
|
* https://docs.fabric.io/crashlytics/index.html
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Answers } from '@awesome-cordova-plugins/fabric/ngx';
|
* import { Answers } from '@awesome-cordova-plugins/fabric/ngx';
|
||||||
@ -380,6 +403,11 @@ export class Answers extends AwesomeCordovaNativePlugin {
|
|||||||
* Send the Content View tracking event.
|
* Send the Content View tracking event.
|
||||||
*
|
*
|
||||||
* https://docs.fabric.io/android/answers/answers-events.html#content-view
|
* https://docs.fabric.io/android/answers/answers-events.html#content-view
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @param type
|
||||||
|
* @param id
|
||||||
|
* @param attributes
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
sendContentView(name: string, type?: string, id?: string, attributes?: Attributes): void {
|
sendContentView(name: string, type?: string, id?: string, attributes?: Attributes): void {
|
||||||
@ -388,6 +416,10 @@ export class Answers extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Shortcut for sendContentView(...) using type of "Screen".
|
* Shortcut for sendContentView(...) using type of "Screen".
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @param id
|
||||||
|
* @param attributes
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
sendScreenView(name: string, id: string, attributes?: Attributes): void {
|
sendScreenView(name: string, id: string, attributes?: Attributes): void {
|
||||||
@ -398,6 +430,9 @@ export class Answers extends AwesomeCordovaNativePlugin {
|
|||||||
* Send a custom tracking event with the given name.
|
* Send a custom tracking event with the given name.
|
||||||
*
|
*
|
||||||
* https://docs.fabric.io/android/answers/answers-events.html#custom-event
|
* https://docs.fabric.io/android/answers/answers-events.html#custom-event
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @param attributes
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
sendCustomEvent(name: string, attributes?: Attributes): void {
|
sendCustomEvent(name: string, attributes?: Attributes): void {
|
||||||
|
@ -82,7 +82,6 @@ export interface FacebookLoginResponse {
|
|||||||
* Events are listed on the [insights page](https://www.facebook.com/insights/).
|
* Events are listed on the [insights page](https://www.facebook.com/insights/).
|
||||||
*
|
*
|
||||||
* For tracking events, see `logEvent` and `logPurchase`.
|
* For tracking events, see `logEvent` and `logPurchase`.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Facebook, FacebookLoginResponse } from '@awesome-cordova-plugins/facebook/ngx';
|
* import { Facebook, FacebookLoginResponse } from '@awesome-cordova-plugins/facebook/ngx';
|
||||||
@ -99,7 +98,6 @@ export interface FacebookLoginResponse {
|
|||||||
* this.fb.logEvent(this.fb.EVENTS.EVENT_NAME_ADDED_TO_CART);
|
* this.fb.logEvent(this.fb.EVENTS.EVENT_NAME_ADDED_TO_CART);
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'Facebook',
|
pluginName: 'Facebook',
|
||||||
@ -270,6 +268,7 @@ export class Facebook extends AwesomeCordovaNativePlugin {
|
|||||||
* Logout of Facebook.
|
* Logout of Facebook.
|
||||||
*
|
*
|
||||||
* For more info see the [Facebook docs](https://developers.facebook.com/docs/reference/javascript/FB.logout)
|
* For more info see the [Facebook docs](https://developers.facebook.com/docs/reference/javascript/FB.logout)
|
||||||
|
*
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves on a successful logout, and rejects if logout fails.
|
* @returns {Promise<any>} Returns a Promise that resolves on a successful logout, and rejects if logout fails.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -338,6 +337,7 @@ export class Facebook extends AwesomeCordovaNativePlugin {
|
|||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* For more options see the [Cordova plugin docs](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
|
* For more options see the [Cordova plugin docs](https://github.com/cordova-plugin-facebook-connect/cordova-plugin-facebook-connect#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
|
||||||
|
*
|
||||||
* @param {Object} options The dialog options
|
* @param {Object} options The dialog options
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@ -459,6 +459,7 @@ export class Facebook extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the deferred app link
|
* Returns the deferred app link
|
||||||
|
*
|
||||||
* @returns {Promise<string>} Returns a Promise that resolves with the deep link
|
* @returns {Promise<string>} Returns a Promise that resolves with the deep link
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -468,6 +469,7 @@ export class Facebook extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Manually log activation events
|
* Manually log activation events
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -75,7 +75,6 @@ export interface IChannelConfiguration {
|
|||||||
* @capacitorincompatible true
|
* @capacitorincompatible true
|
||||||
* @description
|
* @description
|
||||||
* Provides basic functionality for Firebase Cloud Messaging
|
* Provides basic functionality for Firebase Cloud Messaging
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FCM } from '@awesome-cordova-plugins/fcm/ngx';
|
* import { FCM } from '@awesome-cordova-plugins/fcm/ngx';
|
||||||
@ -163,7 +162,6 @@ export class FCM extends AwesomeCordovaNativePlugin {
|
|||||||
* Subscribes you to a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
|
* Subscribes you to a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
|
||||||
*
|
*
|
||||||
* @param {string} topic Topic to be subscribed to
|
* @param {string} topic Topic to be subscribed to
|
||||||
*
|
|
||||||
* @returns {Promise<any>} Returns a promise resolving in result of subscribing to a topic
|
* @returns {Promise<any>} Returns a promise resolving in result of subscribing to a topic
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -175,7 +173,6 @@ export class FCM extends AwesomeCordovaNativePlugin {
|
|||||||
* Unsubscribes you from a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
|
* Unsubscribes you from a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
|
||||||
*
|
*
|
||||||
* @param {string} topic Topic to be unsubscribed from
|
* @param {string} topic Topic to be unsubscribed from
|
||||||
*
|
|
||||||
* @returns {Promise<any>} Returns a promise resolving in result of unsubscribing from a topic
|
* @returns {Promise<any>} Returns a promise resolving in result of unsubscribing from a topic
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -224,7 +221,6 @@ export class FCM extends AwesomeCordovaNativePlugin {
|
|||||||
* Request push notification permission, alerting the user if it not have yet decided
|
* Request push notification permission, alerting the user if it not have yet decided
|
||||||
*
|
*
|
||||||
* @param {IRequestPushPermissionIOSOptions} options Options for push request
|
* @param {IRequestPushPermissionIOSOptions} options Options for push request
|
||||||
*
|
|
||||||
* @returns {Promise<boolean>} Returns a Promise that resolves with the permission status
|
* @returns {Promise<boolean>} Returns a Promise that resolves with the permission status
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -240,7 +236,6 @@ export class FCM extends AwesomeCordovaNativePlugin {
|
|||||||
* Once a channel is created, it stays unchangeable until the user uninstalls the app.
|
* Once a channel is created, it stays unchangeable until the user uninstalls the app.
|
||||||
*
|
*
|
||||||
* @param channelConfig
|
* @param channelConfig
|
||||||
*
|
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @name File Opener
|
* @name File Opener
|
||||||
* @description
|
* @description
|
||||||
* This plugin will open a file on your device file system with its default application.
|
* This plugin will open a file on your device file system with its default application.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
* import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
||||||
@ -35,6 +34,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class FileOpener extends AwesomeCordovaNativePlugin {
|
export class FileOpener extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Open an file
|
* Open an file
|
||||||
|
*
|
||||||
* @param {string} filePath File Path
|
* @param {string} filePath File Path
|
||||||
* @param {string} fileMIMEType File MIME Type
|
* @param {string} fileMIMEType File MIME Type
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -50,6 +50,7 @@ export class FileOpener extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Uninstalls a package
|
* Uninstalls a package
|
||||||
|
*
|
||||||
* @param {string} packageId Package ID
|
* @param {string} packageId Package ID
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -64,6 +65,7 @@ export class FileOpener extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if an app is already installed
|
* Check if an app is already installed
|
||||||
|
*
|
||||||
* @param {string} packageId Package ID
|
* @param {string} packageId Package ID
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -78,6 +80,7 @@ export class FileOpener extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens with system modal to open file with an already installed app.
|
* Opens with system modal to open file with an already installed app.
|
||||||
|
*
|
||||||
* @param {string} filePath File Path
|
* @param {string} filePath File Path
|
||||||
* @param {string} fileMIMEType File MIME Type
|
* @param {string} fileMIMEType File MIME Type
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
|
@ -9,7 +9,6 @@ declare const window: any;
|
|||||||
* @description
|
* @description
|
||||||
*
|
*
|
||||||
* This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library.
|
* This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FilePath } from '@awesome-cordova-plugins/file-path/ngx';
|
* import { FilePath } from '@awesome-cordova-plugins/file-path/ngx';
|
||||||
@ -35,6 +34,7 @@ declare const window: any;
|
|||||||
export class FilePath extends AwesomeCordovaNativePlugin {
|
export class FilePath extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Resolve native path for given content URL/path.
|
* Resolve native path for given content URL/path.
|
||||||
|
*
|
||||||
* @param {string} path Content URL/path.
|
* @param {string} path Content URL/path.
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
|
@ -108,10 +108,8 @@ export interface FileTransferError {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @name File Transfer
|
* @name File Transfer
|
||||||
*
|
|
||||||
* @description
|
* @description
|
||||||
* This plugin allows you to upload and download files.
|
* This plugin allows you to upload and download files.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@awesome-cordova-plugins/file-transfer/ngx';
|
* import { FileTransfer, FileUploadOptions, FileTransferObject } from '@awesome-cordova-plugins/file-transfer/ngx';
|
||||||
@ -162,7 +160,6 @@ export interface FileTransferError {
|
|||||||
*
|
*
|
||||||
* To store files in a different/publicly accessible directory, please refer to the following link
|
* 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
|
* https://github.com/apache/cordova-plugin-file#where-to-store-files
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* FileUploadOptions
|
* FileUploadOptions
|
||||||
* FileUploadResult
|
* FileUploadResult
|
||||||
@ -187,6 +184,7 @@ export class FileTransfer extends AwesomeCordovaNativePlugin {
|
|||||||
* CONNECTION_ERR: 3, Return on connection error
|
* CONNECTION_ERR: 3, Return on connection error
|
||||||
* ABORT_ERR: 4, Return on aborting
|
* ABORT_ERR: 4, Return on aborting
|
||||||
* NOT_MODIFIED_ERR: 5 Return on '304 Not Modified' HTTP response
|
* NOT_MODIFIED_ERR: 5 Return on '304 Not Modified' HTTP response
|
||||||
|
*
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
*/
|
*/
|
||||||
FileTransferErrorCode = {
|
FileTransferErrorCode = {
|
||||||
@ -199,7 +197,8 @@ export class FileTransfer extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new FileTransfer object
|
* Creates a new FileTransfer object
|
||||||
* @return {FileTransferObject}
|
*
|
||||||
|
* @returns {FileTransferObject}
|
||||||
*/
|
*/
|
||||||
create(): FileTransferObject {
|
create(): FileTransferObject {
|
||||||
return new FileTransferObject();
|
return new FileTransferObject();
|
||||||
@ -263,6 +262,7 @@ export class FileTransferObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a listener that gets called whenever a new chunk of data is transferred.
|
* Registers a listener that gets called whenever a new chunk of data is transferred.
|
||||||
|
*
|
||||||
* @param {Function} listener Listener that takes a progress event.
|
* @param {Function} listener Listener that takes a progress event.
|
||||||
*/
|
*/
|
||||||
@InstanceCheck({ sync: true })
|
@InstanceCheck({ sync: true })
|
||||||
|
@ -36,6 +36,7 @@ export interface IFile extends Blob {
|
|||||||
* Returns a "slice" of the file. Since Cordova Files don't contain the actual
|
* Returns a "slice" of the file. Since Cordova Files don't contain the actual
|
||||||
* content, this really returns a File with adjusted start and end.
|
* content, this really returns a File with adjusted start and end.
|
||||||
* Slices of slices are supported.
|
* Slices of slices are supported.
|
||||||
|
*
|
||||||
* @param start {Number} The index at which to start the slice (inclusive).
|
* @param start {Number} The index at which to start the slice (inclusive).
|
||||||
* @param end {Number} The index at which to end the slice (exclusive).
|
* @param end {Number} The index at which to end the slice (exclusive).
|
||||||
*/
|
*/
|
||||||
@ -55,6 +56,7 @@ export interface LocalFileSystem {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests a filesystem in which to store application data.
|
* Requests a filesystem in which to store application data.
|
||||||
|
*
|
||||||
* @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or
|
* @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or
|
||||||
* PERSISTENT.
|
* PERSISTENT.
|
||||||
* @param size This is an indicator of how much storage space, in bytes, the application expects to need.
|
* @param size This is an indicator of how much storage space, in bytes, the application expects to need.
|
||||||
@ -71,6 +73,7 @@ export interface LocalFileSystem {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows the user to look up the Entry for a file or directory referred to by a local URL.
|
* Allows the user to look up the Entry for a file or directory referred to by a local URL.
|
||||||
|
*
|
||||||
* @param url A URL referring to a local file in a filesystem accessable via this API.
|
* @param url A URL referring to a local file in a filesystem accessable via this API.
|
||||||
* @param successCallback A callback that is called to report the FileEntry to which the supplied URL refers.
|
* @param successCallback A callback that is called to report the FileEntry to which the supplied URL refers.
|
||||||
* @param errorCallback A callback that is called when errors happen, or when the request to obtain the Entry is
|
* @param errorCallback A callback that is called when errors happen, or when the request to obtain the Entry is
|
||||||
@ -92,12 +95,14 @@ export interface LocalFileSystem {
|
|||||||
export interface Metadata {
|
export interface Metadata {
|
||||||
/**
|
/**
|
||||||
* This is the time at which the file or directory was last modified.
|
* This is the time at which the file or directory was last modified.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
modificationTime: Date;
|
modificationTime: Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The size of the file, in bytes. This must return 0 for directories.
|
* The size of the file, in bytes. This must return 0 for directories.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
size: number;
|
size: number;
|
||||||
@ -123,12 +128,14 @@ export interface FileSystem {
|
|||||||
/**
|
/**
|
||||||
* This is the name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique
|
* This is the name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique
|
||||||
* across the list of exposed file systems.
|
* across the list of exposed file systems.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The root directory of the file system.
|
* The root directory of the file system.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
root: DirectoryEntry;
|
root: DirectoryEntry;
|
||||||
@ -151,6 +158,7 @@ export interface Entry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Look up metadata about this entry.
|
* Look up metadata about this entry.
|
||||||
|
*
|
||||||
* @param successCallback A callback that is called with the time of the last modification.
|
* @param successCallback A callback that is called with the time of the last modification.
|
||||||
* @param errorCallback ErrorCallback A callback that is called when errors happen.
|
* @param errorCallback ErrorCallback A callback that is called when errors happen.
|
||||||
*/
|
*/
|
||||||
@ -158,6 +166,7 @@ export interface Entry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the metadata of the entry.
|
* Set the metadata of the entry.
|
||||||
|
*
|
||||||
* @param successCallback {Function} is called with a Metadata object
|
* @param successCallback {Function} is called with a Metadata object
|
||||||
* @param errorCallback {Function} is called with a FileError
|
* @param errorCallback {Function} is called with a FileError
|
||||||
* @param metadataObject {Metadata} keys and values to set
|
* @param metadataObject {Metadata} keys and values to set
|
||||||
@ -181,21 +190,6 @@ export interface Entry {
|
|||||||
*/
|
*/
|
||||||
nativeURL: string;
|
nativeURL: string;
|
||||||
|
|
||||||
/**
|
|
||||||
* Look up metadata about this entry.
|
|
||||||
* @param successCallback A callback that is called with the time of the last modification.
|
|
||||||
* @param errorCallback ErrorCallback A callback that is called when errors happen.
|
|
||||||
*/
|
|
||||||
getMetadata(successCallback: MetadataCallback, errorCallback?: ErrorCallback): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the metadata of the entry.
|
|
||||||
* @param successCallback {Function} is called with a Metadata object
|
|
||||||
* @param errorCallback {Function} is called with a FileError
|
|
||||||
* @param metadataObject {Metadata} keys and values to set
|
|
||||||
*/
|
|
||||||
setMetadata(successCallback: MetadataCallback, errorCallback: ErrorCallback, metadataObject: Metadata): void;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move an entry to a different location on the file system. It is an error to try to:
|
* Move an entry to a different location on the file system. It is an error to try to:
|
||||||
*
|
*
|
||||||
@ -248,13 +242,15 @@ export interface Entry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a URL that can be passed across the bridge to identify this entry.
|
* Return a URL that can be passed across the bridge to identify this entry.
|
||||||
* @return string URL that can be passed across the bridge to identify this entry
|
*
|
||||||
|
* @returns string URL that can be passed across the bridge to identify this entry
|
||||||
*/
|
*/
|
||||||
toInternalURL(): string;
|
toInternalURL(): string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to
|
* Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to
|
||||||
* attempt to delete the root directory of a filesystem.
|
* attempt to delete the root directory of a filesystem.
|
||||||
|
*
|
||||||
* @param successCallback A callback that is called on success.
|
* @param successCallback A callback that is called on success.
|
||||||
* @param errorCallback A callback that is called when errors happen.
|
* @param errorCallback A callback that is called when errors happen.
|
||||||
*/
|
*/
|
||||||
@ -263,6 +259,7 @@ export interface Entry {
|
|||||||
/**
|
/**
|
||||||
* Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent
|
* Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent
|
||||||
* is itself.
|
* is itself.
|
||||||
|
*
|
||||||
* @param successCallback A callback that is called to return the parent Entry.
|
* @param successCallback A callback that is called to return the parent Entry.
|
||||||
* @param errorCallback A callback that is called when errors happen.
|
* @param errorCallback A callback that is called when errors happen.
|
||||||
*/
|
*/
|
||||||
@ -280,6 +277,7 @@ export interface DirectoryEntry extends Entry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates or looks up a file.
|
* Creates or looks up a file.
|
||||||
|
*
|
||||||
* @param path Either an absolute path or a relative path from this DirectoryEntry to the file to be looked up or
|
* @param path Either an absolute path or a relative path from this DirectoryEntry to the file to be looked up or
|
||||||
* created. It is an error to attempt to create a file whose immediate parent does not yet exist.
|
* created. It is an error to attempt to create a file whose immediate parent does not yet exist.
|
||||||
* @param options
|
* @param options
|
||||||
@ -298,6 +296,7 @@ export interface DirectoryEntry extends Entry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates or looks up a directory.
|
* Creates or looks up a directory.
|
||||||
|
*
|
||||||
* @param path Either an absolute path or a relative path from this DirectoryEntry to the directory to be looked up
|
* @param path Either an absolute path or a relative path from this DirectoryEntry to the directory to be looked up
|
||||||
* or created. It is an error to attempt to create a directory whose immediate parent does not yet exist.
|
* or created. It is an error to attempt to create a directory whose immediate parent does not yet exist.
|
||||||
* @param options
|
* @param options
|
||||||
@ -311,7 +310,6 @@ export interface DirectoryEntry extends Entry {
|
|||||||
* </ul>
|
* </ul>
|
||||||
* @param successCallback A callback that is called to return the DirectoryEntry selected or created.
|
* @param successCallback A callback that is called to return the DirectoryEntry selected or created.
|
||||||
* @param errorCallback A callback that is called when errors happen.
|
* @param errorCallback A callback that is called when errors happen.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
getDirectory(
|
getDirectory(
|
||||||
path: string,
|
path: string,
|
||||||
@ -324,6 +322,7 @@ export interface DirectoryEntry extends Entry {
|
|||||||
* Deletes a directory and all of its contents, if any. In the event of an error [e.g. trying to delete a directory
|
* Deletes a directory and all of its contents, if any. In the event of an error [e.g. trying to delete a directory
|
||||||
* that contains a file that cannot be removed], some of the contents of the directory may be deleted. It is an error
|
* that contains a file that cannot be removed], some of the contents of the directory may be deleted. It is an error
|
||||||
* to attempt to delete the root directory of a filesystem.
|
* to attempt to delete the root directory of a filesystem.
|
||||||
|
*
|
||||||
* @param successCallback A callback that is called on success.
|
* @param successCallback A callback that is called on success.
|
||||||
* @param errorCallback A callback that is called when errors happen.
|
* @param errorCallback A callback that is called when errors happen.
|
||||||
*/
|
*/
|
||||||
@ -346,6 +345,7 @@ export interface DirectoryReader {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the next block of entries from this directory.
|
* Read the next block of entries from this directory.
|
||||||
|
*
|
||||||
* @param successCallback Called once per successful call to readEntries to deliver the next previously-unreported
|
* @param successCallback Called once per successful call to readEntries to deliver the next previously-unreported
|
||||||
* set of Entries in the associated Directory. If all Entries have already been returned from previous invocations
|
* set of Entries in the associated Directory. If all Entries have already been returned from previous invocations
|
||||||
* of readEntries, successCallback must be called with a zero-length array as an argument.
|
* of readEntries, successCallback must be called with a zero-length array as an argument.
|
||||||
@ -360,6 +360,7 @@ export interface DirectoryReader {
|
|||||||
export interface FileEntry extends Entry {
|
export interface FileEntry extends Entry {
|
||||||
/**
|
/**
|
||||||
* Creates a new FileWriter associated with the file that this FileEntry represents.
|
* Creates a new FileWriter associated with the file that this FileEntry represents.
|
||||||
|
*
|
||||||
* @param successCallback A callback that is called with the new FileWriter.
|
* @param successCallback A callback that is called with the new FileWriter.
|
||||||
* @param errorCallback A callback that is called when errors happen.
|
* @param errorCallback A callback that is called when errors happen.
|
||||||
*/
|
*/
|
||||||
@ -367,6 +368,7 @@ export interface FileEntry extends Entry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a File that represents the current state of the file that this FileEntry represents.
|
* Returns a File that represents the current state of the file that this FileEntry represents.
|
||||||
|
*
|
||||||
* @param successCallback A callback that is called with the File.
|
* @param successCallback A callback that is called with the File.
|
||||||
* @param errorCallback A callback that is called when errors happen.
|
* @param errorCallback A callback that is called when errors happen.
|
||||||
*/
|
*/
|
||||||
@ -456,17 +458,20 @@ export declare class FileSaver extends EventTarget {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The blob is being written.
|
* The blob is being written.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
INIT: number;
|
INIT: number;
|
||||||
/**
|
/**
|
||||||
* The object has been constructed, but there is no pending write.
|
* The object has been constructed, but there is no pending write.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
WRITING: number;
|
WRITING: number;
|
||||||
/**
|
/**
|
||||||
* The entire Blob has been written to the file, an error occurred during the write, or the write was aborted using
|
* The entire Blob has been written to the file, an error occurred during the write, or the write was aborted using
|
||||||
* abort(). The FileSaver is no longer writing the blob.
|
* abort(). The FileSaver is no longer writing the blob.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
DONE: number;
|
DONE: number;
|
||||||
@ -478,11 +483,13 @@ export declare class FileSaver extends EventTarget {
|
|||||||
* <li>WRITING</li>
|
* <li>WRITING</li>
|
||||||
* <li>DONE</li>
|
* <li>DONE</li>
|
||||||
* <ul>
|
* <ul>
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
readyState: number;
|
readyState: number;
|
||||||
/**
|
/**
|
||||||
* The last error that occurred on the FileSaver.
|
* The last error that occurred on the FileSaver.
|
||||||
|
*
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
error: Error;
|
error: Error;
|
||||||
@ -510,30 +517,6 @@ export declare class FileSaver extends EventTarget {
|
|||||||
* Handler for write end events.
|
* Handler for write end events.
|
||||||
*/
|
*/
|
||||||
onwriteend: (event: ProgressEvent) => void;
|
onwriteend: (event: ProgressEvent) => void;
|
||||||
|
|
||||||
/**
|
|
||||||
* When the FileSaver constructor is called, the user agent must return a new FileSaver object with readyState set to
|
|
||||||
* INIT. This constructor must be visible when the script's global object is either a Window object or an object
|
|
||||||
* implementing the WorkerUtils interface.
|
|
||||||
*/
|
|
||||||
constructor(data: Blob);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* When the abort method is called, user agents must run the steps below:
|
|
||||||
* <ol>
|
|
||||||
* <li> If readyState == DONE or readyState == INIT, terminate this overall series of steps without doing anything
|
|
||||||
* else. </li>
|
|
||||||
* <li> Set readyState to DONE. </li>
|
|
||||||
* <li> If there are any tasks from the object's FileSaver task source in one of the task queues, then remove those
|
|
||||||
* tasks. </li>
|
|
||||||
* <li> Terminate the write algorithm being processed. </li>
|
|
||||||
* <li> Set the error attribute to a DOMError object of type "AbortError". </li>
|
|
||||||
* <li> Fire a progress event called abort </li>
|
|
||||||
* <li> Fire a progress event called writeend </li>
|
|
||||||
* <li> Terminate this algorithm. </li>
|
|
||||||
* </ol>
|
|
||||||
*/
|
|
||||||
abort(): void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -556,12 +539,14 @@ export declare class FileWriter extends FileSaver {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the supplied data to the file at position.
|
* Write the supplied data to the file at position.
|
||||||
|
*
|
||||||
* @param data The blob to write.
|
* @param data The blob to write.
|
||||||
*/
|
*/
|
||||||
write(data: ArrayBuffer | Blob | string): void;
|
write(data: ArrayBuffer | Blob | string): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Seek sets the file position at which the next write will occur.
|
* Seek sets the file position at which the next write will occur.
|
||||||
|
*
|
||||||
* @param offset If nonnegative, an absolute byte offset into the file. If negative, an offset back from the end of
|
* @param offset If nonnegative, an absolute byte offset into the file. If negative, an offset back from the end of
|
||||||
* the file.
|
* the file.
|
||||||
*/
|
*/
|
||||||
@ -570,6 +555,7 @@ export declare class FileWriter extends FileSaver {
|
|||||||
/**
|
/**
|
||||||
* Changes the length of the file to that specified. If shortening the file, data beyond the new length must be
|
* Changes the length of the file to that specified. If shortening the file, data beyond the new length must be
|
||||||
* discarded. If extending the file, the existing data must be zero-padded up to the new length.
|
* discarded. If extending the file, the existing data must be zero-padded up to the new length.
|
||||||
|
*
|
||||||
* @param size The size to which the length of the file is to be adjusted, measured in bytes.
|
* @param size The size to which the length of the file is to be adjusted, measured in bytes.
|
||||||
*/
|
*/
|
||||||
truncate(size: number): void;
|
truncate(size: number): void;
|
||||||
@ -636,7 +622,7 @@ export declare class FileReader {
|
|||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Window extends LocalFileSystem {}
|
type Window = LocalFileSystem;
|
||||||
|
|
||||||
declare const window: Window;
|
declare const window: Window;
|
||||||
|
|
||||||
@ -762,6 +748,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get free disk space in Bytes
|
* Get free disk space in Bytes
|
||||||
|
*
|
||||||
* @returns {Promise<number>} Returns a promise that resolves with the remaining free disk space in Bytes
|
* @returns {Promise<number>} Returns a promise that resolves with the remaining free disk space in Bytes
|
||||||
*/
|
*/
|
||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
@ -1042,10 +1029,12 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a new file to the desired location.
|
* Write a new file to the desired location.
|
||||||
|
*
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||||
* @param {string} fileName path relative to base path
|
* @param {string} fileName path relative to base path
|
||||||
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
|
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
|
||||||
* @param {IWriteOptions} whether to replace/append to an existing file. See IWriteOptions for more information.
|
* @param {IWriteOptions} whether to replace/append to an existing file. See IWriteOptions for more information.
|
||||||
|
* @param options
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves to updated file entry or rejects with an error.
|
* @returns {Promise<any>} Returns a Promise that resolves to updated file entry or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
@ -1077,6 +1066,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Write content to FileEntry.
|
* Write content to FileEntry.
|
||||||
|
*
|
||||||
* @hidden
|
* @hidden
|
||||||
* Write to an existing file.
|
* Write to an existing file.
|
||||||
* @param {FileEntry} fe file entry object
|
* @param {FileEntry} fe file entry object
|
||||||
@ -1102,6 +1092,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Write to an existing file.
|
* Write to an existing file.
|
||||||
|
*
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||||
* @param {string} fileName path relative to base path
|
* @param {string} fileName path relative to base path
|
||||||
* @param {string | Blob} text content or blob to write
|
* @param {string | Blob} text content or blob to write
|
||||||
@ -1114,6 +1105,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the contents of a file as text.
|
* Read the contents of a file as text.
|
||||||
|
*
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||||
* @param {string} file Name of file, relative to path.
|
* @param {string} file Name of file, relative to path.
|
||||||
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string or rejects with
|
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string or rejects with
|
||||||
@ -1141,6 +1133,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Read file and return data as a binary data.
|
* Read file and return data as a binary data.
|
||||||
|
*
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||||
* @param {string} file Name of file, relative to path.
|
* @param {string} file Name of file, relative to path.
|
||||||
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string rejects with an
|
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as string rejects with an
|
||||||
@ -1153,6 +1146,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Read file and return data as an ArrayBuffer.
|
* Read file and return data as an ArrayBuffer.
|
||||||
|
*
|
||||||
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
|
||||||
* @param {string} file Name of file, relative to path.
|
* @param {string} file Name of file, relative to path.
|
||||||
* @returns {Promise<ArrayBuffer>} Returns a Promise that resolves with the contents of the file as ArrayBuffer or
|
* @returns {Promise<ArrayBuffer>} Returns a Promise that resolves with the contents of the file as ArrayBuffer or
|
||||||
@ -1224,6 +1218,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param err
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private fillErrorMessage(err: FileError): void {
|
private fillErrorMessage(err: FileError): void {
|
||||||
@ -1234,6 +1229,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves a local file system URL
|
* Resolves a local file system URL
|
||||||
|
*
|
||||||
* @param fileUrl {string} file system url
|
* @param fileUrl {string} file system url
|
||||||
* @returns {Promise<Entry>}
|
* @returns {Promise<Entry>}
|
||||||
*/
|
*/
|
||||||
@ -1260,6 +1256,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves a local directory url
|
* Resolves a local directory url
|
||||||
|
*
|
||||||
* @param directoryUrl {string} directory system url
|
* @param directoryUrl {string} directory system url
|
||||||
* @returns {Promise<DirectoryEntry>}
|
* @returns {Promise<DirectoryEntry>}
|
||||||
*/
|
*/
|
||||||
@ -1278,6 +1275,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a directory
|
* Get a directory
|
||||||
|
*
|
||||||
* @param directoryEntry {DirectoryEntry} Directory entry, obtained by resolveDirectoryUrl method
|
* @param directoryEntry {DirectoryEntry} Directory entry, obtained by resolveDirectoryUrl method
|
||||||
* @param directoryName {string} Directory name
|
* @param directoryName {string} Directory name
|
||||||
* @param flags {Flags} Options
|
* @param flags {Flags} Options
|
||||||
@ -1307,6 +1305,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a file
|
* Get a file
|
||||||
|
*
|
||||||
* @param directoryEntry {DirectoryEntry} Directory entry, obtained by resolveDirectoryUrl method
|
* @param directoryEntry {DirectoryEntry} Directory entry, obtained by resolveDirectoryUrl method
|
||||||
* @param fileName {string} File name
|
* @param fileName {string} File name
|
||||||
* @param flags {Flags} Options
|
* @param flags {Flags} Options
|
||||||
@ -1368,6 +1367,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param fe
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private remove(fe: Entry): Promise<RemoveResult> {
|
private remove(fe: Entry): Promise<RemoveResult> {
|
||||||
@ -1385,6 +1385,9 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param srce
|
||||||
|
* @param destdir
|
||||||
|
* @param newName
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private move(srce: Entry, destdir: DirectoryEntry, newName: string): Promise<Entry> {
|
private move(srce: Entry, destdir: DirectoryEntry, newName: string): Promise<Entry> {
|
||||||
@ -1404,6 +1407,9 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param srce
|
||||||
|
* @param destdir
|
||||||
|
* @param newName
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private copy(srce: Entry, destdir: DirectoryEntry, newName: string): Promise<Entry> {
|
private copy(srce: Entry, destdir: DirectoryEntry, newName: string): Promise<Entry> {
|
||||||
@ -1423,6 +1429,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param dr
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private readEntries(dr: DirectoryReader): Promise<Entry[]> {
|
private readEntries(dr: DirectoryReader): Promise<Entry[]> {
|
||||||
@ -1440,6 +1447,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param de
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private rimraf(de: DirectoryEntry): Promise<RemoveResult> {
|
private rimraf(de: DirectoryEntry): Promise<RemoveResult> {
|
||||||
@ -1457,6 +1465,7 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param fe
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private createWriter(fe: FileEntry): Promise<FileWriter> {
|
private createWriter(fe: FileEntry): Promise<FileWriter> {
|
||||||
@ -1474,6 +1483,8 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param writer
|
||||||
|
* @param gu
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private write(writer: FileWriter, gu: string | Blob | ArrayBuffer): Promise<any> {
|
private write(writer: FileWriter, gu: string | Blob | ArrayBuffer): Promise<any> {
|
||||||
@ -1494,12 +1505,17 @@ export class File extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param writer
|
||||||
|
* @param file
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
private writeFileInChunks(writer: FileWriter, file: Blob) {
|
private writeFileInChunks(writer: FileWriter, file: Blob) {
|
||||||
const BLOCK_SIZE = 1024 * 1024;
|
const BLOCK_SIZE = 1024 * 1024;
|
||||||
let writtenSize = 0;
|
let writtenSize = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
function writeNextChunk() {
|
function writeNextChunk() {
|
||||||
const size = Math.min(BLOCK_SIZE, file.size - writtenSize);
|
const size = Math.min(BLOCK_SIZE, file.size - writtenSize);
|
||||||
const chunk = file.slice(writtenSize, writtenSize + size);
|
const chunk = file.slice(writtenSize, writtenSize + size);
|
||||||
|
@ -4,36 +4,42 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export interface FingerprintOptions {
|
export interface FingerprintOptions {
|
||||||
/**
|
/**
|
||||||
* Title in biometric prompt (android only)
|
* Title in biometric prompt (android only)
|
||||||
|
*
|
||||||
* @default {APP_NAME} Biometric Sign On
|
* @default {APP_NAME} Biometric Sign On
|
||||||
*/
|
*/
|
||||||
title?: string;
|
title?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subtitle in biometric Prompt (android only)
|
* Subtitle in biometric Prompt (android only)
|
||||||
|
*
|
||||||
* @default null
|
* @default null
|
||||||
*/
|
*/
|
||||||
subtitle?: string;
|
subtitle?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description in biometric Prompt
|
* Description in biometric Prompt
|
||||||
|
*
|
||||||
* @default null
|
* @default null
|
||||||
*/
|
*/
|
||||||
description?: string;
|
description?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title of fallback button.
|
* Title of fallback button.
|
||||||
|
*
|
||||||
* @default "Use Pin"
|
* @default "Use Pin"
|
||||||
*/
|
*/
|
||||||
fallbackButtonTitle?: string;
|
fallbackButtonTitle?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title for cancel button on Android
|
* Title for cancel button on Android
|
||||||
|
*
|
||||||
* @default "Cancel"
|
* @default "Cancel"
|
||||||
*/
|
*/
|
||||||
cancelButtonTitle?: string;
|
cancelButtonTitle?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disable 'use backup' option.
|
* Disable 'use backup' option.
|
||||||
|
*
|
||||||
* @default false
|
* @default false
|
||||||
*/
|
*/
|
||||||
disableBackup?: boolean;
|
disableBackup?: boolean;
|
||||||
@ -47,6 +53,7 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If `true` secret will be deleted when biometry items are deleted or enrolled
|
* If `true` secret will be deleted when biometry items are deleted or enrolled
|
||||||
|
*
|
||||||
* @default false
|
* @default false
|
||||||
*/
|
*/
|
||||||
invalidateOnEnrollment?: boolean;
|
invalidateOnEnrollment?: boolean;
|
||||||
@ -57,7 +64,6 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
|
|||||||
* @description
|
* @description
|
||||||
* Use simple fingerprint authentication on Android and iOS.
|
* Use simple fingerprint authentication on Android and iOS.
|
||||||
* Requires Cordova plugin: cordova-plugin-fingerprint-aio. For more info about plugin, vist: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio
|
* Requires Cordova plugin: cordova-plugin-fingerprint-aio. For more info about plugin, vist: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FingerprintAIO } from '@awesome-cordova-plugins/fingerprint-aio/ngx';
|
* import { FingerprintAIO } from '@awesome-cordova-plugins/fingerprint-aio/ngx';
|
||||||
@ -117,78 +123,93 @@ export interface FingerprintSecretOptions extends FingerprintOptions {
|
|||||||
export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_UNKNOWN_ERROR = -100;
|
BIOMETRIC_UNKNOWN_ERROR = -100;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_UNAVAILABLE = -101;
|
BIOMETRIC_UNAVAILABLE = -101;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_AUTHENTICATION_FAILED = -102;
|
BIOMETRIC_AUTHENTICATION_FAILED = -102;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_SDK_NOT_SUPPORTED = -103;
|
BIOMETRIC_SDK_NOT_SUPPORTED = -103;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_HARDWARE_NOT_SUPPORTED = -104;
|
BIOMETRIC_HARDWARE_NOT_SUPPORTED = -104;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_PERMISSION_NOT_GRANTED = -105;
|
BIOMETRIC_PERMISSION_NOT_GRANTED = -105;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_NOT_ENROLLED = -106;
|
BIOMETRIC_NOT_ENROLLED = -106;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_INTERNAL_PLUGIN_ERROR = -107;
|
BIOMETRIC_INTERNAL_PLUGIN_ERROR = -107;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_DISMISSED = -108;
|
BIOMETRIC_DISMISSED = -108;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_PIN_OR_PATTERN_DISMISSED = -109;
|
BIOMETRIC_PIN_OR_PATTERN_DISMISSED = -109;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_SCREEN_GUARD_UNSECURED = -110;
|
BIOMETRIC_SCREEN_GUARD_UNSECURED = -110;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_LOCKED_OUT = -111;
|
BIOMETRIC_LOCKED_OUT = -111;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_LOCKED_OUT_PERMANENT = -112;
|
BIOMETRIC_LOCKED_OUT_PERMANENT = -112;
|
||||||
/**
|
/**
|
||||||
* Convenience constant
|
* Convenience constant
|
||||||
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
BIOMETRIC_SECRET_NOT_FOUND = -113;
|
BIOMETRIC_SECRET_NOT_FOUND = -113;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if fingerprint authentication is available
|
* Check if fingerprint authentication is available
|
||||||
* @return {Promise<any>} Returns a promise with result
|
*
|
||||||
|
* @returns {Promise<any>} Returns a promise with result
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isAvailable(): Promise<any> {
|
isAvailable(): Promise<any> {
|
||||||
@ -197,8 +218,9 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show authentication dialogue and register secret
|
* Show authentication dialogue and register secret
|
||||||
|
*
|
||||||
* @param {FingerprintSecretOptions} options Options for platform specific fingerprint API
|
* @param {FingerprintSecretOptions} options Options for platform specific fingerprint API
|
||||||
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
|
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
registerBiometricSecret(options: FingerprintSecretOptions): Promise<any> {
|
registerBiometricSecret(options: FingerprintSecretOptions): Promise<any> {
|
||||||
@ -207,8 +229,9 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show authentication dialogue and load secret
|
* Show authentication dialogue and load secret
|
||||||
|
*
|
||||||
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
||||||
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
|
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
loadBiometricSecret(options: FingerprintOptions): Promise<string> {
|
loadBiometricSecret(options: FingerprintOptions): Promise<string> {
|
||||||
@ -217,8 +240,9 @@ export class FingerprintAIO extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show authentication dialogue
|
* Show authentication dialogue
|
||||||
|
*
|
||||||
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
* @param {FingerprintOptions} options Options for platform specific fingerprint API
|
||||||
* @return {Promise<any>} Returns a promise that resolves when authentication was successful
|
* @returns {Promise<any>} Returns a promise that resolves when authentication was successful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
show(options: FingerprintOptions): Promise<any> {
|
show(options: FingerprintOptions): Promise<any> {
|
||||||
|
@ -26,7 +26,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* And in the same file, you'll have to add `xmlns:tools="http://schemas.android.com/tools"` to your _manifest_ tag.
|
* And in the same file, you'll have to add `xmlns:tools="http://schemas.android.com/tools"` to your _manifest_ tag.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FirebaseAnalytics } from '@awesome-cordova-plugins/firebase-analytics/ngx';
|
* import { FirebaseAnalytics } from '@awesome-cordova-plugins/firebase-analytics/ngx';
|
||||||
@ -54,9 +53,10 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Logs an app event.
|
* Logs an app event.
|
||||||
* Be aware of automatically collected events.
|
* Be aware of automatically collected events.
|
||||||
|
*
|
||||||
* @param {string} name The name of the event
|
* @param {string} name The name of the event
|
||||||
* @param {any} params Some param to configure something
|
* @param {any} params Some param to configure something
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
logEvent(name: string, params: any): Promise<any> {
|
logEvent(name: string, params: any): Promise<any> {
|
||||||
@ -66,8 +66,9 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Sets the user ID property.
|
* Sets the user ID property.
|
||||||
* This feature must be used in accordance with Google's Privacy Policy.
|
* This feature must be used in accordance with Google's Privacy Policy.
|
||||||
|
*
|
||||||
* @param {string} id The user ID
|
* @param {string} id The user ID
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setUserId(id: string): Promise<any> {
|
setUserId(id: string): Promise<any> {
|
||||||
@ -77,9 +78,10 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* This feature must be used in accordance with Google's Privacy Policy.
|
* This feature must be used in accordance with Google's Privacy Policy.
|
||||||
* Be aware of automatically collected user properties.
|
* Be aware of automatically collected user properties.
|
||||||
|
*
|
||||||
* @param {string} name The property name
|
* @param {string} name The property name
|
||||||
* @param {string} value The property value
|
* @param {string} value The property value
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setUserProperty(name: string, value: string): Promise<any> {
|
setUserProperty(name: string, value: string): Promise<any> {
|
||||||
@ -88,8 +90,9 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether analytics collection is enabled for this app on this device.
|
* Sets whether analytics collection is enabled for this app on this device.
|
||||||
|
*
|
||||||
* @param {boolean} enabled
|
* @param {boolean} enabled
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setEnabled(enabled: boolean): Promise<any> {
|
setEnabled(enabled: boolean): Promise<any> {
|
||||||
@ -99,8 +102,9 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Sets the current screen name, which specifies the current visual context in your app.
|
* Sets the current screen name, which specifies the current visual context in your app.
|
||||||
* This helps identify the areas in your app where users spend their time and how they interact with your app.
|
* This helps identify the areas in your app where users spend their time and how they interact with your app.
|
||||||
|
*
|
||||||
* @param {string} name The name of the screen
|
* @param {string} name The name of the screen
|
||||||
* @return {Promise<any>} Returns a promise
|
* @returns {Promise<any>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setCurrentScreen(name: string): Promise<any> {
|
setCurrentScreen(name: string): Promise<any> {
|
||||||
@ -109,7 +113,8 @@ export class FirebaseAnalytics extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all analytics data for this instance from the device and resets the app instance ID
|
* Clears all analytics data for this instance from the device and resets the app instance ID
|
||||||
* @return {Promise<void>} Returns a promise
|
*
|
||||||
|
* @returns {Promise<void>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
resetAnalyticsData(): Promise<void> {
|
resetAnalyticsData(): Promise<void> {
|
||||||
|
@ -6,7 +6,6 @@ import { Observable } from 'rxjs';
|
|||||||
* @name Firebase Authentication
|
* @name Firebase Authentication
|
||||||
* @description
|
* @description
|
||||||
* Cordova plugin for Firebase Authentication
|
* Cordova plugin for Firebase Authentication
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FirebaseAuthentication } from '@awesome-cordova-plugins/firebase-authentication/ngx';
|
* import { FirebaseAuthentication } from '@awesome-cordova-plugins/firebase-authentication/ngx';
|
||||||
@ -36,7 +35,8 @@ import { Observable } from 'rxjs';
|
|||||||
export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Returns the current user logged in Firebase service
|
* Returns the current user logged in Firebase service
|
||||||
* @return {Promise<any>} Returns the user info
|
*
|
||||||
|
* @returns {Promise<any>} Returns the user info
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
getCurrentUser(): Promise<any> {
|
getCurrentUser(): Promise<any> {
|
||||||
@ -45,8 +45,9 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a JWT token used to identify the user to a Firebase service.
|
* Returns a JWT token used to identify the user to a Firebase service.
|
||||||
|
*
|
||||||
* @param forceRefresh {boolean} Force Refresh
|
* @param forceRefresh {boolean} Force Refresh
|
||||||
* @return {Promise<any>} Returns the id token
|
* @returns {Promise<any>} Returns the id token
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
getIdToken(forceRefresh: boolean): Promise<any> {
|
getIdToken(forceRefresh: boolean): Promise<any> {
|
||||||
@ -55,6 +56,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to create a new user account with the given email address and password.
|
* Tries to create a new user account with the given email address and password.
|
||||||
|
*
|
||||||
* @param email Email
|
* @param email Email
|
||||||
* @param password Password
|
* @param password Password
|
||||||
*/
|
*/
|
||||||
@ -74,6 +76,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Triggers the Firebase Authentication backend to send a password-reset email to the given email address,
|
* Triggers the Firebase Authentication backend to send a password-reset email to the given email address,
|
||||||
* which must correspond to an existing user of your app.
|
* which must correspond to an existing user of your app.
|
||||||
|
*
|
||||||
* @param email Email
|
* @param email Email
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -83,6 +86,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Asynchronously signs in using an email and password.
|
* Asynchronously signs in using an email and password.
|
||||||
|
*
|
||||||
* @param email Email
|
* @param email Email
|
||||||
* @param password Password
|
* @param password Password
|
||||||
*/
|
*/
|
||||||
@ -99,6 +103,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
* timeout [milliseconds] is the maximum amount of time you are willing to wait for SMS auto-retrieval
|
* timeout [milliseconds] is the maximum amount of time you are willing to wait for SMS auto-retrieval
|
||||||
* to be completed by the library. Maximum allowed value is 2 minutes. Use 0 to disable SMS-auto-retrieval.
|
* to be completed by the library. Maximum allowed value is 2 minutes. Use 0 to disable SMS-auto-retrieval.
|
||||||
* If you specify a positive value less than 30 seconds, library will default to 30 seconds.
|
* If you specify a positive value less than 30 seconds, library will default to 30 seconds.
|
||||||
|
*
|
||||||
* @param phoneNumber Phone number
|
* @param phoneNumber Phone number
|
||||||
* @param timeout {number} Timeout
|
* @param timeout {number} Timeout
|
||||||
*/
|
*/
|
||||||
@ -109,6 +114,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Asynchronously signs in using verificationId and 6-digit SMS code.
|
* Asynchronously signs in using verificationId and 6-digit SMS code.
|
||||||
|
*
|
||||||
* @param verificationId Verification ID
|
* @param verificationId Verification ID
|
||||||
* @param smsCode SMS code
|
* @param smsCode SMS code
|
||||||
*/
|
*/
|
||||||
@ -127,6 +133,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses Google's idToken and accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
|
* Uses Google's idToken and accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
|
||||||
|
*
|
||||||
* @param idToken ID Token
|
* @param idToken ID Token
|
||||||
* @param accessToken Access Token
|
* @param accessToken Access Token
|
||||||
*/
|
*/
|
||||||
@ -137,7 +144,9 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses Apples's idToken and rawNonce (optional) to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
|
* Uses Apples's idToken and rawNonce (optional) to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS
|
||||||
|
*
|
||||||
* @param idToken ID Token
|
* @param idToken ID Token
|
||||||
|
* @param identityToken
|
||||||
* @param rawNonce Access Token
|
* @param rawNonce Access Token
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -147,6 +156,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses Facebook's accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
|
* Uses Facebook's accessToken to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
|
||||||
|
*
|
||||||
* @param accessToken Access Token
|
* @param accessToken Access Token
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
@ -156,6 +166,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses Twitter's token and secret to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
|
* Uses Twitter's token and secret to sign-in into firebase account. In order to retrieve those tokens follow instructions for Android and iOS.
|
||||||
|
*
|
||||||
* @param token Token
|
* @param token Token
|
||||||
* @param secret Secret
|
* @param secret Secret
|
||||||
*/
|
*/
|
||||||
@ -177,6 +188,7 @@ export class FirebaseAuthentication extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set's the current user language code. The string used to set this property must be a language code that follows BCP 47.
|
* Set's the current user language code. The string used to set this property must be a language code that follows BCP 47.
|
||||||
|
*
|
||||||
* @param languageCode Language Code
|
* @param languageCode Language Code
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
|
@ -6,7 +6,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @name Firebase Config
|
* @name Firebase Config
|
||||||
* @description
|
* @description
|
||||||
* Cordova plugin for Firebase Config
|
* Cordova plugin for Firebase Config
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FirebaseConfig } from '@awesome-cordova-plugins/firebase-config/ngx';
|
* import { FirebaseConfig } from '@awesome-cordova-plugins/firebase-config/ngx';
|
||||||
|
@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @name FirebaseCrash
|
* @name FirebaseCrash
|
||||||
* @description
|
* @description
|
||||||
* This plugin brings crash reporting from Google Firebase to your Cordova project! Android and iOS supported.
|
* This plugin brings crash reporting from Google Firebase to your Cordova project! Android and iOS supported.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FirebaseCrash } from '@awesome-cordova-plugins/firebase-crash';
|
* import { FirebaseCrash } from '@awesome-cordova-plugins/firebase-crash';
|
||||||
@ -32,8 +31,9 @@ export class FirebaseCrash extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Add logging that will be sent with your crash data in case of app crash.
|
* Add logging that will be sent with your crash data in case of app crash.
|
||||||
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#add_custom_logs
|
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#add_custom_logs
|
||||||
|
*
|
||||||
* @param {string} message
|
* @param {string} message
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
log(message: string): Promise<any> {
|
log(message: string): Promise<any> {
|
||||||
@ -43,8 +43,9 @@ export class FirebaseCrash extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Log non-fatal exceptions in addition to automatically reported app crashes.
|
* Log non-fatal exceptions in addition to automatically reported app crashes.
|
||||||
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#log_non-fatal_exceptions
|
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#log_non-fatal_exceptions
|
||||||
|
*
|
||||||
* @param {string} message
|
* @param {string} message
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
logError(message: string): Promise<any> {
|
logError(message: string): Promise<any> {
|
||||||
@ -54,6 +55,7 @@ export class FirebaseCrash extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Sets the user identifier property for crashlytics reporting.
|
* Sets the user identifier property for crashlytics reporting.
|
||||||
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
|
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
|
||||||
|
*
|
||||||
* @param {string} userId value to set the userId
|
* @param {string} userId value to set the userId
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @name Firebase Crashlytics
|
* @name Firebase Crashlytics
|
||||||
* @description
|
* @description
|
||||||
* A Google Firebase Crashlytics plugin to enable capture of crash reports.
|
* A Google Firebase Crashlytics plugin to enable capture of crash reports.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FirebaseCrashlytics } from '@awesome-cordova-plugins/firebase-crashlytics/ngx';
|
* import { FirebaseCrashlytics } from '@awesome-cordova-plugins/firebase-crashlytics/ngx';
|
||||||
|
@ -81,7 +81,6 @@ export interface ILinkOptions {
|
|||||||
* this.firebaseDynamicLinks.onDynamicLink()
|
* this.firebaseDynamicLinks.onDynamicLink()
|
||||||
* .subscribe((res: any) => console.log(res), (error:any) => console.log(error));
|
* .subscribe((res: any) => console.log(res), (error:any) => console.log(error));
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* DynamicLinksOptions
|
* DynamicLinksOptions
|
||||||
*/
|
*/
|
||||||
@ -99,7 +98,8 @@ export interface ILinkOptions {
|
|||||||
export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
|
export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Determines if the app has a pending dynamic link and provides access to the dynamic link parameters.
|
* Determines if the app has a pending dynamic link and provides access to the dynamic link parameters.
|
||||||
* @return {Promise<IDynamicLink>} Returns a promise
|
*
|
||||||
|
* @returns {Promise<IDynamicLink>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
otherPromise: true,
|
otherPromise: true,
|
||||||
@ -110,7 +110,8 @@ export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers callback that is triggered on each dynamic link click.
|
* Registers callback that is triggered on each dynamic link click.
|
||||||
* @return {Observable<IDynamicLink>} Returns an observable
|
*
|
||||||
|
* @returns {Observable<IDynamicLink>} Returns an observable
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
@ -122,8 +123,10 @@ export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Dynamic Link from the parameters. Returns a promise fulfilled with the new dynamic link url.
|
* Creates a Dynamic Link from the parameters. Returns a promise fulfilled with the new dynamic link url.
|
||||||
|
*
|
||||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||||
* @return {Promise<string>} Returns a promise with the url
|
* @param opts
|
||||||
|
* @returns {Promise<string>} Returns a promise with the url
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
otherPromise: true,
|
otherPromise: true,
|
||||||
@ -134,8 +137,10 @@ export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a shortened Dynamic Link from the parameters. Shorten the path to a string that is only as long as needed to be unique, with a minimum length of 4 characters. Use this method if sensitive information would not be exposed if a short Dynamic Link URL were guessed.
|
* Creates a shortened Dynamic Link from the parameters. Shorten the path to a string that is only as long as needed to be unique, with a minimum length of 4 characters. Use this method if sensitive information would not be exposed if a short Dynamic Link URL were guessed.
|
||||||
|
*
|
||||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||||
* @return {Promise<string>} Returns a promise with the url
|
* @param opts
|
||||||
|
* @returns {Promise<string>} Returns a promise with the url
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
otherPromise: true,
|
otherPromise: true,
|
||||||
@ -146,8 +151,10 @@ export class FirebaseDynamicLinks extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a Dynamic Link from the parameters. Shorten the path to an unguessable string. Such strings are created by base62-encoding randomly generated 96-bit numbers, and consist of 17 alphanumeric characters. Use unguessable strings to prevent your Dynamic Links from being crawled, which can potentially expose sensitive information.
|
* Creates a Dynamic Link from the parameters. Shorten the path to an unguessable string. Such strings are created by base62-encoding randomly generated 96-bit numbers, and consist of 17 alphanumeric characters. Use unguessable strings to prevent your Dynamic Links from being crawled, which can potentially expose sensitive information.
|
||||||
|
*
|
||||||
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
* @param {ILinkOptions} opt [Dynamic Link Parameters](https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks#dynamic-link-parameters)
|
||||||
* @return {Promise<string>} Returns a promise with the url
|
* @param opts
|
||||||
|
* @returns {Promise<string>} Returns a promise with the url
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
otherPromise: true,
|
otherPromise: true,
|
||||||
|
@ -42,7 +42,6 @@ export type FirebaseMessagingTokenType = 'apns-buffer' | 'apns-string';
|
|||||||
* @name Firebase Messaging
|
* @name Firebase Messaging
|
||||||
* @description
|
* @description
|
||||||
* Cordova plugin for Firebase Messaging
|
* Cordova plugin for Firebase Messaging
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FirebaseMessaging } from '@awesome-cordova-plugins/firebase-messaging/ngx';
|
* import { FirebaseMessaging } from '@awesome-cordova-plugins/firebase-messaging/ngx';
|
||||||
@ -94,6 +93,7 @@ export class FirebaseMessaging extends AwesomeCordovaNativePlugin {
|
|||||||
* Grant permission to receive push notifications (will trigger prompt on iOS).
|
* Grant permission to receive push notifications (will trigger prompt on iOS).
|
||||||
*
|
*
|
||||||
* @param {IRequestPermissionOptions} [options]
|
* @param {IRequestPermissionOptions} [options]
|
||||||
|
* @param options.forceShow
|
||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
|
@ -225,7 +225,6 @@ export interface ImageLabel {
|
|||||||
* @name Firebase Vision
|
* @name Firebase Vision
|
||||||
* @description
|
* @description
|
||||||
* Cordova plugin for Firebase MLKit Vision
|
* Cordova plugin for Firebase MLKit Vision
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FirebaseVision } from '@awesome-cordova-plugins/firebase-vision/ngx';
|
* import { FirebaseVision } from '@awesome-cordova-plugins/firebase-vision/ngx';
|
||||||
@ -261,8 +260,9 @@ export interface ImageLabel {
|
|||||||
export class FirebaseVision extends AwesomeCordovaNativePlugin {
|
export class FirebaseVision extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Recognize text in image
|
* Recognize text in image
|
||||||
|
*
|
||||||
* @param file_uri {string} Image URI
|
* @param file_uri {string} Image URI
|
||||||
* @return {Promise<string>} Returns a promise that fulfills with the text in the image
|
* @returns {Promise<string>} Returns a promise that fulfills with the text in the image
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
onDeviceTextRecognizer(file_uri: string): Promise<Text> {
|
onDeviceTextRecognizer(file_uri: string): Promise<Text> {
|
||||||
@ -270,8 +270,9 @@ export class FirebaseVision extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Read data from Barcode
|
* Read data from Barcode
|
||||||
|
*
|
||||||
* @param file_uri {string} Image URI
|
* @param file_uri {string} Image URI
|
||||||
* @return {Promise<Barcode[]>} Returns a promise that fulfills with the data in barcode
|
* @returns {Promise<Barcode[]>} Returns a promise that fulfills with the data in barcode
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
barcodeDetector(file_uri: string): Promise<Barcode[]> {
|
barcodeDetector(file_uri: string): Promise<Barcode[]> {
|
||||||
@ -279,8 +280,9 @@ export class FirebaseVision extends AwesomeCordovaNativePlugin {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Recognize object in image
|
* Recognize object in image
|
||||||
|
*
|
||||||
* @param file_uri {string} Image URI
|
* @param file_uri {string} Image URI
|
||||||
* @return {Promise<ImageLabel[]>} Returns a promise that fulfills with the information about entities in an image
|
* @returns {Promise<ImageLabel[]>} Returns a promise that fulfills with the information about entities in an image
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
imageLabeler(file_uri: string): Promise<ImageLabel[]> {
|
imageLabeler(file_uri: string): Promise<ImageLabel[]> {
|
||||||
|
@ -118,7 +118,6 @@ export interface FirebaseUser {
|
|||||||
* @description
|
* @description
|
||||||
* This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported.
|
* This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported.
|
||||||
* It is a maintained fork from unmaintained ionic-navite plugin called Firebase.
|
* It is a maintained fork from unmaintained ionic-navite plugin called Firebase.
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { FirebaseX } from '@awesome-cordova-plugins/firebase-x/ngx';
|
* import { FirebaseX } from '@awesome-cordova-plugins/firebase-x/ngx';
|
||||||
@ -141,7 +140,6 @@ export interface FirebaseUser {
|
|||||||
* ```
|
* ```
|
||||||
* @interfaces
|
* @interfaces
|
||||||
* IChannelOptions
|
* IChannelOptions
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
pluginName: 'FirebaseX',
|
pluginName: 'FirebaseX',
|
||||||
@ -154,7 +152,8 @@ export interface FirebaseUser {
|
|||||||
export class FirebaseX extends AwesomeCordovaNativePlugin {
|
export class FirebaseX extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Get the current FCM token.
|
* Get the current FCM token.
|
||||||
* @return {Promise<null | string>} Note that token will be null if it has not been established yet
|
*
|
||||||
|
* @returns {Promise<null | string>} Note that token will be null if it has not been established yet
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getToken(): Promise<null | string> {
|
getToken(): Promise<null | string> {
|
||||||
@ -163,7 +162,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the app instance ID (an constant ID which persists as long as the app is not uninstalled/reinstalled)
|
* Get the app instance ID (an constant ID which persists as long as the app is not uninstalled/reinstalled)
|
||||||
* @return {Promise<null | string>} Note that ID will be null if it has not been established yet
|
*
|
||||||
|
* @returns {Promise<null | string>} Note that ID will be null if it has not been established yet
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getId(): Promise<null | string> {
|
getId(): Promise<null | string> {
|
||||||
@ -172,7 +172,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current FCM user.
|
* Get the current FCM user.
|
||||||
* @return {Promise<FirebaseUser | string>}
|
*
|
||||||
|
* @returns {Promise<FirebaseUser | string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getCurrentUser(): Promise<FirebaseUser | string> {
|
getCurrentUser(): Promise<FirebaseUser | string> {
|
||||||
@ -181,7 +182,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reload the current FCM user.
|
* Reload the current FCM user.
|
||||||
* @return {Promise<FirebaseUser | string>}
|
*
|
||||||
|
* @returns {Promise<FirebaseUser | string>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
reloadCurrentUser(): Promise<FirebaseUser | string> {
|
reloadCurrentUser(): Promise<FirebaseUser | string> {
|
||||||
@ -190,7 +192,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get notified when a token is refreshed.
|
* Get notified when a token is refreshed.
|
||||||
* @return {Observable<any>}
|
*
|
||||||
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -202,7 +205,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* iOS only.
|
* iOS only.
|
||||||
* Get the APNS token allocated for this app install.
|
* Get the APNS token allocated for this app install.
|
||||||
* @return {Promise<null | string>} Note that token will be null if it has not been established yet
|
*
|
||||||
|
* @returns {Promise<null | string>} Note that token will be null if it has not been established yet
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getAPNSToken(): Promise<null | string> {
|
getAPNSToken(): Promise<null | string> {
|
||||||
@ -213,7 +217,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* iOS only.
|
* iOS only.
|
||||||
* Registers a handler to call when the APNS token is allocated.
|
* Registers a handler to call when the APNS token is allocated.
|
||||||
* This will be called once when remote notifications permission has been granted by the user at runtime.
|
* This will be called once when remote notifications permission has been granted by the user at runtime.
|
||||||
* @return {Observable<any>}
|
*
|
||||||
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -226,7 +231,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* Registers a callback function to invoke when:
|
* Registers a callback function to invoke when:
|
||||||
* - a notification or data message is received by the app
|
* - a notification or data message is received by the app
|
||||||
* - a system notification is tapped by the user
|
* - a system notification is tapped by the user
|
||||||
* @return {Observable<any>}
|
*
|
||||||
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -237,7 +243,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Grant permission to receive push notifications (will trigger prompt) and return hasPermission: true. iOS only (Android will always return true).
|
* Grant permission to receive push notifications (will trigger prompt) and return hasPermission: true. iOS only (Android will always return true).
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS'],
|
platforms: ['iOS'],
|
||||||
@ -248,7 +255,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check permission to receive push notifications and return hasPermission: true. iOS only (Android will always return true).
|
* Check permission to receive push notifications and return hasPermission: true. iOS only (Android will always return true).
|
||||||
* @return {Promise<boolean>}
|
*
|
||||||
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasPermission(): Promise<boolean> {
|
hasPermission(): Promise<boolean> {
|
||||||
@ -265,8 +273,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a number on the icon badge. Set 0 to clear the badge
|
* Set a number on the icon badge. Set 0 to clear the badge
|
||||||
|
*
|
||||||
* @param {number} badgeNumber
|
* @param {number} badgeNumber
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setBadgeNumber(badgeNumber: number): Promise<any> {
|
setBadgeNumber(badgeNumber: number): Promise<any> {
|
||||||
@ -275,7 +284,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get icon badge number.
|
* Get icon badge number.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getBadgeNumber(): Promise<any> {
|
getBadgeNumber(): Promise<any> {
|
||||||
@ -284,7 +294,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear all pending notifications from the drawer.
|
* Clear all pending notifications from the drawer.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
@ -295,8 +306,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to a topic. Topic messaging allows you to send a message to multiple devices that have opted in to a particular topic.
|
* Subscribe to a topic. Topic messaging allows you to send a message to multiple devices that have opted in to a particular topic.
|
||||||
|
*
|
||||||
* @param {string} topic
|
* @param {string} topic
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
subscribe(topic: string): Promise<any> {
|
subscribe(topic: string): Promise<any> {
|
||||||
@ -305,8 +317,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unsubscribe from a topic. This will stop you receiving messages for that topic.
|
* Unsubscribe from a topic. This will stop you receiving messages for that topic.
|
||||||
|
*
|
||||||
* @param {string} topic
|
* @param {string} topic
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
unsubscribe(topic: string): Promise<any> {
|
unsubscribe(topic: string): Promise<any> {
|
||||||
@ -324,6 +337,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Sets whether to autoinit new FCM tokens. By default, a new token will be generated as soon as the old one is removed.
|
* Sets whether to autoinit new FCM tokens. By default, a new token will be generated as soon as the old one is removed.
|
||||||
* To prevent a new token being generated, by sure to disable autoinit using setAutoInitEnabled() before calling unregister().
|
* To prevent a new token being generated, by sure to disable autoinit using setAutoInitEnabled() before calling unregister().
|
||||||
|
*
|
||||||
|
* @param enabled
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setAutoInitEnabled(enabled: boolean): Promise<any> {
|
setAutoInitEnabled(enabled: boolean): Promise<any> {
|
||||||
@ -336,8 +351,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* - for foreground/data notifications: data.notification_android_channel_id
|
* - for foreground/data notifications: data.notification_android_channel_id
|
||||||
*
|
*
|
||||||
* Calling on Android 7 or below or another platform will have no effect.
|
* Calling on Android 7 or below or another platform will have no effect.
|
||||||
|
*
|
||||||
* @param {IChannelOptions} channelOptions
|
* @param {IChannelOptions} channelOptions
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
createChannel(channelOptions: IChannelOptions): Promise<any> {
|
createChannel(channelOptions: IChannelOptions): Promise<any> {
|
||||||
@ -349,8 +365,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* The default channel is used if no other channel exists or is specified in the notification.
|
* The default channel is used if no other channel exists or is specified in the notification.
|
||||||
* Any options not specified will not be overridden. Should be called as soon as possible (on app start) so default notifications will work as expected.
|
* Any options not specified will not be overridden. Should be called as soon as possible (on app start) so default notifications will work as expected.
|
||||||
* Calling on Android 7 or below or another platform will have no effect.
|
* Calling on Android 7 or below or another platform will have no effect.
|
||||||
|
*
|
||||||
* @param {IChannelOptions} channelOptions
|
* @param {IChannelOptions} channelOptions
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setDefaultChannel(channelOptions: IChannelOptions): Promise<any> {
|
setDefaultChannel(channelOptions: IChannelOptions): Promise<any> {
|
||||||
@ -360,8 +377,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Android 8+ only. Removes a previously defined channel.
|
* Android 8+ only. Removes a previously defined channel.
|
||||||
* Calling on Android 7 or below or another platform will have no effect.
|
* Calling on Android 7 or below or another platform will have no effect.
|
||||||
|
*
|
||||||
* @param {string} channelID
|
* @param {string} channelID
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteChannel(channelID: string): Promise<any> {
|
deleteChannel(channelID: string): Promise<any> {
|
||||||
@ -371,7 +389,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Android 8+ only. Gets a list of all channels.
|
* Android 8+ only. Gets a list of all channels.
|
||||||
* Calling on Android 7 or below or another platform will have no effect.
|
* Calling on Android 7 or below or another platform will have no effect.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
listChannels(): Promise<any> {
|
listChannels(): Promise<any> {
|
||||||
@ -380,6 +399,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable analytics collection (useful for GDPR/privacy settings).
|
* Enable/disable analytics collection (useful for GDPR/privacy settings).
|
||||||
|
*
|
||||||
* @param {boolean} enabled
|
* @param {boolean} enabled
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -390,6 +410,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable Crashlytics collection.
|
* Enable/disable Crashlytics collection.
|
||||||
|
*
|
||||||
* @param {boolean} enabled
|
* @param {boolean} enabled
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -400,6 +421,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable performance collection.
|
* Enable/disable performance collection.
|
||||||
|
*
|
||||||
* @param {boolean} enabled
|
* @param {boolean} enabled
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -410,9 +432,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Log an event using Analytics
|
* Log an event using Analytics
|
||||||
|
*
|
||||||
* @param {string} type
|
* @param {string} type
|
||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
logEvent(type: string, data: any): Promise<any> {
|
logEvent(type: string, data: any): Promise<any> {
|
||||||
@ -421,8 +444,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the name of the current screen in Analytics
|
* Set the name of the current screen in Analytics
|
||||||
|
*
|
||||||
* @param {string} name Screen name
|
* @param {string} name Screen name
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setScreenName(name: string): Promise<any> {
|
setScreenName(name: string): Promise<any> {
|
||||||
@ -431,8 +455,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a user id for use in Analytics
|
* Set a user id for use in Analytics
|
||||||
|
*
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setUserId(userId: string): Promise<any> {
|
setUserId(userId: string): Promise<any> {
|
||||||
@ -441,9 +466,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a user property for use in Analytics
|
* Set a user property for use in Analytics
|
||||||
|
*
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @param {string} value
|
* @param {string} value
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setUserProperty(name: string, value: string): Promise<any> {
|
setUserProperty(name: string, value: string): Promise<any> {
|
||||||
@ -457,6 +483,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* To add user IDs to your reports, assign each user a unique identifier in the form of an ID number, token, or hashed value.
|
* To add user IDs to your reports, assign each user a unique identifier in the form of an ID number, token, or hashed value.
|
||||||
*
|
*
|
||||||
* More info https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
|
* More info https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
|
||||||
|
*
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -469,7 +496,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* Simulates (causes) a fatal native crash which causes a crash event to be sent to Crashlytics (useful for testing).
|
* Simulates (causes) a fatal native crash which causes a crash event to be sent to Crashlytics (useful for testing).
|
||||||
* See the Firebase documentation regarding crash testing.
|
* See the Firebase documentation regarding crash testing.
|
||||||
* Crashes will appear under Event type = "Crashes" in the Crashlytics console.
|
* Crashes will appear under Event type = "Crashes" in the Crashlytics console.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
sendCrash(): Promise<any> {
|
sendCrash(): Promise<any> {
|
||||||
@ -479,8 +507,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Sends a crash-related log message that will appear in the Logs section of the next native crash event.
|
* Sends a crash-related log message that will appear in the Logs section of the next native crash event.
|
||||||
* Note: if you don't then crash, the message won't be sent! Also logs the message to the native device console.
|
* Note: if you don't then crash, the message won't be sent! Also logs the message to the native device console.
|
||||||
|
*
|
||||||
* @param {string} message
|
* @param {string} message
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
logMessage(message: string): Promise<any> {
|
logMessage(message: string): Promise<any> {
|
||||||
@ -492,9 +521,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* The event will appear under Event type = "Non-fatals" in the Crashlytics console.
|
* The event will appear under Event type = "Non-fatals" in the Crashlytics console.
|
||||||
* The error message will appear in the Logs section of the non-fatal error event.
|
* The error message will appear in the Logs section of the non-fatal error event.
|
||||||
* Also logs the error message to the native device console.
|
* Also logs the error message to the native device console.
|
||||||
|
*
|
||||||
* @param {string} error
|
* @param {string} error
|
||||||
* @param {object} (optional) a stack trace generated by stacktrace.js
|
* @param {object} (optional) a stack trace generated by stacktrace.js
|
||||||
* @return {Promise<any>}
|
* @param stackTrace
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
logError(error: string, stackTrace?: object): Promise<any> {
|
logError(error: string, stackTrace?: object): Promise<any> {
|
||||||
@ -534,6 +565,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Switch current authentification system language, for example, the phone sms code.
|
* Switch current authentification system language, for example, the phone sms code.
|
||||||
|
*
|
||||||
* @param lang - language to change, ex: 'fr' for french
|
* @param lang - language to change, ex: 'fr' for french
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -544,6 +576,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Signs the user into Firebase with credentials obtained using verifyPhoneNumber().
|
* Signs the user into Firebase with credentials obtained using verifyPhoneNumber().
|
||||||
* See the Android- and iOS-specific Firebase documentation for more info.
|
* See the Android- and iOS-specific Firebase documentation for more info.
|
||||||
|
*
|
||||||
* @param {object} credential - a credential object returned by the success callback of an authentication method
|
* @param {object} credential - a credential object returned by the success callback of an authentication method
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -553,6 +586,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new email/password-based user account. If account creation is successful, user will be automatically signed in.
|
* Creates a new email/password-based user account. If account creation is successful, user will be automatically signed in.
|
||||||
|
*
|
||||||
* @param email
|
* @param email
|
||||||
* @param password
|
* @param password
|
||||||
*/
|
*/
|
||||||
@ -563,6 +597,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Signs in to an email/password-based user account.
|
* Signs in to an email/password-based user account.
|
||||||
|
*
|
||||||
* @param email
|
* @param email
|
||||||
* @param password
|
* @param password
|
||||||
*/
|
*/
|
||||||
@ -573,6 +608,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Signs in user with custom token.
|
* Signs in user with custom token.
|
||||||
|
*
|
||||||
* @param customToken
|
* @param customToken
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -590,6 +626,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Authenticates the user with a Google account to obtain a credential that can be used to sign the user in/link to an existing user account/reauthenticate the user.
|
* Authenticates the user with a Google account to obtain a credential that can be used to sign the user in/link to an existing user account/reauthenticate the user.
|
||||||
|
*
|
||||||
* @param clientId
|
* @param clientId
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -599,6 +636,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Authenticates the user with an Apple account using Sign In with Apple to obtain a credential that can be used to sign the user in/link to an existing user account/reauthenticate the user.
|
* Authenticates the user with an Apple account using Sign In with Apple to obtain a credential that can be used to sign the user in/link to an existing user account/reauthenticate the user.
|
||||||
|
*
|
||||||
* @param locale
|
* @param locale
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
@ -611,9 +649,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Links the user account to an existing Firebase user account with credentials obtained using verifyPhoneNumber().
|
* Links the user account to an existing Firebase user account with credentials obtained using verifyPhoneNumber().
|
||||||
* See the Android- and iOS-specific Firebase documentation for more info.
|
* See the Android- and iOS-specific Firebase documentation for more info.
|
||||||
|
*
|
||||||
* @param {object} credential - a credential object returned by the success callback of an authentication method
|
* @param {object} credential - a credential object returned by the success callback of an authentication method
|
||||||
* @param {function} success - callback function to call on successful sign-in using credentials
|
* @param {Function} success - callback function to call on successful sign-in using credentials
|
||||||
* @param {function} error - callback function which will be passed a {string} error message as an argument
|
* @param {Function} error - callback function which will be passed a {string} error message as an argument
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
linkUserWithCredential(credential: object, success: () => void, error: (err: string) => void): Promise<any> {
|
linkUserWithCredential(credential: object, success: () => void, error: (err: string) => void): Promise<any> {
|
||||||
@ -622,9 +661,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Reauthenticates the currently signed in user with credentials obtained via an authentication method such as verifyPhoneNumber() or authenticateUserWithGoogle().
|
* Reauthenticates the currently signed in user with credentials obtained via an authentication method such as verifyPhoneNumber() or authenticateUserWithGoogle().
|
||||||
|
*
|
||||||
* @param {Object} credential - a credential object returned by the success callback of an authentication method
|
* @param {Object} credential - a credential object returned by the success callback of an authentication method
|
||||||
* @param {function} success - callback function to call on successful sign-in using credentials
|
* @param {Function} success - callback function to call on successful sign-in using credentials
|
||||||
* @param {function} error - callback function which will be passed a {string} error message as an argument
|
* @param {Function} error - callback function which will be passed a {string} error message as an argument
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
reauthenticateWithCredential(credential: any, success: () => void, error: (err: string) => void): Promise<any> {
|
reauthenticateWithCredential(credential: any, success: () => void, error: (err: string) => void): Promise<any> {
|
||||||
@ -649,7 +689,10 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the display name and/or photo URL of the current Firebase user signed into the app.
|
* Updates the display name and/or photo URL of the current Firebase user signed into the app.
|
||||||
|
*
|
||||||
* @param profile
|
* @param profile
|
||||||
|
* @param profile.name
|
||||||
|
* @param profile.photoUri
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
updateUserProfile(profile: { name: string; photoUri: string }): Promise<any> {
|
updateUserProfile(profile: { name: string; photoUri: string }): Promise<any> {
|
||||||
@ -658,6 +701,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates/sets the email address of the current Firebase user signed into the app.
|
* Updates/sets the email address of the current Firebase user signed into the app.
|
||||||
|
*
|
||||||
* @param email
|
* @param email
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -676,6 +720,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates/sets the account password for the current Firebase user signed into the app.
|
* Updates/sets the account password for the current Firebase user signed into the app.
|
||||||
|
*
|
||||||
* @param password
|
* @param password
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -686,6 +731,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Sends a password reset email to the specified user email address.
|
* Sends a password reset email to the specified user email address.
|
||||||
* Note: doesn't require the Firebase user to be signed in to the app.
|
* Note: doesn't require the Firebase user to be signed in to the app.
|
||||||
|
*
|
||||||
* @param email
|
* @param email
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -703,7 +749,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a Javascript function to invoke when Firebase Authentication state changes between user signed in/signed out.
|
* Registers a Javascript function to invoke when Firebase Authentication state changes between user signed in/signed out.
|
||||||
* @param {function} fn - callback function to invoke when authentication state changes
|
*
|
||||||
|
* @param {Function} fn - callback function to invoke when authentication state changes
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
registerAuthStateChangeListener(fn: any): Promise<any> {
|
registerAuthStateChangeListener(fn: any): Promise<any> {
|
||||||
@ -712,8 +759,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch Remote Config parameter values for your app.
|
* Fetch Remote Config parameter values for your app.
|
||||||
|
*
|
||||||
* @param {number} cacheExpirationSeconds specify the cacheExpirationSeconds
|
* @param {number} cacheExpirationSeconds specify the cacheExpirationSeconds
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
fetch(cacheExpirationSeconds?: number): Promise<any> {
|
fetch(cacheExpirationSeconds?: number): Promise<any> {
|
||||||
@ -722,7 +770,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate the Remote Config fetched config.
|
* Activate the Remote Config fetched config.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
activateFetched(): Promise<any> {
|
activateFetched(): Promise<any> {
|
||||||
@ -731,8 +780,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a Remote Config value.
|
* Retrieve a Remote Config value.
|
||||||
|
*
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getValue(key: string): Promise<any> {
|
getValue(key: string): Promise<any> {
|
||||||
@ -741,8 +791,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Android only. Retrieve a Remote Config byte array.
|
* Android only. Retrieve a Remote Config byte array.
|
||||||
|
*
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getByteArray(key: string): Promise<any> {
|
getByteArray(key: string): Promise<any> {
|
||||||
@ -751,7 +802,8 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Android only. Get the current state of the FirebaseRemoteConfig singleton object.
|
* Android only. Get the current state of the FirebaseRemoteConfig singleton object.
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getInfo(): Promise<any> {
|
getInfo(): Promise<any> {
|
||||||
@ -760,8 +812,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Android only. Change the settings for the FirebaseRemoteConfig object's operations.
|
* Android only. Change the settings for the FirebaseRemoteConfig object's operations.
|
||||||
|
*
|
||||||
* @param {Object} settings
|
* @param {Object} settings
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setConfigSettings(settings: any): Promise<any> {
|
setConfigSettings(settings: any): Promise<any> {
|
||||||
@ -770,8 +823,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Android only. Set defaults in the Remote Config.
|
* Android only. Set defaults in the Remote Config.
|
||||||
|
*
|
||||||
* @param {Object} settings
|
* @param {Object} settings
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setDefaults(settings: any): Promise<any> {
|
setDefaults(settings: any): Promise<any> {
|
||||||
@ -780,8 +834,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a trace.
|
* Start a trace.
|
||||||
|
*
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
startTrace(name: string): Promise<any> {
|
startTrace(name: string): Promise<any> {
|
||||||
@ -792,8 +847,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* To count the performance-related events that occur in your app (such as cache hits or retries),
|
* To count the performance-related events that occur in your app (such as cache hits or retries),
|
||||||
* add a line of code similar to the following whenever the event occurs,
|
* add a line of code similar to the following whenever the event occurs,
|
||||||
* using a string other than retry to name that event if you are counting a different type of event.
|
* using a string other than retry to name that event if you are counting a different type of event.
|
||||||
|
*
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
incrementCounter(name: string): Promise<any> {
|
incrementCounter(name: string): Promise<any> {
|
||||||
@ -802,8 +858,9 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop the trace.
|
* Stop the trace.
|
||||||
|
*
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
stopTrace(name: string): Promise<any> {
|
stopTrace(name: string): Promise<any> {
|
||||||
@ -812,10 +869,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a new document to a Firestore collection, which will be allocated an auto-generated document ID.
|
* Adds a new document to a Firestore collection, which will be allocated an auto-generated document ID.
|
||||||
|
*
|
||||||
* @param {object} document - document object to add to collection
|
* @param {object} document - document object to add to collection
|
||||||
* @param {string} collection - name of top-level collection to add document to.
|
* @param {string} collection - name of top-level collection to add document to.
|
||||||
* @param {function} success - callback function to call on successfully adding the document. Will be passed a {string} argument containing the auto-generated document ID that the document was stored against.
|
* @param {Function} success - callback function to call on successfully adding the document. Will be passed a {string} argument containing the auto-generated document ID that the document was stored against.
|
||||||
* @param {function} error - callback function which will be passed a {string} error message as an argument.
|
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
addDocumentToFirestoreCollection(
|
addDocumentToFirestoreCollection(
|
||||||
@ -829,11 +887,12 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets (adds/replaces) a document with the given ID in a Firestore collection.
|
* Sets (adds/replaces) a document with the given ID in a Firestore collection.
|
||||||
|
*
|
||||||
* @param {string} documentId - document ID to use when setting document in the collection.
|
* @param {string} documentId - document ID to use when setting document in the collection.
|
||||||
* @param {object} document - document object to set in collection.
|
* @param {object} document - document object to set in collection.
|
||||||
* @param {string} collection - name of top-level collection to set document in.
|
* @param {string} collection - name of top-level collection to set document in.
|
||||||
* @param {function} success - callback function to call on successfully setting the document.
|
* @param {Function} success - callback function to call on successfully setting the document.
|
||||||
* @param {function} error - callback function which will be passed a {string} error message as an argument.
|
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setDocumentInFirestoreCollection(
|
setDocumentInFirestoreCollection(
|
||||||
@ -850,11 +909,12 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
* Updates an existing document with the given ID in a Firestore collection. This is a non-destructive update that will only
|
* Updates an existing document with the given ID in a Firestore collection. This is a non-destructive update that will only
|
||||||
* overwrite existing keys in the existing document or add new ones if they don't already exist. If the no document with the
|
* overwrite existing keys in the existing document or add new ones if they don't already exist. If the no document with the
|
||||||
* specified ID exists in the collection, an error will be raised.
|
* specified ID exists in the collection, an error will be raised.
|
||||||
|
*
|
||||||
* @param {string} documentId - document ID of the document to update.
|
* @param {string} documentId - document ID of the document to update.
|
||||||
* @param {object} document - entire document or document fragment to update existing document with.
|
* @param {object} document - entire document or document fragment to update existing document with.
|
||||||
* @param {string} collection - name of top-level collection to update document in.
|
* @param {string} collection - name of top-level collection to update document in.
|
||||||
* @param {function} success - callback function to call on successfully updating the document.
|
* @param {Function} success - callback function to call on successfully updating the document.
|
||||||
* @param {function} error - callback function which will be passed a {string} error message as an argument.
|
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
updateDocumentInFirestoreCollection(
|
updateDocumentInFirestoreCollection(
|
||||||
@ -870,10 +930,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Deletes an existing document with the given ID in a Firestore collection.
|
* Deletes an existing document with the given ID in a Firestore collection.
|
||||||
* - Note: If the no document with the specified ID exists in the collection, the Firebase SDK will still return a successful outcome.
|
* - Note: If the no document with the specified ID exists in the collection, the Firebase SDK will still return a successful outcome.
|
||||||
|
*
|
||||||
* @param {string} documentId - document ID of the document to delete.
|
* @param {string} documentId - document ID of the document to delete.
|
||||||
* @param {string} collection - name of top-level collection to delete document in.
|
* @param {string} collection - name of top-level collection to delete document in.
|
||||||
* @param {function} success - callback function to call on successfully deleting the document.
|
* @param {Function} success - callback function to call on successfully deleting the document.
|
||||||
* @param {function} error - callback function which will be passed a {string} error message as an argument.
|
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteDocumentFromFirestoreCollection(
|
deleteDocumentFromFirestoreCollection(
|
||||||
@ -888,10 +949,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Fetches an existing document with the given ID from a Firestore collection.
|
* Fetches an existing document with the given ID from a Firestore collection.
|
||||||
* -Note: If the no document with the specified ID exists in the collection, the error callback will be invoked.
|
* -Note: If the no document with the specified ID exists in the collection, the error callback will be invoked.
|
||||||
|
*
|
||||||
* @param {string} documentId - document ID of the document to fetch.
|
* @param {string} documentId - document ID of the document to fetch.
|
||||||
* @param {string} collection - name of top-level collection to fetch document from.
|
* @param {string} collection - name of top-level collection to fetch document from.
|
||||||
* @param {function} success - callback function to call on successfully fetching the document. Will be passed an {object} contain the document contents.
|
* @param {Function} success - callback function to call on successfully fetching the document. Will be passed an {object} contain the document contents.
|
||||||
* @param {function} error - callback function which will be passed a {string} error message as an argument.
|
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
fetchDocumentInFirestoreCollection(
|
fetchDocumentInFirestoreCollection(
|
||||||
@ -905,10 +967,11 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches all the documents in the specific collection.
|
* Fetches all the documents in the specific collection.
|
||||||
|
*
|
||||||
* @param {string} collection - name of top-level collection to fetch.
|
* @param {string} collection - name of top-level collection to fetch.
|
||||||
* @param {function} success - callback function to call on successfully deleting the document. Will be passed an {object} containing all the documents in the collection,
|
* @param {Function} success - callback function to call on successfully deleting the document. Will be passed an {object} containing all the documents in the collection,
|
||||||
* indexed by document ID. If a Firebase collection with that name does not exist or it contains no documents, the object will be empty.
|
* indexed by document ID. If a Firebase collection with that name does not exist or it contains no documents, the object will be empty.
|
||||||
* @param {function} error - callback function which will be passed a {string} error message as an argument.
|
* @param {Function} error - callback function which will be passed a {string} error message as an argument.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
fetchFirestoreCollection(
|
fetchFirestoreCollection(
|
||||||
|
@ -7,7 +7,6 @@ import { Observable } from 'rxjs';
|
|||||||
* @capacitorincompatible true
|
* @capacitorincompatible true
|
||||||
* @description
|
* @description
|
||||||
* This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported (including iOS 10).
|
* This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported (including iOS 10).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Firebase } from '@awesome-cordova-plugins/firebase/ngx';
|
* import { Firebase } from '@awesome-cordova-plugins/firebase/ngx';
|
||||||
@ -39,7 +38,8 @@ import { Observable } from 'rxjs';
|
|||||||
export class Firebase extends AwesomeCordovaNativePlugin {
|
export class Firebase extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Get the device token
|
* Get the device token
|
||||||
* @return {Promise<null | string>} Note that token will be null if it has not been established yet
|
*
|
||||||
|
* @returns {Promise<null | string>} Note that token will be null if it has not been established yet
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getToken(): Promise<null | string> {
|
getToken(): Promise<null | string> {
|
||||||
@ -48,7 +48,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get notified when a token is refreshed
|
* Get notified when a token is refreshed
|
||||||
* @return {Observable<any>}
|
*
|
||||||
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -59,7 +60,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get notified when the user opens a notification
|
* Get notified when the user opens a notification
|
||||||
* @return {Observable<any>}
|
*
|
||||||
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
@ -70,7 +72,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Grant permission to receive push notifications
|
* Grant permission to receive push notifications
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['iOS'],
|
platforms: ['iOS'],
|
||||||
@ -81,7 +84,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check permission to receive push notifications
|
* Check permission to receive push notifications
|
||||||
* @return {Promise<{isEnabled: boolean}>}
|
*
|
||||||
|
* @returns {Promise<{isEnabled: boolean}>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasPermission(): Promise<{ isEnabled: boolean }> {
|
hasPermission(): Promise<{ isEnabled: boolean }> {
|
||||||
@ -90,8 +94,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set icon badge number. Set to 0 to clear the badge.
|
* Set icon badge number. Set to 0 to clear the badge.
|
||||||
|
*
|
||||||
* @param {number} badgeNumber
|
* @param {number} badgeNumber
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setBadgeNumber(badgeNumber: number): Promise<any> {
|
setBadgeNumber(badgeNumber: number): Promise<any> {
|
||||||
@ -100,7 +105,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get icon badge number
|
* Get icon badge number
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getBadgeNumber(): Promise<any> {
|
getBadgeNumber(): Promise<any> {
|
||||||
@ -109,8 +115,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe to a topic
|
* Subscribe to a topic
|
||||||
|
*
|
||||||
* @param {string} topic
|
* @param {string} topic
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
subscribe(topic: string): Promise<any> {
|
subscribe(topic: string): Promise<any> {
|
||||||
@ -119,8 +126,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Unsubscribe from a topic
|
* Unsubscribe from a topic
|
||||||
|
*
|
||||||
* @param {string} topic
|
* @param {string} topic
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
unsubscribe(topic: string): Promise<any> {
|
unsubscribe(topic: string): Promise<any> {
|
||||||
@ -138,9 +146,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Log an event using Analytics
|
* Log an event using Analytics
|
||||||
|
*
|
||||||
* @param {string} type
|
* @param {string} type
|
||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
logEvent(type: string, data: any): Promise<any> {
|
logEvent(type: string, data: any): Promise<any> {
|
||||||
@ -149,8 +158,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Log an Error using FirebaseCrash
|
* Log an Error using FirebaseCrash
|
||||||
|
*
|
||||||
* @param {string} message
|
* @param {string} message
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
logError(message: string): Promise<any> {
|
logError(message: string): Promise<any> {
|
||||||
@ -159,8 +169,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the name of the current screen in Analytics
|
* Set the name of the current screen in Analytics
|
||||||
|
*
|
||||||
* @param {string} name Screen name
|
* @param {string} name Screen name
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setScreenName(name: string): Promise<any> {
|
setScreenName(name: string): Promise<any> {
|
||||||
@ -169,8 +180,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a user id for use in Analytics
|
* Set a user id for use in Analytics
|
||||||
|
*
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setUserId(userId: string): Promise<any> {
|
setUserId(userId: string): Promise<any> {
|
||||||
@ -179,9 +191,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a user property for use in Analytics
|
* Set a user property for use in Analytics
|
||||||
|
*
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @param {string} value
|
* @param {string} value
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
setUserProperty(name: string, value: string): Promise<any> {
|
setUserProperty(name: string, value: string): Promise<any> {
|
||||||
@ -190,8 +203,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch Remote Config parameter values for your app
|
* Fetch Remote Config parameter values for your app
|
||||||
|
*
|
||||||
* @param {number} [cacheExpirationSeconds]
|
* @param {number} [cacheExpirationSeconds]
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
@ -203,7 +217,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate the Remote Config fetched config
|
* Activate the Remote Config fetched config
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
activateFetched(): Promise<any> {
|
activateFetched(): Promise<any> {
|
||||||
@ -212,9 +227,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a Remote Config value
|
* Retrieve a Remote Config value
|
||||||
|
*
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @param {string} [namespace]
|
* @param {string} [namespace]
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
@ -226,9 +242,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a Remote Config byte array
|
* Retrieve a Remote Config byte array
|
||||||
|
*
|
||||||
* @param {string} key
|
* @param {string} key
|
||||||
* @param {string} [namespace]
|
* @param {string} [namespace]
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
@ -239,7 +256,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current state of the FirebaseRemoteConfig singleton object
|
* Get the current state of the FirebaseRemoteConfig singleton object
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
@ -250,8 +268,9 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the settings for the FirebaseRemoteConfig object's operations
|
* Change the settings for the FirebaseRemoteConfig object's operations
|
||||||
|
*
|
||||||
* @param {Object} settings
|
* @param {Object} settings
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
@ -262,9 +281,10 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set defaults in the Remote Config
|
* Set defaults in the Remote Config
|
||||||
|
*
|
||||||
* @param {Object} defaults
|
* @param {Object} defaults
|
||||||
* @param {string} [namespace]
|
* @param {string} [namespace]
|
||||||
* @return {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
@ -275,6 +295,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a trace.
|
* Start a trace.
|
||||||
|
*
|
||||||
* @param {string} trace Trace name
|
* @param {string} trace Trace name
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -286,6 +307,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
* To count the performance-related events that occur in your app (such as cache hits or retries), add a line of code
|
* To count the performance-related events that occur in your app (such as cache hits or retries), add a line of code
|
||||||
* similar to the following whenever the event occurs, using a string other than retry to name that event if you are
|
* similar to the following whenever the event occurs, using a string other than retry to name that event if you are
|
||||||
* counting a different type of event:
|
* counting a different type of event:
|
||||||
|
*
|
||||||
* @param {string} trace Trace name
|
* @param {string} trace Trace name
|
||||||
* @param {string} counter Counter
|
* @param {string} counter Counter
|
||||||
*/
|
*/
|
||||||
@ -296,6 +318,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop the trace
|
* Stop the trace
|
||||||
|
*
|
||||||
* @param {string} trace Trace name
|
* @param {string} trace Trace name
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -303,6 +326,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows the user to enable/disable analytics collection
|
* Allows the user to enable/disable analytics collection
|
||||||
|
*
|
||||||
* @param {boolean} enabled value to set collection
|
* @param {boolean} enabled value to set collection
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -314,6 +338,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Allows the user to set User Identifier for crashlytics reporting
|
* Allows the user to set User Identifier for crashlytics reporting
|
||||||
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
|
* https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids
|
||||||
|
*
|
||||||
* @param {string} userId value to set the userId
|
* @param {string} userId value to set the userId
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@ -324,6 +349,7 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends an SMS to the user with the SMS verification code and returns the Verification ID required to sign in using phone authentication
|
* Sends an SMS to the user with the SMS verification code and returns the Verification ID required to sign in using phone authentication
|
||||||
|
*
|
||||||
* @param {string} phoneNumber The phone number, including '+' and country code
|
* @param {string} phoneNumber The phone number, including '+' and country code
|
||||||
* @param {number} timeoutDuration (Android only) The timeout in sec - no more SMS will be sent to this number until this timeout expires
|
* @param {number} timeoutDuration (Android only) The timeout in sec - no more SMS will be sent to this number until this timeout expires
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
@ -339,7 +365,8 @@ export class Firebase extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear all pending notifications from the drawer
|
* Clear all pending notifications from the drawer
|
||||||
* @return {Promise<any>}
|
*
|
||||||
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android'],
|
platforms: ['Android'],
|
||||||
|
@ -6,7 +6,6 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
* @description This plugin allows you to switch the flashlight / torch of the device on and off.
|
* @description This plugin allows you to switch the flashlight / torch of the device on and off.
|
||||||
*
|
*
|
||||||
* Requires Cordova plugin: `cordova-plugin-flashlight`. For more info, please see the [Flashlight plugin docs](https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin).
|
* Requires Cordova plugin: `cordova-plugin-flashlight`. For more info, please see the [Flashlight plugin docs](https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin).
|
||||||
*
|
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* import { Flashlight } from '@awesome-cordova-plugins/flashlight/ngx';
|
* import { Flashlight } from '@awesome-cordova-plugins/flashlight/ngx';
|
||||||
@ -30,6 +29,7 @@ import { Cordova, AwesomeCordovaNativePlugin, Plugin } from '@awesome-cordova-pl
|
|||||||
export class Flashlight extends AwesomeCordovaNativePlugin {
|
export class Flashlight extends AwesomeCordovaNativePlugin {
|
||||||
/**
|
/**
|
||||||
* Checks if the flashlight is available
|
* Checks if the flashlight is available
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
|
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -39,6 +39,7 @@ export class Flashlight extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches the flashlight on
|
* Switches the flashlight on
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -48,6 +49,7 @@ export class Flashlight extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches the flashlight off
|
* Switches the flashlight off
|
||||||
|
*
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -57,6 +59,7 @@ export class Flashlight extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles the flashlight
|
* Toggles the flashlight
|
||||||
|
*
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -66,6 +69,7 @@ export class Flashlight extends AwesomeCordovaNativePlugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the flashlight is turned on.
|
* Checks if the flashlight is turned on.
|
||||||
|
*
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user