Compare commits

...

137 Commits

Author SHA1 Message Date
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
Ibby Hadeed
c6a76c26e0 refactor(phonegap-local-notification): fix class name to match plugin name
BREAKING CHANGE: PhonegapLocalNotifications class has been renamed to PhonegapLocalNotification
2017-06-03 18:42:34 -04:00
Ibby Hadeed
c3f9fb4a23 chore(): update changelog 2017-06-03 18:32:17 -04:00
Ibby Hadeed
abeedbf2fa 3.12.0 2017-06-03 18:32:11 -04:00
Daniel Sogl
9bdabd3ac3 chore(ci): fix karma builds (#1648)
Looks like ts 2.3.4 breaks the ci builds. Sorry for that
2017-06-03 18:25:17 -04:00
Daniel Sogl
0467a0dd32 feat(firebase-dynamic-links): add firebase dynamic links plugin (#1649) 2017-06-03 18:24:07 -04:00
Daniel Sogl
3eb69b4056 feat(firebase-analytics): add firebase analytics plugin (#1647) 2017-06-03 18:24:00 -04:00
Lucas A. Moulin
793e2e34d3 feat(base64): add Base64 plugin (#1645)
* Add base64 plugin

* Add base64 plugin

* Apply requested changes
2017-06-03 16:04:32 -04:00
Daniel Sogl
dd7098d5bd chore(package): update deps (#1646)
* fix(package): fix Node 8 install problems

I had some problems with the outdated dependencies.

* Update package.json
2017-06-03 16:03:58 -04:00
Gianfrancø Palumbo
268e22456e docs(keyboard): Add boolean type to param in JSDoc (#1641) 2017-06-03 14:22:44 -04:00
Daniel Sogl
9950b18e38 refactor(clipboard): changed plugin source (#1643)
* refactor(tts): changed plugin source

* Update index.ts

* Update index.ts
2017-06-03 13:25:10 -04:00
Daniel Sogl
b4deaaa941 docs(): changed old cli commands (#1644)
Im also removed some V2 tags from Ionic and Angular
2017-06-03 13:23:30 -04:00
Daniel Sogl
328e5de3f3 docs(plugins): added platforms (#1638)
* added platforms

* round 2

* round 3

* Update index.ts
2017-06-02 15:34:18 -04:00
Ibby Hadeed
41dae53bf2 chore(): update changelog 2017-06-01 14:23:32 -04:00
Ibby Hadeed
3027b5ea16 3.11.0 2017-06-01 14:23:27 -04:00
Ibby Hadeed
ec773de686 chore(): rename org 2017-06-01 14:03:56 -04:00
Daniel Sogl
f3b7467ffd docs(google-plus): renamed Web to Browser (#1635) 2017-06-01 13:08:53 -04:00
Niklas Häusele
d9546f15ed docs(): fix typo (#1632) 2017-06-01 13:06:07 -04:00
Daniel Sogl
52dcd808b6 refactor(docs): read the description (#1631)
* refactor(docs): read the description

- Added missing platforms
- Unified GitHub links
- Added missing installVariables

* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts
2017-06-01 13:05:47 -04:00
Raman Rasliuk
985193bebd fix(document-viewer): fix param type (#1634)
Options for  viewDocument should be an DocumentViewerOptions object, not array of DocumentViewerOptions objects
2017-06-01 13:05:20 -04:00
Daniel Sogl
9bf9e9d073 typo(package): added fields (#1633) 2017-06-01 13:01:42 -04:00
Daniel Sogl
8b9995a5af fix(secure-storage): add missing function (#1626)
* fix(secure-storage): add missing function

fix #1625

* Update index.ts
2017-05-31 21:03:46 -04:00
Daniel Sogl
2d3add6507 feat(plugin): add FTP plugin (#1627) 2017-05-31 21:03:07 -04:00
Daniel Sogl
ee59b55c29 docs(template): optimize template (#1628)
* Update wrap-min.tmpl

* Update wrap.tmpl
2017-05-31 21:01:37 -04:00
mhartington
28bb6dc1a8 docs(github): rename driftyco references to ionic-team 2017-05-30 11:01:13 -04:00
Nico
b587a0e647 docs(dialogs): confirm() can return a promise that resolves to 0 (#1617)
Document the fact that confirm() will return a promise that resolves to 0 if the user clicks outside the dialog box. This behavior was previously undocummented and could lead to issues if not handled properly.
2017-05-28 14:59:51 -04:00
Daniel Sogl
d9d7919174 chore(package): bump dependencies (#1611)
* chore(package): bump dependencies

I updated the dependencies to the latest bugfix and feature releases without any breaking changes.

* Update package.json

* Update package.json
2017-05-28 04:11:57 -04:00
Daniel Sogl
11c42757d7 docs(): rename OS X to macOS (#1614) 2017-05-28 04:01:27 -04:00
Daniel Sogl
4e4216ff6d docs(file): rename OS X to macOS (#1613) 2017-05-28 04:00:52 -04:00
Daniel Sogl
496968b9fc docs(device): rename OSX to macOS (#1612) 2017-05-28 04:00:18 -04:00
Jan Piotrowski
bf3f9d8799 refactor(core): fix "Install the plugin" command when not installed (#1606)
ionic plugin add ... => ionic cordova plugin add ...
2017-05-25 13:05:59 -04:00
Daniel Sogl
6f22134851 chore(package): bump zone.js and TS version (#1598)
* chore(package) bump zone.js version

* Update package.json
2017-05-25 13:05:29 -04:00
fabiodursoexin
aaeabb9f96 fix(flurry-analytics): fix original class reference (#1597)
fix: FlurryAnalaytics to FlurryAnalytics
2017-05-23 11:01:23 -04:00
Perry Govier
6d4da1fff4 Merge pull request #1465 from piotrowski/improved-plugin-docs
docs(template): Improved plugin docs
2017-05-22 10:03:25 -05:00
Ibby Hadeed
c0fd19fd33 chore(): update changelog 2017-05-20 06:26:59 -04:00
Ibby Hadeed
f2c4f380f8 3.10.2 2017-05-20 06:26:54 -04:00
Daniel Sogl
c96ae3db0d docs(nativegeocoder): out of beta (#1482)
Out of beta since a while
2017-05-20 06:25:45 -04:00
jasonmamy
c2a6198576 refactor(wheel-selector): added display key to override default values, added more docs (#1590) 2017-05-20 06:25:34 -04:00
Ibby Hadeed
2b3d4c9090 docs(): update install commands 2017-05-20 06:25:06 -04:00
Ibby Hadeed
dbb17d801e Merge branch 'master' of github.com:driftyco/ionic-native 2017-05-20 06:23:38 -04:00
Jonathan Alexander
0b1e4e6e84 docs(): update install command (#1592)
The install text is missing cordova so it won't install just by copying and pasting in a terminal.
2017-05-20 06:23:15 -04:00
Ibby Hadeed
8c82c87811 chore(): update changelog 2017-05-20 05:21:46 -04:00
Ibby Hadeed
9997caf506 3.10.1 2017-05-20 05:21:31 -04:00
Ibby Hadeed
c8f53d2dc3 feat(core): add getSupportedPlatforms method 2017-05-20 05:21:27 -04:00
Ibby Hadeed
a10d763a41 docs(linkedin): update repo and install command 2017-05-19 09:48:00 -04:00
Ibby Hadeed
e44fdb6730 chore(): update changelog 2017-05-19 09:44:02 -04:00
Ibby Hadeed
bb8973a0ea 3.10.0 2017-05-19 09:43:51 -04:00
Ibby Hadeed
6031a240a2 feat(native-keyboard): add native keyboard plugin (#1588)
* add native keyboard plugin

* feat(native-keyboard): add native keyboard plugin
2017-05-19 09:37:56 -04:00
Ibby Hadeed
2bd244a536 fix(admob-free): use otherPromise to fix browser development 2017-05-19 09:24:19 -04:00
Ibby Hadeed
64bff1bbed docs(): add notice about plugin taking share of earnings 2017-05-19 07:59:06 -04:00
Ibby Hadeed
da5266cd65 docs(admob-free): improve docs 2017-05-19 07:44:47 -04:00
Ibby Hadeed
c1082b1c14 fix command since I cant change permissions 2017-05-19 06:52:49 -04:00
Ibby Hadeed
2cf132ee88 Merge branch 'master' of github.com:driftyco/ionic-native 2017-05-19 06:46:03 -04:00
Ibby Hadeed
e411146e8f docs(): refactor 2017-05-19 06:38:02 -04:00
Ibby Hadeed
5f63493bdc refactor(): use const instead of var 2017-05-19 06:37:28 -04:00
Daniel Sogl
999c288b23 docs(Speech Recognition): out of beta (#1483) 2017-05-19 06:36:29 -04:00
seshachalamyv
2e83ade978 docs(): fix method name in example (#1585)
data.wasPressed
should be change as data.wasTapped
2017-05-19 06:36:04 -04:00
Ibby Hadeed
08bf57f488 chore(): config github before running ci-tests 2017-05-19 06:35:01 -04:00
Hélder Diniz
6f6392ea5c feat(user-agent): add User-Agent plugin (#1582)
* feat(user-agent): add User-Agent plugin

* feat(user-agent): Few changes upon request
2017-05-19 06:31:31 -04:00
Ibby Hadeed
0b2227d35a Merge branch 'master' of github.com:driftyco/ionic-native 2017-05-19 00:35:10 -04:00
Ibby Hadeed
4bfceadb65 refactor(tts): rename the speak method param 2017-05-19 00:35:06 -04:00
seshachalamyv
61c73eaa4e docs(): fix package name in import statement (#1581)
import { FCM } from 'ionic-native'; Corrected as import { FCM } from '@ionic-native/fcm';
2017-05-18 23:39:31 -04:00
Matias Solis de la Torre
c0c0c5cec5 docs(): update install command (#1584) 2017-05-18 23:38:58 -04:00
Ibby Hadeed
5b82d82d75 Update index.ts 2017-05-17 16:33:52 -04:00
mhartington
36be795623 docs(file): set filesaver class to hidden 2017-05-17 15:14:25 -04:00
mhartington
0996264483 docs(file): set classes to hidden
Set classes to hidden to prevent doc generation
2017-05-17 15:00:00 -04:00
Ibby Hadeed
2245bb8050 chore(): update changelog 2017-05-17 11:19:57 -04:00
Ibby Hadeed
e14e00edba 3.9.2 2017-05-17 11:19:55 -04:00
Ibby Hadeed
22102a7e4a fix(core): decorators should define enumerable properties 2017-05-17 11:19:35 -04:00
Ibby Hadeed
6416c2544c fix(action-sheet): destructiveButtonLast is optional 2017-05-17 11:07:34 -04:00
Ibby Hadeed
73a510f9c2 refactor(): remove unused import 2017-05-17 10:54:58 -04:00
Ibby Hadeed
b8b605db5e chore(): update changelog 2017-05-17 10:54:25 -04:00
Ibby Hadeed
12168d991a 3.9.1 2017-05-17 10:54:22 -04:00
Ibby Hadeed
93a119bf4b fix(core): fix issues when clearing observables 2017-05-17 10:54:09 -04:00
Ibby Hadeed
a7c62de389 refactor(core): otherPromise in wrapInstance shouldn't check for error 2017-05-17 10:47:39 -04:00
Ibby Hadeed
8aca6718e1 refactor(core): wrapInstance should return promise as-is
instance based method never throw errors like regular ones do
2017-05-17 10:46:47 -04:00
Ibby Hadeed
1ec4bdef8f docs(): update interface names 2017-05-17 10:36:05 -04:00
Ibby Hadeed
d6ed87d7cc fix merge conflict 2017-05-17 08:12:36 -04:00
Ibby Hadeed
55f3f37760 chore(): update changelog 2017-05-17 08:10:34 -04:00
Ibby Hadeed
4f547dae30 3.9.0 2017-05-17 08:10:31 -04:00
Ibby Hadeed
f223481307 Merge branch 'master' into improved-plugin-docs 2017-05-17 06:48:46 -04:00
Jan Piotrowski
7d4e8acce8 Remove --save
`ionic cordova plugin add` always adds `--save` to the Cordova call anyway
2017-05-17 11:31:41 +02:00
Jan Piotrowski
dea9f42d5f Changed ionic pluginto ionic cordova plugin 2017-05-11 17:53:15 +02:00
Jan Piotrowski
e193baf1c1 Removed inline style block (as it was added to the main site css) 2017-05-11 11:33:19 +02:00
Jan Piotrowski
4835182ad5 Replace inline styles with style block 2017-05-05 13:38:58 +02:00
Jan Piotrowski
49ac21145a Add link to "Add this plugin to your app's module" and make Installation into ordered list 2017-05-05 13:31:16 +02:00
Jan Piotrowski
8a81ee08e3 Switch placement of Description and Installation 2017-05-05 13:06:31 +02:00
Jan Piotrowski
36d101af02 remove stray "f" 2017-04-29 16:47:23 +02:00
Jan Piotrowski
8e65474c1d Add headline to install commands 2017-04-29 16:45:34 +02:00
140 changed files with 7581 additions and 1004 deletions

View File

@@ -4,7 +4,7 @@
#### There are no rules, but here are a few things to consider:
###### Before you submit an issue:
* Do a quick search to see if there are similar issues
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic 2, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/api/platform/Platform/#ready).
* Make sure that you are waiting for `deviceready` to fire before interacting with any plugin. If you are using Ionic, this can be done using [the `Platform.ready()` function](http://ionicframework.com/docs/api/platform/Platform/#ready).
* **Check that you are using the latest version of** `ionic-native`, you can install the latest version by running `npm i --save @ionic-native/core@latest`
###### Still having problems? submit an issue with the following details:
@@ -16,4 +16,4 @@
## Feature request?
Have a plugin you'd like to see supported? Since Ionic Native is a thin wrapper around existing Cordova plugins, adding support for new plugins is as easy as creating a new wrapper for whatever plugin you'd like to add.
Take a look at our [Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.
Take a look at our [Developer Guide](https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md) for more info on adding new plugins.

File diff suppressed because it is too large Load Diff

View File

@@ -103,7 +103,7 @@ Next, let's look at the `watchPosition` method.
The `@Cordova` decorator has a few more options now.
`observable` indicates that this method may call its callbacks multiple times, so `@Cordova` wraps it in an [`Observable`](https://github.com/driftyco/ionic-native#promises-and-observables) instead of a Promise.
`observable` indicates that this method may call its callbacks multiple times, so `@Cordova` wraps it in an [`Observable`](https://github.com/ionic-team/ionic-native#promises-and-observables) instead of a Promise.
`callbackOrder` refers to the method signature of the underlying Cordova plugin, and tells Ionic Native which arguments are the callbacks to map to the wrapping Promise or Observable. In this case, the signature is [`watchPosition(success, error, options)`](https://github.com/apache/cordova-plugin-geolocation#navigatorgeolocationwatchposition), so we need to tell `@Cordova` that the callbacks are the first arguments, not the last arguments. For rare cases, you can also specify the options `successIndex` and `errorIndex` to indicate where in the argument list the callbacks are located.

View File

@@ -1,4 +1,4 @@
[![Circle CI](https://circleci.com/gh/driftyco/ionic-native.svg?style=shield)](https://circleci.com/gh/driftyco/ionic-native) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) ![](https://img.shields.io/npm/v/@ionic-native/core.svg)
[![Circle CI](https://circleci.com/gh/ionic-team/ionic-native.svg?style=shield)](https://circleci.com/gh/ionic-team/ionic-native) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) ![](https://img.shields.io/npm/v/@ionic-native/core.svg)
# Ionic Native
@@ -169,11 +169,11 @@ Spent way too long diagnosing an issue only to realize a plugin wasn't firing or
## Plugin Missing?
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
## Ionic V1/Angular 1 support
For Ionic V1/Angular 1 support, please use version 2 of Ionic Native. See the [2.x README](https://github.com/driftyco/ionic-native/blob/8cd648db5cddd7bdbe2bd78839b19c620cc8c04c/README.md) for usage information.
For Ionic V1/Angular 1 support, please use version 2 of Ionic Native. See the [2.x README](https://github.com/ionic-team/ionic-native/blob/8cd648db5cddd7bdbe2bd78839b19c620cc8c04c/README.md) for usage information.
# Credits

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:
@@ -30,9 +30,10 @@ jobs:
- run:
name: Run tslint
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: Run tests
command: npm test

5567
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +1,22 @@
{
"name": "ionic-native",
"version": "3.8.1",
"version": "3.12.2",
"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)",
"license": "MIT",
"devDependencies": {
"@angular/compiler": "4.1.2",
"@angular/compiler-cli": "4.1.2",
"@angular/core": "4.1.2",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@types/cordova": "0.0.34",
"@types/jasmine": "^2.5.47",
"@types/node": "^7.0.18",
"@types/jasmine": "^2.5.51",
"@types/node": "^7.0.27",
"canonical-path": "0.0.2",
"child-process-promise": "2.2.0",
"conventional-changelog-cli": "1.2.0",
"child-process-promise": "2.2.1",
"conventional-changelog-cli": "1.3.1",
"cpr": "2.0.2",
"cz-conventional-changelog": "1.2.0",
"cz-conventional-changelog": "2.0.0",
"decamelize": "1.2.0",
"dgeni": "0.4.7",
"dgeni-packages": "0.16.10",
@@ -32,17 +34,17 @@
"karma-typescript": "^3.0.1",
"karma-typescript-es6-transform": "^1.0.0",
"lodash": "4.17.4",
"minimist": "1.1.3",
"minimist": "1.2.0",
"node-html-encoder": "0.0.2",
"q": "1.4.1",
"q": "1.5.0",
"queue": "4.2.1",
"rimraf": "2.5.4",
"rimraf": "2.6.1",
"rxjs": "5.1.1",
"semver": "5.3.0",
"tslint": "3.15.1",
"tslint-ionic-rules": "0.0.8",
"typescript": "2.3.2",
"zone.js": "^0.8.10"
"typescript": "2.3.3",
"zone.js": "^0.8.11"
},
"scripts": {
"start": "npm run test:watch",
@@ -58,6 +60,13 @@
"test": "karma start karma.conf.js --single-run",
"test:watch": "karma start karma.conf.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ionic-team/ionic-native.git"
},
"bugs": {
"url": "https://github.com/ionic-team/ionic-native/issues"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"

View File

@@ -9,6 +9,6 @@
"peerDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/driftyco/ionic-native.git"
"url": "https://github.com/ionic-team/ionic-native.git"
}
}

View File

@@ -9,6 +9,6 @@
"peerDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/driftyco/ionic-native.git"
"url": "https://github.com/ionic-team/ionic-native.git"
}
}

View File

@@ -44,7 +44,7 @@ docType: "<$ doc.docType $>"
<@- endmacro -@>
<@- macro githubViewLink(doc) -@>
<a href="https://github.com/driftyco/ionic-native/tree/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line+1 $>-L<$ doc.location.end.line+1 $>"><$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>)</a>
<a href="https://github.com/ionic-team/ionic-native/tree/master/<$ doc.fileInfo.relativePath $>#L<$ doc.location.start.line+1 $>-L<$ doc.location.end.line+1 $>"><$ doc.fileInfo.relativePath $> (line <$ doc.location.start.line+1 $>)</a>
<@- endmacro -@>
<@- macro paramTable(params, isDirective) -@>
@@ -149,7 +149,7 @@ docType: "<$ doc.docType $>"
<@- endif -@>
</h1>
<a class="improve-v2-docs" href="http://github.com/driftyco/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
<a class="improve-v2-docs" href="http://github.com/ionic-team/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
Improve this doc
</a>
@@ -164,18 +164,25 @@ docType: "<$ doc.docType $>"
</p>
<@ endif @>
<# --- Install commands --- #>
<pre><code class="nohighlight">$ <@ if prop.install @><$ prop.install $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
$ npm install --save @ionic-native/<$ doc.npmId $>
</code></pre>
<# --- Plugin description --- #>
<$ doc.description | marked $>
<p>Repo:
<a href="<$ prop.repo $>">
<$ prop.repo $>
</a>
</p>
<# --- Plugin description --- #>
<$ doc.description | marked $>
<# --- Install commands --- #>
<h2>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 @>
$ npm install --save @ionic-native/<$ doc.npmId $>
</code></pre>
</li>
<li><a href="https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module">Add this plugin to your app's module</a></li>
</ol>
<# --- Plugin supported platforms --- #>
<@ if prop.platforms @>

View File

@@ -1,4 +1,4 @@
<a style="float:right;font-size:12px;" href="http://github.com/driftyco/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
<a style="float:right;font-size:12px;" href="http://github.com/ionic-team/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
Improve this doc
</a>

View File

@@ -31,11 +31,11 @@ function run {
if [ $CHANGED -eq 0 ];
then
echo "-- No changes detected for the following commit, docs not updated."
echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
echo "https://github.com/ionic-team/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
else
git config --global user.email "hi@ionicframework.com"
git config --global user.name "Ionitron"
git commit -am "Automated build of native docs driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
git commit -am "Automated build of native docs ionic-team/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
# in case a different commit was pushed to ionic-site during doc/demo gen,
# try to rebase around it before pushing
git fetch

View File

@@ -18,12 +18,12 @@ function run {
if [ -z "$CHANGED" ];
then
echo "-- No changes detected for the following commit, docs not updated."
echo "https://github.com/driftyco/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
echo "https://github.com/ionic-team/$CIRCLE_PROJECT_REPONAME/commit/$CIRCLE_SHA1"
else
git config --global user.email "hi@ionicframework.com"
git config --global user.name "Ionitron"
git add -A
git commit -am "Automated build of native readmes for driftyco/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
git commit -am "Automated build of native readmes for ionic-team/$CIRCLE_PROJECT_REPONAME@$CIRCLE_SHA1"
# in case a different commit was pushed to ionic-site during doc/demo gen,
# try to rebase around it before pushing
git fetch

View File

@@ -21,7 +21,7 @@ function run {
git config --global user.email "hi@ionicframework.com"
git config --global user.name "Ionitron"
git clone git@github.com:driftyco/$REPOSITORY.git $DIRECTORY $ARGS
git clone git@github.com:ionic-team/$REPOSITORY.git $DIRECTORY $ARGS
cd $DIRECTORY
git fetch origin --tags
cd ../

2
scripts/git/config.sh Normal file
View File

@@ -0,0 +1,2 @@
git config --global user.email "hi@ionicframework.com"
git config --global user.name "Ionitron"

View File

@@ -6,7 +6,7 @@ import { Injectable } from '@angular/core';
* @description
*
* @usage
* ```
* ```typescript
* import { {{ PluginName }} } from '@ionic-native/{{ plugin-name }}';
*
*

View File

@@ -20,7 +20,7 @@ import { Observable } from 'rxjs/Observable';
* This plugin does something
*
* @usage
* ```
* ```typescript
* import { {{ PluginName }} } from '@ionic-native/{{ plugin-name }}';
*
*

View File

@@ -24,7 +24,8 @@ class TestObject {
pluginName: 'TestPlugin',
pluginRef: 'testPlugin',
repo: '',
plugin: 'cordova-plugin-my-plugin'
plugin: 'cordova-plugin-my-plugin',
platforms: ['Android', 'iOS']
})
class TestPlugin extends IonicNativePlugin {
@@ -85,6 +86,10 @@ describe('Regular Decorators', () => {
expect(TestPlugin.getPlugin()).toEqual(window.testPlugin);
});
it('should return supported platforms', () => {
expect(TestPlugin.getSupportedPlatforms()).toEqual(['Android', 'iOS']);
});
});
describe('Cordova', () => {

View File

@@ -135,7 +135,8 @@ export function InstanceCheck(opts: CordovaCheckOptions = {}) {
return getPromise(() => { });
}
}
},
enumerable: true
};
};
}
@@ -159,7 +160,8 @@ export function CordovaCheck(opts: CordovaCheckOptions = {}) {
}
return Promise.reject(check && check.error);
}
}
},
enumerable: true
};
};
}
@@ -239,7 +241,8 @@ export function Cordova(opts: CordovaOptions = {}) {
return {
value: function(...args: any[]) {
return wrap(this, methodName, opts).apply(this, args);
}
},
enumerable: true
};
};
}
@@ -254,7 +257,8 @@ export function CordovaInstance(opts: any = {}) {
return {
value: function(...args: any[]) {
return wrapInstance(this, methodName, opts).apply(this, args);
}
},
enumerable: true
};
};
}
@@ -312,7 +316,8 @@ export function CordovaFunctionOverride(opts: any = {}) {
return {
value: function(...args: any[]) {
return overrideFunction(this, methodName, opts);
}
},
enumerable: true
};
};
}
@@ -348,7 +353,8 @@ export function CordovaFiniteObservable(opts: CordovaFiniteObservableOptions = {
wrappedSubscription.unsubscribe();
};
});
}
},
enumerable: true
};
};
}

View File

@@ -38,4 +38,9 @@ export class IonicNativePlugin {
*/
static getPluginInstallName(): string { return; }
/**
* Returns the plugin's supported platforms
*/
static getSupportedPlatforms(): string[] { return; }
}

View File

@@ -1,4 +1,4 @@
import { get, getPlugin, getPromise, cordovaWarn, pluginWarn } from './util';
import { getPlugin, getPromise, cordovaWarn, pluginWarn } from './util';
import { checkReady } from './bootstrap';
import { CordovaOptions } from './decorators';
@@ -177,11 +177,11 @@ function wrapObservable(pluginObj: any, methodName: string, args: any[], opts: a
if (opts.clearWithArgs) {
return callCordovaPlugin(pluginObj, opts.clearFunction, args, opts, observer.next.bind(observer), observer.error.bind(observer));
}
return get(window, pluginObj.constructor.getPluginRef())[opts.clearFunction].call(pluginObj, pluginResult);
return callCordovaPlugin(pluginObj, opts.clearFunction, []);
}
} catch (e) {
console.warn('Unable to clear the previous observable watch for', pluginObj.constructor.getPluginName(), methodName);
console.error(e);
console.warn(e);
}
};
});
@@ -276,12 +276,12 @@ export function wrapInstance(pluginObj: any, methodName: string, opts: any = {})
return () => {
try {
if (opts.clearWithArgs) {
return pluginObj._objectInstance[opts.clearFunction].apply(pluginObj._objectInstance, args);
return callInstance(pluginObj, opts.clearFunction, args, opts, observer.next.bind(observer), observer.error.bind(observer));
}
return pluginObj._objectInstance[opts.clearFunction].call(pluginObj, pluginResult);
return callInstance(pluginObj, opts.clearFunction, []);
} catch (e) {
console.warn('Unable to clear the previous observable watch for', pluginObj.constructor.getPluginName(), methodName);
console.error(e);
console.warn(e);
}
};
});
@@ -290,23 +290,16 @@ export function wrapInstance(pluginObj: any, methodName: string, opts: any = {})
return getPromise((resolve: Function, reject: Function) => {
let result = callInstance(pluginObj, methodName, args, opts, resolve, reject);
if (result && !result.error) {
if (result && !!result.then) {
result.then(resolve, reject);
} else {
reject();
}
});
} else {
let pluginResult: any, rej: Function;
const p = getPromise((resolve: Function, reject: Function) => {
pluginResult = callInstance(pluginObj, methodName, args, opts, resolve, reject);
rej = reject;
});
if (pluginResult && pluginResult.error) {
p.catch(() => { });
typeof rej === 'function' && rej(pluginResult.error);
}
return p;
return getPromise((resolve: Function, reject: Function) => callInstance(pluginObj, methodName, args, opts, resolve, reject));
}
};

View File

@@ -25,7 +25,7 @@ export const getPromise = (callback: Function): Promise<any> => {
callback(resolve, reject);
});
} else {
console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular 2 or on a recent browser.');
console.error('No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.');
}
};
@@ -51,7 +51,7 @@ export const pluginWarn = (pluginName: string, plugin?: string, method?: string)
console.warn('Native: tried accessing the ' + pluginName + ' plugin but it\'s not installed.');
}
if (plugin) {
console.warn('Install the ' + pluginName + ' plugin: \'ionic plugin add ' + plugin + '\'');
console.warn('Install the ' + pluginName + ' plugin: \'ionic cordova plugin add ' + plugin + '\'');
}
};

View File

@@ -51,7 +51,7 @@ export interface ActionSheetOptions {
/**
* Choose if destructive button will be the last
*/
destructiveButtonLast: boolean;
destructiveButtonLast?: boolean;
}
/**
@@ -94,7 +94,7 @@ export interface ActionSheetOptions {
plugin: 'cordova-plugin-actionsheet',
pluginRef: 'plugins.actionsheet',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet',
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Browser']
platforms: ['Android', 'Browser', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class ActionSheet extends IonicNativePlugin {

View File

@@ -96,6 +96,14 @@ export interface AdMobFreeRewardVideoConfig {
*
*
* ```
* @interfaces
* AdMobFreeBannerConfig
* AdMobFreeInterstitialConfig
* AdMobFreeRewardVideoConfig
* @classes
* AdMobFreeBanner
* AdMobFreeInterstitial
* AdMobFreeRewardVideo
*/
@Plugin({
pluginName: 'AdMobFree',
@@ -108,9 +116,10 @@ export interface AdMobFreeRewardVideoConfig {
export class AdMobFree extends IonicNativePlugin {
/**
* Convenience constructor to get event names
* Convenience object to get event names
* @type {Object}
*/
events = {
events: any = {
BANNER_LOAD: 'admob.banner.events.LOAD',
BANNER_LOAD_FAIL: 'admob.banner.events.LOAD_FAIL',
BANNER_OPEN: 'admob.banner.events.OPEN',
@@ -142,19 +151,19 @@ export class AdMobFree extends IonicNativePlugin {
}
/**
*
* Returns the AdMobFreeBanner object
* @type {AdMobFreeBanner}
*/
banner: AdMobFreeBanner = new AdMobFreeBanner();
/**
*
* Returns the AdMobFreeInterstitial object
* @type {AdMobFreeInterstitial}
*/
interstitial: AdMobFreeInterstitial = new AdMobFreeInterstitial();
/**
*
* Returns the AdMobFreeRewardVideo object
* @type {AdMobFreeRewardVideo}
*/
rewardVideo: AdMobFreeRewardVideo = new AdMobFreeRewardVideo();
@@ -183,28 +192,28 @@ export class AdMobFreeBanner {
* Hide the banner.
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
hide(): Promise<any> { return; }
/**
* Create banner.
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
prepare(): Promise<any> { return; }
/**
* Remove the banner.
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
remove(): Promise<any> { return; }
/**
* Show the banner.
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
show(): Promise<any> { return; }
}
@@ -231,21 +240,21 @@ export class AdMobFreeInterstitial {
* Check if interstitial is ready
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
isReady(): Promise<any> { return; }
/**
* Prepare interstitial
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
prepare(): Promise<any> { return; }
/**
* Show the interstitial
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
show(): Promise<any> { return; }
}
@@ -272,21 +281,21 @@ export class AdMobFreeRewardVideo {
* Check if reward video is ready
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
isReady(): Promise<any> { return; }
/**
* Prepare reward video
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
prepare(): Promise<any> { return; }
/**
* Show the reward video
* @return {Promise<any>}
*/
@Cordova({ sync: true })
@Cordova({ otherPromise: true })
show(): Promise<any> { return; }
}

View File

@@ -93,6 +93,8 @@ export interface AdExtras {
* @name AdMob
* @description
* Plugin for Google Ads, including AdMob / DFP (doubleclick for publisher) and mediations to other Ad networks.
*
* IMPORTANT NOTICE: this plugin takes a percentage out of your earnings if you profit more than $1,000. Read more about this on the plugin's repo. For a completely free alternative, see [AdMob Free](../admob-free).
* @usage
* ```typescript
* import { AdMob } from '@ionic-native/admob';

View File

@@ -101,8 +101,9 @@ export interface AlipayOrder {
plugin: 'cordova-alipay-base',
pluginRef: 'Alipay.Base',
repo: 'https://github.com/xueron/cordova-alipay-base',
platforms: ['Android', 'iOS'],
install: 'ionic plugin add https://github.com/xueron/cordova-alipay-base --variable APP_ID=your_app_id'
install: 'ionic cordova plugin add cordova-alipay-base --variable APP_ID=your_app_id',
installVariables: ['APP_ID'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Alipay extends IonicNativePlugin {

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,23 +8,23 @@ 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();
* });
*
* ```
*/
@Plugin({
pluginName: 'AppMinimize',
plugin: 'https://github.com/tomloprod/cordova-plugin-appminimize.git',
plugin: 'cordova-plugin-appminimize',
pluginRef: 'plugins.appMinimize',
repo: 'https://github.com/tomloprod/cordova-plugin-appminimize',
platforms: ['Android']

View File

@@ -25,7 +25,7 @@ import { Injectable } from '@angular/core';
plugin: 'cordova-plugin-app-preferences',
pluginRef: 'plugins.appPreferences',
repo: 'https://github.com/apla/me.apla.cordova.app-preferences',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'OS X', 'Windows 8', 'Windows Phone']
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'macOS', 'Windows 8', 'Windows Phone']
})
@Injectable()
export class AppPreferences extends IonicNativePlugin {

View File

@@ -140,7 +140,7 @@ export interface AppUrls {
plugin: 'cordova-plugin-apprate',
pluginRef: 'AppRate',
repo: 'https://github.com/pushandplay/cordova-plugin-apprate',
platforms: ['Android', 'iOS', 'Windows (experimental)']
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
})
@Injectable()
export class AppRate extends IonicNativePlugin {

View File

@@ -31,7 +31,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-app-version',
pluginRef: 'cordova.getAppVersion',
repo: 'https://github.com/whiteoctober/cordova-plugin-app-version',
platforms: ['Android', 'iOS']
platforms: ['Android', 'iOS', 'Windows']
})
@Injectable()
export class AppVersion extends IonicNativePlugin {

View File

@@ -22,9 +22,9 @@ import { Injectable } from '@angular/core';
*/
@Plugin({
pluginName: 'Appodeal',
plugin: 'https://github.com/appodeal/appodeal-cordova-plugin',
plugin: 'https://github.com/appodeal/appodeal-cordova-plugin.git',
pluginRef: 'Appodeal',
repo: 'https://github.com/appodeal/appodeal-cordova-plugin.git',
repo: 'https://github.com/appodeal/appodeal-cordova-plugin',
platforms: ['iOS', 'Android']
})
@Injectable()

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))
@@ -306,7 +306,7 @@ export interface BackgroundGeolocationConfig {
plugin: 'cordova-plugin-mauron85-background-geolocation',
pluginRef: 'backgroundGeolocation',
repo: 'https://github.com/mauron85/cordova-plugin-background-geolocation',
platforms: ['iOS', 'Android', 'Windows Phone 8']
platforms: ['Android', 'iOS']
})
@Injectable()
export class BackgroundGeolocation extends IonicNativePlugin {
@@ -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

@@ -70,7 +70,7 @@ export interface BackgroundModeConfiguration {
plugin: 'cordova-plugin-background-mode',
pluginRef: 'cordova.plugins.backgroundMode',
repo: 'https://github.com/katzer/cordova-plugin-background-mode',
platforms: ['Android', 'iOS', 'Windows Phone 8']
platforms: ['AmazonFire OS', 'Android', 'Browser', 'iOS', 'Windows']
})
@Injectable()
export class BackgroundMode extends IonicNativePlugin {

View File

@@ -27,7 +27,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-badge',
pluginRef: 'cordova.plugins.notification.badge',
repo: 'https://github.com/katzer/cordova-plugin-badge',
platforms: ['Android', 'iOS', 'Browser', 'Windows', 'Amazon FireOS', 'Windows Phone 8']
platforms: ['Android', 'Browser', 'iOS', 'Windows']
})
@Injectable()
export class Badge extends IonicNativePlugin {

View File

@@ -92,7 +92,7 @@ export interface BarcodeScanResult {
plugin: 'phonegap-plugin-barcodescanner',
pluginRef: 'cordova.plugins.barcodeScanner',
repo: 'https://github.com/phonegap/phonegap-plugin-barcodescanner',
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Windows 10', 'Windows 8', 'BlackBerry 10', 'Browser']
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Windows']
})
@Injectable()
export class BarcodeScanner extends IonicNativePlugin {

View File

@@ -0,0 +1,45 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @beta
* @name Base64
* @description
* This Plugin is used to encode base64 of any file, it uses js code for iOS, but in case of android it uses native code to handle android versions lower than v.3
*
* @usage
* ```typescript
* import { Base64 } from '@ionic-native/base64';
*
* constructor(private base64: Base64) { }
*
* ...
*
* let filePath: string = 'file:///...';
* this.base64.encodeFile(filePath).then((base64File: string) => {
* console.log(base64File);
* }, (err) => {
* console.log(err);
* });
*
* ```
*/
@Plugin({
pluginName: 'Base64',
plugin: 'com-badrit-base64',
pluginRef: 'plugins.Base64',
repo: 'https://github.com/hazemhagrass/phonegap-base64',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Base64 extends IonicNativePlugin {
/**
* This function encodes base64 of any file
* @param {string} filePath Absolute file path
* @return {Promise<string>} Returns a promise that resolves when the file is successfully encoded
*/
@Cordova()
encodeFile(filePath: string): Promise<string> { return; }
}

View File

@@ -49,7 +49,7 @@ export interface BatteryStatusResponse {
plugin: 'cordova-plugin-battery-status',
pluginRef: 'navigator.battery',
repo: 'https://github.com/apache/cordova-plugin-battery-status',
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser']
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows']
})
@Injectable()
export class BatteryStatus extends IonicNativePlugin {

View File

@@ -173,7 +173,7 @@ import { Observable } from 'rxjs/Observable';
plugin: 'cordova-plugin-ble-central',
pluginRef: 'ble',
repo: 'https://github.com/don/cordova-plugin-ble-central',
platforms: ['iOS', 'Android']
platforms: ['Android', 'iOS']
})
@Injectable()
export class BLE extends IonicNativePlugin {

View File

@@ -35,7 +35,7 @@ import { Observable } from 'rxjs/Observable';
repo: 'https://github.com/don/BluetoothSerial',
plugin: 'cordova-plugin-bluetooth-serial',
pluginRef: 'bluetoothSerial',
platforms: ['Android', 'iOS', 'Windows Phone', 'Browser']
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
@Injectable()
export class BluetoothSerial extends IonicNativePlugin {

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'));
*
@@ -25,7 +26,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
plugin: 'call-number',
pluginRef: 'plugins.CallNumber',
repo: 'https://github.com/Rohfosho/CordovaCallNumberPlugin',
platforms: ['iOS', 'Android']
platforms: ['Android', 'iOS']
})
@Injectable()
export class CallNumber extends IonicNativePlugin {

View File

@@ -125,7 +125,7 @@ export interface CameraPopoverOptions {
plugin: 'cordova-plugin-camera',
pluginRef: 'navigator.camera',
repo: 'https://github.com/apache/cordova-plugin-camera',
platforms: ['Android', 'BlackBerry', 'Browser', 'Firefox', 'FireOS', 'iOS', 'Windows', 'Windows Phone 8', 'Ubuntu']
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class Camera extends IonicNativePlugin {

View File

@@ -164,7 +164,7 @@ export interface CardIOResponse {
plugin: 'card.io.cordova.mobilesdk',
pluginRef: 'CardIO',
repo: 'https://github.com/card-io/card.io-Cordova-Plugin',
platforms: ['iOS', 'Android']
platforms: ['Android', 'iOS']
})
@Injectable()
export class CardIO extends IonicNativePlugin {

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
@@ -31,10 +29,10 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'Clipboard',
plugin: 'https://github.com/VersoSolutions/CordovaClipboard.git',
plugin: 'danielsogl-cordova-plugin-clipboard',
pluginRef: 'cordova.plugins.clipboard',
repo: 'https://github.com/VersoSolutions/CordovaClipboard',
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser']
repo: 'https://github.com/danielsogl/cordova-plugin-clipboard',
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class Clipboard extends IonicNativePlugin {

View File

@@ -294,7 +294,7 @@ export class ContactFindOptions implements IContactFindOptions {
plugin: 'cordova-plugin-contacts',
pluginRef: 'navigator.contacts',
repo: 'https://github.com/apache/cordova-plugin-contacts',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows 8', 'Windows Phone']
platforms: ['Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class Contacts extends IonicNativePlugin {

View File

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

View File

@@ -39,7 +39,7 @@ import { Observable } from 'rxjs/Observable';
plugin: 'cordova-plugin-dbmeter',
pluginRef: 'DBMeter',
repo: 'https://github.com/akofman/cordova-plugin-dbmeter',
platforms: ['iOS', 'Android']
platforms: ['Android', 'iOS']
})
@Injectable()
export class DBMeter extends IonicNativePlugin {

View File

@@ -49,7 +49,7 @@ export interface DeeplinkMatch {
* });
* ```
*
* Alternatively, if you're using Ionic 2, there's a convenience method that takes a reference to a `NavController` and handles
* Alternatively, if you're using Ionic, there's a convenience method that takes a reference to a `NavController` and handles
* the actual navigation for you:
*
* ```typescript
@@ -67,7 +67,7 @@ export interface DeeplinkMatch {
* });
* ```
*
* See the [Ionic 2 Deeplinks Demo](https://github.com/driftyco/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.
*
* @interfaces
@@ -77,10 +77,10 @@ export interface DeeplinkMatch {
pluginName: 'Deeplinks',
plugin: 'ionic-plugin-deeplinks',
pluginRef: 'IonicDeeplink',
repo: 'https://github.com/driftyco/ionic-plugin-deeplinks',
platforms: ['iOS', 'Android', 'Browser'],
install: 'ionic plugin add ionic-plugin-deeplinks --variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com --variable ANDROID_PATH_PREFIX=/',
installVariables: ['URL_SCHEME', 'DEEPLINK_SCHEME', 'DEEPLINK_HOST', 'ANDROID_PATH_PREFIX']
repo: 'https://github.com/ionic-team/ionic-plugin-deeplinks',
install: 'ionic cordova plugin add ionic-plugin-deeplinks --variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com --variable ANDROID_PATH_PREFIX=/',
installVariables: ['URL_SCHEME', 'DEEPLINK_SCHEME', 'DEEPLINK_HOST', 'ANDROID_PATH_PREFIX'],
platforms: ['Android', 'Browser', 'iOS']
})
@Injectable()
export class Deeplinks extends IonicNativePlugin {
@@ -103,7 +103,7 @@ export class Deeplinks extends IonicNativePlugin {
/**
*
* This is a convenience version of `route` that takes a reference to a NavController
* from Ionic 2, or a custom class that conforms to this protocol:
* from Ionic, or a custom class that conforms to this protocol:
*
* NavController.push = function(View, Params){}
*

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

@@ -72,7 +72,7 @@ export interface DeviceMotionAccelerometerOptions {
plugin: 'cordova-plugin-device-motion',
pluginRef: 'navigator.accelerometer',
repo: 'https://github.com/apache/cordova-plugin-device-motion',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class DeviceMotion extends IonicNativePlugin {

View File

@@ -77,7 +77,7 @@ export interface DeviceOrientationCompassOptions {
plugin: 'cordova-plugin-device-orientation',
pluginRef: 'navigator.compass',
repo: 'https://github.com/apache/cordova-plugin-device-orientation',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class DeviceOrientation extends IonicNativePlugin {

View File

@@ -24,7 +24,7 @@ declare const window: any;
plugin: 'cordova-plugin-device',
pluginRef: 'device',
repo: 'https://github.com/apache/cordova-plugin-device',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class Device extends IonicNativePlugin {

View File

@@ -45,8 +45,8 @@ export interface DialogsPromptCallback {
pluginName: 'Dialogs',
plugin: 'cordova-plugin-dialogs',
pluginRef: 'navigator.notification',
repo: 'https://github.com/apache/cordova-plugin-dialogs.git',
platforms: ['Android', 'BlackBerry 10', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
repo: 'https://github.com/apache/cordova-plugin-dialogs',
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class Dialogs extends IonicNativePlugin {
@@ -69,7 +69,7 @@ export class Dialogs extends IonicNativePlugin {
* @param {string} message Dialog message.
* @param {string} title Dialog title. (Optional, defaults to Confirm)
* @param {Array<string>} buttonLabels Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked. Note that the index use one-based indexing.
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked, or 0 if the user has dismissed the dialog by clicking outside the dialog box. Note that the index use one-based indexing.
*/
@Cordova({
successIndex: 1,

View File

@@ -90,13 +90,13 @@ export class DocumentViewer extends IonicNativePlugin {
*
* @param url {string} Url to the file
* @param contentType {string} Content type of the file
* @param options {Array<DocumentViewerOptions>} options
* @param options {DocumentViewerOptions} options
* @param [onShow] {Function}
* @param [onClose] {Function}
* @param [onMissingApp] {Function}
* @param [onError] {Function}
*/
@Cordova({ sync: true })
viewDocument(url: string, contentType: string, options: Array<DocumentViewerOptions>, onShow?: Function, onClose?: Function, onMissingApp?: Function, onError?: Function): void { }
viewDocument(url: string, contentType: string, options: DocumentViewerOptions, onShow?: Function, onClose?: Function, onMissingApp?: Function, onError?: Function): void { }
}

View File

@@ -77,7 +77,7 @@ export interface EmailComposerOptions {
plugin: 'cordova-plugin-email',
pluginRef: 'cordova.plugins.email',
repo: 'https://github.com/hypery2k/cordova-email-plugin',
platforms: ['Android', 'iOS']
platforms: ['Amazon Fire OS', 'Android', 'Browser', 'iOS', 'Windows']
})
@Injectable()
export class EmailComposer extends IonicNativePlugin {

View File

@@ -44,7 +44,7 @@ export interface EstimoteBeaconRegion {
plugin: 'cordova-plugin-estimote',
pluginRef: 'estimote.beacons',
repo: 'https://github.com/evothings/phonegap-estimotebeacons',
platforms: ['iOS', 'Android']
platforms: ['Android', 'iOS']
})
@Injectable()
export class EstimoteBeacons extends IonicNativePlugin {
@@ -512,4 +512,3 @@ export class EstimoteBeacons extends IonicNativePlugin {
writeConnectedMinor(minor: number): Promise<any> { return; }
}

View File

@@ -43,7 +43,7 @@ export interface FacebookLoginResponse {
* Then type in the following command in your Terminal, where APP_ID and APP_NAME are the values from the Facebook Developer portal.
*
* ```bash
* ionic plugin add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication"
* ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"
* ```
*
* After, you'll need to add the native platforms you'll be using to your app in the Facebook Developer portal under your app's Settings:
@@ -114,9 +114,9 @@ export interface FacebookLoginResponse {
plugin: 'cordova-plugin-facebook4',
pluginRef: 'facebookConnectPlugin',
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
install: 'ionic plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
install: 'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
installVariables: ['APP_ID', 'APP_NAME'],
platforms: ['Android', 'iOS']
platforms: ['Android', 'iOS', 'Browser']
})
@Injectable()
export class Facebook extends IonicNativePlugin {

View File

@@ -25,32 +25,32 @@ export interface NotificationData {
*
* @usage
* ```typescript
* import { FCM } from 'ionic-native';
* import { FCM } from '@ionic-native/fcm';
*
* constructor(private fcm: FCM) {}
*
*
* ...
*
*
* fcm.subscribeToTopic('marketing');
*
*
* fcm.getToken().then(token=>{
* backend.registerToken(token);
* })
*
*
* fcm.onNotification().subscribe(data=>{
* if(data.wasPressed){
* if(data.wasTapped){
* console.log("Received in background");
* } else {
* console.log("Received in foreground");
* };
* })
*
*
* fcm.onTokenRefresh().subscribe(token=>{
* backend.registerToken(token);
* })
*
*
* fcm.unsubscribeFromTopic('marketing');
*
*
* ```
* @interfaces
* NotificationData
@@ -60,14 +60,14 @@ export interface NotificationData {
plugin: 'cordova-plugin-fcm',
pluginRef: 'FCMPlugin',
repo: 'https://github.com/fechanique/cordova-plugin-fcm',
platforms: ['iOS', 'Android']
platforms: ['Android', 'iOS']
})
@Injectable()
export class FCM extends IonicNativePlugin {
/**
* Get's device's current registration id
*
*
* @returns {Promise<string>} Returns a Promise that resolves with the registration id token
*/
@Cordova()
@@ -75,7 +75,7 @@ export class FCM extends IonicNativePlugin {
/**
* Event firing on the token refresh
*
*
* @returns {Observable<string>} Returns an Observable that notifies with the change of device's registration id
*/
@Cordova({
@@ -85,9 +85,9 @@ export class FCM extends IonicNativePlugin {
/**
* Subscribes you to a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
*
*
* @param {string} topic Topic to be subscribed to
*
*
* @returns {Promise<any>} Returns a promise resolving in result of subscribing to a topic
*/
@Cordova()
@@ -95,9 +95,9 @@ export class FCM extends IonicNativePlugin {
/**
* Unubscribes you from a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
*
*
* @param {string} topic Topic to be unsubscribed from
*
*
* @returns {Promise<any>} Returns a promise resolving in result of unsubscribing from a topic
*/
@Cordova()
@@ -105,7 +105,7 @@ export class FCM extends IonicNativePlugin {
/**
* Watch for incoming notifications
*
*
* @returns {Observable<any>} returns an object with data from the notification
*/
@Cordova({

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

@@ -400,6 +400,7 @@ export interface RemoveResult {
fileRemoved: Entry;
}
/** @hidden */
export declare class FileSaver extends EventTarget {
/**
* When the FileSaver constructor is called, the user agent must return a new FileSaver object with readyState set to INIT.
@@ -489,6 +490,7 @@ export declare class FileSaver extends EventTarget {
}
/**
* @hidden
* This interface expands on the FileSaver interface to allow for multiple write actions, rather than just saving a single Blob.
*/
export declare class FileWriter extends FileSaver {
@@ -528,6 +530,7 @@ export interface IWriteOptions {
truncate?: number; // if present, number of bytes to truncate file to before writing
}
/** @hidden */
export declare class FileError {
constructor(code: number);
static NOT_FOUND_ERR: number;
@@ -547,6 +550,7 @@ export declare class FileError {
message: string;
}
/** @hidden */
export declare class FileReader {
static EMPTY: number;
static LOADING: number;
@@ -616,7 +620,7 @@ declare const window: Window;
plugin: 'cordova-plugin-file',
pluginRef: 'cordova.file',
repo: 'https://github.com/apache/cordova-plugin-file',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Ubuntu', 'Windows', 'Windows Phone']
platforms: ['Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class File extends IonicNativePlugin {

View File

@@ -0,0 +1,85 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @beta
* @name Firebase Analytics
* @description
* Cordova plugin for Firebase Analytics
*
* Go yo firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
*
* NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.
*
* @usage
* ```typescript
* import { FirebaseAnalytics } from '@ionic-native/firebase-analytics';
*
*
* constructor(private firebaseAnalytics: FirebaseAnalytics) { }
*
* ...
*
* this.firebaseAnalytics.logEvent('page_view', {page: "dashboard"})
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'FirebaseAnalytics',
plugin: 'cordova-plugin-firebase-analytics',
pluginRef: 'cordova.plugins.firebase.analytics',
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-analytics',
platforms: ['Android', 'iOS']
})
@Injectable()
export class FirebaseAnalytics extends IonicNativePlugin {
/**
* Logs an app event.
* Be aware of automatically collected events.
* @param name {string} The name of the event
* @param params {any} Some param to configure something
* @return {Promise<any>} Returns a promise
*/
@Cordova()
logEvent(name: string, params: any): Promise<any> { return; }
/**
* Sets the user ID property.
* This feature must be used in accordance with Google's Privacy Policy.
* @param id {string} THe user ID
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setUserId(id: string): Promise<any> { return; }
/**
* This feature must be used in accordance with Google's Privacy Policy.
* Be aware of automatically collected user properties.
* @param name {string} The property name
* @param value {string} The property value
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setUserProperty(name: string, value: string): Promise<any> { return; }
/**
* Sets whether analytics collection is enabled for this app on this device.
* @param enabled {boolean}
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setEnabled(enabled: boolean): Promise<any> { return; }
/**
* 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.
* @param name {string} The name of the screen
* @return {Promise<any>} Returns a promise
*/
@Cordova()
setCurrentScreen(name: string): Promise<any> { return; }
}

View File

@@ -0,0 +1,85 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
export interface DynamicLinksOptions {
title: string;
message: string;
deepLink?: string;
callToActionText?: string;
}
/**
* @beta
* @name Firebase Dynamic Links
* @description
* Cordova plugin for Firebase Invites and Firebase Dynamic Links
*
* Variables APP_DOMAIN and APP_PATH specify web URL where your app will start an activity to handle the link. They also used to setup support for App Indexing.
*
* Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
*
* Preferences:
*
* Preferences GoogleIOSClientId and GoogleAndroidClientId are used to setup dynamic links when you have an app for several platforms.
* You can find values at your GoogleService-Info.plist (key ANDROID_CLIENT_ID) and google-services.json (key client[0].oauth_client[0].client_id).
*
*config.xml:
* ```xml
* <platform name="android">
* <preference name="GoogleIOSClientId" value="..." />
* </platform>
* <platform name="ios">
* <preference name="GoogleAndroidClientId" value="..." />
* </platform>
* ```
* @usage
* ```typescript
* import { FirebaseDynamicLinks } from '@ionic-native/firebase-dynamic-links';
*
*
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
*
* ...
*
* const options: DynamicLinksOptions = {
* title: 'My Title';
* message: 'My message';
* }
*
* this.firebaseDynamicLinks.sendInvitation(options)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*
* @interfaces
* DynamicLinksOptions
*/
@Plugin({
pluginName: 'FirebaseDynamicLinks',
plugin: ' cordova-plugin-firebase-dynamiclinks',
pluginRef: 'cordova.plugins.firebase.dynamiclinks',
repo: 'https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks',
install: 'ionic cordova plugin add cordova-plugin-firebase-dynamiclinks --save --variable APP_DOMAIN="example.com" --variable APP_PATH="/"',
installVariables: ['APP_DOMAIN', 'APP_PATH'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class FirebaseDynamicLinks extends IonicNativePlugin {
/**
* Registers callback that is triggered on each dynamic link click.
* @return {Promise<any>} Returns a promise
*/
@Cordova()
onDynamicLink(): Promise<any> { return; }
/**
* Display invitation dialog.
* @param options {DynamicLinksOptions} Some param to configure something
* @return {Promise<any>} Returns a promise
*/
@Cordova()
sendInvitation(options: DynamicLinksOptions): Promise<any> { return; }
}

View File

@@ -23,7 +23,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
pluginName: 'Flashlight',
plugin: 'cordova-plugin-flashlight',
pluginRef: 'window.plugins.flashlight',
repo: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git',
repo: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin',
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
@Injectable()

View File

@@ -72,6 +72,9 @@ export interface FlurryAnalyticsLocation {
horizontalAccuracy?: number;
}
/**
* @hidden
*/
export class FlurryAnalyticsObject {
constructor(private _objectInstance: any) { }
@@ -208,8 +211,8 @@ export class FlurryAnalyticsObject {
pluginName: 'FlurryAnalytics',
plugin: 'cordova-plugin-flurryanalytics',
pluginRef: 'FlurryAnalytics',
repo: 'https://github.com/blakgeek/cordova-plugin-flurryanalytics.git',
platforms: ['Android', 'iOS', 'Browser']
repo: 'https://github.com/blakgeek/cordova-plugin-flurryanalytics',
platforms: ['Android', 'iOS']
})
@Injectable()
export class FlurryAnalytics extends IonicNativePlugin {
@@ -224,7 +227,7 @@ export class FlurryAnalytics extends IonicNativePlugin {
let instance: any;
if (checkAvailability(FlurryAnalytics.pluginRef, null, FlurryAnalytics.pluginName) === true) {
instance = new (window as any).FlurryAnalaytics(options);
instance = new (window as any).FlurryAnalytics(options);
}
return new FlurryAnalyticsObject(instance);

View File

@@ -0,0 +1,133 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @name FTP
* @description
* This cordova plugin is created to use ftp (client) in web/js.
*
* @usage
* ```typescript
* import { FTP } from '@ionic-native/ftp';
*
*
* constructor(private fTP: FTP) { }
*
* ...
*
*
* this.fTP.connect('ftp_host', 'ftp_user', 'ftp_password')
* .then((res: any) => console.log('Login successful', res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'FTP',
plugin: 'cordova-plugin-ftp',
pluginRef: 'cordova.plugin.ftp',
repo: 'https://github.com/xfally/cordova-plugin-ftp',
platforms: ['Android', 'iOS']
})
@Injectable()
export class FTP extends IonicNativePlugin {
/**
* Connect to one ftp server.
*
* Just need to init the connection once. If success, you can do any ftp actions later.
* @param hostname {string} The ftp server url. Like ip without protocol prefix, e.g. "192.168.1.1".
* @param username {string} The ftp login username. If it and `password` are all blank/undefined, the default username "anonymous" is used.
* @param password {string} The ftp login password. If it and `username` are all blank/undefined, the default password "anonymous@" is used.
* @return {Promise<any>} The success callback. Notice: For iOS, if triggered, means `init` success, but NOT means the later action, e.g. `ls`... `download` will success!
*/
@Cordova()
connect(hostname: string, username: string, password: string): Promise<any> { return; }
/**
* List files (with info of `name`, `type`, `link`, `size`, `modifiedDate`) under one directory on the ftp server.
* You can get one file's name using `fileList[x].name` (`x` is the location in array).
*
* Explain key:
* - name: file name (utf-8).
* - type: file type. number `0` means regular file, `1` means directory, `2` means symbolic link, `-1` means unknown type (maybe block dev, char dev...).
* - link: if the file is a symbolic link, then this field store symbolic link information (utf-8), else it's a blank string.
* - size: file size in bytes.
* - modifiedDate: modified date of this file. date format is `yyyy-MM-dd HH:mm:ss zzz`, e.g "2015-12-01 20:45:00 GMT+8".
*
* @param path {string} The path on the ftp server. e.g. "/adf/123/".
* @return {Promise<any>} Returns a promise
*/
@Cordova()
ls(path: string): Promise<any> { return; }
/**
* Create one directory on the ftp server.
*
* @param path {string} The path on the ftp server. e.g. "/adf/123/".
* @return {Promise<any>} Returns a promise
*/
@Cordova()
mkdir(path: string): Promise<any> { return; }
/**
* Delete one directory on the ftp server.
*
* Tip: As many ftp server could not rm dir when it's not empty, so rm all files under the dir at first is recommended.
*
* @param path {string} The file (with full path) you want to delete. e.g. "/adf/123/newDir/myFile".
* @return {Promise<any>} Returns a promise
*/
@Cordova()
rmdir(path: string): Promise<any> { return; }
/**
* Delete one file on the ftp server.
*
* @param file {string} The file (with full path) you want to delete. e.g. "/adf/123/newDir/myFile".
* @return {Promise<any>} Returns a promise
*/
@Cordova()
rm(file: string): Promise<any> { return; }
/**
* Upload one local file to the ftp server.
*
* @param localFile {string} The file (with full path) you want to upload. e.g. "/local/path/to/localFile".
* @param remoteFile {string} The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile".
* @return {Promise<any>} Returns a promise.
* It will be triggered many times according the file's size.
* The arg `0`, `0.1xx`, `0.2xx` ... `1` means the upload percent. When it reach `1`, means success.
*/
@Cordova()
upload(localFile: string, remoteFile: string): Promise<any> { return; }
/**
* Download one remote file on the ftp server to local path.
*
* @param localFile {string} The file (with full path) you want to upload. e.g. "/local/path/to/localFile".
* @param remoteFile {string} The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile".
* @return {Promise<any>} Returns a promise.
* It will be triggered many times according the file's size.
* The arg `0`, `0.1xx`, `0.2xx` ... `1` means the upload percent. When it reach `1`, means success.
*/
@Cordova()
download(localFile: string, remoteFile: string): Promise<any> { return; }
/**
* Cancel all requests. Always success.
*
* @return {Promise<any>} Returns a promise
*/
@Cordova()
cancel(): Promise<any> { return; }
/**
* Disconnect from ftp server.
*
* @return {Promise<any>} Returns a promise
*/
@Cordova()
disconnect(): Promise<any> { return; }
}

View File

@@ -72,15 +72,15 @@ 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({
pluginName: 'Geofence',
plugin: 'cordova-plugin-geofence',
pluginRef: 'geofence',
repo: 'https://github.com/cowbell/cordova-plugin-geofence/',
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Windows Phone']
repo: 'https://github.com/cowbell/cordova-plugin-geofence',
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class Geofence extends IonicNativePlugin {

View File

@@ -153,7 +153,7 @@ export interface GeolocationOptions {
plugin: 'cordova-plugin-geolocation',
pluginRef: 'navigator.geolocation',
repo: 'https://github.com/apache/cordova-plugin-geolocation',
platforms: ['Android', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class Geolocation extends IonicNativePlugin {

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', 'Firefox OS', 'iOS', 'Windows Phone 8', 'Widnows', 'Browser']
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class Globalization extends IonicNativePlugin {

View File

@@ -34,7 +34,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-google-analytics',
pluginRef: 'ga',
repo: 'https://github.com/danwilson/google-analytics-plugin',
platforms: ['Android', 'iOS', 'Browser']
platforms: ['Android', 'Browser', 'iOS', 'Windows Phone 8']
})
@Injectable()
export class GoogleAnalytics extends IonicNativePlugin {

View File

@@ -853,14 +853,14 @@ export class Marker {
/**
* Set the marker position.
* @param latLng {GoogleMapLatLng}
* @param latLng {LatLng}
*/
@CordovaInstance({ sync: true })
setPosition(latLng: LatLng): void { return; }
/**
* Return the marker position.
* @return {Promise<GoogleMapLatLng>}
* @return {Promise<LatLng>}
*/
@CordovaInstance()
getPosition(): Promise<LatLng> { return; }

View File

@@ -23,9 +23,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-googleplus',
pluginRef: 'window.plugins.googleplus',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-googleplus',
platforms: ['Web', 'Android', 'iOS'],
install: 'ionic plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myreversedclientid',
installVariables: ['REVERSED_CLIENT_ID']
install: 'ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myreversedclientid',
installVariables: ['REVERSED_CLIENT_ID'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class GooglePlus extends IonicNativePlugin {

View File

@@ -49,10 +49,10 @@ 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: ['iOS', 'Android']
platforms: ['Android', 'iOS', 'macOS']
})
@Injectable()
export class Httpd extends IonicNativePlugin {

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

@@ -57,9 +57,11 @@ export interface ImagePickerOptions {
*/
@Plugin({
pluginName: 'ImagePicker',
plugin: 'https://github.com/Telerik-Verified-Plugins/ImagePicker',
plugin: 'https://github.com/Telerik-Verified-Plugins/ImagePicker.git',
pluginRef: 'window.imagePicker',
repo: 'https://github.com/Telerik-Verified-Plugins/ImagePicker',
install: 'ionic cordova plugin add https://github.com/Telerik-Verified-Plugins/ImagePicker.git --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="your usage message"',
installVariables: ['PHOTO_LIBRARY_USAGE_DESCRIPTION'],
platforms: ['Android', 'iOS']
})
@Injectable()

View File

@@ -43,7 +43,7 @@ export interface ImageResizerOptions {
* Cordova Plugin For Image Resize
*
* Requires plugin `info.protonet.imageresizer` - use the Ionic CLI and type in the following command:
* `ionic plugin add https://github.com/protonet/cordova-plugin-image-resizer.git`
* `ionic cordova plugin add https://github.com/protonet/cordova-plugin-image-resizer.git`
*
* For more info, please see the https://github.com/protonet/cordova-plugin-image-resizer
*

View File

@@ -181,7 +181,7 @@ export class InAppBrowserObject {
plugin: 'cordova-plugin-inappbrowser',
pluginRef: 'cordova.InAppBrowser',
repo: 'https://github.com/apache/cordova-plugin-inappbrowser',
platforms: ['Amazon', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'OS X', 'Ubuntu', 'Windows', 'Windows Phone']
platforms: ['AmazonFire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'macOS', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class InAppBrowser extends IonicNativePlugin {

View File

@@ -57,8 +57,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
pluginName: 'InAppPurchase',
plugin: 'cordova-plugin-inapppurchase',
pluginRef: 'inAppPurchase',
platforms: ['Android', 'iOS'],
repo: 'https://github.com/AlexDisler/cordova-plugin-inapppurchase'
repo: 'https://github.com/AlexDisler/cordova-plugin-inapppurchase',
platforms: ['Android', 'iOS']
})
@Injectable()
export class InAppPurchase extends IonicNativePlugin {

View File

@@ -31,10 +31,10 @@ 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', 'iOS', 'Windows Phone 8']
platforms: ['Android', 'Browser', 'Firefox OS', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class Insomnia extends IonicNativePlugin {

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));
*
@@ -72,7 +72,7 @@ export interface IntelSecurityDataOptions {
plugin: 'com-intel-security-cordova-plugin',
pluginRef: 'intel.security',
repo: 'https://github.com/AppSecurityApi/com-intel-security-cordova-plugin',
platforms: ['Android', 'iOS', 'Windows']
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class IntelSecurity extends IonicNativePlugin {

View File

@@ -24,7 +24,7 @@ import { Observable } from 'rxjs/Observable';
pluginName: 'Keyboard',
plugin: 'ionic-plugin-keyboard',
pluginRef: 'cordova.plugins.Keyboard',
repo: 'https://github.com/driftyco/ionic-plugin-keyboard',
repo: 'https://github.com/ionic-team/ionic-plugin-keyboard',
platforms: ['Android', 'BlackBerry 10', 'iOS', 'Windows']
})
@Injectable()
@@ -57,7 +57,7 @@ export class Keyboard extends IonicNativePlugin {
/**
* Prevents the native UIScrollView from moving when an input is focused.
* @param disable
* @param disable {boolean}
*/
@Cordova({
sync: true,

View File

@@ -7,7 +7,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
* @description
* Get and set data in the iOS Keychain
*
* Requires Cordova plugin: `cordova-plugin-ios-keychain`. For more info, please see the [Keychain plugin docs](https://github.com/driftyco/cordova-plugin-ios-keychain).
* Requires Cordova plugin: `cordova-plugin-ios-keychain`. For more info, please see the [Keychain plugin docs](https://github.com/ionic-team/cordova-plugin-ios-keychain).
*
* @usage
* ```typescript
@@ -29,7 +29,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
pluginName: 'Keychain',
plugin: 'cordova-plugin-ios-keychain',
pluginRef: 'window.Keychain',
repo: 'https://github.com/driftyco/cordova-plugin-ios-keychain/',
repo: 'https://github.com/ionic-team/cordova-plugin-ios-keychain',
platforms: ['iOS']
})
@Injectable()

View File

@@ -92,7 +92,7 @@ export interface LaunchNavigatorOptions {
plugin: 'uk.co.workingedge.phonegap.plugin.launchnavigator',
pluginRef: 'launchnavigator',
repo: 'https://github.com/dpa99c/phonegap-launch-navigator',
platforms: ['Android', 'iOS']
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class LaunchNavigator extends IonicNativePlugin {

View File

@@ -52,8 +52,9 @@ export type LinkedInLoginScopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_comp
pluginName: 'LinkedIn',
plugin: 'cordova-plugin-linkedin',
pluginRef: 'cordova.plugins.LinkedIn',
repo: 'https://github.com/zyramedia/cordova-plugin-linkedin',
install: 'ionic plugin add cordova-plugin-linkedin --variable APP_ID=YOUR_APP_ID',
repo: 'https://github.com/zyra/cordova-plugin-linkedin',
install: 'ionic cordova plugin add cordova-plugin-linkedin --variable APP_ID=YOUR_APP_ID',
installVariables: ['APP_ID'],
platforms: ['Android', 'iOS']
})
@Injectable()

View File

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

View File

@@ -146,7 +146,8 @@ export interface ConfigurationData {
pluginName: 'MediaCapture',
plugin: 'cordova-plugin-media-capture',
pluginRef: 'navigator.device.capture',
repo: 'https://github.com/apache/cordova-plugin-media-capture'
repo: 'https://github.com/apache/cordova-plugin-media-capture',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class MediaCapture extends IonicNativePlugin {

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`
@@ -143,7 +145,7 @@ export type MediaErrorCallback = (error: MediaError) => void;
* });
* ```
*
* You can find the reasons here: https://github.com/driftyco/ionic-native/issues/1452#issuecomment-299605906
* You can find the reasons here: https://github.com/ionic-team/ionic-native/issues/1452#issuecomment-299605906
*
* @usage
* ```typescript
@@ -212,7 +214,8 @@ export type MediaErrorCallback = (error: MediaError) => void;
pluginName: 'MediaPlugin',
repo: 'https://github.com/apache/cordova-plugin-media',
plugin: 'cordova-plugin-media',
pluginRef: 'Media'
pluginRef: 'Media',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class MediaPlugin extends IonicNativePlugin {

View File

@@ -28,7 +28,8 @@ declare var mixpanel: any;
pluginName: 'Mixpanel',
plugin: 'cordova-plugin-mixpanel',
pluginRef: 'mixpanel',
repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin'
repo: 'https://github.com/samzilverberg/cordova-mixpanel-plugin',
platforms: ['Android', 'Browser', 'iOS']
})
@Injectable()
export class Mixpanel extends IonicNativePlugin {

View File

@@ -22,10 +22,10 @@ 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: ['Amazon Fire OS', 'Android', 'iOS']
platforms: ['Android Fire OS', 'Android', 'iOS', 'Windows']
})
@Injectable()
export class MobileAccessibility extends IonicNativePlugin {
@@ -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
*
@@ -104,7 +119,8 @@ export interface MusicControlsOptions {
pluginName: 'MusicControls',
plugin: 'cordova-plugin-music-controls',
pluginRef: 'MusicControls',
repo: 'https://github.com/homerours/cordova-music-controls-plugin'
repo: 'https://github.com/homerours/cordova-music-controls-plugin',
platforms: ['Android', 'iOS', 'Windows']
})
@Injectable()
export class MusicControls extends IonicNativePlugin {
@@ -146,6 +162,15 @@ export class MusicControls extends IonicNativePlugin {
@Cordova()
updateIsPlaying(isPlaying: boolean): void { }
/**
* Update elapsed time, optionally toggle play/pause:
* @param args {elapsed: string, isPlaying: boolean}
*/
@Cordova({
platforms: ['iOS']
})
updateElapsed(args: object): void { }
/**
* Toggle dismissable:
* @param dismissable {boolean}

View File

@@ -33,7 +33,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
pluginName: 'NativeAudio',
plugin: 'cordova-plugin-nativeaudio',
pluginRef: 'plugins.NativeAudio',
repo: 'https://github.com/floatinghotpot/cordova-plugin-nativeaudio'
repo: 'https://github.com/floatinghotpot/cordova-plugin-nativeaudio',
platforms: ['Android', 'Browser', 'iOS']
})
@Injectable()
export class NativeAudio extends IonicNativePlugin {

View File

@@ -2,7 +2,6 @@ import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @beta
* @name Native Geocoder
* @description
* Cordova plugin for native forward and reverse geocoding

View File

@@ -0,0 +1,244 @@
import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface NativeKeyboardOptions {
/**
* A function invoked when the user submits his input. Receives the text as a single property. Make sure your page is UTF-8 encoded so Chinese and Emoji are rendered OK.
*/
onSubmit: Function;
/**
* A function invoked when the keyboard is about to pop up. Receives the height as a single property. (iOS only)
*/
onKeyboardWillShow: Function;
/**
* A function invoked when the keyboard popped up. Receives the height as a single property.
*/
onKeyboardDidShow: Function;
/**
* A function invoked when the keyboard is about to close. (iOS only)
*/
onKeyboardWillHide: Function;
/**
* A function invoked when the keyboard closed.
*/
onKeyboardDidHide: Function;
/**
* A function invoked when any key is pressed, sends the entire text as response.
*/
onTextChanged: Function;
/**
* Highly recommended to pass in if you want to replicate the behavior of the video's above (scroll down when the keyboard opens). Pass in the scrollable DOM element containing the messages.
*/
autoscrollElement: HTMLElement;
/**
* If `autoscrollElement` was set you can also make the list scroll down initially, when the messenger bar (without the keyboard popping up) is shown.
*/
scrollToBottomAfterMessengerShows: boolean;
/**
* Setting this to `true` is like the video's above: the keyboard doesn't close upon submit. Defaults to `false`.
*/
keepOpenAfterSubmit: boolean;
/**
* Makes the messenger bar slide in from the bottom. Defaults to `false`.
*/
animated: boolean;
/**
* Open the keyboard when showing the messenger. Defaults to `false`.
*/
showKeyboard: boolean;
/**
* The default text set in the messenger input bar.
*/
text: string;
/**
* The color of the typed text. Defaults to `#444444`.
*/
textColor: string;
/**
* Like a regular HTML input placeholder.
*/
placeholder: string;
/**
* The color of the placeholder text. Defaults to `#CCCCCC`.
*/
placeholderColor: string;
/**
* The background color of the messenger bar. Defaults to `#F6F6F6`.
*/
backgroundColor: string;
/**
* The background color of the textview. Looks nicest on Android if it's the same color as the `backgroundColor` property. Defaults to `#F6F6F6`.
*/
textViewBackgroundColor: string;
/**
* The border color of the textview. Defaults to `#666666`. (iOS only)
*/
textViewBorderColor: string;
/**
* Setting this > 0 will make a counter show up on iOS (and ignore superfluous input on Android, for now)
*/
maxChars: number;
/**
* Options are: `"none"`, `"split"`, `"countdown"`, `"countdownreversed"`. Note that if `maxChars` is set, `"none"` will still show a counter. Defaults to `"none"`. (iOS only)
*/
counterStyle: string;
/**
* Options are: "default", "decimalpad", "phonepad", "numberpad", "namephonepad", "number", "email", "twitter", "url", "alphabet", "search", "ascii". (iOS only)
*/
type: string;
/**
* Options are: "light", "dark". (iOS only)
*/
appearance: string;
/**
* Disables things like the Emoji keyboard and the Predicive text entry bar (iOS only)
*/
secure: boolean;
/**
*
*/
leftButton: NativeKeyboardLeftButton;
/**
*
*/
rightButton: NativeKeyboardButton;
}
export interface NativeKeyboardButton {
/**
* Either "text" (Android only currently), "fontawesome" or "ionicon".
*/
type: string;
/**
* Depends on the type. Examples: for "text" use "Send", for "fontawesome" use "fa-battery-quarter", for "ionicon" use "\uf48a" (go to http://ionicons.com, right-click and inspect the icon and use the value you find in :before). Note that some fonticons are not supported as the embedded fonts in the plugin may lag behind a little. So try one of the older icons first.
*/
value: string;
/**
* If type is "text" you can set this to either "normal", "bold" or "italic".
*/
textStyle: string;
/**
* A function invoked when the button is pressed. Use this button to prompt the user what he wants to do next by for instance rendering an ActionSheet.
*/
onPress: Function;
}
export interface NativeKeyboardLeftButton extends NativeKeyboardButton {
/**
* Set to `true` to disable the button once text has been entered.
*/
disabledWhenTextEntered: boolean;
}
export interface NativeKeyboardUpdateMessengerOptions {
/**
* Replace the messenger's text by this. The current text remains if omitted.
*/
text: string;
/**
* Position the cursor anywhere in the text range. Defaults to the end of the text.
*/
caretIndex: number;
/**
* If `false` or omitted no changes to the keyboard state are made.
*/
showKeyboard: boolean;
}
/**
* @name Native Keyboard
* @description
* A cross platform WhatsApp / Messenger / Slack -style keyboard even. For your Cordova app.
*
*
* IMPORTANT NOTICE: this plugin is paid, please read more about this at the [plugin's repo](https://github.com/EddyVerbruggen/cordova-plugin-native-keyboard#i-like-it-hook-me-up).
*
*
* @usage
* ```
* import { NativeKeyboard } from '@ionic-native/native-keyboard';
*
*
* constructor(private nativeKeyboard: NativeKeyboard) { }
*
* ...
*
*
* ```
* @interfaces
* NativeKeyboardOptions
* NativeKeyboardButton
* NativeKeyboardLeftButton
* NativeKeyboardUpdateMessengerOptions
*/
@Plugin({
pluginName: 'NativeKeyboard',
plugin: 'cordova-plugin-native-keyboard',
pluginRef: 'NativeKeyboard',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-native-keyboard',
platforms: ['Android', 'iOS']
})
@Injectable()
export class NativeKeyboard extends IonicNativePlugin {
/**
* Show messenger
* @param options {NativeKeyboardOptions}
*/
@Cordova({ sync: true })
showMessenger(options: NativeKeyboardOptions): void {}
/**
* Hide messenger
* @param options {NativeKeyboardOptions}
*/
@Cordova({ sync: true })
hideMessenger(options: NativeKeyboardOptions): void {}
/**
* Programmatically pop up the keyboard again if the user dismissed it.
* @return {Promise<any>}
*/
@Cordova()
showMessengerKeyboard(): Promise<any> { return; }
/**
* Programmatically hide the keyboard (but not the messenger bar)
*/
@Cordova()
hideMessengerKeyboard(): Promise<any> { return; }
/**
* Manipulate the messenger while it's open. For instance if you want to update the text programmatically based on what the user typed.
* @param options
*/
@Cordova()
updateMessenger(options: NativeKeyboardUpdateMessengerOptions): Promise<any> { return; }
}

View File

@@ -66,7 +66,7 @@ export interface NativeTransitionOptions {
plugin: 'com.telerik.plugins.nativepagetransitions',
pluginRef: 'plugins.nativepagetransitions',
repo: 'https://github.com/Telerik-Verified-Plugins/NativePageTransitions',
platforms: ['iOS', 'Android', 'Windows Phone']
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
@Injectable()
export class NativePageTransitions extends IonicNativePlugin {

View File

@@ -32,7 +32,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-nativestorage',
pluginRef: 'NativeStorage',
repo: 'https://github.com/TheCocoaProject/cordova-plugin-nativestorage',
platforms: ['Android', 'iOS', 'Windows']
platforms: ['Android', 'Browser', 'iOS', 'macOS', 'Windows']
})
@Injectable()
export class NativeStorage extends IonicNativePlugin {

View File

@@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/merge';
declare var navigator: any;
declare const navigator: any;
/**
* @name Network
@@ -30,9 +30,9 @@ declare var navigator: any;
*
* // watch network for a connection
* let connectSubscription = this.network.onConnect().subscribe(() => {
* console.log('network connected!');
* console.log('network connected!');
* // We just got a connection but we need to wait briefly
* // before we determine the connection type. Might need to wait
* // before we determine the connection type. Might need to wait.
* // prior to doing any api requests as well.
* setTimeout(() => {
* if (this.network.type === 'wifi') {
@@ -51,9 +51,9 @@ declare var navigator: any;
@Plugin({
pluginName: 'Network',
plugin: 'cordova-plugin-network-information',
pluginRef: 'navigator.connection',
repo: 'https://github.com/apache/cordova-plugin-network-information',
platforms: ['Amazon Fire OS', 'iOS', 'Android', 'BlackBerry 10', 'Windows Phone 7', 'Windows Phone 8', 'Windows', 'Firefox OS', 'Browser'],
pluginRef: 'navigator.connection'
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class Network extends IonicNativePlugin {

View File

@@ -32,7 +32,8 @@ declare let window: any;
pluginName: 'NFC',
plugin: 'phonegap-nfc',
pluginRef: 'nfc',
repo: 'https://github.com/chariotsolutions/phonegap-nfc'
repo: 'https://github.com/chariotsolutions/phonegap-nfc',
platforms: ['Android', 'BlackBerry 10', 'Windows', 'Windows Phone 8']
})
/**
*@{ NFC } class methods

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';
@@ -305,7 +392,7 @@ export enum OSActionType {
plugin: 'onesignal-cordova-plugin',
pluginRef: 'plugins.OneSignal',
repo: 'https://github.com/OneSignal/OneSignal-Cordova-SDK',
platforms: ['Android', 'iOS', 'Windows', 'FireOS']
platforms: ['Amazon Fire OS', 'Android', 'iOS', 'Windows']
})
@Injectable()
export class OneSignal extends IonicNativePlugin {
@@ -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

@@ -1,14 +1,17 @@
import { Injectable } from '@angular/core';
import { Cordova, CordovaInstance, Plugin, IonicNativePlugin, checkAvailability } from '@ionic-native/core';
declare var Notification: any;
declare const Notification: any;
/**
* @hidden
*/
export class PLNObject {
private _objectInstance: any;
constructor(title: string, options: LocalNotificationOptions) {
if (checkAvailability(PhonegapLocalNotifications.pluginRef, null, PhonegapLocalNotifications.pluginName) === true) {
if (checkAvailability(PhonegapLocalNotification.pluginRef, null, PhonegapLocalNotification.pluginName) === true) {
this._objectInstance = new Notification(title, options);
}
}
@@ -55,7 +58,7 @@ export interface LocalNotificationOptions {
*
* @usage
* ```
* import { PhonegapLocalNotifications } from '@ionic-native/phonegap-local-notifications';
* import { PhonegapLocalNotification } from '@ionic-native/phonegap-local-notification';
*
*
* constructor(private localNotification: PhonegapLocalNotifications) { }
@@ -87,10 +90,10 @@ export interface LocalNotificationOptions {
plugin: 'phonegap-local-notifications',
pluginRef: 'Notification',
repo: 'https://github.com/phonegap/phonegap-plugin-local-notification',
platforms: ['Android', 'iOS', 'Browser']
platforms: ['Android', 'Browser', 'iOS', 'Windows']
})
@Injectable()
export class PhonegapLocalNotifications extends IonicNativePlugin {
export class PhonegapLocalNotification extends IonicNativePlugin {
/**
* A global object that lets you interact with the Notification API.

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'));
*
* ```
*/
@@ -44,7 +44,8 @@ import { Injectable } from '@angular/core';
plugin: 'cordova-plugin-photo-library',
pluginRef: 'cordova.plugins.photoLibrary',
repo: 'https://github.com/terikon/cordova-plugin-photo-library',
install: 'ionic plugin add cordova-plugin-photo-library --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="To choose photos"',
install: 'ionic cordova plugin add cordova-plugin-photo-library --variable PHOTO_LIBRARY_USAGE_DESCRIPTION="To choose photos"',
installVariables: ['PHOTO_LIBRARY_USAGE_DESCRIPTION'],
platforms: ['Android', 'Browser', 'iOS']
})
@Injectable()

View File

@@ -28,7 +28,8 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
pluginName: 'PinDialog',
plugin: 'cordova-plugin-pin-dialog',
pluginRef: 'plugins.pinDialog',
repo: 'https://github.com/Paldom/PinDialog'
repo: 'https://github.com/Paldom/PinDialog',
platforms: ['Android', 'iOS']
})
@Injectable()
export class PinDialog extends IonicNativePlugin {

Some files were not shown because too many files have changed in this diff Show More