Compare commits

..

71 Commits

Author SHA1 Message Date
Ibby Hadeed
9a4e36d9d8 chore(): update changelog 2017-07-07 18:49:34 -04:00
Ibby Hadeed
0e970f5038 3.14.0 2017-07-07 18:49:28 -04:00
Ibby Hadeed
398d0eeac5 feat(in-app-purchase2): add a second InAppPurchase plugin (#1775)
* initial commit for iap2

* fix(iap2): fix events callbacks (#1705)

* fix(iap2): add missing decorator to register function (#1709)

* (feat): change iap2 for callbacks

* (fix): register cordova

* (doc): updated docs with usage example (#1713)

* (feat): change iap2 for callbacks

* (fix): register cordova

* (doc): adding setup for store
2017-07-07 18:46:17 -04:00
Ibby Hadeed
c0d27262e4 chore(): update changelog 2017-07-05 02:43:36 -04:00
Ibby Hadeed
f41dfee912 3.13.1 2017-07-05 02:43:30 -04:00
Ibby Hadeed
f5f92e191a chore(): use same deps as ionic2-app-base 2017-07-05 02:42:37 -04:00
Daniel Sogl
a6ae0919e4 chore(package): bump dev deps (#1747) 2017-07-05 02:41:35 -04:00
Tanay Parikh
5b914d7f15 fix(document-viewer): make config properties optional (#1767)
- Before it forced defining all properties
- Option arguments can be found ![here](https://github.com/sitewaerts/cordova-plugin-document-viewer#options)
2017-07-04 21:30:55 -04:00
Jan Piotrowski
2f3331e9ea docs(): add anchors to make headlines linkable (#1766) 2017-07-04 20:20:37 -04:00
Dhyey Thakore
c972497475 docs(toast): template literal in example usage (#1760)
The single quote needed to be escaped to providing proper syntax highlighting in documentation.
2017-07-04 02:17:19 -04:00
Jimmy Nguyen
3582e877d6 docs(): improve the docs for firebase dynamic links (#1718)
* Improved the docs for firebase dynamic links

The config.xml example needed to switch the ios and android tag.
Added an example how to use onDynamicLink()

* (doc) Reverted change and expanded example

* (doc) Even more comments for clarity
2017-07-03 17:31:02 -04:00
Petros
0c79ac16ec feat(app-rate): add function navigateToAppStore() (#1719) 2017-07-03 17:30:09 -04:00
Thomas
3af23023ee docs(): add example on how to use onChange() method (#1726) 2017-07-03 17:29:52 -04:00
Jan Piotrowski
f289a6bbb6 docs(screen-orientation): fix description (#1743)
by removing outdated sentence and info
2017-07-03 17:28:28 -04:00
jdgeier
e64cc0c61c feat(app-rate): add function handleNegativeFeedback() (#1748) 2017-07-03 17:27:44 -04:00
Ibby Hadeed
7144eb0afa ci(): generate readmes to ensure docs are valid 2017-07-03 07:40:38 -04:00
Ibby Hadeed
fa93226cbf docs(): fix docs 2017-07-03 07:38:36 -04:00
Ibby Hadeed
613340118c chore(): update changelog 2017-07-03 07:28:05 -04:00
Ibby Hadeed
55d573f144 3.13.0 2017-07-03 07:28:00 -04:00
Van
b56297e115 feat(qqsdk): add qqsdk plugin (#1689) 2017-07-03 07:24:12 -04:00
Nicolas Naso
b8ac7bfb6a feat(pin-check): add pin check plugin (#1734)
* feat(plugin): pin check

* fix(plugin) pluginRef fixed
2017-07-03 07:23:19 -04:00
Ibby Hadeed
7cb95f1b91 docs(): fix type 2017-07-03 07:22:20 -04:00
Ibby Hadeed
da0fd821f7 chore(): update changelog 2017-07-03 07:16:09 -04:00
Ibby Hadeed
6a18d3f1e0 3.12.2 2017-07-03 07:14:07 -04:00
Ibby Hadeed
5072c99938 Merge branch 'master' of github.com:ionic-team/ionic-native 2017-07-03 07:13:26 -04:00
Ibby Hadeed
e40247c211 fix(local-notifications): add missing priority option
closes #1683
2017-07-03 07:13:19 -04:00
Buddy Reno
593607e914 feat(music-controls): add event for ios control center seek and function to update ios elapsed time (#1727) 2017-07-03 07:11:07 -04:00
Jan Piotrowski
51fc5332ff docs(media): improve description (#1744)
(still bad as usage hint is in there, but at least not the only thing any more)
2017-06-29 20:04:00 -04:00
jeffrey n. carre
27fdac91fd docs(): fix typo (#1731)
Instead of intelSec it should be intelSecurity base on the name of the instance.
2017-06-29 02:42:31 -04:00
neoassyrian
3c125bbc84 fix(onesignal): fix getPermissionSubscriptionState return type (#1742) 2017-06-29 02:42:09 -04:00
Brad Grzesiak
62c39b33c6 docs(call-number): provide note about simulators (#1729) 2017-06-28 06:19:22 -04:00
Drake
e6f81519cc docs(background-geolocation): remove references to Windows Phone (#1704) 2017-06-19 21:00:05 -04:00
Daniel Sogl
64ce132262 fix(ibeacon): optional parameter (#1702)
Fix #1701
2017-06-19 20:59:32 -04:00
Michael Alicea
af91977f82 fix(android-fingerprint-auth): fix return type of isAvailable (#1697)
As seen in the Cordova plugin (https://github.com/mjwheatley/cordova-plugin-android-fingerprint-auth) the isAvailable method returns an object that contains 3 parameters, {isAvailable:, isHardwareDetected, hasEnrolledFingerprints}.

If you do a console log on

this.androidFingerprintAuth.isAvailable()
  .then(res => console.log(res))  //Outputs the Object {isAvailable: true, isHardwareDetected: true, hasEnrolledFingerprints: true}
  .catch(err => console.error(err));

So we are getting the data, just need to make the interface expose it.
2017-06-18 17:25:35 -04:00
Orri Arnarsson
07443e0b53 docs(): fix typo in param type (#1699)
'nuber' changed to 'number'
2017-06-18 17:22:28 -04:00
Hsuan Lee
72f838d768 docs(): add escape character (#1698) 2017-06-17 15:29:22 -04:00
Daniel Sogl
fa86cee3fa docs(clipboard): remove old plugin source (#1696) 2017-06-16 11:27:28 -04:00
Roland Brand
83c25b41ef docs(): fix typo (#1690)
fixed a typo in comment
2017-06-15 17:12:56 -04:00
Jan Piotrowski
2128703d8d docs(screenshot): fix param names (#1686) 2017-06-14 01:40:51 -04:00
Kurt De Vos
b52371b174 feat(sqlite): support pre-filled databases (#1687)
Support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext.
2017-06-14 01:40:31 -04:00
Daniel Sogl
65c2665fc0 docs(transfer): fix typo (#1688) 2017-06-14 01:40:11 -04:00
Denis Glad
279b449456 docs(call-number): fix param type (#1684)
Changed first parameter to string when calling callNumber.
2017-06-12 20:05:43 -04:00
Ibby Hadeed
9bd4994f01 chore(): output to dist 2017-06-11 17:43:17 -04:00
Ibby Hadeed
ab74703841 ci(): change cache key for ionic-site repo
CircleCI can only save files one to a specific cache key. I set the cache key to depend on the checksum of package.json, so it updates the cache every time we update Ionic Native. In the long run, CircleCI will have to download the ionic-site changes less often.
2017-06-11 17:37:06 -04:00
Ibby Hadeed
18a81a77a9 refactor(one-signal): add return statement 2017-06-11 17:32:07 -04:00
Ibby Hadeed
2ebfa46437 ci(): build core before compiling ionic native 2017-06-11 17:29:03 -04:00
Ibby Hadeed
1d4fc03cba ci(): run tsc instead of custom script 2017-06-11 17:26:01 -04:00
neoassyrian
e9283a994d feat(one-signal): add getPermissionSubscriptionState (#1678)
* Create index.ts

* Create index.ts
2017-06-11 17:23:47 -04:00
Aleksandr Filatov
ed6fe880b6 refactor(spinner-dialog): change source #1603 (#1675) 2017-06-11 17:21:09 -04:00
Ibby Hadeed
a2d979a277 Create index.ts 2017-06-11 17:18:18 -04:00
Ibby Hadeed
1ccfb1d84c Merge branch 'master' of github.com:ionic-team/ionic-native 2017-06-11 15:23:19 -04:00
Daniel Sogl
2ec0f87a79 docs(globalization): fix typo (#1672) 2017-06-08 19:37:07 -04:00
Ibby Hadeed
03ac735476 fix(mobile-accessibility): fix plugin reference
fixes #1666
2017-06-08 03:17:41 -04:00
Matias Solis de la Torre
9eb29f8924 docs(): add copy icons instructions (#1670)
Add how to copy icons to use in push notifications.
2017-06-07 19:48:13 -04:00
Jan Piotrowski
85a1f6a35b docs(geofence): CLI v3: ionic platform => ionic cordova platform (#1668) 2017-06-07 19:47:50 -04:00
Daniel Sogl
3cb7d6d4d8 docs(AppMinimize): improve example (#1650) 2017-06-05 23:07:41 -04:00
Daniel Sogl
884cabd301 docs(device-accounts): updated source (#1651)
Added NPM support
2017-06-05 23:07:17 -04:00
Daniel Sogl
663c24d2fa docs(file-chooser): changed source (#1652)
* docs(filechooser): changed source

* Update index.ts
2017-06-05 23:07:06 -04:00
Daniel Sogl
fecf8ad994 docs(insomnia): npm support (#1654) 2017-06-05 23:04:11 -04:00
Daniel Sogl
b05ba586f8 docs(mobile-accessibility): npm support (#1655) 2017-06-05 23:04:02 -04:00
Daniel Sogl
4ed8f9337f docs(screenshot): nom support (#1656) 2017-06-05 23:03:50 -04:00
Daniel Sogl
25446441cf docs(stepcounter): changed source (#1657)
* docs(stepcounter): changed source

* Update index.ts
2017-06-05 23:03:07 -04:00
Daniel Sogl
0805d7754e docs(useragent): changed source (#1658) 2017-06-05 23:02:48 -04:00
Daniel Sogl
d60c0800e7 docs(youtube-video-player): changed source (#1659) 2017-06-05 23:02:33 -04:00
Daniel Sogl
35f498b82c docs(video-capture-plus): changed source (#1660) 2017-06-05 23:02:15 -04:00
Daniel Sogl
8cf4a57a77 docs(web-intent): npm support (#1661) 2017-06-05 23:01:54 -04:00
Daniel Sogl
cb51b5abd6 docs(httpd): npm support (#1664) 2017-06-05 23:01:39 -04:00
Daniel Sogl
59a8e76ba9 docs(couchbase-lite): npm support (#1663) 2017-06-05 23:01:15 -04:00
Ibby Hadeed
8f985025d1 chore 2017-06-04 16:54:12 -04:00
Ibby Hadeed
7d9df8c82f chore(): update changelog 2017-06-03 18:43:46 -04:00
Ibby Hadeed
22ccbfdf8f 3.12.1 2017-06-03 18:43:42 -04:00
44 changed files with 1068 additions and 106 deletions

View File

@@ -1,3 +1,76 @@
<a name="3.14.0"></a>
# [3.14.0](https://github.com/ionic-team/ionic-native/compare/v3.13.1...v3.14.0) (2017-07-07)
### Features
* **in-app-purchase2:** add a second InAppPurchase plugin ([#1775](https://github.com/ionic-team/ionic-native/issues/1775)) ([398d0ee](https://github.com/ionic-team/ionic-native/commit/398d0ee)), closes [#1705](https://github.com/ionic-team/ionic-native/issues/1705)
<a name="3.13.1"></a>
## [3.13.1](https://github.com/ionic-team/ionic-native/compare/v3.13.0...v3.13.1) (2017-07-05)
### Bug Fixes
* **document-viewer:** make config properties optional ([#1767](https://github.com/ionic-team/ionic-native/issues/1767)) ([5b914d7](https://github.com/ionic-team/ionic-native/commit/5b914d7))
### Features
* **app-rate:** add function handleNegativeFeedback() ([#1748](https://github.com/ionic-team/ionic-native/issues/1748)) ([e64cc0c](https://github.com/ionic-team/ionic-native/commit/e64cc0c))
* **app-rate:** add function navigateToAppStore() ([#1719](https://github.com/ionic-team/ionic-native/issues/1719)) ([0c79ac1](https://github.com/ionic-team/ionic-native/commit/0c79ac1))
<a name="3.13.0"></a>
# [3.13.0](https://github.com/ionic-team/ionic-native/compare/v3.12.2...v3.13.0) (2017-07-03)
### Features
* **pin-check:** add pin check plugin ([#1734](https://github.com/ionic-team/ionic-native/issues/1734)) ([b8ac7bf](https://github.com/ionic-team/ionic-native/commit/b8ac7bf))
* **qqsdk:** add qqsdk plugin ([#1689](https://github.com/ionic-team/ionic-native/issues/1689)) ([b56297e](https://github.com/ionic-team/ionic-native/commit/b56297e))
<a name="3.12.2"></a>
## [3.12.2](https://github.com/ionic-team/ionic-native/compare/v3.12.1...v3.12.2) (2017-07-03)
### Bug Fixes
* **android-fingerprint-auth:** fix return type of isAvailable ([#1697](https://github.com/ionic-team/ionic-native/issues/1697)) ([af91977](https://github.com/ionic-team/ionic-native/commit/af91977))
* **ibeacon:** optional parameter ([#1702](https://github.com/ionic-team/ionic-native/issues/1702)) ([64ce132](https://github.com/ionic-team/ionic-native/commit/64ce132)), closes [#1701](https://github.com/ionic-team/ionic-native/issues/1701)
* **local-notifications:** add missing priority option ([e40247c](https://github.com/ionic-team/ionic-native/commit/e40247c)), closes [#1683](https://github.com/ionic-team/ionic-native/issues/1683)
* **mobile-accessibility:** fix plugin reference ([03ac735](https://github.com/ionic-team/ionic-native/commit/03ac735)), closes [#1666](https://github.com/ionic-team/ionic-native/issues/1666)
* **onesignal:** fix getPermissionSubscriptionState return type ([#1742](https://github.com/ionic-team/ionic-native/issues/1742)) ([3c125bb](https://github.com/ionic-team/ionic-native/commit/3c125bb))
### Features
* **music-controls:** add event for ios control center seek and function to update ios elapsed time ([#1727](https://github.com/ionic-team/ionic-native/issues/1727)) ([593607e](https://github.com/ionic-team/ionic-native/commit/593607e))
* **one-signal:** add getPermissionSubscriptionState ([#1678](https://github.com/ionic-team/ionic-native/issues/1678)) ([e9283a9](https://github.com/ionic-team/ionic-native/commit/e9283a9))
* **sqlite:** support pre-filled databases ([#1687](https://github.com/ionic-team/ionic-native/issues/1687)) ([b52371b](https://github.com/ionic-team/ionic-native/commit/b52371b))
<a name="3.12.1"></a>
## [3.12.1](https://github.com/ionic-team/ionic-native/compare/v3.12.0...v3.12.1) (2017-06-03)
### Code Refactoring
* **phonegap-local-notification:** fix class name to match plugin name ([c6a76c2](https://github.com/ionic-team/ionic-native/commit/c6a76c2))
### BREAKING CHANGES
* **phonegap-local-notification:** PhonegapLocalNotifications class has been renamed to PhonegapLocalNotification
<a name="3.12.0"></a>
# [3.12.0](https://github.com/ionic-team/ionic-native/compare/v3.11.0...v3.12.0) (2017-06-03)

View File

@@ -7,7 +7,7 @@ jobs:
steps:
- checkout
- restore_cache:
key: ionic-site-{{ .Branch }}
key: ionic-site-{{ checksum "package.json" }}
- run:
name: Prepare ionic-site repo
command: |
@@ -15,7 +15,7 @@ jobs:
./scripts/docs/prepare.sh
fi
- save_cache:
key: ionic-site-{{ .Branch }}
key: ionic-site-{{ checksum "package.json" }}
paths:
- ~/ionic-site/
- restore_cache:
@@ -32,8 +32,11 @@ jobs:
command: npm run lint
- run: bash ./scripts/git/config.sh
- run:
name: Build changed plugins
command: node scripts/ci-tests.js
name: Build Ionic Native
command: npm run build:core && ./node_modules/.bin/tsc
- run:
name: Generate README files to ensure docs are valid
command: npm run readmes
- run:
name: Run tests
command: npm test

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "3.12.0",
"version": "3.12.1",
"lockfileVersion": 1,
"dependencies": {
"@angular/compiler": {

View File

@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "3.12.0",
"version": "3.14.0",
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
"homepage": "https://ionicframework.com/",
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
@@ -39,12 +39,12 @@
"q": "1.5.0",
"queue": "4.2.1",
"rimraf": "2.6.1",
"rxjs": "5.1.1",
"rxjs": "5.4.0",
"semver": "5.3.0",
"tslint": "3.15.1",
"tslint-ionic-rules": "0.0.8",
"typescript": "2.3.3",
"zone.js": "^0.8.11"
"zone.js": "0.8.12"
},
"scripts": {
"start": "npm run test:watch",
@@ -58,7 +58,8 @@
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"postchangelog": "git commit -am \"chore(): update changelog\"",
"test": "karma start karma.conf.js --single-run",
"test:watch": "karma start karma.conf.js"
"test:watch": "karma start karma.conf.js",
"readmes": "gulp readmes"
},
"repository": {
"type": "git",

View File

@@ -127,7 +127,7 @@ docType: "<$ doc.docType $>"
<@- macro documentClass(doc) @>
<@- if doc.statics.length -@>
<h2>Static Members</h2>
<h2><a class="anchor" name="static-members" href="#static-members"></a>Static Members</h2>
<@ for method in doc.statics -@>
<$ documentMethod(method) $>
<@ endfor -@>
@@ -136,7 +136,7 @@ docType: "<$ doc.docType $>"
<# --- methods in class --- #>
<@- if doc.members and doc.members.length @>
<h2>Instance Members</h2>
<h2><a class="anchor" name="instance-members" href="#instance-members"></a>Instance Members</h2>
<@ for method in doc.members -@>
<$ documentMethod(method) $>
<@- endfor @>
@@ -174,7 +174,7 @@ docType: "<$ doc.docType $>"
</p>
<# --- Install commands --- #>
<h2>Installation</h2>
<h2><a class="anchor" name="installation" href="#installation"></a>Installation</h2>
<ol class="installation">
<li>Install the Cordova and Ionic Native plugins:<br>
<pre><code class="nohighlight">$ <@ if prop.install @><$ prop.install $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
@@ -186,7 +186,7 @@ $ npm install --save @ionic-native/<$ doc.npmId $>
<# --- Plugin supported platforms --- #>
<@ if prop.platforms @>
<h2>Supported platforms</h2>
<h2><a class="anchor" name="platforms" href="#platforms"></a>Supported platforms</h2>
<ul>
<@ for platform in prop.platforms -@>
<li><$ platform $></li>
@@ -198,13 +198,13 @@ $ npm install --save @ionic-native/<$ doc.npmId $>
<# --- Plugin usage --- #>
<@ if doc.usage @>
<h2>Usage</h2>
<h2><a class="anchor" name="usage" href="#usage"></a>Usage</h2>
<$ doc.usage | marked $>
<@ endif @>
<# --- Plugin attributes --- #>
<@- if doc.properties -@>
<h2>Attributes:</h2>
<h2><a class="anchor" name="attributes" href="#attributes"></a>Attributes:</h2>
<table class="table" style="margin:0;">
<thead>
<tr>

View File

@@ -192,7 +192,7 @@ export class AndroidFingerprintAuth extends IonicNativePlugin {
* @returns {Promise<any>} Returns a Promise that resolves if fingerprint auth is available on the device
*/
@Cordova()
isAvailable(): Promise<{ isAvailable: boolean }> { return; }
isAvailable(): Promise<{ isAvailable: boolean, isHardwareDetected: boolean, hasEnrolledFingerprints: boolean }> { return; }
/**
* Delete the cipher used for encryption and decryption by username

View File

@@ -8,17 +8,17 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { Platfrom } from 'ionic-angular';
* import { AppMinimize } from '@ionic-native/app-minimize';
*
*
* constructor(private appMinimize: AppMinimize) { }
* constructor(private platform: Platform, private appMinimize: AppMinimize) { }
*
* ...
*
* this.plugin.minimize().then(
* success => console.log('Closed'),
* err => console.log('Something went wrong')
* );
* this.platform.registerBackButtonAction(() => {
* this.appMinimize.minimize();
* });
*
* ```
*/

View File

@@ -61,6 +61,10 @@ export interface AppRateCallbacks {
* call back function. called when rate-dialog showing
*/
onRateDialogShow?: Function;
/**
* call back function. called when user clicked on negative feedback
*/
handleNegativeFeedback?: Function;
}
@@ -159,4 +163,10 @@ export class AppRate extends IonicNativePlugin {
@Cordova()
promptForRating(immediately: boolean): void { };
/**
* Immediately send the user to the app store rating page
*/
@Cordova()
navigateToAppStore(): void { };
}

View File

@@ -125,7 +125,7 @@ export interface BackgroundGeolocationConfig {
startForeground?: boolean;
/**
* ANDROID, WP8 ONLY
* ANDROID ONLY
* When using BackgroundGeolocation.LocationProvider.ANDROID_DISTANCE_FILTER_PROVIDER:
* The minimum time interval between location updates in milliseconds.
* @see Android docs (http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(long,%20float,%20android.location.Criteria,%20android.app.PendingIntent))
@@ -391,7 +391,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS', 'Windows Phone']
platforms: ['iOS']
})
finish(): Promise<any> { return; }
@@ -401,7 +401,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS', 'Windows Phone']
platforms: ['iOS']
})
changePace(isMoving: boolean): Promise<any> { return; }
@@ -420,7 +420,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
* @returns {Promise<Location>}
*/
@Cordova({
platforms: ['iOS', 'Windows Phone']
platforms: ['iOS']
})
getStationaryLocation(): Promise<BackgroundGeolocationResponse> { return; }
@@ -430,7 +430,7 @@ export class BackgroundGeolocation extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS', 'Windows Phone']
platforms: ['iOS']
})
onStationary(): Promise<any> { return; }

View File

@@ -4,6 +4,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
* @name Call Number
* @description
* 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.
*
* @usage
* ```typescript
@@ -14,7 +15,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
* ...
*
*
* this.callNumber.callNumber(18001010101, true)
* this.callNumber.callNumber("18001010101", true)
* .then(() => console.log('Launched dialer!'))
* .catch(() => console.log('Error launching dialer'));
*

View File

@@ -5,8 +5,6 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
* @description
* Clipboard management plugin for Cordova that supports iOS, Android, and Windows Phone 8.
*
* Requires Cordova plugin: https://github.com/VersoSolutions/CordovaClipboard
* For more info, please see the [Clipboard plugin docs](https://github.com/VersoSolutions/CordovaClipboard.git).
*
* @usage
* ```typescript

View File

@@ -23,7 +23,7 @@ import { Injectable } from '@angular/core';
*/
@Plugin({
pluginName: 'CouchbaseLite',
plugin: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin.git',
plugin: 'couchbase-lite-phonegap-plugin',
pluginRef: 'cblite',
repo: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
platforms: ['Android', 'iOS']

View File

@@ -22,9 +22,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'DeviceAccounts',
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
plugin: 'cordova-device-accounts',
pluginRef: 'plugins.DeviceAccounts',
repo: 'https://github.com/loicknuchel/cordova-device-accounts',
repo: 'https://github.com/danielsogl/cordova-device-accounts',
platforms: ['Android']
})
@Injectable()

View File

@@ -2,29 +2,29 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface DocumentViewerOptions {
title: string;
documentView: {
title?: string;
documentView?: {
closeLabel: string;
};
navigationView: {
navigationView?: {
closeLabel: string;
};
email: {
email?: {
enabled: boolean;
};
print: {
print?: {
enabled: boolean;
};
openWith: {
openWith?: {
enabled: boolean;
};
bookmarks: {
bookmarks?: {
enabled: boolean;
};
search: {
search?: {
enabled: boolean;
};
autoClose: {
autoClose?: {
onPause: boolean;
};
}

View File

@@ -23,9 +23,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'FileChooser',
plugin: 'https://github.com/don/cordova-filechooser.git',
plugin: 'cordova-plugin-filechooser',
pluginRef: 'fileChooser',
repo: 'https://github.com/don/cordova-filechooser',
repo: 'https://github.com/ihadeed/cordova-filechooser',
platforms: ['Android']
})
@Injectable()

View File

@@ -40,16 +40,21 @@ export interface DynamicLinksOptions {
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
*
* ...
*
* // The deepLink and callToActionText properties are optional
* const options: DynamicLinksOptions = {
* title: 'My Title';
* message: 'My message';
* deepLink: 'http://example.com/';
* callToActionText: 'Message on button';
* }
*
* this.firebaseDynamicLinks.sendInvitation(options)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* this.firebaseDynamicLinks.onDynamicLink()
* .then((res: any) => console.log(res)) //Handle the logic here after opening the app with the Dynamic link
* .catch((error:any) => console.log(error));
* ```
*
* @interfaces

View File

@@ -72,7 +72,7 @@ declare const window: any;
* ### Troubleshooting ###
* #### I get compile errors when I run `ionic build ios` or `ionic run ios`. ####
* This could be caused by the Cordova project directory in `/platforms/ios` not being named correctly.
* Try running `ionic platform rm <platform>` then run `ionic platform add <platform>` to recreate the
* Try running `ionic cordova platform rm <platform>` then run `ionic cordova platform add <platform>` to recreate the
* platform directories.
*/
@Plugin({

View File

@@ -26,7 +26,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-globalization',
pluginRef: 'navigator.globalization',
repo: 'https://github.com/apache/cordova-plugin-globalization',
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Widnows Phone']
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class Globalization extends IonicNativePlugin {

View File

@@ -49,7 +49,7 @@ export interface HttpdOptions {
*/
@Plugin({
pluginName: 'Httpd',
plugin: 'https://github.com/floatinghotpot/cordova-httpd.git',
plugin: 'cordova-plugin-httpd',
pluginRef: 'cordova.plugins.CorHttpd',
repo: 'https://github.com/floatinghotpot/cordova-httpd',
platforms: ['Android', 'iOS', 'macOS']

View File

@@ -16,7 +16,7 @@ export interface Beacon {
major: number;
/**
* The beacon's major identifier number.
* The beacon's minor identifier number.
*/
minor: number;
@@ -636,7 +636,7 @@ export class IBeacon extends IonicNativePlugin {
* native layer acknowledged the dispatch of the advertising request.
*/
@Cordova({ otherPromise: true })
startAdvertising(region: Region, measuredPower: number): Promise<void> { return; }
startAdvertising(region: Region, measuredPower?: number): Promise<void> { return; }
/**
* Stop advertising as a beacon.

View File

@@ -0,0 +1,425 @@
import { Plugin, IonicNativePlugin, Cordova, CordovaProperty } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @name In App Purchase 2
* @description
* In-App Purchase for Cordova on iOS, Android and Windows
*
* @usage
* ```typescript
* import { InAppPurchase2 } from '@ionic-native/in-app-purchase-2';
*
* constructor(private store: InAppPurchase2) { }
*
* ...
*
* * @advanced
*
* ```typescript
* // After Platform Ready
* this.store.verbosity = this.store.DEBUG;
* this.store.register({
* id: productId,
* alias: productId,
* type: this.store.NON_RENEWING_SUBSCRIPTION
* });
*
* // Register Event Handlers for the specific product
* this.store.when(productId).registered( (product: IAPProduct) => {
* console.log('Registered: ' + JSON.stringify(product));
* });
*
* // Updated
* this.store.when(productId).updated( (product: IAPProduct) => {
* console.log('Loaded' + JSON.stringify(product));
* });
*
* // Issue with buying
* this.store.when(productId).cancelled( (product) => {
* alert('Purchase was Cancelled');
* });
*
* // Track All Store Errors
* this.store.error( (err) => {
* alert('Store Error ' + JSON.stringify(err));
* });
*
* this.store.ready().then((status) => {
* console.log(JSON.stringify(this.store.get(productId)));
* console.log('Store is Ready: ' + JSON.stringify(status));
* console.log('Products: ' + JSON.stringify(this.store.products));
* });
*
*
* // Errors
* this.store.when(productId).error( (error) => {
* this.loader.dismiss();
* alert('An Error Occured' + JSON.stringify(error));
* });
* // Refresh Starts Handlers
* console.log('Refresh Store');
* this.store.refresh();
*
* ...
*
* // To Purchase
* this.store.order(productId);
*
* ```
*
*/
export interface IAPProductOptions {
id: string;
alias: string;
type: string;
}
export type IAPProducts = Array<IAPProduct> & {
/**
* Get product by ID
*/
byId: { [id: string]: IAPProduct; };
/**
* Get product by alias
*/
byAlias: { [alias: string]: IAPProduct; };
/**
* Remove all products (for testing only).
*/
reset: () => {};
};
export type IAPQueryCallback = ((product: IAPProduct) => void) | ((error: IAPError) => void);
export interface IAPProduct {
id: string;
alias: string;
type: string;
state: string;
title: string;
description: string;
priceMicros: string;
price: string;
currency: string;
loaded: boolean;
valid: boolean;
canPurchase: boolean;
owned: boolean;
downloading: boolean;
downloaded: boolean;
additionalData: any;
transaction: any;
finish(): void;
verify(): any;
set(key: string, value: any): void;
stateChanged(): void;
on(event: string, callback: Function): void;
once(event: string, callback: Function): void;
off(callback: Function): void;
trigger(action: string, args: any): void;
}
export interface IAPProductEvents {
loaded: (callback: IAPQueryCallback) => void;
updated: (callback: IAPQueryCallback) => void;
error: (callback: IAPQueryCallback) => void;
approved: (callback: IAPQueryCallback) => void;
owned: (callback: IAPQueryCallback) => void;
cancelled: (callback: IAPQueryCallback) => void;
refunded: (callback: IAPQueryCallback) => void;
registered: (callback: IAPQueryCallback) => void;
valid: (callback: IAPQueryCallback) => void;
invalid: (callback: IAPQueryCallback) => void;
requested: (callback: IAPQueryCallback) => void;
initiated: (callback: IAPQueryCallback) => void;
finished: (callback: IAPQueryCallback) => void;
verified: (callback: IAPQueryCallback) => void;
unverified: (callback: IAPQueryCallback) => void;
expired: (callback: IAPQueryCallback) => void;
downloading: (product: IAPProduct, progress: any, time_remaining: any) => void;
downloaded: (callback: IAPQueryCallback) => void;
}
export class IAPError {
code: number;
message: string;
}
/**
* @name In App Purchase 2
* @description
*
* @usage
* ```
* import { InAppPurchase2 } from '@ionic-native/in-app-purchase-2';
*
*
* constructor(private inAppPurchase2: InAppPurchase2) { }
*
* ...
*
*
* ```
*/
@Plugin({
pluginName: 'InAppPurchase2',
plugin: 'cc.fovea.cordova.purchase',
pluginRef: 'store',
repo: 'https://github.com/j3k0/cordova-plugin-purchase',
platforms: ['iOS', 'Android', 'Windows'],
install: 'ionic cordova plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="<ANDROID_BILLING_KEY>"'
})
@Injectable()
export class InAppPurchase2 extends IonicNativePlugin {
@CordovaProperty
QUIET: number;
@CordovaProperty
ERROR: number;
@CordovaProperty
WARNING: number;
@CordovaProperty
INFO: number;
@CordovaProperty
DEBUG: number;
/**
* Debug level. Use QUIET, ERROR, WARNING, INFO or DEBUG constants
*/
@CordovaProperty
verbosity: number;
/**
* Set to true to invoke the platform purchase sandbox. (Windows only)
*/
@CordovaProperty
sandbox: boolean;
@CordovaProperty
FREE_SUBSCRIPTION: string;
@CordovaProperty
PAID_SUBSCRIPTION: string;
@CordovaProperty
NON_RENEWING_SUBSCRIPTION: string;
@CordovaProperty
CONSUMABLE: string;
@CordovaProperty
NON_CONSUMABLE: string;
@CordovaProperty
ERR_SETUP: number;
@CordovaProperty
ERR_LOAD: number;
@CordovaProperty
ERR_PURCHASE: number;
@CordovaProperty
ERR_LOAD_RECEIPTS: number;
@CordovaProperty
ERR_CLIENT_INVALID: number;
@CordovaProperty
ERR_PAYMENT_CANCELLED: number;
@CordovaProperty
ERR_PAYMENT_INVALID: number;
@CordovaProperty
ERR_PAYMENT_NOT_ALLOWED: number;
@CordovaProperty
ERR_UNKNOWN: number;
@CordovaProperty
ERR_REFRESH_RECEIPTS: number;
@CordovaProperty
ERR_INVALID_PRODUCT_ID: number;
@CordovaProperty
ERR_FINISH: number;
@CordovaProperty
ERR_COMMUNICATION: number;
@CordovaProperty
ERR_SUBSCRIPTIONS_NOT_AVAILABLE: number;
@CordovaProperty
ERR_MISSING_TOKEN: number;
@CordovaProperty
ERR_VERIFICATION_FAILED: number;
@CordovaProperty
ERR_BAD_RESPONSE: number;
@CordovaProperty
ERR_REFRESH: number;
@CordovaProperty
ERR_PAYMENT_EXPIRED: number;
@CordovaProperty
ERR_DOWNLOAD: number;
@CordovaProperty
ERR_SUBSCRIPTION_UPDATE_NOT_AVAILABLE: number;
@CordovaProperty
REGISTERED: string;
@CordovaProperty
INVALID: string;
@CordovaProperty
VALID: string;
@CordovaProperty
REQUESTED: string;
@CordovaProperty
INITIATED: string;
@CordovaProperty
APPROVED: string;
@CordovaProperty
FINISHED: string;
@CordovaProperty
OWNED: string;
@CordovaProperty
DOWNLOADING: string;
@CordovaProperty
DOWNLOADED: string;
@CordovaProperty
INVALID_PAYLOAD: number;
@CordovaProperty
CONNECTION_FAILED: number;
@CordovaProperty
PURCHASE_EXPIRED: number;
@CordovaProperty
products: IAPProducts;
@CordovaProperty
validator: string | ((product: string | IAPProduct, callback: Function) => void);
@CordovaProperty
log: {
error: (message: string) => void;
warn: (message: string) => void;
info: (message: string) => void;
debug: (message: string) => void;
};
/**
* Get product by id or alias
* @param idOrAlias
*/
@Cordova({ sync: true })
get(idOrAlias: string): IAPProduct { return; }
/**
* Register error handler
* @param onError {Function} function to call on error
*/
@Cordova({ sync: true })
error(onError: Function): void {}
/**
* Add or register a product
* @param product {IAPProductOptions}
*/
@Cordova({ sync: true})
register(product: IAPProductOptions): void {}
/**
*
* @param query
* @param event
* @param callback
* @return {IAPProductEvents}
*/
@Cordova({ sync: true })
when(query: string | IAPProduct, event?: string, callback?: IAPQueryCallback): IAPProductEvents { return; }
/**
* Identical to `when`, but the callback will be called only once. After being called, the callback will be unregistered.
* @param query {string | IAPProduct}
* @param [event] {event}
* @param [callback] {IAPQueryCallback}
* @return {IAPProductEvents}
*/
@Cordova({ sync: true })
once(query: string | IAPProduct, event?: string, callback?: IAPQueryCallback): IAPProductEvents { return; }
/**
* Unregister a callback. Works for callbacks registered with ready, when, once and error.
* @param callback {Function}
*/
@Cordova({ sync: true })
off(callback: Function): void {}
@Cordova({ sync: true })
order(product: string | IAPProduct, additionalData?: any): { then: Function; error: Function; } { return; }
/**
*
* @return {Promise<any>} returns a promise that resolves when the store is ready
*/
@Cordova()
ready(): Promise<void> { return; }
@Cordova({ sync: true })
refresh(): void {}
}

View File

@@ -31,7 +31,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'Insomnia',
plugin: 'https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git',
plugin: 'cordova-plugin-insomnia',
pluginRef: 'plugins.insomnia',
repo: 'https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin',
platforms: ['Android', 'Browser', 'Firefox OS', 'iOS', 'Windows', 'Windows Phone 8']

View File

@@ -53,7 +53,7 @@ export interface IntelSecurityDataOptions {
* .catch((error: any) => console.log(error));
*
* this.intelSecurity.storage.read({id: storageID })
* .then((instanceID: number) => this.intelSec.data.getData(instanceID))
* .then((instanceID: number) => this.intelSecurity.data.getData(instanceID))
* .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
* .catch((error: any) => console.log(error));
*

View File

@@ -89,6 +89,11 @@ export interface ILocalNotification {
* Default: FFFFFF
*/
led?: string;
/**
* Notification priority.
*/
priority?: number;
}
/**

View File

@@ -120,6 +120,8 @@ export type MediaErrorCallback = (error: MediaError) => void;
/**
* @name Media
* @description
* This plugin provides the ability to record and play back audio files on a device.
*
* Some hints if you are using iOS and recording doesn't work:
* 1.) Try to use a absolute file path but remove beginning "file://".
* Then it looks like: `/var/mobile/Containers/Data/Application/AF438B8B-7724-4FBB-8E69-083463224FC4/tmp/my_file.m4a`

View File

@@ -22,8 +22,8 @@ import { Injectable } from '@angular/core';
*/
@Plugin({
pluginName: 'MobileAccessibility',
plugin: 'https://github.com/phonegap/phonegap-mobile-accessibility.git',
pluginRef: 'MobileAccessibilityNotifications',
plugin: 'phonegap-plugin-mobile-accessibility',
pluginRef: 'MobileAccessibility',
repo: 'https://github.com/phonegap/phonegap-mobile-accessibility',
platforms: ['Android Fire OS', 'Android', 'iOS', 'Windows']
})
@@ -179,7 +179,7 @@ export class MobileAccessibility extends IonicNativePlugin {
getTextZoomCallback(): Promise<number> { return; }
/**
* @param textZoom {nuber} A percentage value by which text in the WebView should be scaled.
* @param textZoom {number} A percentage value by which text in the WebView should be scaled.
*/
@Cordova({ sync: true })
setTextZoom(textZoom: number): void { }

View File

@@ -58,38 +58,53 @@ export interface MusicControlsOptions {
*
* this.musicControls.subscribe().subscribe(action => {
*
* switch(action) {
* case 'music-controls-next':
* // Do something
* break;
* case 'music-controls-previous':
* // Do something
* break;
* case 'music-controls-pause':
* // Do something
* break;
* case 'music-controls-play':
* // Do something
* break;
* case 'music-controls-destroy':
* function events(action) {
* const message = JSON.parse(action).message;
* switch(message) {
* case 'music-controls-next':
* // Do something
* break;
* case 'music-controls-previous':
* // Do something
* break;
* case 'music-controls-pause':
* // Do something
* break;
* case 'music-controls-play':
* // Do something
* break;
* case 'music-controls-destroy':
* // Do something
* break;
*
* // External controls (iOS only)
* case 'music-controls-toggle-play-pause' :
* // Do something
* break;
* case 'music-controls-seek-to':
* const seekToInSeconds = JSON.parse(action).position;
* MusicControls.updateElapsed({
* elapsed: seekToInSeconds,
* isPlaying: true
* });
* // Do something
* break;
*
* // Headset events (Android only)
* case 'music-controls-media-button' :
* // Do something
* break;
* case 'music-controls-headset-unplugged':
* // Do something
* break;
* case 'music-controls-headset-plugged':
* // Do something
* break;
* default:
* break;
* }
*
* });
* // Headset events (Android only)
* // All media button events are listed below
* case 'music-controls-media-button' :
* // Do something
* break;
* case 'music-controls-headset-unplugged':
* // Do something
* break;
* case 'music-controls-headset-plugged':
* // Do something
* break;
* default:
* break;
* }
* }
*
* this.musicControls.listen(); // activates the observable above
*
@@ -147,6 +162,15 @@ export class MusicControls extends IonicNativePlugin {
@Cordova()
updateIsPlaying(isPlaying: boolean): void { }
/**
* Update elapsed time, optionally toggle play/pause:
* @param args {Object}
*/
@Cordova({
platforms: ['iOS']
})
updateElapsed(args: { elapsed: string; isPlaying: boolean; }): void { }
/**
* Toggle dismissable:
* @param dismissable {boolean}

View File

@@ -219,6 +219,41 @@ export interface OSActionButton {
*/
icon: string;
}
/**
* OSPermissionState
*/
export interface OSPermissionState {
/**
* User was prompted.
*/
hasPrompted: boolean;
/**
* Permissions Status
*/
status: any;
}
/**
* OSSubscriptionState
*/
export interface OSSubscriptionState {
subscribed: boolean;
userSubscriptionSetting: any;
userId: any;
pushToken: any;
}
/**
* Subscription and permissions status
*/
export interface OSPermissionSubscriptionState {
/**
* Id assigned to the button.
*/
permissionStatus: OSPermissionState;
/**
* Text show on the button to the user.
*/
subscriptionStatus: OSSubscriptionState;
}
/**
* **ANDROID** - If a background image was set, this object will be available.
@@ -268,6 +303,58 @@ export enum OSActionType {
*
* Requires Cordova plugin: `onesignal-cordova-plugin`. For more info, please see the [OneSignal Cordova Docs](https://documentation.onesignal.com/docs/phonegap-sdk-installation).
*
* #### Icons
* If you want to use generated icons with command `ionic cordova resources`:
*
* 1. Add a file to your `hooks` directory inside the `after_prepare` folder called `030_copy_android_notification_icons.js`
*
* 2. Put the following code in it:
*
* ```
* #!/usr/bin/env node
*
* var filestocopy = [{
* "resources/android/icon/drawable-hdpi-icon.png":
* "platforms/android/res/drawable-hdpi/ic_stat_onesignal_default.png"
* }, {
* "resources/android/icon/drawable-mdpi-icon.png":
* "platforms/android/res/drawable-mdpi/ic_stat_onesignal_default.png"
* }, {
* "resources/android/icon/drawable-xhdpi-icon.png":
* "platforms/android/res/drawable-xhdpi/ic_stat_onesignal_default.png"
* }, {
* "resources/android/icon/drawable-xxhdpi-icon.png":
* "platforms/android/res/drawable-xxhdpi/ic_stat_onesignal_default.png"
* }, {
* "resources/android/icon/drawable-xxxhdpi-icon.png":
* "platforms/android/res/drawable-xxxhdpi/ic_stat_onesignal_default.png"
* } ];
*
* var fs = require('fs');
* var path = require('path');
*
* // no need to configure below
* var rootdir = process.argv[2];
*
* filestocopy.forEach(function(obj) {
* Object.keys(obj).forEach(function(key) {
* var val = obj[key];
* var srcfile = path.join(rootdir, key);
* var destfile = path.join(rootdir, val);
* //console.log("copying "+srcfile+" to "+destfile);
* var destdir = path.dirname(destfile);
* if (fs.existsSync(srcfile) && fs.existsSync(destdir)) {
* fs.createReadStream(srcfile).pipe(
* fs.createWriteStream(destfile));
* }
* });
* });
* ```
*
* 3. From the root of your project make the file executable:
* `$ chmod +x hooks/after_prepare/030_copy_android_notification_icons.js`
*
*
* @usage
* ```typescript
* import { OneSignal } from '@ionic-native/onesignal';
@@ -485,6 +572,14 @@ export class OneSignal extends IonicNativePlugin {
@Cordova({ sync: true })
setSubscription(enable: boolean): void { }
/**
* Get the current notification and permission state. Returns a OSPermissionSubscriptionState type described below.
*
* @returns {Promise<OSPermissionSubscriptionState>}
*/
@Cordova()
getPermissionSubscriptionState(): Promise<OSPermissionSubscriptionState> { return; }
/**
*
* @param {notificationObj} Parameters see POST [documentation](https://documentation.onesignal.com/v2.0/docs/notifications-create-notification)

View File

@@ -3,6 +3,9 @@ import { Cordova, CordovaInstance, Plugin, IonicNativePlugin, checkAvailability
declare const Notification: any;
/**
* @hidden
*/
export class PLNObject {
private _objectInstance: any;

View File

@@ -35,7 +35,7 @@ import { Injectable } from '@angular/core';
* complete: () => { console.log('could not get photos'); }
* });
* })
* .catch(err => console.log('permissions weren't granted'));
* .catch(err => console.log('permissions weren\'t granted'));
*
* ```
*/

View File

@@ -0,0 +1,44 @@
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @name Pin Check
* @description
* This plugin is for use with Apache Cordova and allows your application to check whether pin/keyguard or passcode is setup on iOS and Android phones.
*
* Requires Cordova plugin: cordova-plugin-pincheck. For more info, please see the [PinCheck plugin docs](https://github.com/ohh2ahh/AppAvailability).
*
* @usage
* ```typescript
* import { PinCheck } from '@ionic-native/pin-check';
* import { Platform } from 'ionic-angular';
*
* constructor(private pinCheck: PinCheck, private platform: Platform) { }
*
* ...
*
* this.pinCheck.isPinSetup()
* .then(
* (success: string) => console.log("pin is setup.");,
* (error: string) => console.log("pin not setup.");
* );
* ```
*/
@Plugin({
pluginName: 'PinCheck',
plugin: 'cordova-plugin-pincheck',
pluginRef: 'cordova.plugins.PinCheck',
repo: 'https://github.com/shangyilim/cordova-plugin-pincheck',
platforms: ['Android', 'iOS']
})
@Injectable()
export class PinCheck extends IonicNativePlugin {
/**
* check whether pin/keyguard or passcode is setup
* @returns {Promise<boolean>}
*/
@Cordova()
isPinSetup(): Promise<boolean> {
return;
}
}

View File

@@ -0,0 +1,261 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface QQShareOptions {
/**
* The clinet type, QQ or TIM
* Default is QQ
*/
client?: number;
/**
* The Share Sence
* Default is QQ
*/
scene?: number;
/**
* The text for shareText
*/
text?: string;
/**
* The url for share news or audio
*/
url?: string;
/**
* The title for share image,news or audio
*/
title?: string;
/**
* The description for share image,news or audio
*/
description?: string;
/**
* The image for share image,news or audio
* Image supports three types:
* 1. Network URL
* 2. Base64
* 3. Absolute file path
*/
image?: string;
/**
* The URL for audio
*/
flashUrl?: string;
}
/**
* @name QQSDK
* @description
* This Plugin is a wrapper around the Tencent QQ SDK for Android and iOS. Provides access to QQ ssoLogin, QQ Sharing, QQZone Sharing etc.
*
* Requires Cordova plugin: `cordova-plugin-qqsdk`. For more info, please see the [QQSDK plugin docs](https://github.com/iVanPan/Cordova_QQ).
*
* @usage
* ```typescript
* import { QQSDK, QQShareOptions } from '@ionic-native/qqsdk';
*
* constructor(private qq: QQSDK) { }
*
* ...
*
*
* const options: QQShareOptions = {
* client: this.qq.ClientType.QQ,
* scene: this.qq.Scene.QQ,
* title: 'This is a title for cordova-plugin-qqsdk',
* url: 'https://cordova.apache.org/',
* image: 'https://cordova.apache.org/static/img/cordova_bot.png',
* description: 'This is Cordova QQ share description',
* flashUrl: 'http://stream20.qqmusic.qq.com/30577158.mp3',
* };
*
* const clientOptions: QQShareOptions = {
* client: this.qq.ClientType.QQ,
* };
*
* const shareTextOptions: QQShareOptions = {
* client: this.qq.ClientType.QQ,
* text: 'This is Share Text',
* scene: this.qq.Scene.QQ,
* };
*
* this.qq.ssoLogin(clientOptions)
* .then(result => {
* // Success
* console.log('token is ' + result.access_token);
* console.log('userid is ' + result.userid);
* console.log('expires_time is ' + new Date(parseInt(result.expires_time)) + ' TimeStamp is ' + result.expires_time);
* })
* .catch(error => {
* console.log(error); // Failed
* });
*
* this.qq.logout()
* .then(() => {
* console.log('logout success');
* })
* .catch(error => {
* console.log(error);
* });
*
* this.qq.checkClientInstalled(clientOptions)
* .then(() => {
* console.log('Installed');
* })
* .catch(() => {
* console.log('Not Installed');
* });
*
* this.qq.shareText(shareTextOptions)
* .then(() => {
* console.log('shareText success');
* })
* .catch(error => {
* console.log(error);
* });
*
* this.qq.shareImage(options)
* .then(() => {
* console.log('shareImage success');
* })
* .catch(error => {
* console.log(error);
* });
* }
*
* this.qq.shareNews(options)
* .then(() => {
* console.log('shareNews success');
* })
* .catch(error => {
* console.log(error);
* });
* }
*
* this.qq.shareAudio(options)
* .then(() => {
* console.log('shareAudio success');
* })
* .catch(error => {
* console.log(error);
* });
*
* ```
*
* @interfaces
* QQShareOptions
*/
@Plugin({
pluginName: 'QQSDK',
plugin: 'cordova-plugin-qqsdk',
pluginRef: 'QQSDK',
repo: 'https://github.com/iVanPan/Cordova_QQ',
platforms: ['Android', 'iOS'],
install: 'ionic cordova plugin add cordova-plugin-qqsdk --variable QQ_APP_ID=YOUR_QQ_APPID',
installVariables: ['QQ_APP_ID'],
})
@Injectable()
export class QQSDK extends IonicNativePlugin {
/**
* QQ Share Scene
*/
Scene = {
QQ: 0,
QQZone: 1,
Favorite: 2
};
/**
* client type: QQ application or TIM application
*/
ClientType = {
QQ: 0,
TIM: 1
};
/**
* open QQ or TIM client perform ssoLogin
* @param options
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
ssoLogin(options: QQShareOptions): Promise<any> {
return;
}
@Cordova({
callbackOrder: 'reverse'
})
logout(): Promise<any> {
return;
}
/**
* Detect if the QQ application or TIM application is installed on the device.
*
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
checkClientInstalled(options: QQShareOptions): Promise<any> {
return;
}
/**
* shareText
* @param options
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
shareText(options: QQShareOptions): Promise<any> {
return;
}
/**
* shareImage
* @param options
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
shareImage(options: QQShareOptions): Promise<any> {
return;
}
/**
* shareNews
* @param options
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
shareNews(options: QQShareOptions): Promise<any> {
return;
}
/**
* shareAudio
* @param options
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
shareAudio(options: QQShareOptions): Promise<any> {
return;
}
}

View File

@@ -5,8 +5,7 @@ import { Observable } from 'rxjs/Observable';
/**
* @name Screen Orientation
* @description
* Cordova plugin to set/lock the screen orientation in a common way for iOS, Android, WP8 and Blackberry 10.
* This plugin is based on an early version of Screen Orientation API so the api does not currently match the current spec.
* Cordova plugin to set/lock the screen orientation in a common way.
*
* Requires Cordova plugin: `cordova-plugin-screen-orientation`. For more info, please see the [Screen Orientation plugin docs](https://github.com/apache/cordova-plugin-screen-orientation).
*
@@ -27,8 +26,16 @@ import { Observable } from 'rxjs/Observable';
*
* // allow user rotate
* this.screenOrientation.unlock();
* ```
*
* // detect orientation changes
* this.screenOrientation.onChange().subscribe(
* () => {
* console.log("Orientation Changed");
* }
* );
*
* ```
*
* @advanced
*
* Accepted orientation values:

View File

@@ -23,7 +23,7 @@ declare const navigator: any;
*/
@Plugin({
pluginName: 'Screenshot',
plugin: 'https://github.com/gitawego/cordova-screenshot.git',
plugin: 'com.darktalker.cordova.screenshot',
pluginRef: 'navigator.screenshot',
repo: 'https://github.com/gitawego/cordova-screenshot',
platforms: ['Android', 'iOS', 'macOS']
@@ -34,11 +34,11 @@ export class Screenshot extends IonicNativePlugin {
/**
* Takes screenshot and saves the image
*
* @param {string} format. Format can take the value of either 'jpg' or 'png'
* @param format {string} Format can take the value of either 'jpg' or 'png'
* On ios, only 'jpg' format is supported
* @param {number} quality. Determines the quality of the screenshot.
* @param quality {number} Determines the quality of the screenshot.
* Default quality is set to 100.
* @param {string} filename. Name of the file as stored on the storage
* @param filename {string} Name of the file as stored on the storage
* @returns {Promise<any>}
*/
save(format?: string, quality?: number, filename?: string): Promise<any> {
@@ -63,7 +63,7 @@ export class Screenshot extends IonicNativePlugin {
/**
* Takes screenshot and returns the image as an URI
*
* @param {number} quality. Determines the quality of the screenshot.
* @param quality {number} Determines the quality of the screenshot.
* Default quality is set to 100.
* @returns {Promise<any>}
*/

View File

@@ -28,10 +28,10 @@ export interface SpinnerDialogIOSOptions {
*/
@Plugin({
pluginName: 'SpinnerDialog',
plugin: 'cordova-plugin-spinner-dialog',
plugin: 'cordova-plugin-native-spinner',
pluginRef: 'window.plugins.spinnerDialog',
repo: 'https://github.com/Paldom/SpinnerDialog',
platforms: ['Android', 'iOS', 'Windows Phone 8']
repo: 'https://github.com/greybax/cordova-plugin-native-spinner',
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Windows']
})
@Injectable()
export class SpinnerDialog extends IonicNativePlugin {

View File

@@ -16,6 +16,10 @@ export interface SQLiteDatabaseConfig {
* iOS Database Location. Example: 'Library'
*/
iosDatabaseLocation?: string;
/**
* support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext
*/
createFromLocation?: number;
}
/**

View File

@@ -26,9 +26,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'Stepcounter',
plugin: 'https://github.com/Slidee/cordova-plugin-stepcounter.git',
plugin: 'cordova-plugin-stepcounter',
pluginRef: 'stepcounter',
repo: 'https://github.com/Slidee/cordova-plugin-stepcounter',
repo: 'https://github.com/ihadeed/cordova-plugin-stepcounter',
platforms: ['Android']
})
@Injectable()

View File

@@ -51,7 +51,7 @@ export interface ToastOptions {
*
* ...
*
* this.toast.show('I'm a toast', '5000', 'center').subscribe(
* this.toast.show(`I'm a toast`, '5000', 'center').subscribe(
* toast => {
* console.log(toast);
* }

View File

@@ -247,7 +247,7 @@ export class TransferObject {
* Downloads a file from server.
*
* @param {string} source URL of the server to download the file, as encoded by encodeURI().
* @param {stirng} target Filesystem url representing the file on the device. For backwards compatibility, this can also be the full path of the file on the device.
* @param {string} target Filesystem url representing the file on the device. For backwards compatibility, this can also be the full path of the file on the device.
* @param {boolean} trustAllHosts Optional parameter, defaults to false. If set to true, it accepts all security certificates. This is useful because Android rejects self-signed security certificates. Not recommended for production use. Supported on Android and iOS.
* @param {object} Optional parameters, currently only supports headers (such as Authorization (Basic Authentication), etc).
* @returns {Promise<any>} Returns a Promise that resolves to a FileEntry object.

View File

@@ -34,9 +34,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'UserAgent',
plugin: 'https://github.com/LouisT/cordova-useragent.git',
plugin: 'cordova-plugin-useragent',
pluginRef: 'plugins.useragent',
repo: 'https://github.com/LouisT/cordova-useragent',
repo: 'https://github.com/danielsogl/cordova-plugin-useragent',
platforms: ['Android', 'iOS']
})
@Injectable()

View File

@@ -131,9 +131,9 @@ export interface VideoCapturePlusOptions {
*/
@Plugin({
pluginName: 'VideoCapturePlus',
plugin: 'https://github.com/EddyVerbruggen/VideoCapturePlus-PhoneGap-Plugin.git',
plugin: 'cordova-plugin-video-capture-plus',
pluginRef: 'window.plugins.videocaptureplus',
repo: 'https://github.com/EddyVerbruggen/VideoCapturePlus-PhoneGap-Plugin',
repo: 'https://github.com/danielsogl/cordova-plugin-video-capture-plus',
platforms: ['Android', 'iOS']
})
@Injectable()

View File

@@ -28,7 +28,7 @@ import { Observable } from 'rxjs/Observable';
*/
@Plugin({
pluginName: 'WebIntent',
plugin: 'https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent.git',
plugin: 'com-darryncampbell-cordova-plugin-intent',
pluginRef: 'intentShim',
repo: 'https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent',
platforms: ['Android']

View File

@@ -27,9 +27,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'YoutubeVideoPlayer',
plugin: 'https://github.com/JonSmart/CordovaYoutubeVideoPlayer.git',
plugin: 'cordova-plugin-youtube-video-player',
pluginRef: 'YoutubeVideoPlayer',
repo: 'https://github.com/JonSmart/CordovaYoutubeVideoPlayer',
repo: 'https://github.com/ihadeed/CordovaYoutubeVideoPlayer',
platforms: ['Android', 'iOS']
})
@Injectable()

View File

@@ -11,6 +11,7 @@
"paths": {
"@ionic-native/core": ["./dist/@ionic-native/core"]
},
"outDir": "dist",
"rootDir": ".",
"target": "es5",
"skipLibCheck": true,