Compare commits

..
655 Commits
Author SHA1 Message Date
Ibby d36a8c8257 3.1.0-rc.2 2017-03-10 10:39:55 -05:00
Ibby 3665781b40 chore(): update deps 2017-03-10 10:39:40 -05:00
Ibby 9108db7653 Merge branch 'v3-injectable' of github.com:driftyco/ionic-native into v3-injectable 2017-03-10 10:22:15 -05:00
Ibby 00d1ad7d3b set concurrency to number of cores 2017-03-10 10:22:03 -05:00
perry de51ef8a82 chore(CI): fixing npm install instructions in generated readmes 2017-03-08 13:08:10 -06:00
Ibby 9a68ea242c docs(health): fix return type 2017-03-08 05:44:56 -05:00
Ibby 10daa1f1dd docs(background-fetch): fix return type 2017-03-07 06:01:43 -05:00
Ibby 38bb8410e5 refactor(background-geolocation): update imports 2017-03-07 05:58:00 -05:00
Ibby d35d176a79 3.1.0-rc.1 2017-03-07 05:53:34 -05:00
Ibby fe8a380902 docs(): update docs 2017-03-07 05:52:20 -05:00
Ibby a8edd53d26 fix(background-geolocation): configure returns an observable 2017-03-07 05:30:58 -05:00
Ibby HadeedandGitHub 00a7fa547e chore(): merge master into v3-injectable (#1146)
* 2.5.0

* chore(): update changelog

* fix(pin-dialog): add missing errorIndex

* 2.5.1

* chore(): update changelog

* fix(zip): progress callback is optional (#1049)

* fix(apprate): add missing Windows Store option (#1072)

* Update file-chooser.ts (#1071)

Removed semicolon after .then() in usage instructions

* docs(device-motion): update interface names (#1076)

AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement.

* feat(inappbrowser): add interface for IAB options (#1065)

* Add InAppBrowserOptions Interface for better tooling.

* feat(inappbrowser): add  interface for IAB options

* Add more constructor tests.

* Add missing iOS options.

* docs(media): update method usage (#1089)

* fix(push): add the missing option clearBadge (#1087)

* docs(badge): fix example (#1096)

Error in code example (supplied parameters do not match call signature)

* fix(imagepicker): add outputType option (#1098)

* fix(facebook): fixes issue when not supplying default params (#1088)

* Fix default facebook logEvent parameters

* Implement correct parameters format in facebook logEvent method

* Update ibeacon.ts (#1099)

Return type of `getAuthorizationStatus()` made more explicit.

* fix(file): add missing exports (#1101)

Any declaration that is not being exported is missing from the resulting d.ts declaration files.

* Add InAppBrowserOptions interface to documentation. (#1103)

* Update sqlite.ts (#1106)

Added a bracket to remove the syntax error

* update device orientation docs to reflect renaming of CompassHeading interface (#1107)

* Move marker code inside MAP_READY (#1108)

The code to set the camera position and marker should be moved inside the function handling MAP_READY.  Otherwise they execute before the event is fired and it doesn't work.

* refactor(file): accept ArrayBuffer for data to write (#1109)

* docs(google-maps): fix param type

closes #1110

* fix(media): add missing pauseRecord and resumeRecord methods (#1122)

* docs(stripe): fix type and naming issues (#1129)

* refactor(paypal): fix type of items (#1125)

Type of items should be Array<PayPalItem> instead of string.

* fix(serial): Serial.requestPermission() options are optional (#1128)

* add success/error indices

* feat(browser-tab): add browser tab plugin (#1126)

* feature: added hasPermission function to Firebase fixes #1115

* feat: Implemented support for BrowserTab #1077

* docs(browser-tab): add proper docs

* fix(background-geolocation): configure returns a promise

closes #1118

* docs(background-geolocation): add return types and platforms

* fix(contacts): allow passing asterisk as contact field type

closes 1093

* fix(contacts): allow passing asterisk as contact field type

closes #1093

* fix(plugin): revert changes to support stable version (#1116)

 fix #1001

* feat(file): add system paths

* feat(app-update): add cordova-plugin-app-update support (#1105)

* add new app-update plugin

* update plugin info

* docs(app-update): add docs

* feat(alipay): add alipay support. (#1097)

* add cordova-alipay-base plugin. to support Alipay payment

* change ALI_PID to APP_ID, make it same with the latest SDK

* rewrite comments

* docs(google-maps): improve docs (#1095)

Move `map.moveCamera(position);` inside the MAP_READY event.
Allow to zoom the map on first launch (both iOS and Android).

* fix(file): remove FileError from return type (#1086)

Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`.

The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`.

* feat(google-maps): add constant for map type

* fix(file): platform Browser will raise a an DOMException (#1082)

fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage

* feat(local-notifications): support for icon background color (#1079)

The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon.  By not including it in your interface you force users to use the default color for their version of Android.  While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253:

```
/**
     * @return
     *      The notification background color for the small icon
     *      Returns null, if no color is given.
     */
    public int getColor() {
        String hex = options.optString("color", null);

        if (hex == null) {
            return NotificationCompat.COLOR_DEFAULT;
        }

        int aRGB = Integer.parseInt(hex, 16);

        return aRGB + 0xFF000000;
    }
```

I've simply added the option to the interface as well as a short description.

This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9
To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA
And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA

* feat(unique-device-add): add UniqueDeviceId plugin (#1064)

* fix plugin

* feat(text-to-speech): Add stop method (#1063)

https://github.com/vilic/cordova-plugin-tts/pull/32

* feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031)

* feat(Appodeal) bootrapping

* starting docs

* more docs

* feat(appodeal): add event Observables

* feat(appodeal): replace Cordova Observable events with #.fromEvent()

* feat(appodeal): update decorator metadata

* feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025)

* feat(CouchbaseLite): add CouchbaseLite cordova plugin

* add plugin url

* feat(background-fetch): Adding Background Fetch requested in #990 (#1013)

* Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990

* Adding BackgroundFetch to index

* feat(gyroscope): add Gyroscope plugin (#1004)

* add gyroscope.ts to plugins

* add gyroscope to index

* Update gyroscope.ts

* Update gyroscope.ts

* Revert "fix(File): typing where `FileError` can be thrown" (#1130)

* tslint and fix build issues

* 2.6.0

* chore(): update changelog

* fix(core): dont check if method exists when overriding

fixes #1043

* fix(file): fix writeExistingFile

closes #1044

* feat(diagnostic): add new methods

closes #1045

* feat(background-mode): replace event listeners with on method

The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method.

* feat(background-mode): add missing functions

 closes #1078

* tslint

* set GoogleMapsMapTypeId to private

* remove beta from stripe

* 2.7.0

* chore(): update changelog

* feat(app-preferences): added cordova-plugin-app-preferences support (#1084)

* (feat) added cordova-plugin-app-preferences support

* replaced callback functions with promises

* updated example

* (feat) added cordova-plugin-browsertab support

* Revert "(feat) added cordova-plugin-browsertab support"

This reverts commit 00eb5cf5d8.

* (update) synchronize fetch

* feat(photo-library): added cordova-plugin-photo-library (#1102)

* feat(photo-library): added cordova-plugin-photo-library

* CordovaFiniteObservable moved to photo-library.
Overloads are marked as private.

* refactor(photo-library): fixed circleci failing in 2.7.0 (#1132)

* feat(photo-library): added cordova-plugin-photo-library

* CordovaFiniteObservable moved to photo-library.
Overloads are marked as private.

* fixed typescript error in 2.7.0

* feat(health): add wrapper for cordova-plugin-health (#1039)

* feat(health): add wrapper for cordova-plugin-health

* fix(Health): add optional params to QueryOptions for .query()

* docs(health): fix javadoc of interfaces

* fix(health): remove unused Plugin option

* docs(health): add missing documentation

* doc(health): add promise to return

* doc(health): remove empty lines

* doc(health): Add description & reference to repo

* doc(health: add "return {Promise<any>}"

* refactor(safari-view-controller): hide returns promise

* fix typo in ibeacon plugin (#1138)

* fix(file): fix return types

fixes #1139

* docs(background-geolocation): fix param docs

* refactor(health): fix return types and prefix interfaces

* 2.8.0

* chore(): update changelog

* docs(sqlite): syntax error resolved (#1142)

* Syntax error resolved

The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect.

* Fixed a syntax error
2017-03-07 05:06:38 -05:00
Ibby b393c7448b remove console logs
closes #1145
2017-03-06 04:31:31 -05:00
Ibby 46f80555f7 refactor(): remove some prefixes 2017-03-01 19:35:35 -05:00
Ibby 0aee729e8e remove utils from publish command 2017-02-22 19:16:00 -05:00
Ibby 06c8c44efc 3.1.0-alpha.3 2017-02-22 19:10:23 -05:00
Ibby 6df3383585 remove auto-install and cleanup 2017-02-22 19:08:34 -05:00
Ibby f912a452dc remove alpha tag 2017-02-16 22:05:36 -05:00
Ibby ea697bd884 edit publish command 2017-02-16 22:05:23 -05:00
Ibby 6e7b087cff 3.1.0-alpha.2 2017-02-16 22:00:12 -05:00
Ibby 87b5327a42 fix AoT support and add publish script 2017-02-16 22:00:06 -05:00
Ibby 1b1a0e99e8 3.1.0-alpha.1 2017-02-16 20:53:30 -05:00
Ibby 2828319d0a 3.0.1-0 2017-02-16 20:51:44 -05:00
Ibby d3c87fd95a fix build 2017-02-16 20:38:13 -05:00
Ibby 964cc91548 Merge branch 'v3-injectable' into v3-injectable-ngc 2017-02-16 19:49:56 -05:00
Ibby a2e410c4cb resolve merge conflict 2017-02-16 19:49:25 -05:00
Ibby 9055154781 chore(): ngc build 2017-02-16 19:47:50 -05:00
perry 822a4120c7 updating package name in usage instructions 2017-02-15 14:17:53 -06:00
perry bc60d0678b outputting readmes to dist dir instead of src 2017-02-15 10:29:47 -06:00
perry 9aa7ad0221 automating readme file generation and adding it to CI
# Conflicts:
#	src/@ionic-native/plugins/googlemap/index.ts
#	src/@ionic-native/plugins/inappbrowser/index.ts
#	src/@ionic-native/plugins/media/index.ts
#	src/@ionic-native/plugins/sqlite/index.ts
2017-02-15 10:19:26 -06:00
perry e965d654c5 readme templates 2017-02-15 09:48:46 -06:00
perry 82d6efac76 gulp task to generate readme files 2017-02-15 09:48:32 -06:00
Ibby de51746bfc rename google maps 2017-02-13 15:06:09 -05:00
Ibby 157367ddb6 fix(plugins): rename packages/classes 2017-02-13 15:02:36 -05:00
Ibby HadeedandGitHub 6de9697aa9 chore(build): add auto install scripts (#1059)
* feat(core): auto install scripts

* minor fixes

* minor fixes

* remove prompt message
2017-02-13 14:51:10 -05:00
Ibby 1dfdbaf1f0 chore(build): convert dependencies to peer dependencies 2017-02-13 14:31:41 -05:00
Max Lynch 1fe1cd6f75 Cleanup 2017-02-13 12:21:47 -06:00
Max Lynch dcd5e3ac9f Merge branch 'v3-injectable-instance-plugins' into v3-injectable 2017-02-13 12:14:11 -06:00
Max Lynch aa44c09ec4 Merge branch 'v3-injectable' into v3-injectable-instance-plugins 2017-02-13 12:13:50 -06:00
Max Lynch 281e8b737e Merge remote-tracking branch 'origin/v3-node-build' into v3-injectable 2017-02-09 08:29:19 -06:00
Ibby b5ce8e9fbb feat(): make instance based plugins injectable 2017-02-09 09:28:52 -05:00
Ibby 0b17b253d9 chore(): move fs-extra-promise to devDeps 2017-02-09 08:49:30 -05:00
Ibby faffc76a76 chore(): nodejs build script 2017-02-09 08:48:29 -05:00
Max Lynch 20fbfb91ca Fix build errors 2017-02-08 22:25:16 -06:00
Max Lynch 4acdd41837 Remove lots of static stuff with a fancy regex 2017-02-08 22:14:53 -06:00
Max Lynch 1f2dba0a3f Remove duplicate injectables 2017-02-08 17:30:16 -06:00
Max Lynch 76f07092df More stuff 2017-02-08 17:25:48 -06:00
Max Lynch 91a5b5bbfc Checkpoint 2017-02-08 17:14:25 -06:00
Max Lynch e3164c95df Updates 2017-02-08 17:06:03 -06:00
Max Lynch 1933ec66d9 Working on injectable 2017-02-08 16:21:57 -06:00
Max Lynch 742df16837 3.0.0 2017-02-08 12:32:56 -06:00
Max LynchandGitHub c742bdab85 Merge pull request #1048 from driftyco/fix-alpha-package
chore(): change rxjs version to match ionic framework
2017-02-08 10:56:46 -06:00
Ibby HadeedandGitHub cd6d166e76 Update plugin-package.json.template 2017-02-08 08:40:44 -05:00
Ibby HadeedandGitHub e061219aff Update core-package.json.template 2017-02-08 08:40:19 -05:00
Max Lynch 9f1ce45f06 Bump 2017-02-07 15:09:48 -06:00
Max Lynch dd04564335 Some stuff 2017-02-07 15:09:01 -06:00
Max Lynch 03254ad4b7 Build and push 2017-02-07 14:51:40 -06:00
Max Lynch f13a007a1c Individual packages 2017-02-07 13:29:09 -06:00
Max Lynch 9802b7f2e4 Build 2017-02-07 12:50:35 -06:00
Max Lynch a2dcca3815 Remove core 2017-02-07 12:43:13 -06:00
Max Lynch 7226bcad50 Test 2017-02-07 12:40:50 -06:00
Max Lynch 63ab1a205e Plugin tsconfig 2017-02-06 17:22:24 -06:00
Max Lynch b6ab01d100 Core 2017-02-06 17:17:58 -06:00
Max Lynch ecb98e2e82 Core kind of buidls 2017-02-06 17:15:46 -06:00
Max Lynch c733127134 Plugin tsconfigs 2017-02-06 17:06:59 -06:00
Max Lynch 0cce8e9ce7 tsconfig for plugins 2017-02-06 17:05:50 -06:00
Max Lynch b773c0709f Moving things aroudn 2017-02-06 17:00:10 -06:00
Max Lynch d426b15c1c Removed 2017-02-06 16:38:43 -06:00
Max Lynch b05627d2d6 Moving to modules 2017-02-06 16:37:59 -06:00
Max Lynch dbd9df41f0 First try 2017-02-06 15:43:45 -06:00
Ibby HadeedandGitHub 434a6c8ad3 Update stepcounter.ts 2017-02-06 08:33:10 -05:00
Tom SundstromandIbby Hadeed 97489ba573 feat(barcodescanner): add option disableSuccessBeep (#1035)
https://github.com/phonegap/phonegap-plugin-barcodescanner/pull/408
2017-02-05 05:41:49 -05:00
Ibby HadeedandGitHub f525a25b49 refractor(google-maps): use Observable.fromEvent instead of addEventListener (#1032) 2017-02-04 04:32:41 -05:00
Ibby add49e8b4d refractor(): use Observable.fromEvent in wrapEventObservable 2017-02-04 04:16:57 -05:00
EdsandIbby Hadeed 4ab87d8abb feat(inappbrowser): add hide function (#1018) 2017-02-01 01:42:07 -05:00
Prateek KathalandIbby Hadeed 69ff7afb48 docs(file): add link to additional information (#1022)
Adding a link to **cordova plugin file** for ease of understanding file management using cordova.

It took me almost a day to figure out how to properly save things like a pdf/image in a publicly accessible directory. Having a link to the main **cordova file** documentation will save a lot of time.
2017-02-01 01:40:55 -05:00
Ibby 62a30c7d8f Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-31 04:14:40 -05:00
Ibby dc37d8f71c fix(safari-view-controller): fix issue caused by calling show without options 2017-01-31 04:14:28 -05:00
Huan LIandIbby Hadeed 8864d1360a docs(streaming-media): add missing method name (#1016) 2017-01-31 01:39:21 -05:00
Ibby 613141998a docs(header-color): fix doc name 2017-01-30 11:45:36 -05:00
Ibby c2fbb4fb64 docs(geolocation): update watchPosition example 2017-01-30 11:43:58 -05:00
Josh StrangeandIbby Hadeed f0cf86076c feat(background-geolocation): add missing properties for Android 2017-01-30 05:45:42 -05:00
Ibby a03afcf0fa fix(pinterest): fix PinterestPin interface 2017-01-29 06:49:28 -05:00
Ibby 3abe0bb97d Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-26 20:30:51 -05:00
Ibby a5b4632ceb fix(file-transfer): fix return type of upload method
fixes #1002
2017-01-26 20:30:44 -05:00
Ibby HadeedandGitHub 1c78f77c0f docs(stepcounter): update repo and plugin
closes #1003
2017-01-25 22:22:05 -05:00
Ibby cb7d3ef3e0 chore(): update changelog 2017-01-24 15:14:36 -05:00
Ibby 5e83a09056 2.4.1 2017-01-24 15:14:07 -05:00
Ibby b85393de89 chore(): add CordovaOptions interface 2017-01-24 15:12:35 -05:00
Ibby 68c535fd79 style(): missing semicolon 2017-01-24 15:00:43 -05:00
Ibby 1c09ee1fbc fix(screen-orientation): lockOrientation returns a promise
closes #939
2017-01-24 15:00:20 -05:00
Ibby 8b921165bb fix merge conflict 2017-01-24 00:49:14 -05:00
Ibby 0c837de499 chore(): update changelog 2017-01-24 00:48:42 -05:00
Ibby a44500d206 2.4.0 2017-01-24 00:48:07 -05:00
Ibby e063613c8c 2.3.3 2017-01-24 00:46:51 -05:00
Ibby 416071a5a1 fix(google-maps): fix event listeners
fixes #999
2017-01-24 00:46:37 -05:00
Ibby 93fdb7eabb fix typo 2017-01-23 23:00:56 -05:00
Ibby 466437a683 feat(pinterest): add pinterest plugin 2017-01-23 22:59:37 -05:00
Ibby a34723b53c legal name change 2017-01-23 22:22:19 -05:00
Ibby b9bd5100a2 chore(): update changelog 2017-01-23 22:20:09 -05:00
Ibby 51bafccf38 2.3.2 2017-01-23 22:19:48 -05:00
Ibby c3127d35bb fix(googlemaps): fix GoogleMapsLaLngBounds
closes #972
2017-01-23 22:02:31 -05:00
Ibby 1322c1b089 test(): fix test plugin meta 2017-01-22 17:37:04 -05:00
Ibby 9bf7895386 chore(): update changelog 2017-01-22 17:34:13 -05:00
Ibby 538dcb98eb 2.3.1 2017-01-22 17:33:59 -05:00
Ibby 3da0efe38e fix(battery-status): add missing pluginRef 2017-01-22 17:27:52 -05:00
Ibby b983de2145 feat(core): add PluginConfig interface
closes #996
2017-01-22 17:24:43 -05:00
GuilleandIbby Hadeed 9f98f8ef46 feat(google-maps): add base class functions (#993) 2017-01-22 17:17:13 -05:00
Ibby 3e2964b385 Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-22 17:13:59 -05:00
GuilleandIbby Hadeed 77ab2c21da refractor(): name to pluginName (#994) 2017-01-22 17:13:42 -05:00
guilleandIbby Hadeed 94025a7fd2 fix(plugin): adds subscribe() and unsubscribe() 2017-01-22 17:13:13 -05:00
guilleandIbby Hadeed 8c021bcaa0 fix(): add clearAllNotifications() 2017-01-22 17:13:13 -05:00
Ibby da7a3707fa fix(core): fix plugin check 2017-01-22 17:12:24 -05:00
Peter KellyandIbby Hadeed cb293639bc fix(core): fix exception in CordovaProperty (#998)
This reverts part of commit 67adb23, which moved the call to getPlugin()
from within CordovaProperty() to a point where it was called too early.

When the CordovaProperty decorator is called on a property, the class
containing that call has not yet had its Plugin decorator called. Only
when the latter happens does pluginRef get set. Thus, attempting to
access pluginRef within CordovaProperty at the time of the call will
give undefined, and attemping to call getPlugin with an undefined value
will throw an exception:

    Runtime Error
    Cannot read property 'split' of undefined

    TypeError: Cannot read property 'split' of undefined
        at get
        at getPlugin
        at CordovaProperty
        at __decorate
        ...

The above message can be seen in the browser after running the 'ionic
serve' command.

This commit moves the getPlugin call back to the getters and setters
established by CordovaProperty, which are only called *after* the Plugin
decorator has finished executing.

closes #992
2017-01-22 17:11:52 -05:00
Ibby 16f0712462 chore(): update changelog 2017-01-20 16:34:25 -05:00
Ibby e9b2b93486 2.3.0 2017-01-20 16:33:57 -05:00
Ibby a8258ec998 docs(): add beta tags 2017-01-20 16:33:43 -05:00
Ibby 09747cd746 docs(firebase): improve docs 2017-01-20 16:29:15 -05:00
Ibby 2f89ae0e84 Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-20 16:24:22 -05:00
Megan KearlandIbby Hadeed ac748abf78 feat(serial): add Serial plugin (#952)
* style: fix whitespace lint issue

* feat(serial): add serial plugin

* docs(serial): remove unnecessary comments
2017-01-20 16:16:12 -05:00
GuillaumeandIbby Hadeed 1279114b73 feat(backlight): add Backlight plugin (#973)
* feat(backlight): add Backlight plugin

* fix(backlight): set as beta
2017-01-20 16:14:29 -05:00
Peter BakondyandIbby Hadeed 7c30718369 feat(speech-recognition): add SpeechRecognition plugin (#897) 2017-01-20 16:13:58 -05:00
Kim BiesbjergandIbby Hadeed 9c75a06131 feat(launch-review): add LaunchReview plugin (#949)
* Add LaunchReview

* Fix pluginRef
2017-01-20 16:11:57 -05:00
GuillaumeandIbby Hadeed 1e38a6c005 feat(broadcaster): add Broadcaster plugin (#877)
* feat(broadcaster): add Broadcaster plugin

* fix(broadcaster): return Obserable for addEventListener

- also remove the listener when clearing observable
2017-01-20 16:11:19 -05:00
Ibby 23639ee859 docs(): add beta tag 2017-01-20 16:10:39 -05:00
Ibby be20c51996 Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-20 16:09:27 -05:00
Niklas MerzandIbby Hadeed 1615b74065 feat(fingerprint-aio): add cordova-plugin-fingerprint-aio (#845) 2017-01-20 16:09:21 -05:00
Ibby 5638f90783 refractor(): remove default value from optional param 2017-01-20 16:07:28 -05:00
Ibby 47b6164e99 docs(): add beta tags 2017-01-20 16:07:05 -05:00
Lucas A. MoulinandIbby Hadeed 229f5509e9 feat(rollbar): add Rollbar plugin (#832)
* Add Rollbar plugin

* Add documentation

* Add return type to init function

* Remove init params
2017-01-20 16:05:06 -05:00
John-LukeandIbby Hadeed 70c15c31ca feat(navigationbar): add NavigationBar plugin (#826)
* feat(navigationbar): add NavigationBar plugin

* fix(navigationbar) typo in chore

* Implement changes requested

* fix(): add return

* fix(docs): remove callback parameter

* Update navigationbar.ts
2017-01-20 16:04:31 -05:00
Ibby a98ccc726f Merge branch 'John-Luke-master' 2017-01-20 16:04:09 -05:00
Ibby 538ebfe9fe fix merge conflict 2017-01-20 16:03:58 -05:00
Ibby HadeedandGitHub 8e98481609 feat(firebase): add firebase plugin (#914)
closes #608
2017-01-20 16:02:33 -05:00
Ibby HadeedandGitHub 0ec46b03b5 feat(stripe): add stripe plugin (#913)
* feat(stripe): add stripe plugin

* add stripe to index

* add param doc
2017-01-20 16:02:17 -05:00
Ibby f10f152d2c docs(native-geocoder): add interfaces 2017-01-20 16:01:54 -05:00
Ibby d746a98ef4 refractor(native-geocoder): refractor interface names 2017-01-20 16:01:29 -05:00
Ibby dbf95ea4bd fix(native-geocoder): fix callback order 2017-01-20 16:00:05 -05:00
Sebastian BaarandIbby Hadeed 911537b61b feat(nativegeocoder): add NativeGeocoder plugin (#800) 2017-01-20 15:56:16 -05:00
Ibby db55342329 chore(): update changelog 2017-01-20 15:53:35 -05:00
Ibby d54ce83c8f 2.2.17 2017-01-20 15:52:47 -05:00
John-LukeandGitHub 2e926f4a94 Update headercolor.ts 2017-01-19 09:06:58 -03:00
John-LukeandGitHub 292a9f08e9 solve conflict 2017-01-18 19:06:27 -02:00
John-LukeandGitHub b2cd106aae Update headercolor.ts 2017-01-18 18:58:27 -02:00
ellessandIbby Hadeed ab681cccbe fix(app-rate): onRateDialogShow callback (#985) 2017-01-18 12:52:36 -05:00
Dennis BruijnandIbby Hadeed 9008aa264b docs(google-maps): make it clear that the map element needs a height (#984)
I added a change that makes it clear that the map element needs a height to be visible.

I tried to follow the docs but It didn't work, after that I thought my API keys were invalid, at the end it turned out the map wasn't visible at all.
2017-01-18 10:37:02 -05:00
Ibby HadeedandGitHub 33ca56a151 remove static method open 2017-01-18 10:34:52 -05:00
Attila OláhandIbby Hadeed d8892e195b docs(file): clarify what unit getFreeDiskSpace returns with (#981) 2017-01-18 10:30:38 -05:00
Max Lynch 0ab14a085e fix(core): increase deviceready timeout for sanity 2017-01-16 15:33:59 -06:00
Vlado VelichkovskiandIbby Hadeed a88cf7034b docs(nfc): fix return type (#961)
Doc fix for stringToBytes function
2017-01-15 22:48:23 -05:00
DiegoandIbby Hadeed c44071d117 docs(file-chooser): added missing ")" (#971) 2017-01-13 14:02:19 -05:00
perry fb275e0d9f amend(docs): typo in the last commit 2017-01-11 13:02:00 -06:00
perry 5c7d7ac527 chore(docs): add beta warning to docs pages 2017-01-11 13:00:52 -06:00
perry 1134ac96b6 chore(docs): mark static properties as properties Closes #962 2017-01-11 11:28:59 -06:00
Abdelaziz BennounaandIbby Hadeed e902856089 feat(barcodescanner): add missing options (#966)
Fixes #965
2017-01-11 11:31:29 -05:00
Ibby 67adb23a14 chore(): optimize CordovaProperty
closes #954
2017-01-10 20:45:11 -05:00
Ibby 028a568515 chore(): update changelog 2017-01-10 20:39:12 -05:00
Ibby 7a8d30f4e1 2.2.16 2017-01-10 20:38:53 -05:00
Ibby 9541009742 chore(): fix the callCordovaPlugin check
the previous approach doesn't handle __proto__ methods
2017-01-10 20:38:48 -05:00
Ibby 9dee2fbc0c chore(): update changelog 2017-01-10 19:17:27 -05:00
Ibby 60b9c69763 2.2.15 2017-01-10 19:17:16 -05:00
Ibby b98fa28b4b fix(apprate): captialize URL in storeAppURL property 2017-01-10 18:49:53 -05:00
Ibby 603aa9f6d2 chore(): ignore errors when deleting old docs 2017-01-10 16:46:35 -05:00
Ibby f4fa8c31f0 chore(): ignore errors when deleting old docs 2017-01-10 16:42:40 -05:00
Ibby 8e787fdd5f docs(video-player): update install source
closes #959
2017-01-10 16:39:36 -05:00
Ibby c5ec7c33b5 refractor(): lodash contains to includes 2017-01-10 16:34:56 -05:00
Ibby c6dbf343fb chore(): add beta tags 2017-01-10 07:41:44 -05:00
Ibby fa311e6a7c chore(): update packages 2017-01-10 07:40:21 -05:00
Ibby 04347c3df8 chore(): bump tslint ionic rules to 0.0.7 2017-01-10 07:15:57 -05:00
Ibby 8adb36e2a0 chore(): remove old tsconfig 2017-01-10 07:15:00 -05:00
Ibby c700c31127 chore(): bump rxjs to 5.0.0-beta.12 2017-01-10 07:13:08 -05:00
Ibby HadeedandGitHub 5981622f3a chore(): replace try/catch with better approach (#956)
* chore(): replace try/catch with better approach

* optimize last commit
2017-01-10 07:06:44 -05:00
perry 77d6308bca chore(dgeni): add beta tag support 2017-01-09 13:59:03 -06:00
Ibby 92e0bb55c3 Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-09 07:13:04 -05:00
Ibby 452aa5d8c9 chore(): lock typescript to 2.0.x 2017-01-09 07:12:58 -05:00
MSadiqRandIbby Hadeed 2ddb8be775 Typescript error solved (#947)
Added a placeholder parameter to resolve typescript error
2017-01-09 06:10:08 -05:00
Josh GibbsandIbby Hadeed ebf07161b6 fix(onesignal): OSNotification.app_id is optional (#946)
OSNotification::app_id is not required when sending a selfNotification.
2017-01-09 05:07:57 -05:00
Thomas KemmerandIbby Hadeed 6ddd2aa184 fix(ble): stopScan takes no args when used as clear function (#944) 2017-01-09 05:06:33 -05:00
Ibby 9974a1fbd8 chore(): update changelog 2017-01-07 08:04:21 -05:00
Ibby 67edb835f2 2.2.14 2017-01-07 08:03:34 -05:00
Jonathan SaminesandIbby Hadeed 5b6cb6e19f docs(device): fix reference (#930) 2017-01-07 08:00:56 -05:00
Ibby 9a5a62bc3a chore(): tslint 2017-01-07 07:59:06 -05:00
Ibby d192dee1ee docs(google-plus): add basic docs 2017-01-07 07:43:27 -05:00
Ibby 0d6997cbdd fix(push): fix typing for additionalData
closes #868
2017-01-07 06:42:38 -05:00
Ibby 49325e8b93 Merge branch 'master' of github.com:driftyco/ionic-native 2017-01-07 05:44:45 -05:00
Ibby de07df6f20 fix(inappbrowser): fix insertCSS method name
closes #921
2017-01-07 05:44:38 -05:00
Vlado VelichkovskiandIbby Hadeed ca60c5b912 fix(nfc): add missing param for addMimeTypeListener (#937)
Add missing  `mimeType` parameter in `addMimeTypeListener` function
2017-01-07 05:29:08 -05:00
Ibby 54d1a9891b chore(): add try/catch for callCordovaPlugin method
closes #882
2017-01-07 05:26:38 -05:00
Ibby 2c57bc965c docs(globalization): add platforms information
closes #935
2017-01-07 04:47:15 -05:00
Ibby d62779a2a6 feat(market): add search method, return promises 2017-01-07 04:38:37 -05:00
Ibby 009a20608e docs(ibeacon): fix method reference
closes #933
2017-01-07 04:32:18 -05:00
Ibby ca14bf6a75 fix(google-plus): fixes login without options
closes #932
2017-01-07 04:27:58 -05:00
Ibby 49fe24dee2 fix(google-analytics): fix startTrackerWithId when interval is not provided 2017-01-01 06:30:33 -05:00
Ibby d9d89341d2 docs(onesignal): fix docs 2017-01-01 04:11:51 -05:00
GuilleandIbby Hadeed bbf75bcbd7 fix(mixpanel): fix issue when not passing eventProperties (#927) 2016-12-30 06:32:53 -05:00
Megan KearlandIbby Hadeed 9441928884 style(): fix whitespace lint issue (#923) 2016-12-30 00:47:51 -05:00
Watchara SandIbby Hadeed 8eb656cce8 feat(background-geolocation): add altitudeAccuracy into response typings (#922) 2016-12-29 04:39:16 -05:00
Alexey VasilievandIbrahim Hadeed bf0486cb8b Fix doc about changed property (#919) 2016-12-27 16:44:03 -05:00
Ibby e681761f56 chore(): update changelog 2016-12-27 08:43:56 -05:00
Ibby 84ec3fa8d2 2.2.13 2016-12-27 08:43:12 -05:00
Ibby c618ceb693 chore(): tslint 2016-12-27 08:43:06 -05:00
Ibby 46a9b6d50d docs(google-analytics): add usage
closes #883
2016-12-27 08:07:45 -05:00
Ibby 44fe04bbbd docs(): add interfaces 2016-12-27 08:03:21 -05:00
JobandIbrahim Hadeed 3385c1b6dc fix(diagnostic): add permissionStatus types (#890) 2016-12-27 07:58:28 -05:00
Matthew WheatleyandIbrahim Hadeed a1b0f885a7 feat(android-fingerprint-auth): update to v1.2.1 (#910)
* update to use plugin v1.1.0

Updated example
Added new configuration options.
Added new show() result fields
Added new delete method

* Update to plugin v1.2.0

Removed show()
Added encrypt()
Added decrypt()
Removed requirement of username

* edit comments

* edited comments
2016-12-27 07:57:54 -05:00
Louis OrleansandIbrahim Hadeed 56e8eaeb5d feat(onesignal): improve typings (#888)
* Adding platforms list to decorator

* feat(onesignal): Adding more complete type defs

* refactor(onesignal): Prefixing interfaces / enums with `OS`
2016-12-27 07:55:29 -05:00
Ibby ba77fd70c3 fix(background-mode): isEnabled and isActive return booleans
fixes #908
2016-12-27 07:37:03 -05:00
Ibby 1841220359 fix(diagnostic): add missing types
closes #905
2016-12-27 07:28:34 -05:00
Vlado VelichkovskiandIbrahim Hadeed c44fb75adc feat(nfc): add new functions (#853)
Added:
- bytesToHexString
- stringToBytes
- bytesToString

Fixed:
- addTagDiscoveredListener
2016-12-27 07:23:05 -05:00
Ibby ad6badef1f docs(): add platform info 2016-12-27 07:17:27 -05:00
Ibby 7bcf1bfc74 Merge branch 'master' of github.com:driftyco/ionic-native 2016-12-27 07:17:01 -05:00
Peter BakondyandIbrahim Hadeed 0c36988544 feat(sim): add new methods (#894) 2016-12-27 07:16:48 -05:00
Ibby 71e49da8ad docs(media): add instructions to listen to status change 2016-12-27 07:06:41 -05:00
Alex MuramotoandGitHub c28df732d5 Merge pull request #907 from amuramoto/admob-patch
fix(admob): add adId prop to AdMobOptions
2016-12-22 10:16:40 -08:00
Alex Muramoto d5dfdf83f3 fix(admob): add adId prop to AdMobOptions 2016-12-22 10:15:49 -08:00
Ibrahim HadeedandGitHub e42f4d0079 Update network.ts 2016-12-17 20:52:19 -05:00
Matt HillandIbrahim Hadeed cabe327e9b Update contacts.ts (#885) 2016-12-17 20:48:22 -05:00
Ionitron 98d22a3079 chore(ci): updating CI scripts 2016-12-16 14:59:11 -06:00
Ibby 3fffab6d6c chore(): update changelog 2016-12-16 14:15:09 -05:00
Ibby 60defd3e50 2.2.12 2016-12-16 14:14:53 -05:00
Ibby c79ffc4434 Merge branch 'master' of github.com:driftyco/ionic-native 2016-12-16 14:13:11 -05:00
Ibby ec5e27be4b fix(network): update API 2016-12-16 14:12:58 -05:00
perry cf347cd369 chore(ci): test 2016-12-16 12:28:27 -06:00
Ibby 28f316e408 docs(contacts): remove old docs
closes #865
2016-12-15 08:07:26 -05:00
Ibby 9986e0d0b3 fix(diagnostic): permissionStatus gets values from plugin in runtime
fixes #872
2016-12-15 07:56:23 -05:00
Ibby 8b809de568 docs(contacts): improve docs
closes #873
2016-12-15 07:49:28 -05:00
Ibby fa1f718412 chore(): fix clearWithArgs 2016-12-15 07:47:34 -05:00
Ibrahim HadeedandGitHub 3fabc4d72c chore(): clearWithArgs adds callbacks now 2016-12-15 07:42:15 -05:00
Juan G. JordánandIbrahim Hadeed 3a11d290e5 docs(deeplinks): improve docs (#880)
The routeWithNavController method returns an observable, thus it has to be subscribed to, to get it working.

Change the documentation of the method to show that we need to subscribe to the observable, just like when using the route method.
2016-12-15 02:07:26 -05:00
yuhj86andIbrahim Hadeed 700fb47b73 docs(media-capture): improve docs (#878)
import types
2016-12-15 02:01:38 -05:00
HartHerbertandIbrahim Hadeed 61dc8aa18e fix(camera-preview): parameter size is optional (#871)
Just added the '?' to the parameter (size) in the static takePicture(size?: CameraPreviewSize): void { } because the size is a optional parameter
2016-12-13 20:49:46 -05:00
Musa HaidariandIbrahim Hadeed c3f92e92c2 Update sqlite.ts (#862)
`db.executeSql()` was documented as `db.executeSQL()` that caused error:

    main.js:13 Error openening database TypeError: t.executeSQL is not a function
        at file:///android_asset/www/build/main.js:13:11718
        at t.invoke (file:///android_asset/www/build/polyfills.js:3:13422)
        at Object.onInvoke (file:///android_asset/www/build/main.js:3:3341)
        at t.invoke (file:///android_asset/www/build/polyfills.js:3:13373)
        at e.run (file:///android_asset/www/build/polyfills.js:3:10809)
        at file:///android_asset/www/build/polyfills.js:3:8911
        at t.invokeTask (file:///android_asset/www/build/polyfills.js:3:14051)
        at Object.onInvokeTask (file:///android_asset/www/build/main.js:3:3241)
        at t.invokeTask (file:///android_asset/www/build/polyfills.js:3:13987)
        at e.runTask (file:///android_asset/www/build/polyfills.js:3:11411)

The issue is fixed in this commit
2016-12-12 16:43:51 -05:00
Musa HaidariandIbrahim Hadeed 54d2c46742 Update sqlite.ts (#863)
Fixed a typo
2016-12-12 16:42:29 -05:00
Ibrahim HadeedandGitHub 114a74d3ba fix(sms): fix callback index when omitting options param
closes #858
2016-12-10 20:05:24 -05:00
perry b2d29dbde5 chore(CI): updating CI scripts for new ionic-site structure 2016-12-08 15:15:46 -06:00
perry 36bfe38a4c chore(CI): updating CI scripts for new ionic-site structure 2016-12-08 15:12:33 -06:00
Ibby d4e2c10006 chore(): tslint 2016-12-06 09:53:46 -05:00
Ibby ae6a3cda7a docs(): update docs 2016-12-06 09:52:39 -05:00
Ibby d5ac89996f docs(): update docs 2016-12-06 09:20:49 -05:00
Ibby a4216fd8ca docs(): update docs 2016-12-06 09:18:37 -05:00
Ibby a38adf53c3 docs(): update docs 2016-12-06 09:18:03 -05:00
Ibby bd7ebaee3b docs(): update docs 2016-12-06 09:17:35 -05:00
Ibby d92fb1da8b docs(): update docs 2016-12-06 09:15:03 -05:00
Ibby acb7cd862d docs(): update docs 2016-12-06 09:14:28 -05:00
Ibby 1976c38dc7 docs(): display interfaces 2016-12-06 09:11:09 -05:00
Ibby e522a25968 docs(estimote-beacons): display interfaces 2016-12-06 09:09:31 -05:00
Ibby ad84e758be refractor(email-composer): refractor interfaces to avoid duplicates 2016-12-06 09:09:00 -05:00
Ibby 427527a129 refractor(dialogs): refractor interfaces to avoid duplicates 2016-12-06 09:08:02 -05:00
Ibby 3ba72e9f15 refractor(device-orientation): refractor interfaces to avoid duplicates 2016-12-06 09:06:58 -05:00
Ibby a693740f1a refractor(device-motion): refractor interfaces to avoid duplicates 2016-12-06 09:06:13 -05:00
Ibby 2a98be594a docs(deeplinks): display interfaces 2016-12-06 09:04:57 -05:00
Ibby 0787f69884 docs(card-io): document interfaces 2016-12-06 09:03:39 -05:00
Ibby dadaf5831e docs(camera-preview): display interfaces in docs 2016-12-06 08:58:38 -05:00
Ibby 2f9c5e6674 docs(calendar): enhance docs and display interface 2016-12-06 08:57:53 -05:00
Ibby d02688971d refractor(): refractor interface(s) name(s) 2016-12-06 08:51:38 -05:00
Ibby 95ca373e10 refractor(barcode-scanner): add BarcodeScannerOptions interface 2016-12-06 08:50:02 -05:00
Ibby 4abb6ec78e refractor(background-mode): refractor interfaces names to avoid duplicates 2016-12-06 08:45:44 -05:00
Ibby 59a382d6df refractor(background-geolocation): refractor interfaces names to avoid duplicates 2016-12-06 08:44:42 -05:00
Ibby 80d9fe2211 refractor(apprate): export interfaces and improve docs 2016-12-06 08:41:36 -05:00
Ibby 8b48d6c275 docs(): minor update 2016-12-06 08:33:40 -05:00
Ibby 585d4ff37b refractor(android-fingerprint-auth): export options to interface 2016-12-06 08:33:03 -05:00
Ibby 6ba1d4908b feat(admob): update api and docs 2016-12-06 08:29:39 -05:00
Ibby 3a8e958684 style(): move interface to top 2016-12-06 08:06:47 -05:00
Ibby 1358411b80 docs(3dtouch): complete interfaces docs 2016-12-06 08:06:25 -05:00
Ibby e26783b8c6 style(): spacing and cleanup 2016-12-06 08:02:00 -05:00
Ibby fff1dc45e2 chore(): update changelog 2016-12-06 07:46:19 -05:00
Ibby 4aec187e8c 2.2.11 2016-12-06 07:35:04 -05:00
IbbyandIbrahim Hadeed d9188446a0 fix(device): fixes device plugin
Breaking change: device property no longer exists
2016-12-06 07:33:40 -05:00
IbbyandIbrahim Hadeed 7ae6e10375 fix(cordova-property): fixes static properties of classes 2016-12-06 07:33:40 -05:00
Perry GovierandGitHub ea53a1923a chore(CI): reverting benign testing change 2016-12-05 17:00:05 -06:00
Perry GovierandGitHub f45f34442a ignore failed pushes 2016-12-05 16:50:31 -06:00
Perry GovierandGitHub 49de11e761 chore(CI): script typo 2016-12-05 16:45:47 -06:00
Perry GovierandGitHub c29aaca857 chore(ci): test 2016-12-05 16:43:40 -06:00
Perry GovierandGitHub 9241339b2c chore(CI): testing something 2016-12-05 16:32:05 -06:00
Perry GovierandGitHub 9c8b0ceda6 chore(CI): testing a change 2016-12-05 16:26:00 -06:00
Perry GovierandGitHub 78c226e83d chore(CI): testing something 2016-12-05 16:00:54 -06:00
Perry GovierandGitHub ef148d2a68 chore(CI): doh! silly logical mistake 2016-12-05 15:58:13 -06:00
Perry GovierandGitHub 7fa2f7f364 chore(ci): benign docs change to make sure it goes through CI 2016-12-05 14:36:44 -06:00
Ibby 5ef96d4558 chore(): update changelog 2016-12-04 13:52:36 -05:00
Ibby e39810b7d0 2.2.10 2016-12-04 13:52:21 -05:00
Ibby f211da7280 feat(actionsheet): add ActionSheetOptions interface 2016-12-04 13:12:42 -05:00
Ionitron c1398eb54b docs(googlemap): add docs for GoogleMapsMarkerOptions 2016-12-04 12:57:46 -05:00
Ionitron 1e1aaad7aa docs(googlemap): add docs for GoogleMapsMarker 2016-12-04 12:54:25 -05:00
Ionitron 54ef50178b docs(): update docs formatting 2016-12-04 12:46:41 -05:00
Ibby Hadeed 6f7171d26b feat(googlemaps): add markerClick and infoClick to MarkerOptions
addresses #844
2016-12-04 11:55:23 -05:00
Ibby Hadeed cf75a53438 feat(googlemap): add disableAutoPan to GoogleMapsMarkerOptions
closes #844
2016-12-04 11:54:13 -05:00
Ibby Hadeed 8ab1d13fb3 refractor(sqlite): optimize code 2016-12-04 11:50:59 -05:00
Ibby Hadeed dd250a6d17 refractor(sqlite): use InstanceProperty for databaseFeatures 2016-12-04 11:50:29 -05:00
Ibrahim HadeedandGitHub 9082c5efbf fix(sqlite): add static constructor, and fix resolve type (#697) 2016-12-04 11:49:38 -05:00
Ibrahim HadeedandGitHub b19f6d1ccd fix(contacts): fix few bugs in Contacts (#846) 2016-12-04 11:47:28 -05:00
Ibrahim HadeedandGitHub abc90f2e6a chore(): optimize CordovaProperty and InstanceProperty decorators (#635)
* chore(): optimize InstanceProperty wrapper

* chore(): optimize CordovaProperty wrapper

* tslint'

* fix decorators
2016-12-04 11:42:30 -05:00
Ibby Hadeed 717c1438c4 docs(deeplink): update broken return type 2016-12-01 18:55:59 -05:00
Ibby Hadeed 67e0713f18 2.2.9 2016-12-01 18:54:38 -05:00
Ibby Hadeed 693d344dea chore(): update changelog 2016-12-01 18:48:52 -05:00
Ibby Hadeed 914d1442b6 2.2.8 2016-12-01 18:48:29 -05:00
Ibby Hadeed c4acbfe095 chore(): tslint 2016-12-01 18:47:27 -05:00
Ibby Hadeed a26b8879f3 Merge branch 'master' of github.com:driftyco/ionic-native 2016-12-01 18:45:35 -05:00
Ibby Hadeed 2e82320b4c feat(card-io): add typing for response 2016-12-01 18:45:02 -05:00
Ibby Hadeed e6700a360e fix(card-io): fix typo in options 2016-12-01 18:37:00 -05:00
John-LukeandGitHub 3fdc4a8acd fix(): add return 2016-12-01 16:27:50 -03:00
Alex MuramotoandGitHub 82e7bd65a6 docs(camera-preview): correct option doc
Update camera-preview.ts
2016-12-01 09:53:13 -06:00
Alex MuramotoandGitHub 9ab73602af docs(camera): Add link to platform-specific options quirks 2016-12-01 09:50:21 -06:00
Alex MuramotoandGitHub 9f557bee8a docs(camera): correct options
Update camera.ts
2016-12-01 09:45:23 -06:00
Abdelaziz BennounaandGitHub 9c8259f659 Update camera.ts
Fixes cameraDirection values DOC.

Maybe doc should link also to os-specific quirks, e.g. https://github.com/apache/cordova-plugin-camera#module_Camera.Direction for cameraDirection?
2016-12-01 14:36:56 +00:00
John-LukeandGitHub db99482157 Implement changes requested 2016-11-30 20:24:33 -03:00
Wyatt ArentandGitHub bb321057d2 Update camera-preview.ts
Minor typo fix & maintain lowercase convention.
2016-11-30 10:58:22 -07:00
Max LynchandGitHub 853f425383 Merge pull request #837 from amuramoto/docs-updates
docs(all): many fixes for return types and params
2016-11-29 16:43:46 -06:00
Alex Muramoto 7cb3bc7542 resolve merge conflicts 2016-11-29 16:42:30 -06:00
Alex Muramoto 3da2831779 docs(all): standardizes and adds return types, also some param fixes 2016-11-29 16:40:50 -06:00
Ibby Hadeed 1072ab115b fix(globalization): add missing parameter to numberToString function
closes #835
2016-11-29 14:28:26 -05:00
Ibby Hadeed efb2ee7880 refractor(camera): remove public statements 2016-11-29 13:33:11 -05:00
Ibby Hadeed 5b98a80828 docs(backgroundmode): update docs 2016-11-29 13:14:34 -05:00
Ibby Hadeed 785646800b refractor(backgroundmode): fix return types 2016-11-29 13:13:35 -05:00
Ibby Hadeed 8d6c2dfb9a docs(datepicker): update docs 2016-11-29 13:11:15 -05:00
Alex MuramotoandGitHub b7a562053a Merge pull request #836 from amuramoto/background-mode
docs(background mode): fix incorrect return types and typos
2016-11-29 08:23:57 -08:00
Alex Muramoto d76ad8803e docs(background mode): fix incorrect return types and typos 2016-11-29 10:22:32 -06:00
perry 13216d1f04 attempting to eliminate the possibility for false positives when checking for docs changes 2016-11-28 10:53:24 -06:00
Wyatt ArentandIbrahim Hadeed 00e68ca990 docs(camera-preview): add missing param (#830)
* Update camera-preview.ts

This missing parameter would cause TS to spew

* Update camera-preview.ts

Sending preview to back is initially confusing and causes it to appear to not work.
2016-11-28 04:24:23 -05:00
Ibrahim HadeedandGitHub c987a06f91 Update wrap-min.tmpl 2016-11-25 00:09:40 -05:00
Ibrahim HadeedandGitHub 87049e9582 Update wrap.tmpl 2016-11-25 00:09:26 -05:00
John-Luke bab2971c58 fix(headercolor): solve typo in usage and chore 2016-11-24 14:37:57 -03:00
Ibby Hadeed fd0ac37ffc refractor(file): property filesystem of Entry is lowercase
fixes #720
2016-11-24 05:28:53 -05:00
Ibby Hadeed b64d61828a chore(): update changelog 2016-11-24 05:25:14 -05:00
Ibby Hadeed 08d66ead9b 2.2.7 2016-11-24 05:22:45 -05:00
Ibby Hadeed 9bd8997a31 fix(file): correct writeFile flags
fixes #789
2016-11-24 05:22:04 -05:00
Ibby Hadeed 156328c9de refractor(): change return type of writeFile 2016-11-24 05:19:12 -05:00
John Luke 93696d53f7 feat(headercolor): add HeaderColor plugin
fix [#760](https://github.com/driftyco/ionic-native/issues/760)
2016-11-23 16:47:34 -03:00
Ibby Hadeed 78b3ec5b1f fix(googlemap): fix typoe googledesic to geodesic
fixes #765
2016-11-23 08:55:49 -05:00
Ibby Hadeed f07431a14c fix(video-player): scalingMode is number
fixes #774
2016-11-23 08:53:20 -05:00
Ibby Hadeed 8439faf6b8 docs(imagepicker): update repo url 2016-11-23 08:51:04 -05:00
Ibby Hadeed 51ab03d097 feat(google-map): add get and set methods to Marker class
fixes #798
2016-11-23 08:44:43 -05:00
Ibby Hadeed abd910de67 feat(google-analytics): new interval period parameter
closes #816
2016-11-23 08:34:04 -05:00
Ibby Hadeed 24184a5a6a chore(): tslint 2016-11-23 08:23:55 -05:00
Ibby Hadeed 0b39ff8b7d docs(push): fix install command
closes #803
2016-11-23 08:22:35 -05:00
Ibby Hadeed 6ad54ecf86 feat(camera-preview): add disable method 2016-11-23 08:16:02 -05:00
Ibby Hadeed 3dd863cb49 Merge branch 'master' of github.com:driftyco/ionic-native 2016-11-23 08:05:34 -05:00
Ibby Hadeed b719a0372b fix(native-audio): completeCallback is optional on play method
closes #792
2016-11-23 08:05:04 -05:00
Ibby Hadeed bdef1daba5 docs(backgroundmode): remove anchor from repo link 2016-11-23 08:01:10 -05:00
Yasin SimsekandIbrahim Hadeed 695099b2b0 fix(3dTouch): fixes onHomeIconPressed (#813) 2016-11-23 04:48:08 -05:00
Max LynchandGitHub 28f4680575 Merge pull request #764 from shamsher31/patch-1
Update Example for Ionic Native Google Map
2016-11-20 08:16:57 -06:00
Max LynchandGitHub 40a7b138e2 Merge pull request #768 from stalniy/fix/file.writeFile
refactor(file): add return value to be  file entry in writeFile
2016-11-20 08:13:53 -06:00
Max LynchandGitHub fa624df1da Merge pull request #769 from ValentinKlinghammer/patch-1
docs(admob) Added basic usage description
2016-11-20 08:12:02 -06:00
Max Lynch 5577c51dbc fix(camera-preview): formatting. Closes #790 2016-11-20 07:54:44 -06:00
Max LynchandGitHub 1ab76ae693 Merge pull request #797 from shanesmith/patch-1
docs(media-capture): fix documentation mixup
2016-11-20 07:51:57 -06:00
Max LynchandGitHub 98bd5cee38 Merge pull request #801 from morrisonbrett/master
GoogleAnalytics TS file updated to include 'Browser', now that 'Brows…
2016-11-20 07:50:42 -06:00
Max LynchandGitHub f6903cdcdf Merge pull request #804 from nakulgulati/patch-1
Plugin reference fix
2016-11-20 07:50:25 -06:00
Alex MuramotoandMike Hartington b5cc14c546 docs(camera preview): update to correct repo
* docs(camera preview): update to correct repo

* docs(camera preview): fix typo

* docs(camera preview): Update to other repo

* fix(camera preview): revert to old plugin and update repo to matching repo
2016-11-18 17:30:06 -05:00
Nakul GulatiandGitHub 8988fad713 Plugin reference fix
The plugin reference is available as part of the global `cordova` object and not the global `plugins` object. This caused the plugin to `Plugin not installed warning` even though the plugin is installed and works when using through `cordova.plugins.market.open(appId);`
2016-11-18 17:08:42 +05:30
Brett Morrison 7b8b2d7136 GoogleAnalytics TS file updated to include 'Browser', now that 'Browser' is supported: https://github.com/danwilson/google-analytics-plugin/pull/313 2016-11-17 16:14:02 -08:00
Alex MuramotoandMike Hartington dd2ccef0c7 docs(camera preview): update to correct repo
* docs(camera preview): update to correct repo

* docs(camera preview): fix typo

* docs(camera preview): Update to other repo
2016-11-17 12:53:24 -05:00
Shane SmithandShane Smith e46f10878e docs(media-capture): fix documentation mixup 2016-11-16 14:43:52 -05:00
mhartington 2dacec0cb5 docs(): hide old open method 2016-11-09 14:14:26 -05:00
Anıl ÜNALandIbrahim Hadeed 0c5fadee86 docs(apprate): update usage (#778) 2016-11-08 17:02:10 -05:00
Ramon Henrique OrnelasandIbrahim Hadeed 01b30c68e1 fix(diagnostics): fix #776 (#777) 2016-11-08 17:01:38 -05:00
Valentin KlinghammerandGitHub e5b0365d0c Added basic usage description to AdMob 2016-11-03 10:41:41 +01:00
Sergii Stotskyi 867400d1ac refactor(file): add return value to be updated file entry in writeFile method
Also remove code duplication in writeExistingFile
2016-11-03 06:16:08 +02:00
Mark McEahernandIbrahim Hadeed 88f6ecf250 docs(inappbrowser): fix typo (#766) 2016-11-02 17:49:34 -04:00
Shamsher AnsariandGitHub e6beaa49a4 Update Example for Google Map 2016-11-02 16:44:06 +05:30
Andrew MitchellandIbrahim Hadeed fa03fa544f fix(datepicker): fix allowOldDates option (#761) 2016-11-02 00:13:43 -04:00
Ibby c22747fa2e chore(): go to SITE_DIR if checking out 2016-10-27 19:18:29 -04:00
Ibby fd8f80e92b test(): add mixpanel test back 2016-10-27 19:04:59 -04:00
Ibby 17f2fcb829 chore(): update changelog 2016-10-27 19:02:50 -04:00
Ibby 6a412155a3 2.2.6 2016-10-27 19:02:32 -04:00
Ibby 489d860264 chore(): update changelog 2016-10-27 19:02:12 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed ca43394185 fix(nfc): don't bind to name field, fix #740 (#749) 2016-10-27 18:51:21 -04:00
Perry GovierandGitHub b3eed47cbb Merge pull request #738 from driftyco/clean-docs
chore(scripts): clean old docs before processing
2016-10-27 16:46:56 -05:00
Max Lynch 71916a85dd fix(plugin): don't bind to name field. Fixes #740 2016-10-27 12:48:50 -05:00
Ibby 0669ba5222 2.2.5 2016-10-27 09:17:35 -04:00
Ibby bec0eac122 style(): tslint 2016-10-27 09:17:11 -04:00
Daniel FloodandIbrahim Hadeed 00e63d9fc8 docs(youtube-video-player): fix typo (#747)
Changed YouTubeVideoPlayer.openVideo to YoutubeVideoPlayer.openVideo  (notice the T in Youtube).
2016-10-27 09:15:03 -04:00
Ibby ac181c5439 fix(nfc): fix Ndef class
closes #713
2016-10-27 08:24:28 -04:00
Ibby 8fbf1f2b34 feat(sms): add hasPermission method
closes #721
2016-10-27 08:14:47 -04:00
Ibby 685ac5c7a0 refractor(contacts): export ContactError
closes #731
2016-10-27 08:11:45 -04:00
Ibby 634843e1b2 Merge branch 'master' of github.com:driftyco/ionic-native 2016-10-27 08:09:46 -04:00
Ibby d5310b0f73 fix(geolocation): fix watchPosition return type
closes #741
2016-10-27 08:09:36 -04:00
IbbyandIbrahim Hadeed a72cd59b99 fix(sqlite): fix callback issue with transaction method
closes #732
2016-10-27 08:00:47 -04:00
IbbyandIbrahim Hadeed 6f4737190b fix(sqlite): check if plugin exists before opening database 2016-10-27 08:00:47 -04:00
Ibby c98b4f4c85 fix(sqlite): check if plugin exists before opening database 2016-10-27 07:30:06 -04:00
Ibby 8f5532eb74 refractor(mixpanel): remove pluginMeta variable 2016-10-27 07:26:12 -04:00
Ibby 4340597fc9 Merge branch 'master' of github.com:driftyco/ionic-native 2016-10-27 07:25:22 -04:00
Andrew ColeandIbrahim Hadeed 7324246e6a refractor(mixpanel): remove pluginMeta variable (#742)
Documentation doesn't specify the repo or the correct command for ionic plugin add ...
2016-10-27 07:25:12 -04:00
Ibby 55b6ab9c54 refractor(file): remove pluginMeta variable 2016-10-27 07:24:19 -04:00
Ibby a5e591cfa6 refractor(googlemap): remove pluginMap constant 2016-10-27 07:23:13 -04:00
Ibby 48e5d46f1e refractor(googlemap): googlemaps.ts to googlemap.ts 2016-10-27 07:17:14 -04:00
Ibrahim HadeedandGitHub 62d8645468 leave index.md untouched 2016-10-27 07:09:38 -04:00
Ibby 0388ac3f6b test(): fix tests 2016-10-27 06:59:00 -04:00
Ibby 24752652b7 style(): tslint 2016-10-27 06:40:22 -04:00
Ibby eb03de96ba feat(diagnostic): add missing functions
closes #743
2016-10-27 06:38:46 -04:00
twaldeckerandIbrahim Hadeed 0317d4455f docs(transfer): add how-to download files (#745)
also add information how to browse your app
files directory, which is hard to find.
I needed very long time to check where my files are.
2016-10-27 06:30:02 -04:00
AndreasGassmannandIbrahim Hadeed 757d0961b9 fix(3dtouch): add missing property (#739) 2016-10-24 16:12:01 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 693ba01137 chore(location-accuracy): add name field (#724) 2016-10-22 13:19:49 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed fa0175d248 chore(http): add name field (#725) 2016-10-22 13:19:43 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 04d01ac1b3 chore(zbar): add name field see https://github.com/driftyco/ionic-native/commit/96776567eb1d3f316e788ded75f1372ab9ce9713 (#723) 2016-10-22 13:19:38 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 77c7b9d00a chore(stepcounter): add name field (#726) 2016-10-22 13:19:32 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed ee4cfadff1 chore(devicefeedback): add name field (#727) 2016-10-22 13:19:25 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 49d8348db3 chore(themeable-browser): add name field (#728) 2016-10-22 13:19:19 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 6e445b1beb chore(templates): add name field (#729) 2016-10-22 13:19:13 -04:00
Ibrahim HadeedandGitHub 970eb755b6 chore(scripts): clean old docs before processing
This should clean the old docs before processing the new ones, to remove any old directories.
2016-10-22 13:17:44 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 1a803e70be refractor(filepath): add name field (#722) 2016-10-18 22:37:53 -04:00
Max Lynch 6982a2d35f chore(deeplinks): Updated Deeplinks docs 2016-10-18 12:22:09 -05:00
Colin FrickandIbrahim Hadeed 0660a3bc67 feat(filepath): add cordova-plugin-filepath (#714) 2016-10-18 06:05:19 -04:00
Max Lynch 96776567eb feat(plugins): add name field 2016-10-17 20:38:25 -05:00
Matt KaneandIbrahim Hadeed d09018d2d4 docs(camera): correct costants paths (#706) 2016-10-17 05:34:16 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 0649d8ca8c style(device-feedback): fix angular style (#703) 2016-10-16 03:00:27 -07:00
Ibby 41abaeb7c9 chore(): update changelog 2016-10-15 13:17:23 -04:00
Ibby 4dc82383a0 2.2.4 2016-10-15 13:17:06 -04:00
Ibrahim HadeedandGitHub 799e2f0b2e fix(sqlite): fix callback order for transaction (#700) 2016-10-15 07:41:46 -07:00
Ibrahim HadeedandGitHub b95f88c165 feat(mixpanel): MixpanelPeople returns promises (#681)
* feat(mixpanel): make MixpanelPeople return promises

* remove decorator from people property

* add cordova decorator'

* test(mixpanel): add mixpanel tests

* test(mixpanel): remove unused imports

* fix(mixpanel): fix MixpanelPeople class

closes #667
2016-10-15 07:41:37 -07:00
Ibrahim HadeedandGitHub bbda6e22a2 feat(device-feedback): add DeviceFeedback plugin (#696) 2016-10-15 07:41:06 -07:00
IbbyandIbrahim Hadeed 3edfafb6f9 feat(image-picker): add new android methods 2016-10-15 07:40:22 -07:00
Ibby 99c1d499f7 chore(): update contributing guide 2016-10-14 08:12:35 -04:00
Ibby 37ed9a097a docs(toast): add interface to docs 2016-10-14 07:11:41 -04:00
Ibby db3d5b63c6 docs(image-picker): add interface docs 2016-10-14 06:44:57 -04:00
Ibby 6521e1833c refractor(): change return type of configure 2016-10-14 06:43:02 -04:00
Ibby debe6834ef chore(): update changelog 2016-10-14 06:06:49 -04:00
Ibby 292c8801ea Merge branch 'master' of https://github.com/driftyco/ionic-native 2016-10-14 06:06:31 -04:00
williamandIbrahim Hadeed b031ceed99 docs(camera-preview): fix repo link (#695)
Breaking link to Repo.
2016-10-14 03:06:11 -07:00
Ibby 82d4ec2738 2.2.3 2016-10-14 06:03:59 -04:00
Ibby 9c55358620 Merge branch 'master' of https://github.com/driftyco/ionic-native 2016-10-13 19:15:46 -04:00
Ibby 51bc5ef542 docs(ble): update docs for isEnabled
closes #665
2016-10-13 19:15:38 -04:00
Colin FrickandIbrahim Hadeed 74a252b324 fix(googlemaps): Expose 'type' property in GoogleMapsLatLngBounds #693 (#694) 2016-10-13 16:00:15 -07:00
Ramon Henrique OrnelasandIbrahim Hadeed 43c8592b40 style(file): fix angular style (#685) 2016-10-12 19:52:27 -07:00
Ramon Henrique OrnelasandIbrahim Hadeed babfb0dca3 fix(onesignal): update to match latest API version (#691) 2016-10-12 19:51:57 -07:00
Ibby ceb4217415 chore(): update changelog 2016-10-11 21:03:52 -04:00
Ibby 798625698d 2.2.2 2016-10-11 21:03:23 -04:00
Ibby 5cfb3b033b refractor(): remove unused import 2016-10-11 21:02:53 -04:00
Ibrahim HadeedandGitHub 95d666c348 Merge pull request #682 from driftyco/fix/file
fix(file): fix writeFile method
2016-10-11 18:01:55 -07:00
Ibby 276d61bf3a fix(file): read methods can accept Blobs too 2016-10-11 20:48:53 -04:00
Ibby 397a209ad2 docs(file): improve docs 2016-10-11 20:46:05 -04:00
Ibby d2f42ef33a fix(file): getFreeDiskSpace now works 2016-10-11 20:44:27 -04:00
Ibby fe46907aaa docs(file): document getFreeDiskspace 2016-10-11 20:39:26 -04:00
Ibby 5c92455ee9 feat(file): getFile and getDirectory are now public
closes #657
2016-10-11 20:30:14 -04:00
Ibby 046cbe7fca chore(): update changelog 2016-10-11 20:18:33 -04:00
Ibby 32f09275aa 2.2.1 2016-10-11 20:18:17 -04:00
Ibby 542ff4cf95 feat(file): resolveLocalFilesystemUrl and resolveDirectoryUrl are now public methods
closes #657
2016-10-11 20:16:39 -04:00
Ibby 5710eb78a8 fix(file): last parameter for writeFile now only accepts options 2016-10-11 20:13:21 -04:00
Ibby 842a80d493 fix(file): fix writeFile method
addresses #464 #552 #666
2016-10-11 20:10:47 -04:00
Ibby c2d4f1c0da fix(location-accuracy): accuracy param is number
closes #676
2016-10-11 19:35:54 -04:00
Xueron NeeandIbrahim Hadeed e28e5b0f5f fix(themeablebrowser): add missed options (#680) 2016-10-11 16:33:35 -07:00
JobandIbrahim Hadeed bff4862979 fix(diagnostic): misspelled getContactsAuthorizationStatus method (#678) 2016-10-11 16:32:24 -07:00
Ibby 6bcef44d42 Merge branch 'master' of https://github.com/driftyco/ionic-native 2016-10-11 09:14:22 -04:00
Ibby 69c9b6f555 docs(): set ANDROID_THEMES to private 2016-10-11 09:14:17 -04:00
Ibby 7f38cb5a16 docs(datepicker): improve docs 2016-10-11 09:13:56 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed cf7abe110d fix(http): export via window.IonicNative (#675)
* fix(http): fix export system module

* style(http): fix angular style

* style(http): delete multiline

* chore(http): add attribute platforms to decorator Plugin

* fix(http): typo param uploadFile()

* fix(http): typo commit https://github.com/driftyco/ionic-native/pull/675/commits/ba6a7e993085683bae705d44c4ce726adcc04b10
2016-10-11 03:25:15 -07:00
Ibby 5b060345d2 chore(): update changelog 2016-10-11 04:30:55 -04:00
Ibby 1784036ef7 chore(): update changelog 2016-10-11 04:22:46 -04:00
Ibby 7a8577007c 2.2.0 2016-10-11 04:19:02 -04:00
Ibrahim HadeedandGitHub 7c6e6d8b6b fix(onesignal): update to match latest api (#671)
closes #667
2016-10-11 01:12:43 -07:00
Ramon Henrique OrnelasandIbrahim Hadeed c5fd83ddb6 style(onesignal): add semicolon fix lint (#672) 2016-10-11 01:12:32 -07:00
Ramon Henrique OrnelasandIbrahim Hadeed 7b2fe69c7c docs(camera-preview): change repo no longer maintaned fix #360
* docs(camera-preview): change repo no longer maintaned  fix #360

* refactor(camera-preview): delete dead code
2016-10-11 01:11:05 -07:00
Ibrahim HadeedandGitHub f0961c7b23 feat(http): add cordovaHTTP wrapper (#674) 2016-10-11 01:06:41 -07:00
Ibby 35c8bbd49e fix(native-transitions): add missing interface properties 2016-10-10 20:50:10 -04:00
Ibby 1a343c1ea5 Merge branch 'master' of https://github.com/driftyco/ionic-native 2016-10-10 20:10:43 -04:00
Ibby 4fef8ff326 refractor(onesignal): add OneSignalNotification interface 2016-10-10 20:10:14 -04:00
Xueron NeeandIbrahim Hadeed 13681756ae fix(thmeable-browser): fix the name of the plugin (#663) 2016-10-09 04:33:54 -04:00
Ibby 4a798281e4 chore(): update changelog 2016-10-08 20:57:54 -04:00
Ibby 79670b7878 2.1.9 2016-10-08 20:57:47 -04:00
Ibby 720084578d fix(paypal): add optional details param to paypalpayment 2016-10-08 20:44:32 -04:00
Patrick BußmannandIbrahim Hadeed 3dd6a92ccf fix(paypal): problems with selection of PayPal environment (#662)
* Fixed bugs with selection of environment and added missing prepareToRender function

* Updated PayPal usage example
2016-10-08 20:34:27 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 7d1686ef93 refactor(googlemaps): throw warnings plugin_not_installed (#655)
* refactor(googlemaps): adjust imports to warnings console and delete @author comments

* refactor(googlemaps): throw warnings plugin_not_installed

* refactor(googlemaps): delete warnings of the methods added Promise.reject case plugin_not_instalet
2016-10-08 20:29:53 -04:00
Ibby b40b0fff98 chore(): update changelog 2016-10-08 18:50:49 -04:00
Ibby 4dba0580ac 2.1.8 2016-10-08 18:50:36 -04:00
Ibby 11653ce752 fix(googlemaps): fixes GoogleMapsLatLng class
closes 658
2016-10-08 18:48:28 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed d3e6f3ba41 refactor(plugin): improvement pull #654 (#661) 2016-10-08 15:07:01 -04:00
Thiery LaverdureandIbrahim Hadeed 2c6cc37a5f docs(calendar): fix typo (#660) 2016-10-08 14:54:02 -04:00
Ibby 4c7defb2ec chore(): update changelog 2016-10-06 20:38:32 -04:00
Ibby 2da02e6d46 2.1.7 2016-10-06 20:38:21 -04:00
Ibby 7a91c87a72 test(): sync methods no longer get resolve/reject 2016-10-06 20:37:41 -04:00
Patrick BußmannandIbrahim Hadeed 598f8a9e7c fix(paypal): fixed currency code not found issue (#653) 2016-10-06 20:34:45 -04:00
ziggyJandIbrahim Hadeed 6f0f02bb66 fix google maps setPadding not working issue #573 (#654) 2016-10-06 20:33:42 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed e4bde77bd4 chore(): deleted ionic-gulp-tslint change for gulp-tslint directly (#611) 2016-10-06 00:37:34 -04:00
Ibby c24b331866 chore(): update changelog 2016-10-06 00:27:24 -04:00
Ibby 4ac348bd0f 2.1.6 2016-10-06 00:27:04 -04:00
Ibby f0026572e7 fix(paypal): fix helper classes 2016-10-06 00:26:59 -04:00
Ibby e30ccabf7b 2.1.5 2016-10-05 23:19:55 -04:00
Ibby 6b286db51a chore(): add successIndex at the correct position if we have optional params 2016-10-05 23:19:45 -04:00
Ibby d79d62bfa0 docs(hotspot): remove unecessary doc tags 2016-10-05 22:46:22 -04:00
Ibby 2bdd3a3868 chore(): update changelog 2016-10-05 22:43:59 -04:00
Ibby 09d481e1d6 2.1.4 2016-10-05 22:43:31 -04:00
Ibby 6f23bef5d1 fix(google-analytics): specify successIndex and errorIndex for methods with optional params 2016-10-05 22:43:20 -04:00
Ibby 84f54d64aa chore(): update changelog 2016-10-05 22:42:35 -04:00
Ibby c9ddec3bb5 2.1.3 2016-10-05 22:36:10 -04:00
Ibby f62e1081e1 fix(google-analytics): add newSession param 2016-10-05 22:35:52 -04:00
Ibby 7dba41cbe1 docs(google-analytics): add missing docs 2016-10-05 22:30:40 -04:00
Ibby 77b0277290 fix(google-analytics): add missing methods, fix return types 2016-10-05 22:27:28 -04:00
Ibby 40325cad9f fix(google-analytics): fix depreciated plugin reference 2016-10-05 22:20:55 -04:00
Ibby ab5bbae2f6 chore(): update changelog 2016-10-05 21:04:04 -04:00
Ibby 5da746d2fc 2.1.2 2016-10-05 21:03:06 -04:00
Ibby 72a694a5e1 fix(googlemaps): add missing properties
should fix #642
2016-10-05 20:43:57 -04:00
Andrew ColeandIbrahim Hadeed 1ab0d2f915 Changed confusing sentence structure. (#644)
Reading the document on which destination type, without commas leads to confusing behaviour.
2016-10-05 20:33:31 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 083118aff4 docs(background-geolocation): exports interfaces to template dgeni (#640) 2016-10-05 20:33:13 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed ad373c93ae docs(paypal): delete ':' of the params (#639) 2016-10-05 20:32:47 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed ac301c284f docs(one-signal): fix types params (#638) 2016-10-05 20:32:29 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 1e0509da98 docs(paypal): fix typo name interface (#637) 2016-10-05 20:32:12 -04:00
Ibrahim HadeedandGitHub ad3bef2e5a chore(): fix module export conflicts (#633)
* chore(): fix module export conflicts

* remove export{}

* resolve conflicting export names
2016-10-05 20:29:40 -04:00
AndreasGassmannandIbrahim Hadeed bbbbb3e8d0 feat(zBar): add zBar barcode scanner plugin (#634) 2016-10-04 15:12:39 -04:00
Ibby 0bc73e525d docs(contacts): improve docs 2016-10-04 13:59:32 -04:00
Ibby 7ababc4d67 docs(googlemaps): remove related interface untill they're well documented 2016-10-04 13:47:28 -04:00
Ibrahim HadeedandGitHub 6ff8f03ef0 docs(): docs now display interfaces and related classes
document interfaces + other classes
2016-10-04 13:46:55 -04:00
Ibby 010a6ea304 docs(geolocation): add error handling and related interfaces 2016-10-04 13:45:54 -04:00
perry 973c80b264 docs(pay-pal): interfaces dont’ need to be marked private if their corresponding var is 2016-10-03 17:06:40 -05:00
Ibby b5f9ba588a 2.1.1 2016-10-03 17:38:47 -04:00
Ibby c5724fdc4e chore(): fix main and typings paths 2016-10-03 17:38:42 -04:00
Ibby ebda055444 chore(): update changelog 2016-10-03 17:05:21 -04:00
Ibby 7cf9bd8e5e 2.1.0 2016-10-03 17:04:49 -04:00
Ibrahim HadeedandGitHub ce710117f7 fix(paypal): fix typings, add PayPalItem and PayPalPaymentDetails
fix(paypal): fix typings, add PayPalItem and PayPalPaymentDetails
2016-10-03 16:57:33 -04:00
Ibby fcda04acf1 add missing docs 2016-10-03 16:56:15 -04:00
Ibby 83ac4c7bbe more docs 2016-10-03 16:51:57 -04:00
Ibrahim HadeedandGitHub 2be7872cd6 docs(LocationAccuracy): fixes typo
docs(LocationAccuracy): fixes typo
2016-10-03 14:16:15 -04:00
Ibrahim HadeedandGitHub 97a7f1a4e7 docs(googlemaps): change observable to promise in main docs (#624)
GoogleMaps.one() returns Promise not Observable
2016-10-03 14:15:56 -04:00
Nakul GulatiandGitHub e9e37f33f9 Changed observable to promise in docs
GoogleMaps.one() returns Promise not Observable
2016-10-03 18:50:40 +05:30
Manu Mtz.-AlmeidaandGitHub 344ce11a3e docs(LocationAccuracy): fixes typo 2016-10-03 14:26:13 +02:00
Ibby 7fcd1f85a3 docs(paypal): add related interfaces 2016-10-03 03:18:54 -04:00
Ibby 5d13ba03d8 fix(paypal): fix typings, add PayPalItem and PayPalPaymentDetails 2016-10-03 03:14:51 -04:00
Tomas BeranandIbrahim Hadeed a99b753d2d feat(stepcounter): add stepcounter plugin (#607)
* feat(stepcounter): add stepcounter plugin

* docs(stepcounter): add missing returns
2016-10-02 18:20:01 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 8f26f4b3ef chore(): move templates of the root folder to scripts/templates similar to Ionic (#612) 2016-10-02 18:19:24 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 624bc1d9b5 style(media): fix angular style (#614) 2016-10-01 16:15:58 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 0a07bef2d2 chore(): move CONTRIBUTING to .github/CONTRIBUTING (#613) 2016-10-01 16:15:32 -04:00
Ibby 96bb4d38dc chore(media): remove unused import, ensure plugin is installed 2016-10-01 15:19:16 -04:00
Ibby 58a99a14d5 fix(media): add status as a parmeter instead of property of instance 2016-10-01 15:05:08 -04:00
Tom ZöhnerandIbrahim Hadeed 66e9e46458 feat(googlemaps): support bounds in Geocoder (#599) 2016-09-29 11:52:14 -04:00
Gianfranco PalumboandIbrahim Hadeed d6060a95d7 fix(power-management): fix repo and pluginref (#603)
Fixes the link that is generated in the docs here
http://ionicframework.com/docs/v2/native/powermanagement/
2016-09-28 17:56:27 -04:00
Chris MaissanandIbrahim Hadeed 80ff2f3bfa fix(calendar): fixed modifyEventWithOptions and related interface
* Fixed Calendar modifyEventWithOptions method

* Updated comments
2016-09-28 13:54:19 -04:00
Steve SandersandIbrahim Hadeed 16f05c3b0d fix(push): Add support for passing notification id into finish (#600) 2016-09-28 13:51:03 -04:00
HoiselandIbrahim Hadeed 2ed84b1b71 fix(social-sharing): shareWithOptions method signature (#598)
Fix shareWithOptions method signature, replacing 'options.file' property with 'options.files' to match social sharing plugin [method interface](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/blob/master/src/android/nl/xservices/plugins/SocialSharing.java#L209)
2016-09-27 14:00:01 -04:00
Daniel LealandIbrahim Hadeed 8d21f5f225 fix(googlemaps): CameraPosition target can now be GoogleMapsLatLng[] (#587) 2016-09-27 10:51:43 -04:00
SylvainGuittardandIbrahim Hadeed be2c198259 fix(googlemaps): typo in GoogleMapsTileOverlayOptions (#589) 2016-09-27 10:51:04 -04:00
Ibrahim Hadeed dde011c8f6 document interfaces + other classes 2016-09-27 10:46:41 -04:00
Max Lynch 47112c7c24 feat(plugin): checkInstall w/ warning msg 2016-09-25 18:17:09 -05:00
Ramon Henrique OrnelasandIbrahim Hadeed 1b87af86bf docs(emailcompposer): change repo #568 (#584) 2016-09-25 19:01:39 -04:00
Max Lynch d45a2b5407 feat(plugin): add getPlugin to plugin interface. Fixes #582 2016-09-25 17:59:56 -05:00
Ibrahim Hadeed 49bf9b7cc5 docs(ble): add return docs for startScanWithOptions 2016-09-25 18:44:29 -04:00
Ibrahim Hadeed 79f0a3fc7b feat(ble): add startScanWithOptions
closes #539
2016-09-25 18:36:00 -04:00
Ibrahim HadeedandGitHub 60b7c7469a feat(location-accuracy): add location accuracy plugin (#583)
closes #484
2016-09-25 18:28:22 -04:00
Ibrahim Hadeed c377489aba chore(): add license 2016-09-25 17:59:21 -04:00
Ibrahim Hadeed 8bb22fb576 fix badges 2016-09-25 17:58:32 -04:00
Ibrahim Hadeed 310e0942fd fix badges 2016-09-25 17:58:13 -04:00
Ibrahim Hadeed df06a24746 fix badges 2016-09-25 17:57:38 -04:00
Ibrahim Hadeed b9151bc062 feat(themable-browser): add ThemableBrowser plugin
closes #549
2016-09-25 17:55:13 -04:00
Ibrahim Hadeed 972d63b2d2 feat(themable-browser): add ThemableBrowser plugin
closes #549
2016-09-25 17:53:17 -04:00
Ibrahim Hadeed 440786a4f7 Merge branch 'master' of https://github.com/driftyco/ionic-native 2016-09-25 17:00:11 -04:00
Ibrahim Hadeed 3a6ec05bef style(googlemaps): remove unecessary new lines 2016-09-25 16:55:17 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed c5733326a9 fix(isdebug): export IsDebug class (#578) 2016-09-25 15:42:31 -04:00
Ibrahim Hadeed f36b1c03cb refractor(googlemaps): fix typo in GoogleMapsTileOverlayOptions 2016-09-25 15:29:03 -04:00
Max Lynch 3266d21ba4 chore(changelog): update changelog 2016-09-24 17:33:37 -05:00
Max Lynch 62f1504514 vBump 2016-09-24 17:30:07 -05:00
Max Lynch f60d08b7a4 feat(plugin): cordova function override. fixes #437 2016-09-24 17:26:23 -05:00
Max Lynch a092a31a1e feat(emailcomposer): use new supported plugin. #568 2016-09-24 16:00:44 -05:00
Max Lynch 6407518892 Add back erroneous exports 2016-09-24 15:44:28 -05:00
Max Lynch e7e45f608c feat(npm): typescript 2.0.2 2016-09-24 15:41:07 -05:00
Max LynchandGitHub c175badab6 Merge pull request #561 from krizroring/master
Extension of the BackgroundGeolocation plugin
2016-09-24 15:40:59 -05:00
Max LynchandGitHub 05783be9ac Merge pull request #574 from ramonornela/fix_style
style(inapppurchase): fix angular style
2016-09-24 15:36:48 -05:00
Ramon Ornelas 6948eabc96 style(inapppurchase): fix angular style 2016-09-24 09:39:31 -03:00
Max Lynch 48196da281 feat(push): add coldstart property. Fixes #559 2016-09-22 20:43:51 -05:00
Max Lynch a0b6b1084b fix(webintent): add type param. Fixes #564 2016-09-22 20:37:36 -05:00
Max Lynch 4292959c87 fix(plugins): export VideoPlayer. Fixes #563 2016-09-22 20:35:19 -05:00
Max Lynch e50b961bf9 fix(npm): duplicate typings 2016-09-22 15:10:44 -05:00
Max Lynch 0ba3957e8a chore(npm): proper 2.0.0 typescript 2016-09-22 13:59:20 -05:00
Max Lynch c33842f8f0 chore(npm): proper 2.0.0 typescript 2016-09-22 13:58:57 -05:00
Max Lynch f87237852f chore(npm): bump to 1.3.27 2016-09-22 13:39:51 -05:00
Max Lynch bfb63a77a2 chore(npm): bump to 1.3.26 2016-09-22 13:37:01 -05:00
Max Lynch b1ca6af2c3 add typings for old release 2016-09-22 13:36:38 -05:00
Max Lynch 2f20deacf2 Revert "Bump to 2.0.0 typescript"
This reverts commit de1086b894.
2016-09-22 13:36:27 -05:00
Max Lynch de1086b894 Bump to 2.0.0 typescript 2016-09-22 13:25:16 -05:00
Max Lynch 6a19c8cf48 fix(ts): use old ts version for 1.3.x #567 2016-09-22 13:11:56 -05:00
Max Lynch b6b0359fcf fixing package.json publish 2016-09-21 15:12:27 -05:00
Max Lynch bb0d81a4e9 vBump 2016-09-21 15:10:44 -05:00
Max Lynch 4014972feb feat(build): Support ES2015 modules 2016-09-21 15:04:46 -05:00
Max Lynch 3903fee2bf feat(scripts): publish script with npm and bower. Fixes #448 2016-09-21 11:02:32 -05:00
Christian Roring 31706867c7 feat(BackgroundGeolocation): code cleanup 2016-09-20 14:00:57 +02:00
Christian Roring 808a75e41c feat(BackgroundGeolocation): Update to the latest version 2016-09-20 13:07:01 +02:00
Christian Roring 919e8dae30 feat(BackgroundGeolocation): Update to the latest version 2016-09-20 12:36:56 +02:00
Ibrahim HadeedandGitHub 763ad1bdb0 fix(call-number): number should be a string
closes #545
2016-09-19 18:20:51 -04:00
Ibrahim HadeedandGitHub 281575b961 feat(background-geolocation): add showAppSettings function
closes #548
2016-09-19 18:18:53 -04:00
Ibrahim HadeedandGitHub 42d1bbc7a8 docs(camera): add return type to cleanup
closes #550
2016-09-19 18:14:51 -04:00
Jay CambronandIbrahim Hadeed a28667e751 docs(background-geolocation): add notice (#534) 2016-09-19 18:00:58 -04:00
Attila OláhandIbrahim Hadeed 505ff189d9 chore(market): add missing plugin name (#557) 2016-09-19 17:58:37 -04:00
Daniel Imhoff 35c37c2d9e chore(build): rename to more explicit tsconfig-es5.json 2016-09-14 14:13:14 -05:00
Daniel Imhoff efbd11676f put tsc output into dist/es5, not just dist/ 2016-09-14 13:35:45 -05:00
Daniel Imhoff abf3335415 'npm run' runs with node_modules/.bin in path 2016-09-14 13:25:50 -05:00
Andrew MitchellandIbrahim Hadeed c83b0437fa feat(localNotifications): added register and has permission functions (#536) 2016-09-13 08:10:14 -04:00
Ibrahim HadeedandGitHub 23fc908eb6 fix(googlemaps): CameraPosition target can now be LatLngBounds
closes #547
2016-09-13 06:17:07 -04:00
Daniel Imhoff 9d35567cb5 Fix import to use @reactivex/rxjs 2016-09-09 14:45:24 -05:00
Max Lynch 7f77b8f069 Package 2016-09-09 09:50:13 -05:00
mhartington 410b3d261f docs(localNotification): update docs 2016-09-07 12:44:35 -04:00
Max LynchandGitHub d8baf3a814 Merge pull request #524 from mattlewis92/ng1-promise-tweak
fix(ng1): fail gracefully when angular 1 promises can't be retrieved
2016-09-07 10:07:53 -05:00
Ibrahim Hadeed c36b0a6b3f chore(): update changelog 2016-09-06 23:38:15 -04:00
Ibrahim Hadeed 3385a46648 1.3.21 2016-09-06 23:37:58 -04:00
Ibrahim Hadeed 550b8289c9 reafractor(file): add types to promises 2016-09-06 23:33:51 -04:00
Ibrahim Hadeed 2aa998f66f docs(googlemaps): improve usage 2016-09-06 23:23:51 -04:00
Ibrahim Hadeed dff034a5b6 feat(googlemaps): can pass HTMLElement to constructor 2016-09-06 23:23:06 -04:00
Ibrahim Hadeed c407b6d4f0 docs(googlemaps): improve usage 2016-09-06 23:21:29 -04:00
Ibrahim Hadeed 58c9439a32 docs(camera-preview): add usage
closes #363
2016-09-06 23:12:35 -04:00
Ibrahim Hadeed c75f89894a fix(): remove CanvasCamera plugin 2016-09-06 23:04:53 -04:00
Ibrahim Hadeed a566240266 fix(media): nest the constructor logic 2016-09-06 23:02:46 -04:00
Ibrahim Hadeed d03d70ff0b fix(googlemaps): moveCamera and animateCamera now return a Promise
closes #511
2016-09-06 22:28:56 -04:00
Ibrahim Hadeed 7910493a6c fix(file): set exclusive to true when replace is false
closes #516
2016-09-06 22:24:34 -04:00
Ibrahim Hadeed c76de34b97 fix(social-sharing): shareViaEmail now resolves/rejects when not providing optional args 2016-09-06 22:22:38 -04:00
Ibrahim Hadeed ddae67913d chore(): lint 2016-09-06 21:59:58 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 4f9716415b fix(social-sharing): various fixes (#520)
* feat(socialsharing): add method shareVia()

* docs(socialsharing): fix docs params Types

* docs(socialsharing): fix docs param Type method canShareVia

* docs(socialsharing): shareVia()

* fix(socialsharing): fix order callback, because params is optional

* feat(socialsharing): add params optionals canShareVia()

* docs(socialsharing): add returns Promise
2016-09-06 21:58:04 -04:00
Nicolas PerrautandIbrahim Hadeed caf2d67443 docs(statusbar): fix typo (#526) 2016-09-06 21:54:57 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 393e9d0e00 feat(file): allows writeFile and writeExistingFile to accept Blob (#527) 2016-09-06 21:54:35 -04:00
Sergii StotskyiandIbrahim Hadeed bbbd0d52e9 feat(file): adds chunked blob writing (#529)
This prevents devices crashing when user picks a big file to write
2016-09-06 21:53:42 -04:00
Barry RoweandIbrahim Hadeed 26dead93ff fix(geolocation): retain Observable even during an error condition (#532)
The way this was setup previously, if an error occurred on the watchPosition observable, the observer was sent an error, which would have to be caught. This also has the side effect of completing the observable, which means anything down stream that would be subscribed would be unsubscribed and no longer receive updates.

Instead of using binding the error callback to ```observer.error``` this change just binds the error callback to ```observer.next``` and lets the subscriber filter out results that match ```PositionError``` rather than having to manage re-subscribing (which could just immediately fail and enter a loop of catch/retry)
2016-09-06 21:52:43 -04:00
Matt LewisandIbrahim Hadeed 1facde3966 test(): add initial test suite (#523) 2016-09-06 21:42:29 -04:00
mhartington d5513db9bb doc(media): improve docs 2016-09-06 15:48:53 -04:00
Matt Lewis d135dc26e2 fix(ng1): fail gracefully when angular 1 promises can't be retrieved 2016-09-02 18:19:56 +01:00
Max Lynch 2dc68a4785 fix(ng1): grab injector from app. #451 2016-09-01 13:37:43 -05:00
Ramon Henrique OrnelasandIbrahim Hadeed 2f706deb26 style(): fix Angular style TEMPLATE (#517)
* style(TEMPLATE): fix angular style

* docs(TEMPLATE): fix angular style docs template
2016-09-01 01:32:14 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 54460e2362 style(): fix angular styles (#512)
* style(canva-camera): fix angular style

* style(crop): fix angular style

* style(file-chooser): fix angular style

* style(file-opener): fix angular style

* style(file): fix angular style

* style(inappbrowser): fix angular style

* style(instagram): fix angular style

* style(is-debug): fix angular style

* style(native-page-transitions): fix angular style

* style(market): fix angular style

* style(music-controls): fix angular style

* style(nfc): fix angular style

* style(pay-pal): fix angular style

* style(power-management): fix angular style

* style(securestorage): fix angular style

* style(streaming-media): fix angular style

* style(video-editor): fix angular style

* style(youtube-video-player): fix angular style
2016-08-31 17:02:15 -04:00
Ramon Henrique OrnelasandIbrahim Hadeed 1db1374226 fix(base64togallery): fixes callbacks (#513) 2016-08-31 17:01:50 -04:00
Dominique RauandIbrahim Hadeed 3917a3f7b9 docs(tts): fix plugin name (#514) 2016-08-31 16:59:41 -04:00
Ibrahim HadeedandGitHub 210346e1e3 fix(diagnostics): fixes constants and other minor issues
fix(diagnostic): Some fixes regarding objects
2016-08-30 23:51:43 -04:00
Ibrahim HadeedandGitHub f4efe1f6eb docs(contacts): document create method
Docs Contants.create()
2016-08-30 23:49:58 -04:00
Ibrahim HadeedandGitHub 04b24d255e docs(file): fix methods private exposed (#509) 2016-08-30 23:49:20 -04:00
Ramon Ornelas e34c25b490 docs(file): fix methods private exposed 2016-08-30 14:45:52 -03:00
Ramon Ornelas ea36333497 docs(contacts): add docs basic create() 2016-08-30 14:29:17 -03:00
Guille f93f958d66 fix(diagnostic): Fix typo 2016-08-29 23:18:24 +02:00
Guille 8f3d36f4bc fix(diagnostic): Fix permissionStatus object 2016-08-29 16:58:58 +02:00
GuillermoandIbrahim Hadeed 51364f8edd fix(mixpanel): Make eventProperties optional (#501)
* fix(mixpanel): Make eventProperties optional

* style(mixpanel): Match editorconfig
2016-08-29 10:58:00 -04:00
Guille cb176aae90 fix(diagnostic): Fix diagnostic objects 2016-08-29 16:50:28 +02:00
Guille 9d573a92ce fix(diagnostic): Add DENIED_ALWAYS to permissionStatus, also some code formatting 2016-08-29 14:59:43 +02:00
GuillermoandIbrahim Hadeed 877ac27868 fix(install-instructions): This fixes install instructions for deeplinks, facebook and googlemaps (#499) 2016-08-27 15:20:51 -04:00
Ibrahim Hadeed 9c8321d3b4 chore(): update changelog 2016-08-27 15:09:38 -04:00
Ibrahim Hadeed e8bfb77b3d 1.3.20 2016-08-27 15:09:19 -04:00
Ibrahim Hadeed 87ab8980b2 Merge branch 'master' of https://github.com/driftyco/ionic-native 2016-08-27 14:56:45 -04:00
Ibrahim Hadeed 13de69080a refractor(): use es6 features
tor-es6'
2016-08-27 14:56:34 -04:00
Ibrahim Hadeed 8d439ff0cf fix merge conflicts 2016-08-27 14:55:37 -04:00
GuillermoandIbrahim Hadeed f6d5ac4621 fix(GoogleMaps): Fixes #452 (#498) 2016-08-27 14:50:49 -04:00
Ibrahim Hadeed f37a40e138 remove duplicate identifier 2016-08-27 14:46:05 -04:00
Ibrahim HadeedandGitHub 21d8122257 feat(file-opener): add file opener support (#497)
closes #295
2016-08-27 14:43:57 -04:00
Ibrahim HadeedandGitHub 0cf7d6aca1 feat(youtube): add Youtube video player plugin support (#496) 2016-08-27 14:35:18 -04:00
Ibrahim HadeedandGitHub 94a7dae863 feat(file-chooser): add file chooser plugin support (#495) 2016-08-27 14:35:12 -04:00
Ibrahim HadeedandGitHub 4e9bc95fff feat(music-controls): add music controls plugin support (#494) 2016-08-27 14:35:06 -04:00
Ibrahim Hadeed ad57733daf feat(canvas-camera): add CanvasCamera support 2016-08-27 14:15:15 -04:00
Ibrahim Hadeed f4acc35cba chore(): fix plugin:create 2016-08-27 14:02:29 -04:00
Ibrahim Hadeed f2cf1d4e03 chore(): add minimal template 2016-08-27 13:03:39 -04:00
Ibrahim Hadeed b91740a91a docs(): add private to extra classes 2016-08-27 12:33:02 -04:00
Ibrahim Hadeed a006cdb77b chore(): update changelog 2016-08-27 02:12:47 -04:00
Ibrahim Hadeed c93d95132d 1.3.19 2016-08-27 02:11:09 -04:00
Ibrahim Hadeed dd0c9baffd fix(mixpanel): implement CordovaProperty correctly 2016-08-27 02:10:50 -04:00
Ibrahim Hadeed 661276467c refractor(streaming-media): refractor to resolve duplicate 2016-08-27 02:08:16 -04:00
Ibrahim HadeedandGitHub cf8e3420c0 feat(mixpanel): add mixpanel support (#492) 2016-08-27 02:05:35 -04:00
Ibrahim HadeedandGitHub 9fe5c196aa feat(paypal): add PayPal support (#491) 2016-08-27 02:04:11 -04:00
Ibrahim HadeedandGitHub 76aa8a6494 feat(nfc): add nfc support (#493)
* feat(nfc): add nfc plugin

addresses #412

* feat(nfc): add nfc support
2016-08-27 02:03:06 -04:00
Ibrahim HadeedandGitHub 9bcc4ed80f feat(market): add Market plugin support (#490) 2016-08-27 02:02:30 -04:00
Ibrahim HadeedandGitHub cd82a5393e feat(power-management): add power management support (#489) 2016-08-27 02:02:23 -04:00
Ibrahim HadeedandGitHub 00d87dba98 feat(native-page-transitions): add support for Native Page Transitions plugin (#488) 2016-08-27 02:02:13 -04:00
Ibrahim HadeedandGitHub 759f8ef910 feat(call-number): add support for CallNumber plugin (#487) 2016-08-27 02:02:07 -04:00
Ibrahim HadeedandGitHub 841b242fb9 feat(streaming-media): add streaming media support (#486) 2016-08-27 02:01:59 -04:00
Ibrahim Hadeed ae03d7237e Merge branch 'master' of https://github.com/driftyco/ionic-native 2016-08-26 13:48:06 -04:00
Ibrahim Hadeed ff64c6e363 docs(diagnostic): add return types to docs 2016-08-26 13:14:13 -04:00
Alex MuramotoandIbrahim Hadeed 820e4d78bf docs(geofence): remove code comments (#483) 2016-08-26 13:09:12 -04:00
Ibrahim Hadeed c7a5f7d023 docs(): add description tag 2016-08-26 13:08:13 -04:00
Matt Lewis f2bf2b5626 refactor: use es6 features in index file 2016-08-19 08:34:12 +01:00
201 changed files with 17871 additions and 6894 deletions
+8 -7
View File
@@ -1,18 +1,19 @@
# Contributing to Ionic Native
## 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.
## Have an issue?
#### 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
* **Check that you are using the latest version of** `ionic-native`
* 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/v2/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@latest`
###### Still having problems? submit an issue with the following details:
* Short description of the issue
* Steps to reproduce
* Stack trace (if available)
## 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.
+2
View File
@@ -1,5 +1,7 @@
.DS_Store
node_modules/
.idea
.tmp
aot/
dist/
scripts/ionic-native-bower
+701 -27
View File
@@ -1,3 +1,666 @@
<a name="2.8.0"></a>
# [2.8.0](https://github.com/driftyco/ionic-native/compare/v2.7.0...v2.8.0) (2017-03-04)
### Bug Fixes
* **file:** fix return types ([b458327](https://github.com/driftyco/ionic-native/commit/b458327)), closes [#1139](https://github.com/driftyco/ionic-native/issues/1139)
### Features
* **app-preferences:** added cordova-plugin-app-preferences support ([#1084](https://github.com/driftyco/ionic-native/issues/1084)) ([12280dd](https://github.com/driftyco/ionic-native/commit/12280dd))
* **health:** add wrapper for cordova-plugin-health ([#1039](https://github.com/driftyco/ionic-native/issues/1039)) ([3500d80](https://github.com/driftyco/ionic-native/commit/3500d80))
* **photo-library:** added cordova-plugin-photo-library ([#1102](https://github.com/driftyco/ionic-native/issues/1102)) ([384dfc2](https://github.com/driftyco/ionic-native/commit/384dfc2))
<a name="2.7.0"></a>
# [2.7.0](https://github.com/driftyco/ionic-native/compare/v2.6.0...v2.7.0) (2017-03-02)
### Bug Fixes
* **core:** dont check if method exists when overriding ([754c5ec](https://github.com/driftyco/ionic-native/commit/754c5ec)), closes [#1043](https://github.com/driftyco/ionic-native/issues/1043)
* **file:** fix writeExistingFile ([47f48ba](https://github.com/driftyco/ionic-native/commit/47f48ba)), closes [#1044](https://github.com/driftyco/ionic-native/issues/1044)
### Features
* **background-mode:** add missing functions ([906401b](https://github.com/driftyco/ionic-native/commit/906401b)), closes [#1078](https://github.com/driftyco/ionic-native/issues/1078)
* **background-mode:** replace event listeners with on method ([ffdbab7](https://github.com/driftyco/ionic-native/commit/ffdbab7))
* **diagnostic:** add new methods ([5144345](https://github.com/driftyco/ionic-native/commit/5144345)), closes [#1045](https://github.com/driftyco/ionic-native/issues/1045)
<a name="2.6.0"></a>
# [2.6.0](https://github.com/driftyco/ionic-native/compare/v2.5.1...v2.6.0) (2017-03-02)
### Bug Fixes
* **apprate:** add missing Windows Store option ([#1072](https://github.com/driftyco/ionic-native/issues/1072)) ([439ccee](https://github.com/driftyco/ionic-native/commit/439ccee))
* **background-geolocation:** configure returns a promise ([fc87992](https://github.com/driftyco/ionic-native/commit/fc87992)), closes [#1118](https://github.com/driftyco/ionic-native/issues/1118)
* **contacts:** allow passing asterisk as contact field type ([9c5b593](https://github.com/driftyco/ionic-native/commit/9c5b593)), closes [#1093](https://github.com/driftyco/ionic-native/issues/1093)
* **contacts:** allow passing asterisk as contact field type ([2639486](https://github.com/driftyco/ionic-native/commit/2639486))
* **facebook:** fixes issue when not supplying default params ([#1088](https://github.com/driftyco/ionic-native/issues/1088)) ([85a3a40](https://github.com/driftyco/ionic-native/commit/85a3a40))
* **file:** add missing exports ([#1101](https://github.com/driftyco/ionic-native/issues/1101)) ([23b97f6](https://github.com/driftyco/ionic-native/commit/23b97f6))
* **file:** platform Browser will raise a an DOMException ([#1082](https://github.com/driftyco/ionic-native/issues/1082)) ([2fba915](https://github.com/driftyco/ionic-native/commit/2fba915))
* **file:** remove FileError from return type ([#1086](https://github.com/driftyco/ionic-native/issues/1086)) ([c1748bb](https://github.com/driftyco/ionic-native/commit/c1748bb))
* **imagepicker:** add outputType option ([#1098](https://github.com/driftyco/ionic-native/issues/1098)) ([b4b7cfa](https://github.com/driftyco/ionic-native/commit/b4b7cfa))
* **media:** add missing pauseRecord and resumeRecord methods ([#1122](https://github.com/driftyco/ionic-native/issues/1122)) ([234ed6e](https://github.com/driftyco/ionic-native/commit/234ed6e))
* **plugin:** revert changes to support stable version ([#1116](https://github.com/driftyco/ionic-native/issues/1116)) ([104532e](https://github.com/driftyco/ionic-native/commit/104532e)), closes [#1001](https://github.com/driftyco/ionic-native/issues/1001)
* **push:** add the missing option clearBadge ([#1087](https://github.com/driftyco/ionic-native/issues/1087)) ([70847d1](https://github.com/driftyco/ionic-native/commit/70847d1))
* **serial:** Serial.requestPermission() options are optional ([#1128](https://github.com/driftyco/ionic-native/issues/1128)) ([da72500](https://github.com/driftyco/ionic-native/commit/da72500))
* **zip:** progress callback is optional ([#1049](https://github.com/driftyco/ionic-native/issues/1049)) ([83f57b9](https://github.com/driftyco/ionic-native/commit/83f57b9))
### Features
* **alipay:** add alipay support. ([#1097](https://github.com/driftyco/ionic-native/issues/1097)) ([2eea3df](https://github.com/driftyco/ionic-native/commit/2eea3df))
* **app-update:** add cordova-plugin-app-update support ([#1105](https://github.com/driftyco/ionic-native/issues/1105)) ([21d4088](https://github.com/driftyco/ionic-native/commit/21d4088))
* **appodeal:** adds Appodeal SDK wrappers for iOS and Android ([#1031](https://github.com/driftyco/ionic-native/issues/1031)) ([fd8107b](https://github.com/driftyco/ionic-native/commit/fd8107b))
* **background-fetch:** Adding Background Fetch requested in [#990](https://github.com/driftyco/ionic-native/issues/990) ([#1013](https://github.com/driftyco/ionic-native/issues/1013)) ([57e2691](https://github.com/driftyco/ionic-native/commit/57e2691))
* **browser-tab:** add browser tab plugin ([#1126](https://github.com/driftyco/ionic-native/issues/1126)) ([8de3793](https://github.com/driftyco/ionic-native/commit/8de3793)), closes [#1115](https://github.com/driftyco/ionic-native/issues/1115)
* **couchbase-lite:** add CouchbaseLite cordova plugin ([#1025](https://github.com/driftyco/ionic-native/issues/1025)) ([09a7dcf](https://github.com/driftyco/ionic-native/commit/09a7dcf))
* **file:** add system paths ([f0e2195](https://github.com/driftyco/ionic-native/commit/f0e2195))
* **google-maps:** add constant for map type ([318ad3f](https://github.com/driftyco/ionic-native/commit/318ad3f))
* **gyroscope:** add Gyroscope plugin ([#1004](https://github.com/driftyco/ionic-native/issues/1004)) ([0378b1d](https://github.com/driftyco/ionic-native/commit/0378b1d))
* **inappbrowser:** add interface for IAB options ([#1065](https://github.com/driftyco/ionic-native/issues/1065)) ([f4b8236](https://github.com/driftyco/ionic-native/commit/f4b8236))
* **local-notifications:** support for icon background color ([#1079](https://github.com/driftyco/ionic-native/issues/1079)) ([2a32624](https://github.com/driftyco/ionic-native/commit/2a32624))
* **text-to-speech:** Add stop method ([#1063](https://github.com/driftyco/ionic-native/issues/1063)) ([4f86320](https://github.com/driftyco/ionic-native/commit/4f86320))
* **unique-device-add:** add UniqueDeviceId plugin ([#1064](https://github.com/driftyco/ionic-native/issues/1064)) ([60db10c](https://github.com/driftyco/ionic-native/commit/60db10c))
<a name="2.5.1"></a>
## [2.5.1](https://github.com/driftyco/ionic-native/compare/v2.5.0...v2.5.1) (2017-02-07)
### Bug Fixes
* **pin-dialog:** add missing errorIndex ([b7701cd](https://github.com/driftyco/ionic-native/commit/b7701cd))
<a name="2.5.0"></a>
# [2.5.0](https://github.com/driftyco/ionic-native/compare/v2.4.1...v2.5.0) (2017-02-07)
### Bug Fixes
* **file-transfer:** fix return type of upload method ([a5b4632](https://github.com/driftyco/ionic-native/commit/a5b4632)), closes [#1002](https://github.com/driftyco/ionic-native/issues/1002)
* **pinterest:** fix PinterestPin interface ([a03afcf](https://github.com/driftyco/ionic-native/commit/a03afcf))
* **safari-view-controller:** fix issue caused by calling show without options ([dc37d8f](https://github.com/driftyco/ionic-native/commit/dc37d8f))
### Features
* **background-geolocation:** add missing properties for Android ([f0cf860](https://github.com/driftyco/ionic-native/commit/f0cf860))
* **barcodescanner:** add option disableSuccessBeep ([#1035](https://github.com/driftyco/ionic-native/issues/1035)) ([97489ba](https://github.com/driftyco/ionic-native/commit/97489ba))
* **inappbrowser:** add hide function ([#1018](https://github.com/driftyco/ionic-native/issues/1018)) ([4ab87d8](https://github.com/driftyco/ionic-native/commit/4ab87d8))
<a name="2.4.1"></a>
## [2.4.1](https://github.com/driftyco/ionic-native/compare/v2.4.0...v2.4.1) (2017-01-24)
### Bug Fixes
* **screen-orientation:** lockOrientation returns a promise ([1c09ee1](https://github.com/driftyco/ionic-native/commit/1c09ee1)), closes [#939](https://github.com/driftyco/ionic-native/issues/939)
<a name="2.4.0"></a>
# [2.4.0](https://github.com/driftyco/ionic-native/compare/v2.3.3...v2.4.0) (2017-01-24)
<a name="2.3.3"></a>
## [2.3.3](https://github.com/driftyco/ionic-native/compare/v2.3.2...v2.3.3) (2017-01-24)
### Bug Fixes
* **google-maps:** fix event listeners ([416071a](https://github.com/driftyco/ionic-native/commit/416071a)), closes [#999](https://github.com/driftyco/ionic-native/issues/999)
### Features
* **pinterest:** add pinterest plugin ([466437a](https://github.com/driftyco/ionic-native/commit/466437a))
<a name="2.3.2"></a>
## [2.3.2](https://github.com/driftyco/ionic-native/compare/v2.3.1...v2.3.2) (2017-01-24)
### Bug Fixes
* **googlemaps:** fix GoogleMapsLaLngBounds ([c3127d3](https://github.com/driftyco/ionic-native/commit/c3127d3)), closes [#972](https://github.com/driftyco/ionic-native/issues/972)
<a name="2.3.1"></a>
## [2.3.1](https://github.com/driftyco/ionic-native/compare/v2.3.0...v2.3.1) (2017-01-22)
### Bug Fixes
* add clearAllNotifications() ([8c021bc](https://github.com/driftyco/ionic-native/commit/8c021bc))
* **battery-status:** add missing pluginRef ([3da0efe](https://github.com/driftyco/ionic-native/commit/3da0efe))
* **core:** fix exception in CordovaProperty ([#998](https://github.com/driftyco/ionic-native/issues/998)) ([cb29363](https://github.com/driftyco/ionic-native/commit/cb29363)), closes [#992](https://github.com/driftyco/ionic-native/issues/992)
* **core:** fix plugin check ([da7a370](https://github.com/driftyco/ionic-native/commit/da7a370))
* **plugin:** adds subscribe() and unsubscribe() ([94025a7](https://github.com/driftyco/ionic-native/commit/94025a7))
### Features
* **core:** add PluginConfig interface ([b983de2](https://github.com/driftyco/ionic-native/commit/b983de2)), closes [#996](https://github.com/driftyco/ionic-native/issues/996)
* **google-maps:** add base class functions ([#993](https://github.com/driftyco/ionic-native/issues/993)) ([9f98f8e](https://github.com/driftyco/ionic-native/commit/9f98f8e))
<a name="2.3.0"></a>
# [2.3.0](https://github.com/driftyco/ionic-native/compare/v2.2.17...v2.3.0) (2017-01-20)
### Bug Fixes
* **native-geocoder:** fix callback order ([dbf95ea](https://github.com/driftyco/ionic-native/commit/dbf95ea))
### Features
* **backlight:** add Backlight plugin ([#973](https://github.com/driftyco/ionic-native/issues/973)) ([1279114](https://github.com/driftyco/ionic-native/commit/1279114))
* **broadcaster:** add Broadcaster plugin ([#877](https://github.com/driftyco/ionic-native/issues/877)) ([1e38a6c](https://github.com/driftyco/ionic-native/commit/1e38a6c))
* **fingerprint-aio:** add cordova-plugin-fingerprint-aio ([#845](https://github.com/driftyco/ionic-native/issues/845)) ([1615b74](https://github.com/driftyco/ionic-native/commit/1615b74))
* **firebase:** add firebase plugin ([#914](https://github.com/driftyco/ionic-native/issues/914)) ([8e98481](https://github.com/driftyco/ionic-native/commit/8e98481)), closes [#608](https://github.com/driftyco/ionic-native/issues/608)
* **launch-review:** add LaunchReview plugin ([#949](https://github.com/driftyco/ionic-native/issues/949)) ([9c75a06](https://github.com/driftyco/ionic-native/commit/9c75a06))
* **nativegeocoder:** add NativeGeocoder plugin ([#800](https://github.com/driftyco/ionic-native/issues/800)) ([911537b](https://github.com/driftyco/ionic-native/commit/911537b))
* **navigationbar:** add NavigationBar plugin ([#826](https://github.com/driftyco/ionic-native/issues/826)) ([70c15c3](https://github.com/driftyco/ionic-native/commit/70c15c3))
* **rollbar:** add Rollbar plugin ([#832](https://github.com/driftyco/ionic-native/issues/832)) ([229f550](https://github.com/driftyco/ionic-native/commit/229f550))
* **serial:** add Serial plugin ([#952](https://github.com/driftyco/ionic-native/issues/952)) ([ac748ab](https://github.com/driftyco/ionic-native/commit/ac748ab))
* **speech-recognition:** add SpeechRecognition plugin ([#897](https://github.com/driftyco/ionic-native/issues/897)) ([7c30718](https://github.com/driftyco/ionic-native/commit/7c30718))
* **stripe:** add stripe plugin ([#913](https://github.com/driftyco/ionic-native/issues/913)) ([0ec46b0](https://github.com/driftyco/ionic-native/commit/0ec46b0))
<a name="2.2.17"></a>
## [2.2.17](https://github.com/driftyco/ionic-native/compare/v2.2.16...v2.2.17) (2017-01-20)
### Bug Fixes
* **app-rate:** onRateDialogShow callback ([#985](https://github.com/driftyco/ionic-native/issues/985)) ([ab681cc](https://github.com/driftyco/ionic-native/commit/ab681cc))
* **core:** increase deviceready timeout for sanity ([0ab14a0](https://github.com/driftyco/ionic-native/commit/0ab14a0))
### Features
* **barcodescanner:** add missing options ([#966](https://github.com/driftyco/ionic-native/issues/966)) ([e902856](https://github.com/driftyco/ionic-native/commit/e902856)), closes [#965](https://github.com/driftyco/ionic-native/issues/965)
<a name="2.2.16"></a>
## [2.2.16](https://github.com/driftyco/ionic-native/compare/v2.2.15...v2.2.16) (2017-01-11)
<a name="2.2.15"></a>
## [2.2.15](https://github.com/driftyco/ionic-native/compare/v2.2.14...v2.2.15) (2017-01-11)
### Bug Fixes
* **apprate:** captialize URL in storeAppURL property ([b98fa28](https://github.com/driftyco/ionic-native/commit/b98fa28))
* **ble:** stopScan takes no args when used as clear function ([#944](https://github.com/driftyco/ionic-native/issues/944)) ([6ddd2aa](https://github.com/driftyco/ionic-native/commit/6ddd2aa))
* **onesignal:** OSNotification.app_id is optional ([#946](https://github.com/driftyco/ionic-native/issues/946)) ([ebf0716](https://github.com/driftyco/ionic-native/commit/ebf0716))
<a name="2.2.14"></a>
## [2.2.14](https://github.com/driftyco/ionic-native/compare/v2.2.13...v2.2.14) (2017-01-07)
### Bug Fixes
* **google-analytics:** fix startTrackerWithId when interval is not provided ([49fe24d](https://github.com/driftyco/ionic-native/commit/49fe24d))
* **google-plus:** fixes login without options ([ca14bf6](https://github.com/driftyco/ionic-native/commit/ca14bf6)), closes [#932](https://github.com/driftyco/ionic-native/issues/932)
* **inappbrowser:** fix insertCSS method name ([de07df6](https://github.com/driftyco/ionic-native/commit/de07df6)), closes [#921](https://github.com/driftyco/ionic-native/issues/921)
* **mixpanel:** fix issue when not passing eventProperties ([#927](https://github.com/driftyco/ionic-native/issues/927)) ([bbf75bc](https://github.com/driftyco/ionic-native/commit/bbf75bc))
* **nfc:** add missing param for addMimeTypeListener ([#937](https://github.com/driftyco/ionic-native/issues/937)) ([ca60c5b](https://github.com/driftyco/ionic-native/commit/ca60c5b))
* **push:** fix typing for additionalData ([0d6997c](https://github.com/driftyco/ionic-native/commit/0d6997c)), closes [#868](https://github.com/driftyco/ionic-native/issues/868)
### Features
* **background-geolocation:** add altitudeAccuracy into response typings ([#922](https://github.com/driftyco/ionic-native/issues/922)) ([8eb656c](https://github.com/driftyco/ionic-native/commit/8eb656c))
* **market:** add search method, return promises ([d62779a](https://github.com/driftyco/ionic-native/commit/d62779a))
<a name="2.2.13"></a>
## [2.2.13](https://github.com/driftyco/ionic-native/compare/v2.2.12...v2.2.13) (2016-12-27)
### Bug Fixes
* **admob:** add adId prop to AdMobOptions ([d5dfdf8](https://github.com/driftyco/ionic-native/commit/d5dfdf8))
* **background-mode:** isEnabled and isActive return booleans ([ba77fd7](https://github.com/driftyco/ionic-native/commit/ba77fd7)), closes [#908](https://github.com/driftyco/ionic-native/issues/908)
* **diagnostic:** add missing types ([1841220](https://github.com/driftyco/ionic-native/commit/1841220)), closes [#905](https://github.com/driftyco/ionic-native/issues/905)
* **diagnostic:** add permissionStatus types ([#890](https://github.com/driftyco/ionic-native/issues/890)) ([3385c1b](https://github.com/driftyco/ionic-native/commit/3385c1b))
### Features
* **android-fingerprint-auth:** update to v1.2.1 ([#910](https://github.com/driftyco/ionic-native/issues/910)) ([a1b0f88](https://github.com/driftyco/ionic-native/commit/a1b0f88))
* **nfc:** add new functions ([#853](https://github.com/driftyco/ionic-native/issues/853)) ([c44fb75](https://github.com/driftyco/ionic-native/commit/c44fb75))
* **onesignal:** improve typings ([#888](https://github.com/driftyco/ionic-native/issues/888)) ([56e8eae](https://github.com/driftyco/ionic-native/commit/56e8eae))
* **sim:** add new methods ([#894](https://github.com/driftyco/ionic-native/issues/894)) ([0c36988](https://github.com/driftyco/ionic-native/commit/0c36988))
<a name="2.2.12"></a>
## [2.2.12](https://github.com/driftyco/ionic-native/compare/v2.2.11...v2.2.12) (2016-12-16)
### Bug Fixes
* **camera-preview:** parameter size is optional ([#871](https://github.com/driftyco/ionic-native/issues/871)) ([61dc8aa](https://github.com/driftyco/ionic-native/commit/61dc8aa))
* **diagnostic:** permissionStatus gets values from plugin in runtime ([9986e0d](https://github.com/driftyco/ionic-native/commit/9986e0d)), closes [#872](https://github.com/driftyco/ionic-native/issues/872)
* **network:** update API ([ec5e27b](https://github.com/driftyco/ionic-native/commit/ec5e27b))
* **sms:** fix callback index when omitting options param ([114a74d](https://github.com/driftyco/ionic-native/commit/114a74d)), closes [#858](https://github.com/driftyco/ionic-native/issues/858)
### Features
* **admob:** update api and docs ([6ba1d49](https://github.com/driftyco/ionic-native/commit/6ba1d49))
<a name="2.2.11"></a>
## [2.2.11](https://github.com/driftyco/ionic-native/compare/v2.2.10...v2.2.11) (2016-12-06)
### Bug Fixes
* **cordova-property:** fixes static properties of classes ([7ae6e10](https://github.com/driftyco/ionic-native/commit/7ae6e10))
* **device:** fixes device plugin ([d918844](https://github.com/driftyco/ionic-native/commit/d918844))
### BREAKING CHANGES
* device: device property no longer exists
<a name="2.2.10"></a>
## [2.2.10](https://github.com/driftyco/ionic-native/compare/v2.2.9...v2.2.10) (2016-12-04)
### Bug Fixes
* **contacts:** fix few bugs in Contacts ([#846](https://github.com/driftyco/ionic-native/issues/846)) ([b19f6d1](https://github.com/driftyco/ionic-native/commit/b19f6d1))
* **sqlite:** add static constructor, and fix resolve type ([#697](https://github.com/driftyco/ionic-native/issues/697)) ([9082c5e](https://github.com/driftyco/ionic-native/commit/9082c5e))
### Features
* **actionsheet:** add ActionSheetOptions interface ([f211da7](https://github.com/driftyco/ionic-native/commit/f211da7))
* **googlemap:** add disableAutoPan to GoogleMapsMarkerOptions ([cf75a53](https://github.com/driftyco/ionic-native/commit/cf75a53)), closes [#844](https://github.com/driftyco/ionic-native/issues/844)
* **googlemaps:** add markerClick and infoClick to MarkerOptions ([6f7171d](https://github.com/driftyco/ionic-native/commit/6f7171d))
<a name="2.2.9"></a>
## [2.2.9](https://github.com/driftyco/ionic-native/compare/v2.2.8...v2.2.9) (2016-12-01)
<a name="2.2.8"></a>
## [2.2.8](https://github.com/driftyco/ionic-native/compare/v2.2.7...v2.2.8) (2016-12-01)
### Bug Fixes
* add return ([3fdc4a8](https://github.com/driftyco/ionic-native/commit/3fdc4a8))
* **card-io:** fix typo in options ([e6700a3](https://github.com/driftyco/ionic-native/commit/e6700a3))
* **globalization:** add missing parameter to numberToString function ([1072ab1](https://github.com/driftyco/ionic-native/commit/1072ab1)), closes [#835](https://github.com/driftyco/ionic-native/issues/835)
* **headercolor:** solve typo in usage and chore ([bab2971](https://github.com/driftyco/ionic-native/commit/bab2971))
### Features
* **card-io:** add typing for response ([2e82320](https://github.com/driftyco/ionic-native/commit/2e82320))
<a name="2.2.7"></a>
## [2.2.7](https://github.com/driftyco/ionic-native/compare/v2.2.5...v2.2.7) (2016-11-24)
### Bug Fixes
* **3dTouch:** fixes onHomeIconPressed ([#813](https://github.com/driftyco/ionic-native/issues/813)) ([695099b](https://github.com/driftyco/ionic-native/commit/695099b))
* **camera-preview:** formatting. Closes [#790](https://github.com/driftyco/ionic-native/issues/790) ([5577c51](https://github.com/driftyco/ionic-native/commit/5577c51))
* **datepicker:** fix allowOldDates option ([#761](https://github.com/driftyco/ionic-native/issues/761)) ([fa03fa5](https://github.com/driftyco/ionic-native/commit/fa03fa5))
* **diagnostics:** fix [#776](https://github.com/driftyco/ionic-native/issues/776) ([#777](https://github.com/driftyco/ionic-native/issues/777)) ([01b30c6](https://github.com/driftyco/ionic-native/commit/01b30c6))
* **file:** correct writeFile flags ([9bd8997](https://github.com/driftyco/ionic-native/commit/9bd8997)), closes [#789](https://github.com/driftyco/ionic-native/issues/789)
* **googlemap:** fix typoe googledesic to geodesic ([78b3ec5](https://github.com/driftyco/ionic-native/commit/78b3ec5)), closes [#765](https://github.com/driftyco/ionic-native/issues/765)
* **native-audio:** completeCallback is optional on play method ([b719a03](https://github.com/driftyco/ionic-native/commit/b719a03)), closes [#792](https://github.com/driftyco/ionic-native/issues/792)
* **nfc:** don't bind to name field, fix [#740](https://github.com/driftyco/ionic-native/issues/740) ([#749](https://github.com/driftyco/ionic-native/issues/749)) ([ca43394](https://github.com/driftyco/ionic-native/commit/ca43394))
* **plugin:** don't bind to name field. Fixes [#740](https://github.com/driftyco/ionic-native/issues/740) ([71916a8](https://github.com/driftyco/ionic-native/commit/71916a8))
* **video-player:** scalingMode is number ([f07431a](https://github.com/driftyco/ionic-native/commit/f07431a)), closes [#774](https://github.com/driftyco/ionic-native/issues/774)
### Features
* **camera-preview:** add disable method ([6ad54ec](https://github.com/driftyco/ionic-native/commit/6ad54ec))
* **google-analytics:** new interval period parameter ([abd910d](https://github.com/driftyco/ionic-native/commit/abd910d)), closes [#816](https://github.com/driftyco/ionic-native/issues/816)
* **google-map:** add get and set methods to Marker class ([51ab03d](https://github.com/driftyco/ionic-native/commit/51ab03d)), closes [#798](https://github.com/driftyco/ionic-native/issues/798)
* **headercolor:** add HeaderColor plugin ([93696d5](https://github.com/driftyco/ionic-native/commit/93696d5)), closes [#760](https://github.com/driftyco/ionic-native/issues/760)
<a name="2.2.5"></a>
## [2.2.5](https://github.com/driftyco/ionic-native/compare/v2.2.4...v2.2.5) (2016-10-27)
### Bug Fixes
* **3dtouch:** add missing property ([#739](https://github.com/driftyco/ionic-native/issues/739)) ([757d096](https://github.com/driftyco/ionic-native/commit/757d096))
* **geolocation:** fix watchPosition return type ([d5310b0](https://github.com/driftyco/ionic-native/commit/d5310b0)), closes [#741](https://github.com/driftyco/ionic-native/issues/741)
* **nfc:** fix Ndef class ([ac181c5](https://github.com/driftyco/ionic-native/commit/ac181c5)), closes [#713](https://github.com/driftyco/ionic-native/issues/713)
* **sqlite:** check if plugin exists before opening database ([6f47371](https://github.com/driftyco/ionic-native/commit/6f47371))
* **sqlite:** check if plugin exists before opening database ([c98b4f4](https://github.com/driftyco/ionic-native/commit/c98b4f4))
* **sqlite:** fix callback issue with transaction method ([a72cd59](https://github.com/driftyco/ionic-native/commit/a72cd59)), closes [#732](https://github.com/driftyco/ionic-native/issues/732)
### Features
* **diagnostic:** add missing functions ([eb03de9](https://github.com/driftyco/ionic-native/commit/eb03de9)), closes [#743](https://github.com/driftyco/ionic-native/issues/743)
* **filepath:** add cordova-plugin-filepath ([#714](https://github.com/driftyco/ionic-native/issues/714)) ([0660a3b](https://github.com/driftyco/ionic-native/commit/0660a3b))
* **plugins:** add name field ([9677656](https://github.com/driftyco/ionic-native/commit/9677656))
* **sms:** add hasPermission method ([8fbf1f2](https://github.com/driftyco/ionic-native/commit/8fbf1f2)), closes [#721](https://github.com/driftyco/ionic-native/issues/721)
<a name="2.2.4"></a>
## [2.2.4](https://github.com/driftyco/ionic-native/compare/v2.2.3...v2.2.4) (2016-10-15)
### Bug Fixes
* **sqlite:** fix callback order for transaction ([#700](https://github.com/driftyco/ionic-native/issues/700)) ([799e2f0](https://github.com/driftyco/ionic-native/commit/799e2f0))
### Features
* **device-feedback:** add DeviceFeedback plugin ([#696](https://github.com/driftyco/ionic-native/issues/696)) ([bbda6e2](https://github.com/driftyco/ionic-native/commit/bbda6e2))
* **image-picker:** add new android methods ([3edfafb](https://github.com/driftyco/ionic-native/commit/3edfafb))
* **mixpanel:** MixpanelPeople returns promises ([#681](https://github.com/driftyco/ionic-native/issues/681)) ([b95f88c](https://github.com/driftyco/ionic-native/commit/b95f88c)), closes [#667](https://github.com/driftyco/ionic-native/issues/667)
<a name="2.2.3"></a>
## [2.2.3](https://github.com/driftyco/ionic-native/compare/v2.2.2...v2.2.3) (2016-10-14)
### Bug Fixes
* **googlemaps:** Expose 'type' property in GoogleMapsLatLngBounds [#693](https://github.com/driftyco/ionic-native/issues/693) ([#694](https://github.com/driftyco/ionic-native/issues/694)) ([74a252b](https://github.com/driftyco/ionic-native/commit/74a252b))
* **onesignal:** update to match latest API version ([#691](https://github.com/driftyco/ionic-native/issues/691)) ([babfb0d](https://github.com/driftyco/ionic-native/commit/babfb0d))
<a name="2.2.2"></a>
## [2.2.2](https://github.com/driftyco/ionic-native/compare/v2.2.1...v2.2.2) (2016-10-12)
### Bug Fixes
* **file:** getFreeDiskSpace now works ([d2f42ef](https://github.com/driftyco/ionic-native/commit/d2f42ef))
* **file:** read methods can accept Blobs too ([276d61b](https://github.com/driftyco/ionic-native/commit/276d61b))
### Features
* **file:** getFile and getDirectory are now public ([5c92455](https://github.com/driftyco/ionic-native/commit/5c92455)), closes [#657](https://github.com/driftyco/ionic-native/issues/657)
<a name="2.2.1"></a>
## [2.2.1](https://github.com/driftyco/ionic-native/compare/v2.2.0...v2.2.1) (2016-10-12)
### Bug Fixes
* **diagnostic:** misspelled getContactsAuthorizationStatus method ([#678](https://github.com/driftyco/ionic-native/issues/678)) ([bff4862](https://github.com/driftyco/ionic-native/commit/bff4862))
* **file:** fix writeFile method ([842a80d](https://github.com/driftyco/ionic-native/commit/842a80d))
* **file:** last parameter for writeFile now only accepts options ([5710eb7](https://github.com/driftyco/ionic-native/commit/5710eb7))
* **http:** export via window.IonicNative ([#675](https://github.com/driftyco/ionic-native/issues/675)) ([cf7abe1](https://github.com/driftyco/ionic-native/commit/cf7abe1))
* **location-accuracy:** accuracy param is number ([c2d4f1c](https://github.com/driftyco/ionic-native/commit/c2d4f1c)), closes [#676](https://github.com/driftyco/ionic-native/issues/676)
* **themeablebrowser:** add missed options ([#680](https://github.com/driftyco/ionic-native/issues/680)) ([e28e5b0](https://github.com/driftyco/ionic-native/commit/e28e5b0))
### Features
* **file:** resolveLocalFilesystemUrl and resolveDirectoryUrl are now public methods ([542ff4c](https://github.com/driftyco/ionic-native/commit/542ff4c)), closes [#657](https://github.com/driftyco/ionic-native/issues/657)
<a name="2.2.0"></a>
# [2.2.0](https://github.com/driftyco/ionic-native/compare/v2.1.9...v2.2.0) (2016-10-11)
### Bug Fixes
* **native-transitions:** add missing interface properties ([35c8bbd](https://github.com/driftyco/ionic-native/commit/35c8bbd))
* **onesignal:** update to match latest api ([#671](https://github.com/driftyco/ionic-native/issues/671)) ([7c6e6d8](https://github.com/driftyco/ionic-native/commit/7c6e6d8)), closes [#667](https://github.com/driftyco/ionic-native/issues/667)
### Features
* **http:** add cordovaHTTP wrapper ([#674](https://github.com/driftyco/ionic-native/issues/674)) ([f0961c7](https://github.com/driftyco/ionic-native/commit/f0961c7))
<a name="2.1.9"></a>
## [2.1.9](https://github.com/driftyco/ionic-native/compare/v2.1.7...v2.1.9) (2016-10-09)
### Bug Fixes
* **googlemaps:** fixes GoogleMapsLatLng class ([11653ce](https://github.com/driftyco/ionic-native/commit/11653ce))
* **paypal:** add optional details param to paypalpayment ([7200845](https://github.com/driftyco/ionic-native/commit/7200845))
* **paypal:** problems with selection of PayPal environment ([#662](https://github.com/driftyco/ionic-native/issues/662)) ([3dd6a92](https://github.com/driftyco/ionic-native/commit/3dd6a92))
* **thmeable-browser:** fix the name of the plugin ([#663](https://github.com/driftyco/ionic-native/issues/663)) ([1368175](https://github.com/driftyco/ionic-native/commit/1368175))
<a name="2.1.7"></a>
## [2.1.7](https://github.com/driftyco/ionic-native/compare/v2.1.6...v2.1.7) (2016-10-07)
### Bug Fixes
* **paypal:** fixed currency code not found issue ([#653](https://github.com/driftyco/ionic-native/issues/653)) ([598f8a9](https://github.com/driftyco/ionic-native/commit/598f8a9))
<a name="2.1.6"></a>
## [2.1.6](https://github.com/driftyco/ionic-native/compare/v2.1.3...v2.1.6) (2016-10-06)
### Bug Fixes
* **google-analytics:** specify successIndex and errorIndex for methods with optional params ([6f23bef](https://github.com/driftyco/ionic-native/commit/6f23bef))
* **paypal:** fix helper classes ([f002657](https://github.com/driftyco/ionic-native/commit/f002657))
<a name="2.1.3"></a>
## [2.1.3](https://github.com/driftyco/ionic-native/compare/v2.1.2...v2.1.3) (2016-10-06)
### Bug Fixes
* **google-analytics:** add missing methods, fix return types ([77b0277](https://github.com/driftyco/ionic-native/commit/77b0277))
* **google-analytics:** add newSession param ([f62e108](https://github.com/driftyco/ionic-native/commit/f62e108))
* **google-analytics:** fix depreciated plugin reference ([40325ca](https://github.com/driftyco/ionic-native/commit/40325ca))
<a name="2.1.2"></a>
## [2.1.2](https://github.com/driftyco/ionic-native/compare/v2.1.0...v2.1.2) (2016-10-06)
### Bug Fixes
* **googlemaps:** add missing properties ([72a694a](https://github.com/driftyco/ionic-native/commit/72a694a)), closes [#642](https://github.com/driftyco/ionic-native/issues/642)
### Features
* **zBar:** add zBar barcode scanner plugin ([#634](https://github.com/driftyco/ionic-native/issues/634)) ([bbbbb3e](https://github.com/driftyco/ionic-native/commit/bbbbb3e))
<a name="2.1.0"></a>
# [2.1.0](https://github.com/driftyco/ionic-native/compare/v2.0.3...v2.1.0) (2016-10-03)
### Bug Fixes
* **calendar:** fixed modifyEventWithOptions and related interface ([80ff2f3](https://github.com/driftyco/ionic-native/commit/80ff2f3))
* **googlemaps:** CameraPosition target can now be GoogleMapsLatLng[] ([#587](https://github.com/driftyco/ionic-native/issues/587)) ([8d21f5f](https://github.com/driftyco/ionic-native/commit/8d21f5f))
* **googlemaps:** typo in GoogleMapsTileOverlayOptions ([#589](https://github.com/driftyco/ionic-native/issues/589)) ([be2c198](https://github.com/driftyco/ionic-native/commit/be2c198))
* **isdebug:** export IsDebug class ([#578](https://github.com/driftyco/ionic-native/issues/578)) ([c573332](https://github.com/driftyco/ionic-native/commit/c573332))
* **media:** add status as a parmeter instead of property of instance ([58a99a1](https://github.com/driftyco/ionic-native/commit/58a99a1))
* **paypal:** fix typings, add PayPalItem and PayPalPaymentDetails ([5d13ba0](https://github.com/driftyco/ionic-native/commit/5d13ba0))
* **power-management:** fix repo and pluginref ([#603](https://github.com/driftyco/ionic-native/issues/603)) ([d6060a9](https://github.com/driftyco/ionic-native/commit/d6060a9))
* **push:** Add support for passing notification id into finish ([#600](https://github.com/driftyco/ionic-native/issues/600)) ([16f05c3](https://github.com/driftyco/ionic-native/commit/16f05c3))
* **social-sharing:** shareWithOptions method signature ([#598](https://github.com/driftyco/ionic-native/issues/598)) ([2ed84b1](https://github.com/driftyco/ionic-native/commit/2ed84b1)), closes [/github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/blob/master/src/android/nl/xservices/plugins/SocialSharing.java#L209](https://github.com//github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/blob/master/src/android/nl/xservices/plugins/SocialSharing.java/issues/L209)
### Features
* **ble:** add startScanWithOptions ([79f0a3f](https://github.com/driftyco/ionic-native/commit/79f0a3f)), closes [#539](https://github.com/driftyco/ionic-native/issues/539)
* **googlemaps:** support bounds in Geocoder ([#599](https://github.com/driftyco/ionic-native/issues/599)) ([66e9e46](https://github.com/driftyco/ionic-native/commit/66e9e46))
* **location-accuracy:** add location accuracy plugin ([#583](https://github.com/driftyco/ionic-native/issues/583)) ([60b7c74](https://github.com/driftyco/ionic-native/commit/60b7c74)), closes [#484](https://github.com/driftyco/ionic-native/issues/484)
* **plugin:** add getPlugin to plugin interface. Fixes [#582](https://github.com/driftyco/ionic-native/issues/582) ([d45a2b5](https://github.com/driftyco/ionic-native/commit/d45a2b5))
* **plugin:** checkInstall w/ warning msg ([47112c7](https://github.com/driftyco/ionic-native/commit/47112c7))
* **stepcounter:** add stepcounter plugin ([#607](https://github.com/driftyco/ionic-native/issues/607)) ([a99b753](https://github.com/driftyco/ionic-native/commit/a99b753))
* **themable-browser:** add ThemableBrowser plugin ([b9151bc](https://github.com/driftyco/ionic-native/commit/b9151bc)), closes [#549](https://github.com/driftyco/ionic-native/issues/549)
* **themable-browser:** add ThemableBrowser plugin ([972d63b](https://github.com/driftyco/ionic-native/commit/972d63b)), closes [#549](https://github.com/driftyco/ionic-native/issues/549)
<a name="2.0.3"></a>
## [2.0.3](https://github.com/driftyco/ionic-native/compare/v1.3.21...v2.0.3) (2016-09-24)
### Bug Fixes
* **call-number:** number should be a string ([763ad1b](https://github.com/driftyco/ionic-native/commit/763ad1b)), closes [#545](https://github.com/driftyco/ionic-native/issues/545)
* **googlemaps:** CameraPosition target can now be LatLngBounds ([23fc908](https://github.com/driftyco/ionic-native/commit/23fc908)), closes [#547](https://github.com/driftyco/ionic-native/issues/547)
* **npm:** duplicate typings ([e50b961](https://github.com/driftyco/ionic-native/commit/e50b961))
* **plugins:** export VideoPlayer. Fixes [#563](https://github.com/driftyco/ionic-native/issues/563) ([4292959](https://github.com/driftyco/ionic-native/commit/4292959))
* **ts:** use old ts version for 1.3.x [#567](https://github.com/driftyco/ionic-native/issues/567) ([6a19c8c](https://github.com/driftyco/ionic-native/commit/6a19c8c))
* **webintent:** add type param. Fixes [#564](https://github.com/driftyco/ionic-native/issues/564) ([a0b6b10](https://github.com/driftyco/ionic-native/commit/a0b6b10))
### Features
* **background-geolocation:** add showAppSettings function ([281575b](https://github.com/driftyco/ionic-native/commit/281575b)), closes [#548](https://github.com/driftyco/ionic-native/issues/548)
* **BackgroundGeolocation:** code cleanup ([3170686](https://github.com/driftyco/ionic-native/commit/3170686))
* **BackgroundGeolocation:** Update to the latest version ([808a75e](https://github.com/driftyco/ionic-native/commit/808a75e))
* **BackgroundGeolocation:** Update to the latest version ([919e8da](https://github.com/driftyco/ionic-native/commit/919e8da))
* **build:** Support ES2015 modules ([4014972](https://github.com/driftyco/ionic-native/commit/4014972))
* **emailcomposer:** use new supported plugin. [#568](https://github.com/driftyco/ionic-native/issues/568) ([a092a31](https://github.com/driftyco/ionic-native/commit/a092a31))
* **localNotifications:** added register and has permission functions ([#536](https://github.com/driftyco/ionic-native/issues/536)) ([c83b043](https://github.com/driftyco/ionic-native/commit/c83b043))
* **npm:** typescript 2.0.2 ([e7e45f6](https://github.com/driftyco/ionic-native/commit/e7e45f6))
* **plugin:** cordova function override. fixes [#437](https://github.com/driftyco/ionic-native/issues/437) ([f60d08b](https://github.com/driftyco/ionic-native/commit/f60d08b))
* **push:** add coldstart property. Fixes [#559](https://github.com/driftyco/ionic-native/issues/559) ([48196da](https://github.com/driftyco/ionic-native/commit/48196da))
* **scripts:** publish script with npm and bower. Fixes [#448](https://github.com/driftyco/ionic-native/issues/448) ([3903fee](https://github.com/driftyco/ionic-native/commit/3903fee))
<a name="1.3.21"></a>
## [1.3.21](https://github.com/driftyco/ionic-native/compare/v1.3.20...v1.3.21) (2016-09-07)
### Bug Fixes
* **base64togallery:** fixes callbacks ([#513](https://github.com/driftyco/ionic-native/issues/513)) ([1db1374](https://github.com/driftyco/ionic-native/commit/1db1374))
* **diagnostic:** Add DENIED_ALWAYS to permissionStatus, also some code formatting ([9d573a9](https://github.com/driftyco/ionic-native/commit/9d573a9))
* **diagnostic:** Fix diagnostic objects ([cb176aa](https://github.com/driftyco/ionic-native/commit/cb176aa))
* **diagnostic:** Fix permissionStatus object ([8f3d36f](https://github.com/driftyco/ionic-native/commit/8f3d36f))
* **diagnostic:** Fix typo ([f93f958](https://github.com/driftyco/ionic-native/commit/f93f958))
* **file:** set exclusive to true when replace is false ([7910493](https://github.com/driftyco/ionic-native/commit/7910493)), closes [#516](https://github.com/driftyco/ionic-native/issues/516)
* **geolocation:** retain Observable even during an error condition ([#532](https://github.com/driftyco/ionic-native/issues/532)) ([26dead9](https://github.com/driftyco/ionic-native/commit/26dead9))
* **googlemaps:** moveCamera and animateCamera now return a Promise ([d03d70f](https://github.com/driftyco/ionic-native/commit/d03d70f)), closes [#511](https://github.com/driftyco/ionic-native/issues/511)
* **install-instructions:** This fixes install instructions for deeplinks, facebook and googlemaps ([#499](https://github.com/driftyco/ionic-native/issues/499)) ([877ac27](https://github.com/driftyco/ionic-native/commit/877ac27))
* **media:** nest the constructor logic ([a566240](https://github.com/driftyco/ionic-native/commit/a566240))
* **mixpanel:** Make eventProperties optional ([#501](https://github.com/driftyco/ionic-native/issues/501)) ([51364f8](https://github.com/driftyco/ionic-native/commit/51364f8))
* **ng1:** fail gracefully when angular 1 promises can't be retrieved ([d135dc2](https://github.com/driftyco/ionic-native/commit/d135dc2))
* **ng1:** grab injector from app. [#451](https://github.com/driftyco/ionic-native/issues/451) ([2dc68a4](https://github.com/driftyco/ionic-native/commit/2dc68a4))
* remove CanvasCamera plugin ([c75f898](https://github.com/driftyco/ionic-native/commit/c75f898))
* **social-sharing:** shareViaEmail now resolves/rejects when not providing optional args ([c76de34](https://github.com/driftyco/ionic-native/commit/c76de34))
* **social-sharing:** various fixes ([#520](https://github.com/driftyco/ionic-native/issues/520)) ([4f97164](https://github.com/driftyco/ionic-native/commit/4f97164))
### Features
* **file:** adds chunked blob writing ([#529](https://github.com/driftyco/ionic-native/issues/529)) ([bbbd0d5](https://github.com/driftyco/ionic-native/commit/bbbd0d5))
* **file:** allows writeFile and writeExistingFile to accept Blob ([#527](https://github.com/driftyco/ionic-native/issues/527)) ([393e9d0](https://github.com/driftyco/ionic-native/commit/393e9d0))
* **googlemaps:** can pass HTMLElement to constructor ([dff034a](https://github.com/driftyco/ionic-native/commit/dff034a))
<a name="1.3.20"></a>
## [1.3.20](https://github.com/driftyco/ionic-native/compare/v1.3.19...v1.3.20) (2016-08-27)
### Bug Fixes
* **GoogleMaps:** Fixes [#452](https://github.com/driftyco/ionic-native/issues/452) ([#498](https://github.com/driftyco/ionic-native/issues/498)) ([f6d5ac4](https://github.com/driftyco/ionic-native/commit/f6d5ac4))
### Features
* **canvas-camera:** add CanvasCamera support ([ad57733](https://github.com/driftyco/ionic-native/commit/ad57733))
* **file-chooser:** add file chooser plugin support ([#495](https://github.com/driftyco/ionic-native/issues/495)) ([94a7dae](https://github.com/driftyco/ionic-native/commit/94a7dae))
* **file-opener:** add file opener support ([#497](https://github.com/driftyco/ionic-native/issues/497)) ([21d8122](https://github.com/driftyco/ionic-native/commit/21d8122)), closes [#295](https://github.com/driftyco/ionic-native/issues/295)
* **music-controls:** add music controls plugin support ([#494](https://github.com/driftyco/ionic-native/issues/494)) ([4e9bc95](https://github.com/driftyco/ionic-native/commit/4e9bc95))
* **youtube:** add Youtube video player plugin support ([#496](https://github.com/driftyco/ionic-native/issues/496)) ([0cf7d6a](https://github.com/driftyco/ionic-native/commit/0cf7d6a))
<a name="1.3.19"></a>
## [1.3.19](https://github.com/driftyco/ionic-native/compare/v1.3.18...v1.3.19) (2016-08-27)
### Bug Fixes
* **mixpanel:** implement CordovaProperty correctly ([dd0c9ba](https://github.com/driftyco/ionic-native/commit/dd0c9ba))
### Features
* **call-number:** add support for CallNumber plugin ([#487](https://github.com/driftyco/ionic-native/issues/487)) ([759f8ef](https://github.com/driftyco/ionic-native/commit/759f8ef))
* **market:** add Market plugin support ([#490](https://github.com/driftyco/ionic-native/issues/490)) ([9bcc4ed](https://github.com/driftyco/ionic-native/commit/9bcc4ed))
* **mixpanel:** add mixpanel support ([#492](https://github.com/driftyco/ionic-native/issues/492)) ([cf8e342](https://github.com/driftyco/ionic-native/commit/cf8e342))
* **native-page-transitions:** add support for Native Page Transitions plugin ([#488](https://github.com/driftyco/ionic-native/issues/488)) ([00d87db](https://github.com/driftyco/ionic-native/commit/00d87db))
* **nfc:** add nfc support ([#493](https://github.com/driftyco/ionic-native/issues/493)) ([76aa8a6](https://github.com/driftyco/ionic-native/commit/76aa8a6))
* **paypal:** add PayPal support ([#491](https://github.com/driftyco/ionic-native/issues/491)) ([9fe5c19](https://github.com/driftyco/ionic-native/commit/9fe5c19))
* **power-management:** add power management support ([#489](https://github.com/driftyco/ionic-native/issues/489)) ([cd82a53](https://github.com/driftyco/ionic-native/commit/cd82a53))
* **streaming-media:** add streaming media support ([#486](https://github.com/driftyco/ionic-native/issues/486)) ([841b242](https://github.com/driftyco/ionic-native/commit/841b242))
<a name="1.3.18"></a>
## [1.3.18](https://github.com/driftyco/ionic-native/compare/v1.3.17...v1.3.18) (2016-08-26)
@@ -5,13 +668,16 @@
### Bug Fixes
* **facebook:** export interfaces ([c4110ee](https://github.com/driftyco/ionic-native/commit/c4110ee))
* **File:** fixed readFileAs ([#479](https://github.com/driftyco/ionic-native/issues/479)) ([eff7841](https://github.com/driftyco/ionic-native/commit/eff7841))
* **geofence:** fix event listeners ([efa222f](https://github.com/driftyco/ionic-native/commit/efa222f))
### Features
* **code-push:** add wrapper for cordova-plugin-code-push ([#420](https://github.com/driftyco/ionic-native/issues/420)) ([905f988](https://github.com/driftyco/ionic-native/commit/905f988))
* **diagnostic:** add full plugin functionality ([#424](https://github.com/driftyco/ionic-native/issues/424)) ([47a9b34](https://github.com/driftyco/ionic-native/commit/47a9b34)), closes [#224](https://github.com/driftyco/ionic-native/issues/224)
* **geofence:** Adds geofence plugin ([#442](https://github.com/driftyco/ionic-native/issues/442)) ([a438967](https://github.com/driftyco/ionic-native/commit/a438967))
* **inAppPurchase:** add inAppPurhcase plugin ([#423](https://github.com/driftyco/ionic-native/issues/423)) ([8526e89](https://github.com/driftyco/ionic-native/commit/8526e89))
* **IsDebug:** add the IsDebug plugin ([#475](https://github.com/driftyco/ionic-native/issues/475)) ([dd39ba8](https://github.com/driftyco/ionic-native/commit/dd39ba8))
@@ -24,7 +690,7 @@
* add the reject function at the expected errorIndex position in the args array ([#436](https://github.com/driftyco/ionic-native/issues/436)) ([4e87ac7](https://github.com/driftyco/ionic-native/commit/4e87ac7))
* **camera-preview:** changes implementation to match Cordova plugin ([#441](https://github.com/driftyco/ionic-native/issues/441)) ([55ba65a](https://github.com/driftyco/ionic-native/commit/55ba65a))
* **file:** fixes exclusive option ([#459](https://github.com/driftyco/ionic-native/issues/459)) ([14e41a3](https://github.com/driftyco/ionic-native/commit/14e41a3)), closes [#459](https://github.com/driftyco/ionic-native/issues/459)
* **file:** fixes exclusive option ([#459](https://github.com/driftyco/ionic-native/issues/459)) ([14e41a3](https://github.com/driftyco/ionic-native/commit/14e41a3))
* **file:** initialize writeFile options ([#468](https://github.com/driftyco/ionic-native/issues/468)) ([16628a4](https://github.com/driftyco/ionic-native/commit/16628a4))
* **nativeaudio:** fix plugin reference ([2510c5f](https://github.com/driftyco/ionic-native/commit/2510c5f))
@@ -58,12 +724,13 @@
<a name="1.3.14"></a>
## [1.3.14](https://github.com/driftyco/ionic-native/compare/v1.3.13...v1.3.14) (2016-08-15)
## [1.3.14](https://github.com/driftyco/ionic-native/compare/v1.3.12...v1.3.14) (2016-08-15)
### Bug Fixes
* **datepicker:** date now accepts Date, string, or number ([#428](https://github.com/driftyco/ionic-native/issues/428)) ([aaddd9e](https://github.com/driftyco/ionic-native/commit/aaddd9e)), closes [#354](https://github.com/driftyco/ionic-native/issues/354)
* **inappbrowser:** fix event listener ([4b08d85](https://github.com/driftyco/ionic-native/commit/4b08d85))
### Features
@@ -74,27 +741,26 @@
<a name="1.3.13"></a>
## [1.3.13](https://github.com/driftyco/ionic-native/compare/v1.3.12...v1.3.13) (2016-08-13)
### Bug Fixes
* **inappbrowser:** fix event listener ([4b08d85](https://github.com/driftyco/ionic-native/commit/4b08d85))
<a name="1.3.12"></a>
## [1.3.12](https://github.com/driftyco/ionic-native/compare/v1.3.10...v1.3.12) (2016-08-13)
## [1.3.12](https://github.com/driftyco/ionic-native/compare/v1.3.11...v1.3.12) (2016-08-13)
### Bug Fixes
* **backgroundGeolocation:** update config and move to sync. Fixes [#331](https://github.com/driftyco/ionic-native/issues/331) ([4e20681](https://github.com/driftyco/ionic-native/commit/4e20681)), closes [#331](https://github.com/driftyco/ionic-native/issues/331)
* **camera:** camera options should be optional. Fixes [#413](https://github.com/driftyco/ionic-native/issues/413) ([#417](https://github.com/driftyco/ionic-native/issues/417)) ([c60c3b7](https://github.com/driftyco/ionic-native/commit/c60c3b7)), closes [#413](https://github.com/driftyco/ionic-native/issues/413) [#417](https://github.com/driftyco/ionic-native/issues/417)
* **inappbrowser:** fix event listener ([618d866](https://github.com/driftyco/ionic-native/commit/618d866))
<a name="1.3.11"></a>
## [1.3.11](https://github.com/driftyco/ionic-native/compare/v1.3.10...v1.3.11) (2016-08-11)
### Bug Fixes
* **backgroundGeolocation:** update config and move to sync. Fixes [#331](https://github.com/driftyco/ionic-native/issues/331) ([4e20681](https://github.com/driftyco/ionic-native/commit/4e20681))
* **camera:** camera options should be optional. Fixes [#413](https://github.com/driftyco/ionic-native/issues/413) ([#417](https://github.com/driftyco/ionic-native/issues/417)) ([c60c3b7](https://github.com/driftyco/ionic-native/commit/c60c3b7))
* **index:** export Geolocation interfaces. ([#404](https://github.com/driftyco/ionic-native/issues/404)) ([0c486b0](https://github.com/driftyco/ionic-native/commit/0c486b0))
* **ng1:** Copy object properly. Fixes [#357](https://github.com/driftyco/ionic-native/issues/357) ([9ca38cd](https://github.com/driftyco/ionic-native/commit/9ca38cd)), closes [#357](https://github.com/driftyco/ionic-native/issues/357)
* **ng1:** Copy object properly. Fixes [#357](https://github.com/driftyco/ionic-native/issues/357) ([9ca38cd](https://github.com/driftyco/ionic-native/commit/9ca38cd))
### Features
@@ -125,7 +791,7 @@
### Features
* **crop:** add crop plugin ([#284](https://github.com/driftyco/ionic-native/issues/284)) ([41c9adf](https://github.com/driftyco/ionic-native/commit/41c9adf))
* **screen-orientation:** Added Screen Orientation Plugin [#342](https://github.com/driftyco/ionic-native/issues/342) ([#366](https://github.com/driftyco/ionic-native/issues/366)) ([bd9366b](https://github.com/driftyco/ionic-native/commit/bd9366b)), closes [#342](https://github.com/driftyco/ionic-native/issues/342)
* **screen-orientation:** Added Screen Orientation Plugin [#342](https://github.com/driftyco/ionic-native/issues/342) ([#366](https://github.com/driftyco/ionic-native/issues/366)) ([bd9366b](https://github.com/driftyco/ionic-native/commit/bd9366b))
@@ -152,7 +818,7 @@
### Bug Fixes
* **base64togallery:** update plugin wrapper to match latest version ([d4bee49](https://github.com/driftyco/ionic-native/commit/d4bee49)), closes [#335](https://github.com/driftyco/ionic-native/issues/335)
* **sqlite:** fix method attribute typo ([#324](https://github.com/driftyco/ionic-native/issues/324)) ([006bc70](https://github.com/driftyco/ionic-native/commit/006bc70)), closes [#324](https://github.com/driftyco/ionic-native/issues/324)
* **sqlite:** fix method attribute typo ([#324](https://github.com/driftyco/ionic-native/issues/324)) ([006bc70](https://github.com/driftyco/ionic-native/commit/006bc70))
### Features
@@ -265,12 +931,28 @@
<a name="1.3.1"></a>
## [1.3.1](https://github.com/driftyco/ionic-native/compare/v1.2.4...v1.3.1) (2016-06-26)
## [1.3.1](https://github.com/driftyco/ionic-native/compare/v1.3.0...v1.3.1) (2016-06-26)
### Bug Fixes
* **3dtouch:** fix implementation for onHomeIconPressed function ([d2b2be6](https://github.com/driftyco/ionic-native/commit/d2b2be6)), closes [#232](https://github.com/driftyco/ionic-native/issues/232)
* **sqlite:** resolve race condition, add comments ([#235](https://github.com/driftyco/ionic-native/issues/235)) ([f1c8ce3](https://github.com/driftyco/ionic-native/commit/f1c8ce3))
### Features
* **googlemaps:** add GoogleMapsLatLngBounds class ([17da427](https://github.com/driftyco/ionic-native/commit/17da427))
* **printer:** add printer plugin ([#225](https://github.com/driftyco/ionic-native/issues/225)) ([48ffcae](https://github.com/driftyco/ionic-native/commit/48ffcae))
<a name="1.3.0"></a>
# [1.3.0](https://github.com/driftyco/ionic-native/compare/v1.2.3...v1.3.0) (2016-06-13)
### Bug Fixes
* **barcodescanner:** add missing options param ([4fdcbb5](https://github.com/driftyco/ionic-native/commit/4fdcbb5)), closes [#180](https://github.com/driftyco/ionic-native/issues/180)
* **base64togallery:** method is now static ([be7b9e2](https://github.com/driftyco/ionic-native/commit/be7b9e2)), closes [#212](https://github.com/driftyco/ionic-native/issues/212)
* **batterystatus:** correct plugin name on npm ([66b7fa6](https://github.com/driftyco/ionic-native/commit/66b7fa6))
@@ -279,7 +961,6 @@
* **deviceorientation:** cancelFunction renamed to clearFunction ([8dee02e](https://github.com/driftyco/ionic-native/commit/8dee02e))
* **geolocation:** fix watchPosition() ([4a8650e](https://github.com/driftyco/ionic-native/commit/4a8650e)), closes [#164](https://github.com/driftyco/ionic-native/issues/164)
* **googlemaps:** isAvailable() returns boolean, not an instance of GoogleMap ([a53ae8f](https://github.com/driftyco/ionic-native/commit/a53ae8f))
* **sqlite:** resolve race condition, add comments ([#235](https://github.com/driftyco/ionic-native/issues/235)) ([f1c8ce3](https://github.com/driftyco/ionic-native/commit/f1c8ce3)), closes [#235](https://github.com/driftyco/ionic-native/issues/235)
### Features
@@ -287,13 +968,6 @@
* **angular1:** Support Angular 1 ([af8fbde](https://github.com/driftyco/ionic-native/commit/af8fbde))
* **barcodescanner:** add encode function ([e73f57f](https://github.com/driftyco/ionic-native/commit/e73f57f)), closes [#115](https://github.com/driftyco/ionic-native/issues/115)
* **deeplinks:** Add Ionic Deeplinks Plugin ([c93cbed](https://github.com/driftyco/ionic-native/commit/c93cbed))
* **googlemaps:** add GoogleMapsLatLngBounds class ([17da427](https://github.com/driftyco/ionic-native/commit/17da427))
* **printer:** add printer plugin ([#225](https://github.com/driftyco/ionic-native/issues/225)) ([48ffcae](https://github.com/driftyco/ionic-native/commit/48ffcae))
<a name="1.2.4"></a>
## [1.2.4](https://github.com/driftyco/ionic-native/compare/v1.2.3...v1.2.4) (2016-06-01)
+23
View File
@@ -0,0 +1,23 @@
Copyright 2015-present Drifty Co.
http://drifty.com/
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+3 -3
View File
@@ -1,8 +1,8 @@
[![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/)
[![npm](https://img.shields.io/npm/l/express.svg)](https://www.npmjs.com/package/ionic-native-playground)
[![npm](https://img.shields.io/npm/l/express.svg)](https://www.npmjs.com/package/ionic-native)
[![NPM](https://nodei.co/npm/ionic-native.png?stars&downloads)](https://nodei.co/npm/ionic-native/)
[![NPM](https://nodei.co/npm-dl/ionic-native.png?months=6&height=2)](https://nodei.co/npm/ionic-native/)
# Ionic Native
@@ -86,7 +86,7 @@ Let us know or submit a PR! Take a look at [the Developer Guide](https://github.
# Credits
Ibrahim Hadeed - [@ihadeed](http://github.com/ihadeed)
Ibby Hadeed - [@ihadeed](http://github.com/ihadeed)
Tim Lancina - [@timlancina](http://twitter.com/timlancina)
+1 -1
View File
@@ -17,7 +17,7 @@ dependencies:
test:
override:
- echo "No tests are written at the moment. But we will attempt to build the library with the latest changes."
- npm test
- npm run build
deployment:
+9 -3
View File
@@ -2,7 +2,7 @@ var gulp = require('gulp');
var minimist = require('minimist');
var uglify = require('gulp-uglify');
var rename = require("gulp-rename");
var tslint = require('ionic-gulp-tslint');
var tslint = require('gulp-tslint');
var decamelize = require('decamelize');
var replace = require('gulp-replace');
@@ -28,12 +28,18 @@ gulp.task("minify:dist", function(){
});
gulp.task('lint', function() {
tslint({src: 'src/**/*.ts'});
gulp.src('src/**/*.ts')
.pipe(tslint({
formatter: "verbose",
configuration: 'tslint.json'
}))
.pipe(tslint.report())
});
gulp.task('plugin:create', function(){
if(flags.n && flags.n !== ''){
return gulp.src('./TEMPLATE')
var src = flags.m?'./scripts/templates/wrap-min.tmpl':'./scripts/templates/wrap.tmpl';
return gulp.src(src)
.pipe(replace('PluginName', flags.n))
.pipe(rename(decamelize(flags.n, '-') + '.ts'))
.pipe(gulp.dest('./src/plugins/'));
+61
View File
@@ -0,0 +1,61 @@
const WATCH = process.argv.indexOf('--watch') > -1;
module.exports = config => {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: './',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine', 'browserify'],
// list of files / patterns to load in the browser
files: [
'test/**/*.spec.ts'
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/**/*.spec.ts': ['browserify']
},
browserify: {
debug: true,
plugin: [ 'tsify' ],
extensions: ['.js', '.ts']
},
phantomjsLauncher: {
// Have phantomjs exit if a ResourceError is encountered (useful if karma exits without killing phantom)
exitOnResourceError: true
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['dots'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: WATCH,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: !WATCH
});
};
+44 -27
View File
@@ -1,50 +1,68 @@
{
"name": "ionic-native",
"version": "1.3.18",
"version": "3.1.0-rc.2",
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
"main": "dist/index.js",
"main": "dist/es5/index.js",
"module": "dist/esm/index.js",
"typings": "dist/es5/index.d.ts",
"files": [
"dist"
],
"dependencies": {
"rxjs": "^5.0.0-beta.6"
},
"devDependencies": {
"browserify": "^13.0.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"browserify": "^13.3.0",
"canonical-path": "0.0.2",
"child-process-promise": "^2.2.0",
"conventional-changelog-cli": "^1.2.0",
"conventional-github-releaser": "^1.1.3",
"cpr": "^1.0.0",
"cz-conventional-changelog": "^1.1.6",
"cpr": "^2.0.2",
"cz-conventional-changelog": "^1.2.0",
"decamelize": "^1.2.0",
"dgeni": "^0.4.2",
"dgeni-packages": "^0.10.18",
"glob": "^6.0.4",
"es6-shim": "~0.35.2",
"fs-extra": "^2.0.0",
"fs-extra-promise": "^0.4.1",
"glob": "^7.1.1",
"gulp": "^3.9.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
"gulp-tslint": "^5.0.0",
"gulp-uglify": "^1.5.4",
"ionic-gulp-tslint": "^1.0.0",
"lodash": "3.10.1",
"gulp-tslint": "^6.1.2",
"gulp-uglify": "^2.0.0",
"jasmine-core": "~2.5.2",
"karma": "~1.3.0",
"karma-browserify": "~5.1.0",
"karma-jasmine": "~1.1.0",
"karma-phantomjs-launcher": "~1.0.2",
"lodash": "4.17.4",
"minimist": "^1.1.3",
"mkdirp": "^0.5.1",
"node-html-encoder": "0.0.2",
"q": "1.4.1",
"semver": "^5.0.1",
"tslint": "^3.8.1",
"tslint-ionic-rules": "0.0.5",
"typescript": "^1.8.10"
"queue": "^4.2.1",
"rimraf": "^2.5.4",
"rxjs": "5.0.1",
"semver": "^5.3.0",
"tsify": "~3.0.0",
"tslint": "^3.15.1",
"tslint-ionic-rules": "0.0.7",
"typescript": "2.0.09",
"watchify": "~3.7.0",
"zone.js": "0.7.2"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "./node_modules/.bin/gulp lint",
"watch": "./node_modules/.bin/tsc -w",
"build": "npm run lint && npm run build:js && npm run build:bundle && npm run build:minify",
"build:js": "./node_modules/.bin/tsc",
"build:bundle": "./node_modules/.bin/browserify dist/index.js > dist/ionic.native.js",
"build:minify": "./node_modules/.bin/gulp minify:dist",
"changelog": "./node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"test": "karma start",
"test:watch": "npm test -- --watch",
"start": "npm run test:watch",
"lint": "gulp lint",
"build": "npm run clean && npm run lint && npm run build:core && npm run build:modules",
"build:core": "ngc -p scripts/build/tsconfig-core.json",
"build:modules": "node scripts/build/build.js",
"clean": "rimraf dist",
"shipit": "npm run build && gulp readmes && npm run npmpub",
"npmpub": "node scripts/build/publish.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"plugin:create": "gulp plugin:create"
},
"repository": {
@@ -56,7 +74,6 @@
"url": "https://github.com/driftyco/ionic-native/issues"
},
"homepage": "https://github.com/driftyco/ionic-native",
"typings": "./dist/index.d.ts",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
+135
View File
@@ -0,0 +1,135 @@
// Node module dependencies
const fs = require('fs-extra-promise').useFs(require('fs-extra')),
queue = require('queue'),
path = require('path'),
exec = require('child_process').exec;
// Constants for the build process. Paths and JSON files templates
const ROOT = path.resolve(path.join(__dirname, '../../')), // root ionic-native directory
PLUGINS_PATH = path.resolve(ROOT, 'src/@ionic-native/plugins'), // path to plugins source files
CORE_PACKAGE_JSON = require(path.resolve(__dirname, 'core-package.json')), // core package.json
PLUGIN_PACKAGE_JSON = require(path.resolve(__dirname, 'plugin-package.json')), // plugin package.json template
PLUGIN_TS_CONFIG = require(path.resolve(__dirname, 'tsconfig-plugin.json')), // plugin tsconfig template
BUILD_TMP = path.resolve(ROOT, '.tmp'), // tmp directory path
BUILD_DIST_ROOT = path.resolve(ROOT, 'dist/packages-dist/@ionic-native'), // dist directory root path
BUILD_PLUGINS_DIST = path.resolve(BUILD_DIST_ROOT, 'plugins'), // plugins dist directory path
BUILD_CORE_DIST = path.resolve(BUILD_DIST_ROOT, 'core'); // core dist directory path
// dependency versions
const ANGULAR_VERSION = '2.2.1',
RXJS_VERSION = '5.0.0-beta.12',
IONIC_NATIVE_VERSION = require(path.resolve(ROOT, 'package.json')).version;
// package dependencies
const CORE_PEER_DEPS = {
'rxjs': RXJS_VERSION
};
const PLUGIN_PEER_DEPS = {
'@ionic-native/core': IONIC_NATIVE_VERSION,
'@angular/core': ANGULAR_VERSION,
'rxjs': RXJS_VERSION
};
// set peer dependencies for all plugins
PLUGIN_PACKAGE_JSON.peerDependencies = PLUGIN_PEER_DEPS;
// Delete dist directory and any temporary files
console.log('Removing old TMP directory');
fs.removeSync(BUILD_TMP);
fs.removeSync(BUILD_PLUGINS_DIST);
// Create tmp/dist directories
console.log('Making new TMP directory');
fs.mkdirpSync(BUILD_TMP);
// Prepare and copy the core module's package.json
console.log('Preparing core module package.json');
CORE_PACKAGE_JSON.version = IONIC_NATIVE_VERSION;
CORE_PACKAGE_JSON.peerDependencies = CORE_PEER_DEPS;
fs.writeJsonSync(path.resolve(BUILD_CORE_DIST, 'package.json'), CORE_PACKAGE_JSON);
// Fetch a list of the plugins
const PLUGINS = fs.readdirSync(PLUGINS_PATH);
// Create a queue to process tasks
const QUEUE = queue({
concurrency: require('os').cpus().length
});
// Function to process a single plugin
const addPluginToQueue = pluginName => {
QUEUE.push((callback) => {
console.log(`Building plugin: ${pluginName}`);
const PLUGIN_BUILD_DIR = path.resolve(BUILD_TMP, 'plugins', pluginName),
PLUGIN_SRC_PATH = path.resolve(PLUGINS_PATH, pluginName, 'index.ts');
let tsConfigPath;
fs.mkdirpAsync(PLUGIN_BUILD_DIR) // create tmp build dir
.then(() => fs.mkdirpAsync(path.resolve(BUILD_PLUGINS_DIST, pluginName))) // create dist dir
.then(() => {
// Write tsconfig.json
const tsConfig = JSON.parse(JSON.stringify(PLUGIN_TS_CONFIG));
tsConfig.files = [PLUGIN_SRC_PATH];
// tsConfig.compilerOptions.paths['@ionic-native/core'] = [BUILD_CORE_DIST];
tsConfigPath = path.resolve(PLUGIN_BUILD_DIR, 'tsconfig.json');
return fs.writeJsonAsync(tsConfigPath, tsConfig);
})
.then(() => {
// clone package.json
const packageJson = JSON.parse(JSON.stringify(PLUGIN_PACKAGE_JSON));
packageJson.name = `@ionic-native/${pluginName}`;
packageJson.version = IONIC_NATIVE_VERSION;
return fs.writeJsonAsync(path.resolve(BUILD_PLUGINS_DIST, pluginName, 'package.json'), packageJson);
})
.then(() => {
// compile the plugin
exec(`${ROOT}/node_modules/.bin/ngc -p ${tsConfigPath}`, (err, stdout, stderr) => {
if (err) {
// oops! something went wrong.
callback(`\n\nBuilding ${pluginName} failed.`);
console.log(err);
return;
}
// we're done with this plugin!
callback();
});
})
.catch(callback);
}); // QUEUE.push end
};
PLUGINS.forEach(addPluginToQueue);
QUEUE.start((err) => {
if (err) {
console.log('Error building plugins. ', err);
} else {
console.log('Done processing plugins!');
}
});
+14
View File
@@ -0,0 +1,14 @@
{
"name": "@ionic-native/core",
"version": "{{VERSION}}",
"description": "Ionic Native - Native plugins for ionic apps",
"module": "index.js",
"typings": "index.d.ts",
"author": "ionic",
"license": "MIT",
"peerDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/driftyco/ionic-native.git"
}
}
+14
View File
@@ -0,0 +1,14 @@
{
"name": "@ionic-native/{{PLUGIN}}",
"version": "{{VERSION}}",
"description": "Ionic Native - Native plugins for ionic apps",
"module": "index.js",
"typings": "index.d.ts",
"author": "ionic",
"license": "MIT",
"peerDependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/driftyco/ionic-native.git"
}
}
+56
View File
@@ -0,0 +1,56 @@
// Node module dependencies
const fs = require('fs-extra-promise').useFs(require('fs-extra')),
queue = require('queue'),
path = require('path'),
exec = require('child-process-promise').exec;
const ROOT = path.resolve(path.join(__dirname, '../../')),
DIST = path.resolve(ROOT, 'dist', 'packages-dist', '@ionic-native'),
PLUGINS_ROOT = path.resolve(DIST, 'plugins'),
CORE = path.resolve(DIST, 'core');
const FLAGS = '--access public'; // add any flags here if you want... (example: --tag alpha)
console.log('Publishing @ionic-native/core');
exec(`npm publish ${CORE} ${FLAGS}`)
.then(() => {
const PLUGINS = fs.readdirSync(PLUGINS_ROOT);
const QUEUE = queue({
concurrency: 10
});
PLUGINS.forEach(pluginName => {
QUEUE.push(done => {
console.log(`Publishing plugin ${pluginName}`);
const pluginPath = path.resolve(PLUGINS_ROOT, pluginName);
exec(`npm publish ${pluginPath} ${FLAGS}`)
.then(() => done())
.catch(done);
});
});
QUEUE.start((err) => {
if (err) {
console.log('Error publishing ionic-native. ', err);
} else {
console.log('Done publishing ionic-native!');
}
});
})
.catch(e => {
console.log('Publish failed');
console.log(e);
});
+19
View File
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"stripInternal": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"module": "es2015",
"moduleResolution": "node",
"outDir": "../../dist/packages-dist/",
"rootDir": "../../src/",
"target": "es5",
"skipLibCheck": true,
"lib": ["es2015", "dom"]
},
"files": [
"../../src/@ionic-native/core/index.ts"
]
}
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"stripInternal": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"module": "es2015",
"moduleResolution": "node",
"outDir": "../../../dist/packages-dist/",
"paths": {
"@ionic-native/core": ["../../../dist/packages-dist/@ionic-native/core"]
},
"rootDir": "../../../src/",
"target": "es5",
"skipLibCheck": true,
"lib": ["es2015", "dom"]
},
"files": [
"../../../src/@ionic-native/plugins/{{PLUGIN}}/index.ts"
]
}
+2 -1
View File
@@ -1,5 +1,6 @@
{
"sitePath": "../ionic-site",
"v2DocsDir": "docs/v2/native",
"docsDest": "../ionic-site/docs/v2/native"
"docsDest": "../ionic-site/content/docs/v2/native",
"pluginDir": "dist/packages-dist/@ionic-native/plugins"
}
+36 -12
View File
@@ -31,12 +31,37 @@ module.exports = function(currentVersion) {
// $runBefore: ['rendering-docs'],
// $process: function(docs){
// docs.forEach(function(doc){
// if (doc.members && doc.name == "IonicApp"){
// doc.members.forEach(function(method){
// if (method.name === "load") {
// console.log(method);
// }
// })
// if (doc.name == "Camera"){
//
// // console.log(doc.tags);
// // doc.tags.forEach(function(tag){
// // if(tag.tagName == 'classes'){
// //
// // }
// // });
//
// // doc.moduleDoc.exports.forEach(function(d,i){
// // if(d.name === 'CameraOptions') {
// // console.log('Name: ' + d.name);
// // console.log('Type: ' + d.docType);
// // console.log('First member: ', d.members[0]);
// // }
// // });
//
//
// // var exports = doc.exportSymbol.parent.exports;
// // for(var p in exports) {
// // if(p == 'CameraOptions')
// // {
// // var x = exports[p];
// // console.log(x.members.quality);
// // }
// // }
// // doc.members.forEach(function(method){
// // if (method.name === "getPicture") {
// // console.log(method);
// // }
// // })
// }
// })
// }
@@ -51,7 +76,7 @@ module.exports = function(currentVersion) {
versions = [];
// new version, add it to the versions list
if (currentVersion != 'nightly' && !_.contains(versions, currentVersion)) {
if (currentVersion != 'nightly' && !_.includes(versions, currentVersion)) {
versions.unshift(currentVersion);
}
//First semver valid version is latest
@@ -60,7 +85,7 @@ module.exports = function(currentVersion) {
// We don't separate by versions so always put the docs in the root
var folder = '';
return {
href: path.join('/' + config.v2DocsDir, folder),
href: '/' + config.v2DocsDir.replace('content/',''),
folder: folder,
name: version
};
@@ -74,12 +99,11 @@ module.exports = function(currentVersion) {
renderDocsProcessor.extraData.version = versionData;
renderDocsProcessor.extraData.versionInfo = versionInfo;
computePathsProcessor.pathTemplates = [{
docTypes: ['class', 'var', 'function', 'let'],
getOutputPath: function(doc) {
var docPath = doc.name + '/index.md';
var path = config.v2DocsDir + '/' + docPath;
var path = 'content/' + config.v2DocsDir + '/' + docPath;
return path;
}
@@ -96,7 +120,7 @@ module.exports = function(currentVersion) {
readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname,
'../..'));
readTypeScriptModules.sourceFiles = [
'src/index.ts'
'./src/@ionic-native/plugins/**/*.ts'
];
})
@@ -124,7 +148,7 @@ module.exports = function(currentVersion) {
// Configure file writing
.config(function(writeFilesProcessor) {
writeFilesProcessor.outputFolder = config.sitePath;
writeFilesProcessor.outputFolder = './src/@ionic-native/plugins2/';
})
// Configure rendering
+184
View File
@@ -0,0 +1,184 @@
var Package = require('dgeni').Package;
var jsdocPackage = require('dgeni-packages/jsdoc');
var nunjucksPackage = require('dgeni-packages/nunjucks');
var typescriptPackage = require('./typescript-package');
var linksPackage = require('./links-package');
var gitPackage = require('dgeni-packages/git');
var path = require('path');
var semver = require('semver');
var fs = require('fs');
var _ = require('lodash');
var config = require('../config.json');
var projectPackage = require('../../package.json');
// jscs:disable validateIndentation
// Define the dgeni package for generating the docs
module.exports = function(currentVersion) {
return new Package('ionic-v2-docs',
[jsdocPackage, nunjucksPackage, typescriptPackage,
linksPackage, gitPackage])
// .processor(require('./processors/latest-version'))
.processor(require('./processors/readmes'))
.processor(require('./processors/remove-private-members'))
.processor(require('./processors/hide-private-api'))
.processor(require('./processors/collect-inputs-outputs'))
// for debugging docs
// .processor(function test(){
// return {
//
// $runBefore: ['rendering-docs'],
// $process: function(docs){
// docs.forEach(function(doc){
// if (doc.name == "Camera"){
//
// // console.log(doc.tags);
// // doc.tags.forEach(function(tag){
// // if(tag.tagName == 'classes'){
// //
// // }
// // });
//
// // doc.moduleDoc.exports.forEach(function(d,i){
// // if(d.name === 'CameraOptions') {
// // console.log('Name: ' + d.name);
// // console.log('Type: ' + d.docType);
// // console.log('First member: ', d.members[0]);
// // }
// // });
//
//
// // var exports = doc.exportSymbol.parent.exports;
// // for(var p in exports) {
// // if(p == 'CameraOptions')
// // {
// // var x = exports[p];
// // console.log(x.members.quality);
// // }
// // }
// // doc.members.forEach(function(method){
// // if (method.name === "getPicture") {
// // console.log(method);
// // }
// // })
// }
// })
// }
// }
// })
.config(function(log) {
log.level = 'error'; //'silly', 'debug', 'info', 'warn', 'error'
})
.config(function(renderDocsProcessor, computePathsProcessor, versionInfo) {
versions = [];
// new version, add it to the versions list
if (currentVersion != 'nightly' && !_.includes(versions, currentVersion)) {
versions.unshift(currentVersion);
}
//First semver valid version is latest
var latestVersion = _.find(versions, semver.valid);
versions = versions.map(function(version) {
// We don't separate by versions so always put the docs in the root
var folder = '';
return {
href: '/' + config.v2DocsDir.replace('content/', ''),
folder: folder,
name: version
};
});
var versionData = {
list: versions,
current: _.find(versions, {name: currentVersion}),
latest: _.find(versions, {name: latestVersion}) || _.first(versions)
};
renderDocsProcessor.extraData.version = versionData;
renderDocsProcessor.extraData.versionInfo = versionInfo;
computePathsProcessor.pathTemplates = [{
docTypes: ['class', 'var', 'function', 'let'],
getOutputPath: function(doc) {
return doc.originalModule.replace(config.pluginDir + '/', '')
.replace('/index', '') + '/README.md';
}
}];
})
//configure file reading
.config(function(readFilesProcessor, readTypeScriptModules) {
// Don't run unwanted processors since we are not using the normal file reading processor
readFilesProcessor.$enabled = false;
readFilesProcessor.basePath = path.resolve(__dirname, '../..');
readTypeScriptModules.basePath = path.resolve(path.resolve(__dirname,
'../..'));
readTypeScriptModules.sourceFiles = [
'./src/@ionic-native/plugins/**/*.ts'
];
})
.config(function(parseTagsProcessor) {
parseTagsProcessor.tagDefinitions = parseTagsProcessor.tagDefinitions
.concat(require('./tag-defs/tag-defs'));
})
// .config(function(parseTagsProcessor) {
// // We actually don't want to parse param docs in this package as we are
// // getting the data out using TS
// parseTagsProcessor.tagDefinitions.forEach(function(tagDef) {
// console.log(tagDef);
// if (tagDef.name === 'param') {
// tagDef.docProperty = 'paramData';
// tagDef.transforms = [];
// }
// });
// })
// Configure links
.config(function(getLinkInfo) {
getLinkInfo.useFirstAmbiguousLink = false;
})
// Configure file writing
.config(function(writeFilesProcessor) {
writeFilesProcessor.outputFolder = './dist/packages-dist/';
})
// Configure rendering
.config(function(templateFinder, templateEngine) {
// Nunjucks and Angular conflict in their template bindings so change the Nunjucks
// Also conflict with Jekyll
templateEngine.config.tags = {
variableStart: '<$',
variableEnd: '$>',
blockStart: '<@',
blockEnd: '@>',
commentStart: '<#',
commentEnd: '#>'
};
// add custom filters to nunjucks
templateEngine.filters.push(
require('./filters/capital'),
require('./filters/code'),
require('./filters/dump')
);
templateFinder.templateFolders.unshift(path.resolve(__dirname, 'templates'));
// Specify how to match docs to templates.
templateFinder.templatePatterns = [
'${ doc.template }',
'${ doc.docType }.template.md',
'readme.template.md'
];
});
};
+17 -1
View File
@@ -7,7 +7,23 @@ module.exports = function(gulp) {
try {
var ionicPackage = require('./dgeni-config')(projectPackage.version);
var dgeni = new Dgeni([ionicPackage]);
return dgeni.generate();
return dgeni.generate().then(function(docs) {
console.log(docs.length + ' docs generated');
});
} catch (err) {
console.log(err.stack);
}
});
gulp.task('readmes', [], function() {
var Dgeni = require('dgeni');
var semver = require('semver');
try {
var ionicPackage = require('./dgeni-readmes-config')(projectPackage.version);
var dgeni = new Dgeni([ionicPackage]);
return dgeni.generate().then(function(docs) {
console.log(docs.length + ' README files generated');
});
} catch (err) {
console.log(err.stack);
}
+5 -1
View File
@@ -21,13 +21,17 @@ function run {
./git/clone.sh --repository="ionic-site" \
--directory="$SITE_DIR" \
--branch="master"
ls -al $SITE_DIR
cd $SITE_DIR
ls -al
else
echo "using existing"
cd $SITE_DIR
git reset --hard
git pull origin master
fi
git rm -rf content/docs/v2/native/*/ || true
}
source $(dirname $0)/../utils.inc.sh
@@ -5,6 +5,15 @@ module.exports = function collectInputsOutputs() {
$process: function(docs) {
docs.forEach(function(doc) {
if (doc.statics && doc.statics.length) {
for (var i in doc.statics) {
// identify properties to differentiate from methods
if (typeof doc.statics[i].parameters == 'undefined') {
doc.statics[i].isProperty = true;
}
}
}
if (doc.members && doc.members.length) {
var members = [];
var inputs = [];
+5 -2
View File
@@ -19,14 +19,17 @@ module.exports = function jekyll(renderDocsProcessor) {
docs.forEach(function(doc, i) {
doc.outputPath = doc.outputPath.toLowerCase().replace(' ', '-');
docs[i].URL = doc.outputPath.replace('docs/v2//', 'docs/v2/')
.replace('/index.md', '');
.replace('/index.md', '')
.replace('content/', '');
docs[i].demo = !!docs[i].demo;
});
docs.push({
docType: 'native_menu-menu',
id: 'native_menu-menu',
template: 'native_menu.template.html',
outputPath: '_includes/v2_fluid/native_menu.html'
outputPath: 'content/_includes/v2_fluid/native_menu.html'
});
// returning docs will replace docs object in the next process
+1 -1
View File
@@ -12,7 +12,7 @@ module.exports = function latestVersion(renderDocsProcessor) {
$process: function(docs) {
var versionData = renderDocsProcessor.extraData.version;
var docsBase = 'dist/ionic-site/docs/v2/';
var docsBase = 'dist/ionic-site/content/docs/v2/';
var versionDir = path.resolve(docsBase, versionData.latest.name);
var latestDir = path.resolve(docsBase, 'api');
+25
View File
@@ -0,0 +1,25 @@
module.exports = function jekyll(renderDocsProcessor) {
return {
name: 'readmes',
description: 'Create jekyll includes',
$runAfter: ['paths-computed'],
$runBefore: ['rendering-docs'],
$process: function(docs) {
var currentVersion = renderDocsProcessor.extraData.version.current.name;
// pretty up and sort the docs object for menu generation
docs = docs.filter(function(doc) {
return (!!doc.name && !!doc.outputPath) || doc.docType === 'index-page';
});
docs.forEach(function(doc, i) {
doc.npmId = doc.outputPath.replace('/README.md', '')
.replace('src/@ionic-native/plugins/','');
doc.outputPath = doc.outputPath.replace('src/', '');
});
// returning docs will replace docs object in the next process
return docs;
}
};
};
+7 -1
View File
@@ -1,5 +1,11 @@
module.exports = [
{'name': 'advanced'},
{'name': 'demo'},
{'name': 'usage'}
{'name': 'beta', transforms: function(doc, tag, value) {
// make the value true or undefined instead of '' or undefined
return typeof value !== 'undefined';
}},
{'name': 'usage'},
{'name': 'classes'}, // related classes
{'name': 'interfaces'} // related interfaces
];
+158 -93
View File
@@ -1,7 +1,7 @@
---
layout: "v2_fluid/docs_base"
version: "<$ version.current.name $>"
versionHref: "<$ version.current.href $>"
versionHref: "<$ version.current.href.replace('content/','') $>"
path: "<$ doc.path $>"
category: native
id: "<$ doc.name|lower|replace(' ','-') $>"
@@ -11,6 +11,39 @@ doc: "<$ doc.name $>"
docType: "<$ doc.docType $>"
---
<@ macro interfaceTable(interface) @>
<@ for export in doc.moduleDoc.exports -@>
<@ if export.name == interface @>
<table class="table param-table" style="margin:0;">
<thead>
<tr>
<th>Param</th>
<th>Type</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<@ for param in export.members @>
<tr>
<td>
<$ param.name $>
<@ if param.optional @><div><em>(optional)</em></div><@ endif @>
</td>
<td>
<code><$ param.returnType | escape $></code>
</td>
<td>
<$ param.description | marked $>
</td>
</tr>
<@ endfor @>
</tbody>
</table>
<@ endif @>
<@- endfor @>
<@ endmacro @>
<@ macro paramList(paramData) -@>
<@- if paramData -@><span class="params">(
<@- for param in paramData -@>
@@ -73,15 +106,81 @@ docType: "<$ doc.docType $>"
<$ typeList(fn.typeList) $> <$ fn.description $>
<@- endmacro -@>
<@ macro documentClass(doc) @>
<@- if doc.statics.length -@>
<h2>Static Members</h2>
<@ for method in doc.statics -@>
<@ if not method.internal @>
<div id="<$ method.name $>"></div>
<h3><$ functionSyntax(method) $></h3>
<@- if method.decorators @>
<@ for prop in method.decorators[0].argumentInfo @>
<@ if prop.platforms @>
<p>
<b>Platforms:</b>
<@- for platform in prop.platforms @>
<code><$ platform $></code>&nbsp;
<@ endfor -@>
</p>
<@ endif @>
<@ endfor @>
<@- endif @>
<$ method.description $>
<@ if method.params @>
<$ paramTable(method.params) $>
<@ endif @>
<@ if method.this -@>
<h4> Method's `this`
<$ method.this $>
</h4>
<@- endif @>
<@ if method.returns @>
<div class="return-value" markdown="1">
<i class="icon ion-arrow-return-left"></i>
<b>Returns:</b> <$ typeInfo(method.returns) $>
</div>
<@ endif @>
<@ endif @>
<@ endfor -@>
<@ endif @>
<!-- methods on the class -->
<@- if doc.members and doc.members.length @>
<h2>Instance Members</h2>
<@ for method in doc.members -@>
<div id="<$ method.name $>"></div>
<h3>
<$ functionSyntax(method) $>
</h3>
<$ method.description $>
<@ if method.params -@>
<$ paramTable(method.params) $>
<@- endif @>
<@ if method.this -@>
<h4> Method's `this`
<$ method.this $>
</h4>
<@- endif @>
<@ if method.returns -@>
<div class="return-value" markdown="1">
<i class="icon ion-arrow-return-left"></i>
<b>Returns:</b> <$ typeInfo(method.returns) $>
</div>
<@- endif @>
<@- endfor @>
<@- endif -@>
<@ endmacro @>
<@ block body @>
<@ block content @>
<@ block header @>
<h1 class="api-title">
<@ if doc.docType == "directive" @>
<$ doc.name | dashCase $>
<@ else @>
@@ -101,24 +200,31 @@ docType: "<$ doc.docType $>"
Delegate: <$ doc.delegate $>
</small>
<@ endif @>
<@- if doc.beta == true -@>
<span class="beta" title="beta">&beta;</span>
<@- 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 $>">
Improve this doc
</a>
<@ if doc.codepen @>
{% include codepen.html id="<$ doc.codepen $>" %}
<@ endif @>
<@ endblock @>
<!-- decorators -->
<@- if doc.decorators @>
<@ for prop in doc.decorators[0].argumentInfo @>
<pre><code>$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif -@></code></pre>
<@ if doc.beta == true @>
<p class="beta-notice">
This plugin is still in beta stage and may not work as expected. Please
submit any issues to the <a target="_blank"
href="<$ prop.repo $>/issues">plugin repo</a>.
</p>
<@ endif @>
<pre><code>$ <@ if prop.install @><$ prop.install $><@ else @>npm install @ionic-native/<$ prop.pluginRef $> -save<@ endif -@></code></pre>
<p>Repo:
<a href="<$ prop.repo $>">
<$ prop.repo $>
@@ -141,15 +247,15 @@ docType: "<$ doc.docType $>"
<h2>Supported platforms</h2>
<@ block platforms @>
<ul>
<@- for platform in prop.platforms @>
<@ for platform in prop.platforms -@>
<li><$ platform $></li>
<@ endfor -@>
<@- endfor @>
</ul>
<@ endblock @>
<!-- @platforms tag end -->
<@ endif @>
<@ endfor @>
<@ endif -@>
<@ endif -@><!-- if doc.decorators -->
<!-- @usage tag -->
<@ if doc.usage @>
@@ -181,12 +287,11 @@ docType: "<$ doc.docType $>"
</tr>
</thead>
<tbody>
<@ for prop in doc.properties @>
<@ for prop in doc.properties -@>
<tr>
<td>
<$ prop.name $>
</td>
<@ if hasTypes @>
<td>
<$ prop.type.name $>
@@ -197,86 +302,12 @@ docType: "<$ doc.docType $>"
<$ prop.description $>
</td>
</tr>
<@ endfor @>
<@- endfor @>
</tbody>
</table>
<@ endif @>
<@- if doc.statics.length -@>
<h2>Static Members</h2>
<@- for method in doc.statics @><@ if not method.internal @>
<div id="<$ method.name $>"></div>
<h3><$ functionSyntax(method) $></h3>
<@- if method.decorators @>
<@ for prop in method.decorators[0].argumentInfo @>
<@ if prop.platforms @>
<p>
<b>Platforms:</b>
<@- for platform in prop.platforms @>
<code><$ platform $></code>&nbsp;
<@ endfor -@>
</p>
<@ endif @>
<@ endfor @>
<@ endif -@>
<$ method.description $>
<@ if method.params @>
<$ paramTable(method.params) $>
<@ endif @>
<@ if method.this @>
<h4> Method's `this`
<$ method.this $>
</h4>
<@ endif @>
<@ if method.returns @>
<div class="return-value" markdown="1">
<i class="icon ion-arrow-return-left"></i>
<b>Returns:</b> <$ typeInfo(method.returns) $>
</div>
<@ endif @>
<@ endif @>
<@ endfor -@>
<@ endif @>
<!-- methods on the class -->
<@- if doc.members and doc.members.length @>
<h2>Instance Members</h2>
<@- for method in doc.members @>
<div id="<$ method.name $>"></div>
<h3>
<$ functionSyntax(method) $>
</h3>
<$ method.description $>
<@ if method.params @>
<$ paramTable(method.params) $>
<@ endif @>
<@ if method.this @>
<h4> Method's `this`
<$ method.this $>
</h4>
<@ endif @>
<@ if method.returns @>
<div class="return-value" markdown="1">
<i class="icon ion-arrow-return-left"></i>
<b>Returns:</b> <$ typeInfo(method.returns) $>
</div>
<@ endif @>
<@ endfor -@>
<@- endif -@>
<$ documentClass(doc) $>
<@ block advanced @>
<@- if doc.advanced -@>
@@ -285,6 +316,40 @@ docType: "<$ doc.docType $>"
<@- endif -@>
<@ endblock @>
<!-- other classes -->
<@ for tag in doc.tags.tags -@>
<@ if tag.tagName == 'classes' -@>
<!--<h2><a class="anchor" name="related-classes" href="#related-classes"></a>Related Classes</h2>-->
<@ set classes = tag.description.split('\n') @>
<@ for item in classes -@>
<@ if item.length > 1 @>
<@ for export in doc.moduleDoc.exports -@>
<@ if export.name == item @>
<h2><a class="anchor" name="<$ item $>" href="#<$ item $>"></a><$ item $></h2>
<$ documentClass(export) $>
<@ endif @>
<@- endfor @>
<@ endif @>
<@- endfor @>
<@- endif @>
<@- endfor @>
<!-- end other classes -->
<!-- interfaces -->
<@ for tag in doc.tags.tags -@>
<@ if tag.tagName == 'interfaces' @>
<!--<h2><a class="anchor" name="interfaces" href="#interfaces"></a>Interfaces</h2>-->
<@ set interfaces = tag.description.split('\n') @>
<@ for item in interfaces -@>
<@ if item.length > 1 @>
<h2><a class="anchor" name="<$ item $>" href="#<$ item $>"></a><$ item $></h2>
<$ interfaceTable(item) $>
<@ endif @>
<@- endfor @>
<@ endif @>
<@- endfor @>
<!-- end interfaces -->
<!-- related link -->
<@- if doc.see @>
+6 -1
View File
@@ -1,4 +1,9 @@
<@ for doc in docs @><@ if doc.URL and doc.private != true @>
<@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta != true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|replace(' ','-') $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $></a>
</li><@ endif @><@ endfor @>
<@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta == true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|replace(' ','-') $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $> <span class="beta">&beta;</span></a>
</li><@ endif @><@ endfor @>
+54
View File
@@ -0,0 +1,54 @@
<@- block body @>
<@- block content @>
<@- block header @>
<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 $>">
Improve this doc
</a>
# <$ doc.name $>
<!-- end header block -->
<@ endblock -@>
<@- if doc.beta == true @>
<p style="color:orange">
This plugin is still in beta stage and may not work as expected. Please
submit any issues to the <a target="_blank"
href="<$ prop.repo $>/issues">plugin repo</a>.
</p>
<@ endif -@>
<@- for prop in doc.decorators[0].argumentInfo @>
```
$ <@ if prop.install @><$ prop.install $><@ else @>npm install @ionic-native/<$ doc.npmId $> --save<@ endif @>
```
## [Usage Documentation](https://ionicframework.com/docs/v2/native/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/')|replace('index.ts','')|replace('src/@ionic-native/plugins/','') $>)
Cordova Repo: [<$ prop.repo $>](<$ prop.repo $>)
<!-- description -->
<@- block description @>
<$ doc.description $>
<@ endblock -@>
<@- if doc.directiveInfo @>
## <$ doc.directiveInfo.type $>
### <$ doc.directiveInfo.properties[0].name $>: `<$ doc.directiveInfo.properties[0].values $>`
<@ endif -@>
<@- if prop.platforms @>
<!-- @platforms tag -->
## Supported platforms
<@ block platforms @>
<@ for platform in prop.platforms -@>
- <$ platform $>
<@ endfor @>
<@ endblock -@>
<!-- @platforms tag end -->
<@ endif -@>
<!-- end for prop in method.decorators[0].argumentInfo -->
<@ endfor -@>
<!-- end content block -->
<@ endblock -@>
<!-- end body block -->
<@ endblock -@>
+5 -5
View File
@@ -1,7 +1,7 @@
#!/bin/bash
echo "##### "
echo "##### ci/deploy.sh"
echo "##### ci/update_docs.sh"
echo "#####"
@@ -23,10 +23,10 @@ function run {
# CD in to the site dir to commit updated docs
cd $SITE_DIR
CHANGES=$(git status --porcelain)
# if no changes, don't commit
if [[ "$CHANGES" == "" ]]; then
CHANGED=$(git diff-index --name-only HEAD --)
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"
else
@@ -39,7 +39,7 @@ function run {
git fetch
git rebase
git push origin master
git push origin master || :
echo "-- Updated docs for $VERSION_NAME succesfully!"
fi
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
echo "##### "
echo "##### ci/update_docs.sh"
echo "#####"
function init {
cd ../..
}
function run {
# process new docs
./node_modules/.bin/gulp readmes
# if no changes, don't commit
CHANGED=$(git diff-index --name-only HEAD --)
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"
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"
# in case a different commit was pushed to ionic-site during doc/demo gen,
# try to rebase around it before pushing
git fetch
git rebase
# git push origin master || :
echo "-- Updated docs for $VERSION_NAME succesfully!"
fi
}
source $(dirname $0)/../utils.inc.sh
+20
View File
@@ -0,0 +1,20 @@
import { Plugin } from './plugin';
/**
* @name PluginName
* @description
*
* @usage
* ```
* import { PluginName } from 'ionic-native';
*
*
* ```
*/
@Plugin({
pluginName: 'PluginName',
plugin: '',
pluginRef: '',
repo: ''
})
export class PluginName {
}
+4 -3
View File
@@ -10,8 +10,8 @@
* - Remove this note
*
*/
import {Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty} from './plugin';
import {Observable} from 'rxjs/Observable';
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty } from './plugin';
import { Observable } from 'rxjs/Observable';
/**
* @name PluginName
@@ -20,7 +20,7 @@ import {Observable} from 'rxjs/Observable';
*
* @usage
* ```
* import {PluginName} from 'ionic-native';
* import { PluginName } from 'ionic-native';
*
* PluginName.functionName('Hello', 123)
* .then((something: any) => doSomething(something))
@@ -29,6 +29,7 @@ import {Observable} from 'rxjs/Observable';
* ```
*/
@Plugin({
pluginName: 'PluginName',
plugin: '', // npm package name, example: cordova-plugin-camera
pluginRef: '', // the variable reference to call the plugin, example: navigator.geolocation
repo: '', // the github repository URL for the plugin
+24
View File
@@ -0,0 +1,24 @@
declare var window;
export function checkReady() {
const DEVICE_READY_TIMEOUT = 5000;
// To help developers using cordova, we listen for the device ready event and
// log an error if it didn't fire in a reasonable amount of time. Generally,
// when this happens, developers should remove and reinstall plugins, since
// an inconsistent plugin is often the culprit.
const before = Date.now();
let didFireReady = false;
document.addEventListener('deviceready', () => {
console.log('DEVICE READY FIRED AFTER', (Date.now() - before), 'ms');
didFireReady = true;
});
setTimeout(() => {
if (!didFireReady && window.cordova) {
console.warn(`Native: deviceready did not fire within ${DEVICE_READY_TIMEOUT}ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.`);
}
}, DEVICE_READY_TIMEOUT);
}
+1
View File
@@ -0,0 +1 @@
export * from './plugin';
+615
View File
@@ -0,0 +1,615 @@
import { get } from './util';
import { checkReady } from './bootstrap';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/fromEvent';
checkReady();
declare var window;
declare var Promise;
/**
* @private
*/
export interface PluginConfig {
/**
* Plugin name, this should match the class name
*/
pluginName: string;
/**
* Plugin NPM package name
*/
plugin: string;
/**
* Plugin object reference
*/
pluginRef: string;
/**
* Github repository URL
*/
repo: string;
/**
* Custom install command
*/
install?: string;
/**
* Available installation variables
*/
installVariables?: string[];
/**
* Supported platforms
*/
platforms?: string[];
}
/**
* @private
*/
export interface CordovaOptions {
/**
* Set to true if the wrapped method is a sync function
*/
sync?: boolean;
/**
* Callback order. Set to reverse if the success/error callbacks are the first 2 arguments that the wrapped method takes.
*/
callbackOrder?: 'reverse';
/**
* Callback style
*/
callbackStyle?: 'node' | 'object';
/**
* Set a custom index for the success callback function. This doesn't work if callbackOrder or callbackStyle are set.
*/
successIndex?: number;
/**
* Set a custom index for the error callback function. This doesn't work if callbackOrder or callbackStyle are set.
*/
errorIndex?: number;
/**
* Success function property name. This must be set if callbackStyle is set to object.
*/
successName?: string;
/**
* Error function property name. This must be set if callbackStyle is set to object.
*/
errorName?: string;
/**
* Set to true to return an observable
*/
observable?: boolean;
/**
* If observable is set to true, this can be set to a different function name that will cancel the observable.
*/
clearFunction?: string;
/**
* This can be used if clearFunction is set. Set this to true to call the clearFunction with the same arguments used in the initial function.
*/
clearWithArgs?: boolean;
/**
* Creates an observable that wraps a global event. Replaces document.addEventListener
*/
eventObservable?: boolean;
/**
* Event name, this must be set if eventObservable is set to true
*/
event?: string;
/**
* Element to attach the event listener to, this is optional, defaults to `window`
*/
element?: any;
/**
* Set to true if the wrapped method returns a promise
*/
otherPromise?: boolean;
/**
* Supported platforms
*/
platforms?: string[];
}
/**
* @private
* @param pluginRef
* @returns {null|*}
*/
export const getPlugin = function(pluginRef: string): any {
return get(window, pluginRef);
};
/**
* @private
* @param pluginObj
* @param method
*/
export const pluginWarn = function(pluginObj: any, method?: string) {
let pluginName = pluginObj.constructor.getPluginName(), plugin = pluginObj.constructor.getPlugin();
if (method) {
console.warn('Native: tried calling ' + pluginName + '.' + method + ', but the ' + pluginName + ' plugin is not installed.');
} else {
console.warn('Native: tried accessing the ' + pluginName + ' plugin but it\'s not installed.');
}
console.warn('Install the ' + pluginName + ' plugin: \'ionic plugin add ' + plugin + '\'');
};
/**
* @private
* @param pluginName
* @param method
*/
export const cordovaWarn = function(pluginName: string, method: string) {
if (method) {
console.warn('Native: tried calling ' + pluginName + '.' + method + ', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
} else {
console.warn('Native: tried accessing the ' + pluginName + ' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator');
}
};
function setIndex(args: any[], opts: any = {}, resolve?: Function, reject?: Function): any {
// ignore resolve and reject in case sync
if (opts.sync) {
return args;
}
// If the plugin method expects myMethod(success, err, options)
if (opts.callbackOrder === 'reverse') {
// Get those arguments in the order [resolve, reject, ...restOfArgs]
args.unshift(reject);
args.unshift(resolve);
} else if (opts.callbackStyle === 'node') {
args.push((err, result) => {
if (err) {
reject(err);
} else {
resolve(result);
}
});
} else if (opts.callbackStyle === 'object' && opts.successName && opts.errorName) {
let obj: any = {};
obj[opts.successName] = resolve;
obj[opts.errorName] = reject;
args.push(obj);
} else if (typeof opts.successIndex !== 'undefined' || typeof opts.errorIndex !== 'undefined') {
const setSuccessIndex = () => {
// If we've specified a success/error index
if (opts.successIndex > args.length) {
args[opts.successIndex] = resolve;
} else {
args.splice(opts.successIndex, 0, resolve);
}
};
const setErrorIndex = () => {
// We don't want that the reject cb gets spliced into the position of an optional argument that has not been defined and thus causing non expected behaviour.
if (opts.errorIndex > args.length) {
args[opts.errorIndex] = reject; // insert the reject fn at the correct specific index
} else {
args.splice(opts.errorIndex, 0, reject); // otherwise just splice it into the array
}
};
if (opts.successIndex > opts.errorIndex) {
setErrorIndex();
setSuccessIndex();
} else {
setSuccessIndex();
setErrorIndex();
}
} else {
// Otherwise, let's tack them on to the end of the argument list
// which is 90% of cases
args.push(resolve);
args.push(reject);
}
return args;
}
function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts: any = {}, resolve?: Function, reject?: Function) {
// Try to figure out where the success/error callbacks need to be bound
// to our promise resolve/reject handlers.
args = setIndex(args, opts, resolve, reject);
let pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());
if (!pluginInstance || pluginInstance[methodName] === 'undefined') {
// Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation).
if (!window.cordova) {
cordovaWarn(pluginObj.constructor.getPluginName(), methodName);
return {
error: 'cordova_not_available'
};
}
pluginWarn(pluginObj, methodName);
return {
error: 'plugin_not_installed'
};
}
return pluginInstance[methodName].apply(pluginInstance, args);
}
/**
* @private
*/
export function getPromise(cb) {
const tryNativePromise = () => {
if (window.Promise) {
return new Promise((resolve, reject) => {
cb(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.');
}
};
return tryNativePromise();
}
function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
let pluginResult, rej;
const p = getPromise((resolve, reject) => {
pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject);
rej = reject;
});
// Angular throws an error on unhandled rejection, but in this case we have already printed
// a warning that Cordova is undefined or the plugin is uninstalled, so there is no reason
// to error
if (pluginResult && pluginResult.error) {
p.catch(() => { });
rej(pluginResult.error);
}
return p;
}
function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts: any= {}) {
return getPromise((resolve, reject) => {
let pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts);
if (pluginResult && pluginResult.error) {
reject(pluginResult.error);
}
pluginResult.then(resolve).catch(reject);
});
}
function wrapObservable(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
return new Observable(observer => {
let pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer));
if (pluginResult && pluginResult.error) {
observer.error(pluginResult.error);
}
return () => {
try {
if (opts.clearFunction) {
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);
}
} catch (e) {
console.warn('Unable to clear the previous observable watch for', pluginObj.constructor.getPluginName(), methodName);
console.error(e);
}
};
});
}
function callInstance(pluginObj: any, methodName: string, args: any[], opts: any = {}, resolve?: Function, reject?: Function) {
args = setIndex(args, opts, resolve, reject);
return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance, args);
}
function wrapInstance(pluginObj: any, methodName: string, opts: any = {}) {
return (...args) => {
if (opts.sync) {
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
return callInstance(pluginObj, methodName, args, opts);
} else if (opts.observable) {
return new Observable(observer => {
let pluginResult = callInstance(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer));
return () => {
try {
if (opts.clearWithArgs) {
return pluginObj._objectInstance[opts.clearFunction].apply(pluginObj._objectInstance, args);
}
return pluginObj._objectInstance[opts.clearFunction].call(pluginObj, pluginResult);
} catch (e) {
console.warn('Unable to clear the previous observable watch for', pluginObj.constructor.getPluginName(), methodName);
console.error(e);
}
};
});
} else if (opts.otherPromise) {
return getPromise((resolve, reject) => {
let result = callInstance(pluginObj, methodName, args, opts, resolve, reject);
result.then(resolve, reject);
});
} else {
return getPromise((resolve, reject) => {
callInstance(pluginObj, methodName, args, opts, resolve, reject);
});
}
};
}
/**
* Wrap the event with an observable
* @param event even name
* @param element The element to attach the event listener to
* @returns {Observable}
*/
function wrapEventObservable(event: string, element: any = window): Observable<any> {
return Observable.fromEvent(element, event);
}
/**
* Certain plugins expect the user to override methods in the plugin. For example,
* window.cordova.plugins.backgroundMode.onactivate = function() { ... }.
*
* Unfortunately, this is brittle and would be better wrapped as an Observable. overrideFunction
* does just this.
*/
function overrideFunction(pluginObj: any, methodName: string, args: any[], opts: any = {}): Observable<any> {
return new Observable(observer => {
let pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());
if (!pluginInstance) {
// Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation).
if (!window.cordova) {
cordovaWarn(pluginObj.constructor.getPluginName(), methodName);
observer.error({
error: 'cordova_not_available'
});
}
pluginWarn(pluginObj, methodName);
observer.error({
error: 'plugin_not_installed'
});
return;
}
pluginInstance[methodName] = observer.next.bind(observer);
});
}
/**
* @private
* @param pluginObj
* @param methodName
* @param opts
* @returns {function(...[any]): (undefined|*|Observable|*|*)}
*/
export const wrap = function(pluginObj: any, methodName: string, opts: CordovaOptions = {}) {
return (...args) => {
if (opts.sync) {
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
return callCordovaPlugin(pluginObj, methodName, args, opts);
} else if (opts.observable) {
return wrapObservable(pluginObj, methodName, args, opts);
} else if (opts.eventObservable && opts.event) {
return wrapEventObservable(opts.event, opts.element);
} else if (opts.otherPromise) {
return wrapOtherPromise(pluginObj, methodName, args, opts);
} else {
return wrapPromise(pluginObj, methodName, args, opts);
}
};
};
/**
* @private
*
* Class decorator specifying Plugin metadata. Required for all plugins.
*
* @usage
* ```typescript
* @Plugin({
* pluginName: 'MyPlugin',
* plugin: 'cordova-plugin-myplugin',
* pluginRef: 'window.myplugin'
* })
* export class MyPlugin {
*
* // Plugin wrappers, properties, and functions go here ...
*
* }
* ```
*/
export function Plugin(config: PluginConfig) {
return function(cls) {
// Add these fields to the class
for (let k in config) {
cls[k] = config[k];
}
cls['installed'] = function(printWarning?: boolean) {
return !!getPlugin(config.pluginRef);
};
cls['getPlugin'] = function() {
return getPlugin(config.pluginRef);
};
cls['checkInstall'] = function() {
let pluginInstance = getPlugin(config.pluginRef);
if (!pluginInstance) {
pluginWarn(cls);
return false;
}
return true;
};
cls['getPluginName'] = function() {
return config.pluginName;
};
cls['getPluginRef'] = function() {
return config.pluginRef;
};
cls['getPluginInstallName'] = function() {
return config.plugin;
};
cls['getPluginRepo'] = function() {
return config.repo;
};
cls['getSupportedPlatforms'] = function() {
return config.platforms;
};
return cls;
};
}
/**
* @private
*
* Wrap a stub function in a call to a Cordova plugin, checking if both Cordova
* and the required plugin are installed.
*/
export function Cordova(opts: CordovaOptions = {}) {
return (target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>) => {
return {
value: function(...args: any[]) {
return wrap(this, methodName, opts).apply(this, args);
}
};
};
}
/**
* @private
*
* Wrap an instance method
*/
export function CordovaInstance(opts: any = {}) {
return (target: Object, methodName: string) => {
return {
value: function(...args: any[]) {
return wrapInstance(this, methodName, opts).apply(this, args);
}
};
};
}
/**
* @private
*
*
* Before calling the original method, ensure Cordova and the plugin are installed.
*/
export function CordovaProperty(target: any, key: string) {
const exists = () => {
let pluginInstance = getPlugin(target.pluginRef);
if (!pluginInstance || typeof pluginInstance[key] === 'undefined') {
pluginWarn(target, key);
return false;
}
return true;
};
Object.defineProperty(target, key, {
get: () => {
if (exists()) {
return getPlugin(target.pluginRef)[key];
} else {
return null;
}
},
set: (value) => {
if (exists()) {
getPlugin(target.pluginRef)[key] = value;
}
}
});
}
/**
* @private
* @param target
* @param key
* @constructor
*/
export function InstanceProperty(target: any, key: string) {
Object.defineProperty(target, key, {
get: function(){
return this._objectInstance[key];
},
set: function(value){
this._objectInstance[key] = value;
}
});
}
/**
* @private
*
* Wrap a stub function in a call to a Cordova plugin, checking if both Cordova
* and the required plugin are installed.
*/
export function CordovaFunctionOverride(opts: any = {}) {
return (target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>) => {
return {
value: function(...args: any[]) {
return overrideFunction(this, methodName, opts);
}
};
};
}
/**
* @private
*/
export interface CordovaFiniteObservableOptions extends CordovaOptions {
/**
* Function that gets a result returned from plugin's success callback, and decides whether it is last value and observable should complete.
*/
resultFinalPredicate?: (result: any) => boolean;
/**
* Function that gets called after resultFinalPredicate, and removes service data that indicates end of stream from the result.
*/
resultTransform?: (result: any) => any;
}
/**
* @private
*
* Wraps method that returns an observable that can be completed. Provided opts.resultFinalPredicate dictates when the observable completes.
*
*/
export function CordovaFiniteObservable(opts: CordovaFiniteObservableOptions = {}) {
if (opts.observable === false) {
throw new Error('CordovaFiniteObservable decorator can only be used on methods that returns observable. Please provide correct option.');
}
opts.observable = true;
return (target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>) => {
return {
value: function(...args: any[]) {
let wrappedObservable: Observable<any> = wrap(this, methodName, opts).apply(this, args);
return new Observable<any>((observer) => {
let wrappedSubscription = wrappedObservable.subscribe({
next: (x) => {
observer.next(opts.resultTransform ? opts.resultTransform(x) : x);
if (opts.resultFinalPredicate && opts.resultFinalPredicate(x)) {
observer.complete();
}
},
error: (err) => { observer.error(err); },
complete: () => { observer.complete(); }
});
return () => {
wrappedSubscription.unsubscribe();
};
});
}
};
};
}
@@ -0,0 +1,106 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
export interface ActionSheetOptions {
/**
* The labels for the buttons. Uses the index x
*/
buttonLabels: string[];
/**
* The title for the actionsheet
*/
title?: string;
/**
* Theme to be used on Android
*/
androidTheme?: number;
/**
* Enable a cancel on Android
*/
androidEnableCancelButton?: boolean;
/**
* Enable a cancel on Windows Phone
*/
winphoneEnableCancelButton?: boolean;
/**
* Add a cancel button with text
*/
addCancelButtonWithLabel?: string;
/**
* Add a destructive button with text
*/
addDestructiveButtonWithLabel?: string;
/**
* On an iPad, set the X,Y position
*/
position?: number[];
}
/**
* @name Action Sheet
* @description
* The ActionSheet plugin shows a native list of options the user can choose from.
*
* Requires Cordova plugin: `cordova-plugin-actionsheet`. For more info, please see the [ActionSheet plugin docs](https://github.com/EddyVerbruggen/cordova-plugin-actionsheet).
*
* @usage
* ```typescript
* import { ActionSheet, ActionSheetOptions } from '@ionic-native/action-sheet';
*
* constructor(private actionSheet: ActionSheet) { }
*
* ...
*
*
* let buttonLabels = ['Share via Facebook', 'Share via Twitter'];
*
* const options: ActionSheetOptions = {
* title: 'What do you want with this image?',
* buttonLabels: buttonLabels,
* addCancelButtonWithLabel: 'Cancel',
* addDestructiveButtonWithLabel: 'Delete'
* };
*
* this.actionSheet.show(options).then((buttonIndex: number) => {
* console.log('Button pressed: ' + buttonIndex);
* });
* ```
* @interfaces
* ActionSheetOptions
*/
@Plugin({
pluginName: 'ActionSheet',
plugin: 'cordova-plugin-actionsheet',
pluginRef: 'plugins.actionsheet',
repo: 'https://github.com/EddyVerbruggen/cordova-plugin-actionsheet',
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
@Injectable()
export class ActionSheet {
/**
* Show a native ActionSheet component. See below for options.
* @param options {ActionSheetOptions} Options See table below
* @returns {Promise<any>} Returns a Promise that resolves with the index of the
* button pressed (1 based, so 1, 2, 3, etc.)
*/
@Cordova()
show(options?: ActionSheetOptions): Promise<any> { return; }
/**
* Progamtically hide the native ActionSheet
* @returns {Promise<any>} Returns a Promise that resolves when the actionsheet is closed
*/
@Cordova()
hide(options?: any): Promise<any> { return; }
}
+280
View File
@@ -0,0 +1,280 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export type AdSize = 'SMART_BANNER' | 'BANNER' | 'MEDIUM_RECTANGLE' | 'FULL_BANNER' | 'LEADERBOARD' | 'SKYSCRAPER' | 'CUSTOM';
export interface AdMobOptions {
/**
* Banner ad ID
*/
adId?: string;
/**
* Banner Ad Size, defaults to `SMART_BANNER`. IT can be: `SMART_BANNER`, `BANNER`, `MEDIUM_RECTANGLE`, `FULL_BANNER`, `LEADERBOARD`, `SKYSCRAPER`, or `CUSTOM`
*/
adSize?: AdSize;
/**
* Banner width, valid when `adSize` is set to `CUSTOM`
*/
width?: number;
/**
* Banner height, valid when `adSize` is set to `CUSTOM`
*/
height?: number;
/**
* Allow banner to overlap webview, or else it will push webview up or down to avoid overlap. Defaults to false.
*/
overlap?: boolean;
/**
* Position of banner ad. Defaults to `TOP_CENTER`. You can use the `AdMob.AD_POSITION` property to select other values.
*/
position?: number;
/**
* X in pixels. Valid when `position` is set to `POS_XY`
*/
x?: number;
/**
* Y in pixels. Valid when `position` is set to `POS_XY`
*/
y?: number;
/**
* Set to true to receive test ad for testing purposes
*/
isTesting?: boolean;
/**
* Auto show interstitial ad when loaded. Set to false if hope to control the show timing with prepareInterstitial/showInterstitial
*/
autoShow?: boolean;
/**
* Re-create the banner on web view orientation change (not screen orientation), or else just move the banner. Default:true.
*/
orientationRenew?: boolean;
/**
* Set extra color style for Ad
*/
adExtras?: AdExtras;
}
export interface AdExtras {
color_bg: string;
color_bg_top: string;
color_border: string;
color_link: string;
color_text: string;
color_url: string;
}
/**
* @name AdMob
* @description
* Plugin for Google Ads, including AdMob / DFP (doubleclick for publisher) and mediations to other Ad networks.
* @usage
* ```typescript
* import { AdMob, AdMobOptions, AdSize, AdExtras } from '@ionic-native/ad-mob';
*
* constructor(private admob: AdMob){}
*
* ionViewDidLoad() {
* this.admob.onAdDismiss()
* .subscribe(() => { console.log('User dismissed ad'); });
* }
*
* onClick() {
* this.admob.prepareInterstitial('YOUR_ADID')
* .then(() => { this.admob.showInterstitial(); });
* }
*
* ```
*
* @interfaces
* AdMobOptions
* AdExtras
*/
@Plugin({
pluginName: 'AdMob',
plugin: 'cordova-plugin-admobpro',
pluginRef: 'AdMob',
repo: 'https://github.com/floatinghotpot/cordova-admob-pro',
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
@Injectable()
export class AdMob {
/**
* @private
*/
static AD_POSITION = {
NO_CHANGE: 0,
TOP_LEFT: 1,
TOP_CENTER: 2,
TOP_RIGHT: 3,
LEFT: 4,
CENTER: 5,
RIGHT: 6,
BOTTOM_LEFT: 7,
BOTTOM_CENTER: 8,
BOTTOM_RIGHT: 9,
POS_XY: 10
};
/**
* Create a banner
* @param adIdOrOptions {string | AdMobOptions} Ad ID or Options
* @returns {Promise<any>} Returns a Promise that resolves when the banner is created
*/
@Cordova()
createBanner(adIdOrOptions: string | AdMobOptions): Promise<any> { return; }
/**
* Destroy the banner, remove it from screen.
*/
@Cordova({
sync: true
})
removeBanner(): void { }
/**
* Show banner at position
* @param position {number} Position. Use `AdMob.AD_POSITION` to set values.
*/
@Cordova({
sync: true
})
showBanner(position: number): void { }
/**
* Show banner at custom position
* @param x {number} Offset from screen left.
* @param y {number} Offset from screen top.
*/
@Cordova({
sync: true
})
showBannerAtXY(x: number, y: number): void { }
/**
* Hide the banner, remove it from screen, but can show it later
*/
@Cordova({
sync: true
})
hideBanner(): void { }
/**
* Prepare interstitial banner
* @param adIdOrOptions {string | AdMobOptions} Ad ID or Options
* @returns {Promise<any>} Returns a Promise that resolves when interstitial is prepared
*/
@Cordova()
prepareInterstitial(adIdOrOptions: string | AdMobOptions): Promise<any> { return; }
/**
* Show interstitial ad when it's ready
*/
@Cordova({
sync: true
})
showInterstitial(): void { }
/**
* Prepare a reward video ad
* @param adIdOrOptions {string | AdMobOptions} Ad ID or Options
* @returns {Promise<any>} Returns a Promise that resolves when the ad is prepared
*/
@Cordova()
prepareRewardVideoAd(adIdOrOptions: string | AdMobOptions): Promise<any> { return; }
/**
* Show a reward video ad
*/
@Cordova({
sync: true
})
showRewardVideoAd(): void { }
/**
* Sets the values for configuration and targeting
* @param options {AdMobOptions} Options
* @returns {Promise<any>} Returns a Promise that resolves when the options have been set
*/
@Cordova()
setOptions(options: AdMobOptions): Promise<any> { return; }
/**
* Get user ad settings
* @returns {Promise<any>} Returns a promise that resolves with the ad settings
*/
@Cordova()
getAdSettings(): Promise<any> { return; }
/**
* Triggered when failed to receive Ad
* @returns {Observable<any>}
*/
@Cordova({
eventObservable: true,
event: 'onAdFailLoad'
})
onAdFailLoad(): Observable<any> { return; }
/**
* Triggered when Ad received
* @returns {Observable<any>}
*/
@Cordova({
eventObservable: true,
event: 'onAdLoaded'
})
onAdLoaded(): Observable<any> { return; }
/**
* Triggered when Ad will be showed on screen
* @returns {Observable<any>}
*/
@Cordova({
eventObservable: true,
event: 'onAdPresent'
})
onAdPresent(): Observable<any> { return; }
/**
* Triggered when user click the Ad, and will jump out of your App
* @returns {Observable<any>}
*/
@Cordova({
eventObservable: true,
event: 'onAdLeaveApp'
})
onAdLeaveApp(): Observable<any> { return; }
/**
* Triggered when dismiss the Ad and back to your App
* @returns {Observable<any>}
*/
@Cordova({
eventObservable: true,
event: 'onAdDismiss'
})
onAdDismiss(): Observable<any> { return; }
}
+115
View File
@@ -0,0 +1,115 @@
import { Plugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
export interface AlipayOrder {
/**
* appId assigned by Alipay
*/
app_id: string;
/**
* Api name.
* Should be: alipay.trade.app.pay
*/
method: string;
/**
* Data format
* Default: "JSON"
*/
format?: string;
/**
* Charset
* Possible values: "UTF-8", "GBK"
* Default: "UTF-8"
*/
charset: string;
/**
* Sign method
* Default: 'RSA'
*/
sign_type: string;
/**
* Sign value. Should be got from server side.
* Default: 'RSA'
*/
sign: string;
/**
* Timestamp, formated like "yyyy-MM-dd HH:mm:ss", e.g. 2014-07-24 03:07:50
*/
timestamp: string;
/**
* Api version. Fixed value '1.0'
*/
version: string;
/**
* Notify url.
*/
notify_url: string;
/**
* biz content. formated in json. see alipay doc for detail.
*/
biz_content: string;
}
/**
* @name Alipay
* @description
* This plugin is used for Alipay APP support. Integrated with the latest SDK.
*
* Requires Cordova plugin: `cordova-alipay-base`. For more info, please see the [Alipay plugin docs](https://github.com/xueron/cordova-alipay-base).
*
* @usage
* ```
* import { Alipay, AlipayOrder } from '@ionic-native/alipay';
*
* constructor(private alipay: Alipay) {
*
* // Should get from server side with sign.
* const alipayOrder: AlipayOrder = {
* ...
* };
*
*
* this.alipay.pay(alipayOrder)
* .then(result => {
* console.log(result); // Success
* })
* .catch(error => {
* console.log(error); // Failed
* });
*
* }
*
*
* ```
*
* @interfaces
* AlipayOrder
*/
@Plugin({
pluginName: 'Alipay',
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'
})
@Injectable()
export class Alipay {
/**
* Open Alipay to perform App pay
* @param order { AlipayOrder } alipay options
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova()
pay(order: AlipayOrder): Promise<any> { return; }
}
@@ -0,0 +1,181 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
export interface AFAAuthOptions {
/**
* Required
* Used as the alias for your key in the Android Key Store.
*/
clientId: string;
/**
* Used to create credential string for encrypted token and as alias to retrieve the cipher.
*/
username?: string;
/**
* Used to create credential string for encrypted token
*/
password?: string;
/**
* Required for decrypt()
* Encrypted user credentials to decrypt upon successful authentication.
*/
token?: string;
/**
* Set to true to remove the "USE BACKUP" button
*/
disableBackup?: boolean;
/**
* Change the language. (en_US or es)
*/
locale?: string;
/**
* The device max is 5 attempts. Set this parameter if you want to allow fewer than 5 attempts.
*/
maxAttempts?: number;
/**
* Require the user to authenticate with a fingerprint to authorize every use of the key.
* New fingerprint enrollment will invalidate key and require backup authenticate to
* re-enable the fingerprint authentication dialog.
*/
userAuthRequired?: boolean;
/**
* Set the title of the fingerprint authentication dialog.
*/
dialogTitle?: string;
/**
* Set the message of the fingerprint authentication dialog.
*/
dialogMessage?: string;
/**
* Set the hint displayed by the fingerprint icon on the fingerprint authentication dialog.
*/
dialogHint?: string;
}
export interface AFADecryptOptions {
/**
* Biometric authentication
*/
withFingerprint: boolean;
/**
* Authentication using backup credential activity
*/
withBackup: boolean;
/**
* FingerprintAuth.CipherMode.DECRYPT
* Decrypted password
*/
password: string;
}
export interface AFAEncryptResponse {
/**
* Biometric authentication
*/
withFingerprint: boolean;
/**
* Authentication using backup credential activity
*/
withBackup: boolean;
/**
* base64encoded string representation of user credentials
*/
token: string;
}
/**
* @name Android Fingerprint Auth
* @description
* This plugin will open a native dialog fragment prompting the user to authenticate using their fingerprint. If the device has a secure lockscreen (pattern, PIN, or password), the user may opt to authenticate using that method as a backup.
* @usage
* ```typescript
* import { AndroidFingerprintAuth, AFAAuthOptions } from '@ionic-native/android-fingerprint-auth';
*
* constructor(private androidFingerprintAuth: AndroidFingerprintAuth) { }
*
* ...
*
*
* this.androidFingerprintAuth.isAvailable()
* .then((result)=> {
* if(result.isAvailable){
* // it is available
*
* this.androidFingerprintAuth.encrypt({ clientId: "myAppName", username: "myUsername", password: "myPassword" })
* .then(result => {
* if (result.withFingerprint) {
* console.log("Successfully encrypted credentials.");
* console.log("Encrypted credentials: " + result.token);
* } else if (result.withBackup) {
* console.log('Successfully authenticated with backup password!');
* } else console.log('Didn\'t authenticate!');
* })
* .catch(error => {
* if (error === "Cancelled") {
* console.log("Fingerprint authentication cancelled");
* } else console.error(error)
* });
*
* } else {
* // fingerprint auth isn't available
* }
* })
* .catch(error => console.error(error));
* ```
* @interfaces
* AFAAuthOptions
* AFAEncryptResponse
* AFADecryptOptions
*/
@Plugin({
pluginName: 'AndroidFingerprintAuth',
plugin: 'cordova-plugin-android-fingerprint-auth',
pluginRef: 'FingerprintAuth',
repo: 'https://github.com/mjwheatley/cordova-plugin-android-fingerprint-auth'
})
@Injectable()
export class AndroidFingerprintAuth {
/**
* Opens a native dialog fragment to use the device hardware fingerprint scanner to authenticate against fingerprints registered for the device.
* @param options {AFAAuthOptions} Options
* @returns {Promise<any>}
*/
@Cordova()
encrypt(options: AFAAuthOptions): Promise<AFAEncryptResponse> {return; }
/**
* Opens a native dialog fragment to use the device hardware fingerprint scanner to authenticate against fingerprints registered for the device.
* @param options {AFAAuthOptions} Options
* @returns {Promise<any>}
*/
@Cordova()
decrypt(options: AFAAuthOptions): Promise<AFADecryptOptions> {return; }
/**
* Check if service is available
* @returns {Promise<any>} Returns a Promise that resolves if fingerprint auth is available on the device
*/
@Cordova()
isAvailable(): Promise<{isAvailable: boolean}> { return; }
/**
* Delete the cipher used for encryption and decryption by username
* @returns {Promise<any>} Returns a Promise that resolves if the cipher was successfully deleted
*/
@Cordova()
delete(options: {clientId: string; username: string; }): Promise<{deleted: boolean}> { return; }
}
@@ -1,4 +1,5 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name App Availability
@@ -9,18 +10,22 @@ import { Cordova, Plugin } from './plugin';
*
* @usage
* ```typescript
* import { AppAvailability } from 'ionic-native';
* import { AppAvailability } from '@ionic-native/app-availability';
* import { Platform } from 'ionic-angular';
*
* constructor(private appAvailability: AppAvailability, private platform: Platform) { }
*
* ...
*
* let app;
*
* if (device.platform === 'iOS') {
* if (this.platform.is('ios')) {
* app = 'twitter://';
* } else if (device.platform === 'Android') {
* } else if (this.platform.is('android')) {
* app = 'com.twitter.android';
* }
*
* AppAvailability.check(app)
* this.appAvailability.check(app)
* .then(
* (yes: string) => console.log(app + ' is available'),
* (no: string) => console.log(app + ' is NOT available')
@@ -28,11 +33,13 @@ import { Cordova, Plugin } from './plugin';
* ```
*/
@Plugin({
pluginName: 'AppAvailability',
plugin: 'cordova-plugin-appavailability',
pluginRef: 'appAvailability',
repo: 'https://github.com/ohh2ahh/AppAvailability',
platforms: ['Android', 'iOS']
})
@Injectable()
export class AppAvailability {
/**
@@ -41,6 +48,6 @@ export class AppAvailability {
* @returns {Promise<boolean>}
*/
@Cordova()
static check(app: string): Promise<boolean> { return; }
check(app: string): Promise<boolean> { return; }
}
@@ -0,0 +1,139 @@
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
/**
* @name App Preferences
* @description
* This plugin allows you to read and write app preferences
*
* @usage
* ```typescript
* import { AppPreferences } from '@ionic-native/app-preferences';
*
* constructor(private appPreferences: AppPreferences) {
*
* this.appPreferences.fetch('key').then((res) => { console.log(res); });
*
* }
* ```
*
*/
@Plugin({
pluginName: 'AppPreferences',
plugin: 'cordova-plugin-app-preferences', // npm package name, example: cordova-plugin-camera
pluginRef: 'plugins.appPreferences', // the variable reference to call the plugin, example: navigator.geolocation
repo: 'https://github.com/apla/me.apla.cordova.app-preferences', // the github repository URL for the plugin
})
@Injectable()
export class AppPreferences {
/**
* Get a preference value
*
* @param {string} dict Dictionary for key (OPTIONAL)
* @param {string} key Key
* @return {Promise<any>} Returns a promise
*/
@Cordova({
sync: true,
callbackOrder: 'reverse'
})
fetch(dict: string, key?: string): Promise<any> { return; }
/**
* Set a preference value
*
* @param {string} dict Dictionary for key (OPTIONAL)
* @param {string} key Key
* @param {string} value Value
* @return {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse'
})
store(dict: string, key: string, value?: string): Promise<any> {
return;
}
/**
* Remove value from preferences
*
* @param {string} dict Dictionary for key (OPTIONAL)
* @param {string} key Key
* @return {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse'
})
remove(dict: string, key?: string): Promise<any> { return; }
/**
* Clear preferences
*
* @return {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse'
})
clearAll(): Promise<any> { return; }
/**
* Show native preferences interface
*
* @return {Promise<any>} Returns a promise
*/
@Cordova({
callbackOrder: 'reverse'
})
show(): Promise<any> { return; }
/**
* Show native preferences interface
*
* @param {boolean} subscribe true value to subscribe, false - unsubscribe
* @return {Observable<any>} Returns an observable
*/
@Cordova({
observable: true
})
watch(subscribe: boolean): Observable<any> { return; }
/**
* Return named configuration context
* In iOS you'll get a suite configuration, on Android — named file
* Supports: Android, iOS
* @param {string} suiteName suite name
* @returns {Object} Custom object, bound to that suite
*/
@Cordova({
platforms: ['Android']
})
suite(suiteName: string): Object { return; }
@Cordova({
platforms: ['iOS']
})
iosSuite(suiteName: string): Object { return; }
/**
* Return cloud synchronized configuration context
* Currently supports Windows and iOS/macOS
* @returns {Object} Custom object, bound to that suite
*/
@Cordova({
platforms: ['iOS', 'Windows', 'Windows Phone 8']
})
cloudSync(): Object { return; }
/**
* Return default configuration context
* Currently supports Windows and iOS/macOS
* @returns {Object} Custom Object, bound to that suite
*/
@Cordova({
platforms: ['iOS', 'Windows', 'Windows Phone 8']
})
defaults(): Object { return; }
}
+153
View File
@@ -0,0 +1,153 @@
import { Injectable } from '@angular/core';
import { Cordova, CordovaProperty, Plugin } from '@ionic-native/core';
declare var window;
export interface AppRatePreferences {
/**
* Custom BCP 47 language tag
*/
useLanguage?: string;
/**
* Custom application title
*/
displayAppName?: string;
/**
* Show dialog again when application version will be updated. Defaults to `true`
*/
promptAgainForEachNewVersion?: boolean;
/**
* count of runs of application before dialog will be displayed. Defaults to `3`
*/
usesUntilPrompt?: number;
/**
* leave app or no when application page opened in app store (now supported only for iOS). Defaults to `false`
*/
openStoreInApp?: boolean;
/**
* use custom view for rate dialog. Defaults to `false`
*/
useCustomRateDialog?: boolean;
/**
* Custom locale object
*/
customLocale?: any;
/**
* Callbacks for events
*/
callbacks?: AppRateCallbacks;
/**
* App Store URLS
*/
storeAppURL?: AppUrls;
}
export interface AppRateCallbacks {
/**
* call back function. called when user clicked on rate-dialog buttons
*/
onButtonClicked?: Function;
/**
* call back function. called when rate-dialog showing
*/
onRateDialogShow?: Function;
}
export interface AppUrls {
/**
* application id in AppStore
*/
ios?: string;
/**
* application URL in GooglePlay
*/
android?: string;
/**
* application URL in Windows Store
*/
windows?: string;
/**
* application URL in AppWorld
*/
blackberry?: string;
/**
* application URL in WindowsStore
*/
windows8?: string;
}
/**
* @name App Rate
* @description
* The AppRate plugin makes it easy to prompt the user to rate your app, either now, later, or never.
*
* Requires Cordova plugin: cordova-plugin-apprate. For more info, please see the [AppRate plugin docs](https://github.com/pushandplay/cordova-plugin-apprate).
*
* @usage
* ```typescript
* import { AppRate } from '@ionic-native/app-rate';
*
* constructor(private appRate: AppRate) { }
*
* ...
*
* this.appRate.preferences.storeAppURL = {
* ios: '<my_app_id>',
* android: 'market://details?id=<package_name>',
* windows: 'ms-windows-store://review/?ProductId=<Store_ID>'
* };
*
* this.appRate.promptForRating(false);
* ```
*
* @interfaces
* AppRatePreferences
* AppUrls
* AppRateCallbacks
*
*/
@Plugin({
pluginName: 'AppRate',
plugin: 'cordova-plugin-apprate',
pluginRef: 'AppRate',
repo: 'https://github.com/pushandplay/cordova-plugin-apprate',
platforms: ['Android', 'iOS', 'Windows (experimental)']
})
@Injectable()
export class AppRate {
/**
* Configure various settings for the Rating View.
* See table below for options
*/
@CordovaProperty
preferences: AppRatePreferences;
/**
* Prompts the user for rating
* @param {boolean} immediately Show the rating prompt immediately.
*/
@Cordova()
promptForRating(immediately: boolean): void { };
}
@@ -0,0 +1,56 @@
import { Plugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @name App Update
* @description
* This plugin does self-update for android
*
* @usage
*
* You should first host an XML file on your server with the following data in it:
* ```xml
* <update>
* <version>302048</version>
* <name>APK Name</name>
* <url>https://your-remote-api.com/YourApp.apk</url>
* </update>
* ```
*
* Then use the following code:
*
* ```
* import { AppUpdate } from '@ionic-native/app-update';
*
* constructor(private appUpdate: AppUpdate) {
*
* const updateUrl = 'http://your-remote-api.com/update.xml';
* this.appUpdate.checkAppUpdate(updateUrl);
*
* }
*
*
* ```
*
* The plugin will compare the app version and update it automatically if the API has a newer version to install.
*/
@Plugin({
pluginName: 'AppUpdate',
plugin: 'cordova-plugin-app-update',
pluginRef: 'AppUpdate',
repo: 'https://github.com/vaenow/cordova-plugin-app-update',
platforms: ['Android']
})
@Injectable()
export class AppUpdate {
/**
* Check and update
* @param updateUrl {string} update api url
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova({
callbackOrder: 'reverse'
})
checkAppUpdate(updateUrl: string): Promise<any> { return; }
}
@@ -1,4 +1,7 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name App Version
@@ -9,48 +12,56 @@ import { Cordova, Plugin } from './plugin';
*
* @usage
* ```typescript
* import { AppVersion } from 'ionic-native';
* import { AppVersion } from '@ionic-native/app-version';
*
* constructor(private appVersion: AppVersion) { }
*
* ...
*
*
* AppVersion.getAppName();
* AppVersion.getPackageName();
* AppVersion.getVersionCode();
* AppVersion.getVersionNumber();
* this.appVersion.getAppName();
* this.appVersion.getPackageName();
* this.appVersion.getVersionCode();
* this.appVersion.getVersionNumber();
*
* ```
*/
@Plugin({
pluginName: 'AppVersion',
plugin: 'cordova-plugin-app-version',
pluginRef: 'cordova.getAppVersion',
repo: 'https://github.com/whiteoctober/cordova-plugin-app-version',
platforms: ['Android', 'iOS']
})
@Injectable()
export class AppVersion {
/**
* Returns the name of the app
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static getAppName(): Promise<any> { return; }
getAppName(): Promise<any> { return; }
/**
* Returns the package name of the app
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static getPackageName(): Promise<any> { return; }
getPackageName(): Promise<any> { return; }
/**
* Returns the build identifier of the app
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static getVersionCode(): Promise<any> { return; }
getVersionCode(): Promise<any> { return; }
/**
* Returns the version of the app
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static getVersionNumber(): Promise<any> { return; }
getVersionNumber(): Promise<any> { return; }
}
+519
View File
@@ -0,0 +1,519 @@
import { Plugin, Cordova } from '@ionic-native/core';
import { Observable } from 'rxjs';
import { Injectable } from '@angular/core';
/**
* @name Appodeal
* @description
* Plugin to serve ads through native Appodeal SDKs
*
* @usage
* ```
* import { Appodeal } from '@ionic-native/appodeal';
*
* constructor(private appodeal: Appodeal) {
*
* const appKey = '<your app key>';
* appodeal.initialize(appKey, appodeal.AD_TYPES.REWARDED_VIDEO);
* appodeal.show(appodeal.AD_TYPES.REWARDED_VIDEO);
*
* }
*
*
*
* ```
*/
@Plugin({
pluginName: 'Appodeal',
plugin: 'https://github.com/appodeal/appodeal-cordova-plugin',
pluginRef: 'Appodeal',
repo: 'https://github.com/appodeal/appodeal-cordova-plugin.git',
platforms: [ 'ios', 'android' ]
})
@Injectable()
export class Appodeal {
// available types of advertisements
readonly AD_TYPES = {
INTERSTITIAL: 1,
SKIPPABLE_VIDEO: 2,
BANNER: 4,
BANNER_BOTTOM: 8,
BANNER_TOP: 16,
REWARDED_VIDEO: 128,
NON_SKIPPABLE_VIDEO: 256
};
/**
* initialize Appodeal SDK
* @param {string} appKey
* @param {number} adType
*/
@Cordova()
initialize(appKey: string, adType: number): void {};
/**
* check if SDK has been initialized
* @returns {Promise<boolean>}
*/
@Cordova()
isInitialized(): Promise<any> { return; };
/**
* show ad of specified type
* @param {number} adType
* @returns {Promise<boolean>}
*/
@Cordova()
show(adType: number): Promise<any> { return; };
/**
* show ad of specified type with placement options
* @param {number} adType
* @param {any} placement
* @returns {Promise<boolean>}
*/
@Cordova()
showWithPlacement(
adType: number,
placement: any
): Promise<any> { return; };
/**
* hide ad of specified type
* @param {number} adType
*/
@Cordova()
hide(adType: number): void {};
/**
* confirm use of ads of specified type
* @param {number} adType
*/
@Cordova()
confirm(adType: number): void {};
/**
* check if ad of specified type has been loaded
* @param {number} adType
* @returns {Promise<boolean>}
*/
@Cordova()
isLoaded(adType: number): Promise<any> { return; };
/**
* check if ad of specified
* @param {number} adType
* @returns {Promise<boolean>}
*/
@Cordova()
isPrecache(adType: number): Promise<any> { return; };
/**
*
* @param {number} adType
* @param autoCache
*/
@Cordova()
setAutoCache(adType: number, autoCache: any): void {};
/**
* forcefully cache an ad by type
* @param {number} adType
*/
@Cordova()
cache(adType: number): void {};
/**
*
* @param {boolean} set
*/
@Cordova()
setOnLoadedTriggerBoth(set: boolean): void {};
/**
* enable or disable Smart Banners
* @param {boolean} enabled
*/
@Cordova()
setSmartBanners(enabled: boolean): void {};
/**
* enable or disable banner backgrounds
* @param {boolean} enabled
*/
@Cordova()
setBannerBackground(enabled: boolean): void {};
/**
* enable or disable banner animations
* @param {boolean} enabled
*/
@Cordova()
setBannerAnimation(enabled: boolean): void {};
/**
*
* @param value
*/
@Cordova()
set728x90Banners(value: any): void {};
/**
* enable or disable logging
* @param {boolean} logging
*/
@Cordova()
setLogging(logging: boolean): void {};
/**
* enable or disable testing mode
* @param {boolean} testing
*/
@Cordova()
setTesting(testing: boolean): void {};
/**
* reset device ID
*/
@Cordova()
resetUUID(): void {};
/**
* get version of Appdeal SDK
*/
@Cordova()
getVersion(): Promise<any> { return; };
/**
*
* @param {string} network
* @param {number} adType
*/
@Cordova()
disableNetwork(network?: string, adType?: number): void {};
/**
*
* @param {string} network
* @param {number} adType
*/
@Cordova()
disableNetworkType(network?: string, adType?: number): void {};
/**
* disable Location permissions for Appodeal SDK
*/
@Cordova()
disableLocationPermissionCheck(): void {};
/**
* disable Storage permissions for Appodeal SDK
*/
@Cordova()
disableWriteExternalStoragePermissionCheck(): void {};
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableInterstitialCallbacks(enabled: boolean): void {};
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableSkippableVideoCallbacks(enabled: boolean): void {};
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableNonSkippableVideoCallbacks(enabled: boolean): void {};
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableBannerCallbacks(enabled: boolean): void {};
/**
* enable event listeners
* @param {boolean} enabled
*/
@Cordova()
enableRewardedVideoCallbacks(enabled: boolean): void {};
/**
*
* @param {string} name - name of rule
* @param {boolean} value
*/
@Cordova()
setCustomBooleanRule(name: string, value: boolean): void {};
/**
*
* @param {string} name - name of rule
* @param {number} value
*/
@Cordova()
setCustomIntegerRule(name: string, value: number): void {};
/**
* set rule with float value
* @param {string} name
* @param {number} value
*/
@Cordova()
setCustomDoubleRule(name: string, value: number): void {};
/**
* set rule with string value
* @param {string} name - name of rule
* @param {string} value
*/
@Cordova()
setCustomStringRule(name: string, value: string): void {};
/**
* set ID preference in Appodeal for current user
* @param id
*/
@Cordova()
setUserId(id: any): void {};
/**
* set Email preference in Appodeal for current user
* @param email
*/
@Cordova()
setEmail(email: any): void {};
/**
* set Birthday preference in Appodeal for current user
* @param birthday
*/
@Cordova()
setBirthday(birthday: any): void {};
/**
* et Age preference in Appodeal for current user
* @param age
*/
@Cordova()
setAge(age: any): void {};
/**
* set Gender preference in Appodeal for current user
* @param gender
*/
@Cordova()
setGender(gender: any): void {};
/**
* set Occupation preference in Appodeal for current user
* @param occupation
*/
@Cordova()
setOccupation(occupation: any): void {};
/**
* set Relation preference in Appodeal for current user
* @param relation
*/
@Cordova()
setRelation(relation: any): void {};
/**
* set Smoking preference in Appodeal for current user
* @param smoking
*/
@Cordova()
setSmoking(smoking: any): void {};
/**
* set Alcohol preference in Appodeal for current user
* @param alcohol
*/
@Cordova()
setAlcohol(alcohol: any): void {};
/**
* set Interests preference in Appodeal for current user
* @param interests
*/
@Cordova()
setInterests(interests: any): void {};
@Cordova({
eventObservable: true,
event: 'onInterstitialLoaded',
element: document
})
onInterstitialLoaded(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onInterstitialFailedToLoad',
element: document
})
onInterstitialFailedToLoad(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onInterstitialShown',
element: document
})
onInterstitialShown(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onInterstitialClicked',
element: document
})
onInterstitialClicked(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onInterstitialClosed',
element: document
})
onInterstitialClosed(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onSkippableVideoLoaded',
element: document
})
onSkippableVideoLoaded(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onSkippableVideoFailedToLoad',
element: document
})
onSkippableVideoFailedToLoad(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onSkippableVideoShown',
element: document
})
onSkippableVideoShown(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onSkippableVideoFinished',
element: document
})
onSkippableVideoFinished(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onSkippableVideoClosed',
element: document
})
onSkippableVideoClosed(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onRewardedVideoLoaded',
element: document
})
onRewardedVideoLoaded(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onRewardedVideoFailedToLoad',
element: document
})
onRewardedVideoFailedToLoad(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onRewardedVideoShown',
element: document
})
onRewardedVideoShown(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onRewardedVideoFinished',
element: document
})
onRewardedVideoFinished(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onRewardedVideoClosed',
element: document
})
onRewardedVideoClosed(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoLoaded',
element: document
})
onNonSkippableVideoLoaded(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoFailedToLoad',
element: document
})
onNonSkippableVideoFailedToLoad(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoShown',
element: document
})
onNonSkippableVideoShown(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoFinished',
element: document
})
onNonSkippableVideoFinished(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onNonSkippableVideoClosed',
element: document
})
onNonSkippableVideoClosed(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onBannerClicked',
element: document
})
onBannerClicked(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onBannerFailedToLoad',
element: document
})
onBannerFailedToLoad(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onBannerLoaded',
element: document
})
onBannerLoaded(): Observable<any> { return; }
@Cordova({
eventObservable: true,
event: 'onBannerShown',
element: document
})
onBannerShown(): Observable<any> { return; }
}
@@ -0,0 +1,103 @@
import { Cordova, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
declare var window;
export interface BackgroundFetchConfig {
/**
* Set true to cease background-fetch from operating after user "closes" the app. Defaults to true.
*/
stopOnTerminate?: boolean;
}
/**
* @name Background Fetch
* @description
* iOS Background Fetch Implementation. See: https://developer.apple.com/reference/uikit/uiapplication#1657399
* iOS Background Fetch is basically an API which wakes up your app about every 15 minutes (during the user's prime-time hours) and provides your app exactly 30s of background running-time. This plugin will execute your provided callbackFn whenever a background-fetch event occurs. There is no way to increase the rate which a fetch-event occurs and this plugin sets the rate to the most frequent possible value of UIApplicationBackgroundFetchIntervalMinimum -- iOS determines the rate automatically based upon device usage and time-of-day (ie: fetch-rate is about ~15min during prime-time hours; less frequently when the user is presumed to be sleeping, at 3am for example).
* For more detail, please see https://github.com/transistorsoft/cordova-plugin-background-fetch
*
* @usage
*
* ```typescript
* import { BackgroundFetch, BackgroundFetchConfig } from '@ionic-native/background-fetch';
*
*
* constructor(private backgroundFetch: BackgroundFetch) {
*
* const config: BackgroundFetchConfig = {
* stopOnTerminate: false, // Set true to cease background-fetch from operating after user "closes" the app. Defaults to true.
* };
*
* backgroundFetch.configure(config)
* .then(() => {
* console.log('Background Fetch initialized');
*
* this.backgroundFetch.finish();
*
* })
* .catch(e => console.log('Error initializing background fetch', e));
*
* // Start the background-fetch API. Your callbackFn provided to #configure will be executed each time a background-fetch event occurs. NOTE the #configure method automatically calls #start. You do not have to call this method after you #configure the plugin
* backgroundFetch.start();
*
* // Stop the background-fetch API from firing fetch events. Your callbackFn provided to #configure will no longer be executed.
* backgroundFetch.stop();
*
*
* }
*
* ```
* @interfaces
* BackgroundFetchConfig
*
*/
@Plugin({
pluginName: 'BackgroundFetch',
plugin: 'cordova-plugin-background-fetch',
pluginRef: 'BackgroundFetch',
repo: 'https://github.com/transistorsoft/cordova-plugin-background-fetch',
platforms: ['iOS']
})
@Injectable()
export class BackgroundFetch {
/**
* Configures the plugin's fetch callbackFn
*
* @param {BackgroundFetchConfig} config Configuration for plugin
* @return {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse'
})
configure(config: BackgroundFetchConfig): Promise<any> { return; }
/**
* Start the background-fetch API.
* Your callbackFn provided to #configure will be executed each time a background-fetch event occurs. NOTE the #configure method automatically calls #start. You do not have to call this method after you #configure the plugin
* @returns {Promise<any>}
*/
@Cordova()
start(): Promise<any> { return; }
/**
* Stop the background-fetch API from firing fetch events. Your callbackFn provided to #configure will no longer be executed.
* @returns {Promise<any>}
*/
@Cordova()
stop(): Promise<any> { return; }
/**
* You MUST call this method in your fetch callbackFn provided to #configure in order to signal to iOS that your fetch action is complete. iOS provides only 30s of background-time for a fetch-event -- if you exceed this 30s, iOS will kill your app.
*/
@Cordova({
sync: true
})
finish(): void { }
}
@@ -0,0 +1,549 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare var window;
export interface BackgroundGeolocationResponse {
/**
* ID of location as stored in DB (or null)
*/
locationId: number;
/**
* Service provider
*/
serviceProvider: string;
/**
* true if location recorded as part of debug
*/
debug: boolean;
/**
* UTC time of this fix, in milliseconds since January 1, 1970.
*/
time: number;
/**
* latitude, in degrees.
*/
latitude: number;
/**
* longitude, in degrees.
*/
longitude: number;
/**
* estimated accuracy of this location, in meters.
*/
accuracy: number;
/**
* speed if it is available, in meters/second over ground.
*/
speed: number;
/**
* altitude if available, in meters above the WGS 84 reference ellipsoid.
*/
altitude: number;
/**
* accuracy of the altitude if available.
*/
altitudeAccuracy: number;
/**
* bearing, in degrees.
*/
bearing: number;
/**
* A Coordinates object defining the current location
*/
coords: Coordinates;
/**
* A timestamp representing the time at which the location was retrieved.
*/
timestamp: number;
}
export interface BackgroundGeolocationConfig {
/**
* Desired accuracy in meters. Possible values [0, 10, 100, 1000]. The lower
* the number, the more power devoted to GeoLocation resulting in higher
* accuracy readings. 1000 results in lowest power drain and least accurate
* readings. @see Apple docs (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html#//apple_ref/occ/instp/CLLocationManager/desiredAccuracy)
*/
desiredAccuracy: number;
/**
* Stationary radius in meters. When stopped, the minimum distance the device
* must move beyond the stationary location for aggressive background-tracking
* to engage.
*/
stationaryRadius: number;
/**
* When enabled, the plugin will emit sounds for life-cycle events of
* background-geolocation! See debugging sounds table.
*/
debug?: boolean;
/**
* The minimum distance (measured in meters) a device must move horizontally
* before an update event is generated. @see Apple docs. (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/occ/instp/CLLocationManager/distanceFilter)
*/
distanceFilter: number;
/**
* IOS, ANDROID ONLY
* Enable this in order to force a stop() when the application terminated
* (e.g. on iOS, double-tap home button, swipe away the app).o
*
* Defaults to true
*/
stopOnTerminate?: boolean;
/**
* ANDROID ONLY
* Start background service on device boot.
*
* Defaults to false
*/
startOnBoot?: boolean;
/**
* ANDROID ONLY
* If false location service will not be started in foreground and no notification will be shown.
*
* Defaults to true
*/
startForeground?: boolean;
/**
* ANDROID, WP8 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))
* and the MS doc (http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.geolocation.geolocator.reportinterval)
* for more information
* When using BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER:
* Rate in milliseconds at which your app prefers to receive location updates.
* @see Android docs (https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html#getInterval())
*/
interval?: number;
/**
* ANDROID ONLY
* Custom notification title in the drawer.
*/
notificationTitle?: string;
/**
* ANDROID ONLY
* Custom notification text in the drawer.
*/
notificationText?: string;
/**
* ANDROID ONLY
* The accent color to use for notification. Eg. #4CAF50.
*/
notificationIconColor?: string;
/**
* ANDROID ONLY
* The filename of a custom notification icon. See android quirks.
* NOTE: Only available for API Level >=21.
*/
notificationIconLarge?: string;
/**
* ANDROID ONLY
* The filename of a custom notification icon. See android quirks.
* NOTE: Only available for API Level >=21.
*/
notificationIconSmall?: string;
/**
* ANDROID ONLY
* Set location service provider @see wiki (https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers)
*/
locationProvider?: number;
/**
* IOS ONLY
* [AutomotiveNavigation, OtherNavigation, Fitness, Other] Presumably,
* this affects iOS GPS algorithm. @see Apple docs for more information
* (https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/occ/instp/CLLocationManager/activityType)
*/
activityType?: string;
/**
* IOS ONLY
* Pauses location updates when app is paused
*
* Defaults to true
*/
pauseLocationUpdates?: boolean;
/**
* Server url where to send HTTP POST with recorded locations
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
*/
url?: string;
/**
* Server url where to send fail to post locations
* @see https://github.com/mauron85/cordova-plugin-background-geolocation#http-locations-posting
*/
syncUrl?: string;
/**
* Specifies how many previously failed locations will be sent to server at once
*
* Defaults to 100
*/
syncThreshold?: number;
/**
* Optional HTTP headers sent along in HTTP request
*/
httpHeaders?: any;
/**
* IOS ONLY
* Switch to less accurate significant changes and region monitory when in background (default)
*
* Defaults to 100
*/
saveBatteryOnBackground?: boolean;
/**
* Limit maximum number of locations stored into db
*
* Defaults to 10000
*/
maxLocations?: number;
/**
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
*
* Fastest rate in milliseconds at which your app can handle location updates.
* @see Android docs (https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html#getFastestInterval())
*/
fastestInterval?: number;
/**
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
*
* Rate in milliseconds at which activity recognition occurs. Larger values will result in fewer activity detections while improving battery life.
*/
activitiesInterval?: number;
/**
* ANDROID ONLY with BackgroundGeolocation.LocationProvider.ANDROID_ACTIVITY_PROVIDER
*
* stop() is forced, when the STILL activity is detected (default is true)
*/
stopOnStillActivity?: boolean;
}
/**
* @name BackgroundGeolocation
* @description
* This plugin provides foreground and background geolocation with battery-saving "circular region monitoring" and "stop detection". For
* more detail, please see https://github.com/mauron85/cordova-plugin-background-geolocation
*
* @usage
*
* BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission.
*
* ```typescript
* import { BackgroundGeolocation, BackgroundGeolocationConfig } from '@ionic-native/background-geolocation';
*
* constructor(private backgroundGeolocation: BackgroundGeolocation) { }
*
* ...
*
* const config: BackgroundGeolocationConfig = {
* desiredAccuracy: 10,
* stationaryRadius: 20,
* distanceFilter: 30,
* debug: true, // enable this hear sounds for background-geolocation life-cycle.
* stopOnTerminate: false, // enable this to clear background location settings when the app terminates
* };
*
* this.backgroundGeolocation.configure(config)
* .subscribe((location: BackgroundGeolocationResponse) => {
*
* console.log(location);
*
* // IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,
* // and the background-task may be completed. You must do this regardless if your HTTP request is successful or not.
* // IF YOU DON'T, ios will CRASH YOUR APP for spending too much time in the background.
* BackgroundGeolocation.finish(); // FOR IOS ONLY
*
* });
*
* // start recording location
* this.backgroundGeolocation.start();
*
* // If you wish to turn OFF background-tracking, call the #stop method.
* this.backgroundGeolocation.stop();
*
* ```
* @interfaces
* BackgroundGeolocationResponse
* BackgroundGeolocationConfig
*/
@Plugin({
pluginName: 'BackgroundGeolocation',
plugin: 'cordova-plugin-mauron85-background-geolocation',
pluginRef: 'backgroundGeolocation',
repo: 'https://github.com/mauron85/cordova-plugin-background-geolocation',
platforms: ['iOS', 'Android', 'Windows Phone 8']
})
@Injectable()
export class BackgroundGeolocation {
/**
* Set location service provider @see https://github.com/mauron85/cordova-plugin-background-geolocation/wiki/Android-providers
*
* Possible values:
* ANDROID_DISTANCE_FILTER_PROVIDER: 0,
* ANDROID_ACTIVITY_PROVIDER: 1
*
* @enum {number}
*/
static LocationProvider: any = {
ANDROID_DISTANCE_FILTER_PROVIDER: 0,
ANDROID_ACTIVITY_PROVIDER: 1
};
/**
* Desired accuracy in meters. Possible values [0, 10, 100, 1000].
* The lower the number, the more power devoted to GeoLocation resulting in higher accuracy readings.
* 1000 results in lowest power drain and least accurate readings.
*
* Possible values:
* HIGH: 0
* MEDIUM: 10
* LOW: 100
* PASSIVE: 1000
*
* enum {number}
*/
static Accuracy: any = {
HIGH: 0,
MEDIUM: 10,
LOW: 100,
PASSIVE: 1000
};
/**
* Used in the switchMode function
*
* Possible values:
* BACKGROUND: 0
* FOREGROUND: 1
*
* @enum {number}
*/
static Mode: any = {
BACKGROUND: 0,
FOREGROUND: 1
};
/**
* Configure the plugin.
*
* @param options {BackgroundGeolocationConfig} options An object of type Config
* @return {Observable<BackgroundGeolocationResponse>}
*/
@Cordova({
callbackOrder: 'reverse',
observable: true
})
configure(options: BackgroundGeolocationConfig): Observable<BackgroundGeolocationResponse> { return; }
/**
* Turn ON the background-geolocation system.
* The user will be tracked whenever they suspend the app.
* @returns {Promise<any>}
*/
@Cordova()
start(): Promise<any> { return; }
/**
* Turn OFF background-tracking
* @returns {Promise<any>}
*/
@Cordova()
stop(): Promise<any> { return; }
/**
* Inform the native plugin that you're finished, the background-task may be completed
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS', 'Windows Phone']
})
finish(): Promise<any> { return; }
/**
* Force the plugin to enter "moving" or "stationary" state
* @param isMoving {boolean}
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS', 'Windows Phone']
})
changePace(isMoving: boolean): Promise<any> { return; }
/**
* Setup configuration
* @param options {BackgroundGeolocationConfig}
* @returns {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse'
})
setConfig(options: BackgroundGeolocationConfig): Promise<any> { return; }
/**
* Returns current stationaryLocation if available. null if not
* @returns {Promise<Location>}
*/
@Cordova({
platforms: ['iOS', 'Windows Phone']
})
getStationaryLocation(): Promise<BackgroundGeolocationResponse> { return; }
/**
* Add a stationary-region listener. Whenever the devices enters "stationary-mode",
* your #success callback will be executed with #location param containing #radius of region
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS', 'Windows Phone']
})
onStationary(): Promise<any> { return; }
/**
* Check if location is enabled on the device
* @returns {Promise<number>} Returns a promise with int argument that takes values 0, 1 (true).
*/
@Cordova({
platforms: ['Android']
})
isLocationEnabled(): Promise<number> { return; }
/**
* Display app settings to change permissions
*/
@Cordova({sync: true})
showAppSettings(): void { }
/**
* Display device location settings
*/
@Cordova({sync: true})
showLocationSettings(): void { }
/**
* Method can be used to detect user changes in location services settings.
* If user enable or disable location services then success callback will be executed.
* In case or error (SettingNotFoundException) fail callback will be executed.
* @returns {Promise<boolean>}
*/
@Cordova({
platforms: ['Android']
})
watchLocationMode(): Promise<boolean> { return; }
/**
* Stop watching for location mode changes.
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android']
})
stopWatchingLocationMode(): Promise<any> { return; }
/**
* Method will return all stored locations.
* Locations are stored when:
* - config.stopOnTerminate is false and main activity was killed
* by the system
* or
* - option.debug is true
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android']
})
getLocations(): Promise<any> { return; }
/**
* Method will return locations, which has not been yet posted to server. NOTE: Locations does contain locationId.
* @returns {Promise<any>}
*/
@Cordova()
getValidLocations(): Promise<any> { return; }
/**
* Delete stored location by given locationId.
* @param locationId {number}
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android']
})
deleteLocation(locationId: number): Promise<any> { return; }
/**
* Delete all stored locations.
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android']
})
deleteAllLocations(): Promise<any> { return; }
/**
* Normally plugin will handle switching between BACKGROUND and FOREGROUND mode itself.
* Calling switchMode you can override plugin behavior and force plugin to switch into other mode.
*
* In FOREGROUND mode plugin uses iOS local manager to receive locations and behavior is affected by option.desiredAccuracy and option.distanceFilter.
* In BACKGROUND mode plugin uses significant changes and region monitoring to receive locations and uses option.stationaryRadius only.
*
* BackgroundGeolocation.Mode.FOREGROUND
* BackgroundGeolocation.Mode.BACKGROUND
**
* @param modeId {number}
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS']
})
switchMode(modeId: number): Promise<any> { return; }
/**
* Return all logged events. Useful for plugin debugging. Parameter limit limits number of returned entries.
* @see https://github.com/mauron85/cordova-plugin-background-geolocation/tree/v2.2.1#debugging for more information.
*
* @param limit {number} Limits the number of entries
* @returns {Promise<any>}
*/
@Cordova()
getLogEntries(limit: number): Promise<any> { return; }
}
@@ -0,0 +1,177 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* Configurations items that can be updated.
*/
export interface BackgroundModeConfiguration {
/**
* Title of the background task
*/
title?: String;
/**
* The text that scrolls itself on statusbar
*/
ticker?: String;
/**
* Description of background task
*/
text?: String;
/**
* if true plugin will not display a notification. Default is false.
*/
silent?: boolean;
/**
* By default the app will come to foreground when taping on the notification. If false, plugin wont come to foreground when tapped.
*/
resume?: boolean;
}
/**
* @name Background Mode
* @description
* Cordova plugin to prevent the app from going to sleep while in background.
* Requires Cordova plugin: cordova-plugin-background-mode. For more info about plugin, vist: https://github.com/katzer/cordova-plugin-background-mode
*@usage
* ```typescript
* import { BackgroundMode } from '@ionic-native/background-mode';
*
* constructor(private backgroundMode: BackgroundMode) { }
*
* ...
*
* this.backgroundMode.enable();
* ```
*
* @interfaces
* BackgroundModeConfiguration
*/
@Plugin({
pluginName: 'BackgroundMode',
plugin: 'cordova-plugin-background-mode',
pluginRef: 'cordova.plugins.backgroundMode',
repo: 'https://github.com/katzer/cordova-plugin-background-mode',
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
@Injectable()
export class BackgroundMode {
/**
* Enable the background mode.
* Once called, prevents the app from being paused while in background.
*/
@Cordova({
sync: true
})
enable(): void { }
/**
* Disable the background mode.
* Once the background mode has been disabled, the app will be paused when in background.
*/
@Cordova()
disable(): Promise<any> { return; }
/**
* Checks if background mode is enabled or not.
* @returns {boolean} returns a boolean that indicates if the background mode is enabled.
*/
@Cordova({
sync: true
})
isEnabled(): boolean { return; }
/**
* Can be used to get the information if the background mode is active.
* @returns {boolean} returns a boolean that indicates if the background mode is active.
*/
@Cordova({
sync: true
})
isActive(): boolean { return; }
/**
* Override the default title, ticker and text.
* Available only for Android platform.
* @param {Configure} options List of option to configure. See table below
*/
@Cordova({
platforms: ['Android']
})
setDefaults(options?: BackgroundModeConfiguration): Promise<any> { return; }
/**
* Modify the displayed information.
* Available only for Android platform.
* @param {Configure} options Any options you want to update. See table below.
*/
@Cordova({
platforms: ['Android']
})
configure(options?: BackgroundModeConfiguration): Promise<any> { return; }
/**
* Listen for events that the plugin fires. Available events are `enable`, `disable`, `activate`, `deactivate` and `failure`.
* @param event {string} Event name
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
clearFunction: 'un',
clearWithArgs: true
})
on(event: string): Observable<any> { return; }
/**
* Override the back button on Android to go to background instead of closing the app.
*/
@Cordova({
platforms: ['Android'],
sync: true
})
overrideBackButton(): void {}
/**
* Exclude the app from the recent task list works on Android 5.0+.
*/
@Cordova({
platforms: ['Android'],
sync: true
})
excludeFromTaskList(): void {}
/**
* The method works async instead of isActive() or isEnabled().
*/
@Cordova({
platforms: ['Android']
})
isScreenOff(): Promise<boolean> { return; }
/**
* Turn screen on
*/
@Cordova({
platforms: ['Android'],
sync: true
})
wakeUp(): void {}
/**
* Turn screen on and show app even locked
*/
@Cordova({
platforms: ['Android'],
sync: true
})
unlock(): void {}
}
@@ -0,0 +1,51 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
/**
* @beta
* @name Backlight
* @description
* This plugin adds turning on/off the device backlight.
*
* @usage
* ```
* import { Backlight } from '@ionic-native/backlight';
*
* constructor(private backlight: Backlight) { }
*
* ...
*
* // Turn backlight on
* this.backlight.on().then(() => console.log('backlight on'));
*
* // Turn backlight off
* this.backlight.off().then(() => console.log('backlight off'));
*
* ```
*/
@Plugin({
pluginName: 'Backlight',
plugin: 'cordova-plugin-backlight',
pluginRef: 'cordova.plugins.Backlight',
repo: 'https://github.com/mebibou/cordova-plugin-backlight',
platforms: ['Android']
})
@Injectable()
export class Backlight {
/**
* This function turns backlight on
* @return {Promise<any>} Returns a promise that resolves when the backlight is on
*/
@Cordova()
on(): Promise<any> { return; }
/**
* This function turns backlight off
* @return {Promise<any>} Returns a promise that resolves when the backlight is off
*/
@Cordova()
off(): Promise<any> { return; }
}
@@ -1,4 +1,6 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Badge
@@ -9,70 +11,77 @@ import { Cordova, Plugin } from './plugin';
*
* @usage
* ```typescript
* import { Badge } from 'ionic-native';
* import { Badge } from '@ionic-native/badge';
*
* constructor(private badge: Badge) { }
*
* Badge.set(10);
* Badge.increase();
* Badge.clear();
* ...
*
* this.badge.set(10);
* this.badge.increase(1);
* this.badge.clear();
* ```
*/
@Plugin({
pluginName: 'Badge',
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']
})
@Injectable()
export class Badge {
/**
* Clear the badge of the app icon.
* @returns {Promise<boolean>}
*/
@Cordova()
static clear(): Promise<boolean> { return; }
clear(): Promise<boolean> { return; }
/**
* Set the badge of the app icon.
* @param {number} badgeNumber The new badge number.
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static set(badgeNumber: number): Promise<any> { return; }
set(badgeNumber: number): Promise<any> { return; }
/**
* Get the badge of the app icon.
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static get(): Promise<any> { return; }
get(): Promise<any> { return; }
/**
* Increase the badge number.
* @param {number} increaseBy Count to add to the current badge number
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static increase(increaseBy: number): Promise<any> { return; }
increase(increaseBy: number): Promise<any> { return; }
/**
* Decrease the badge number.
* @param {number} decreaseBy Count to subtract from the current badge number
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static decrease(decreaseBy: number): Promise<any> { return; }
decrease(decreaseBy: number): Promise<any> { return; }
/**
* Determine if the app has permission to show badges.
* @returns {Promise<any>}
*/
@Cordova()
static hasPermission(): Promise<any> { return; }
hasPermission(): Promise<any> { return; }
/**
* Register permission to set badge notifications
* @returns {Promise}
* @returns {Promise<any>}
*/
@Cordova()
static registerPermission(): Promise<any> { return; }
registerPermission(): Promise<any> { return; }
}
@@ -0,0 +1,124 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
export interface BarcodeScannerOptions {
/**
* Prefer front camera. Supported on iOS and Android.
*/
preferFrontCamera?: boolean;
/**
* Show flip camera button. Supported on iOS and Android.
*/
showFlipCameraButton?: boolean;
/**
* Show torch button. Supported on iOS and Android.
*/
showTorchButton?: boolean;
/**
* Disable animations. Supported on iOS only.
*/
disableAnimations?: boolean;
/**
* Disable success beep. Supported on iOS only.
*/
disableSuccessBeep?: boolean;
/**
* Prompt text. Supported on Android only.
*/
prompt?: string;
/**
* Formats separated by commas. Defaults to all formats except `PDF_417` and `RSS_EXPANDED`.
*/
formats?: string;
/**
* Orientation. Supported on Android only. Can be set to `portrait` or `landscape`. Defaults to none so the user can rotate the phone and pick an orientation.
*/
orientation?: string;
/**
* Launch with the torch switched on (if available). Supported on Android only.
*/
torchOn?: boolean;
/**
* Display scanned text for X ms. 0 suppresses it entirely, default 1500. Supported on Android only.
*/
resultDisplayDuration?: number;
}
/**
* @name Barcode Scanner
* @description
* The Barcode Scanner Plugin opens a camera view and automatically scans a barcode, returning the data back to you.
*
* Requires Cordova plugin: `phonegap-plugin-barcodescanner`. For more info, please see the [BarcodeScanner plugin docs](https://github.com/phonegap/phonegap-plugin-barcodescanner).
*
* @usage
* ```typescript
* import { BarcodeScanner } from '@ionic-native/barcode-scanner';
*
* constructor(private barcodeScanner: BarcodeScanner) { }
*
* ...
*
*
* this.barcodeScanner.scan().then((barcodeData) => {
* // Success! Barcode data is here
* }, (err) => {
* // An error occurred
* });
* ```
* @interfaces
* BarcodeScannerOptions
*/
@Plugin({
pluginName: 'BarcodeScanner',
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']
})
@Injectable()
export class BarcodeScanner {
/**
* @private
*/
static Encode: any = {
TEXT_TYPE: 'TEXT_TYPE',
EMAIL_TYPE: 'EMAIL_TYPE',
PHONE_TYPE: 'PHONE_TYPE',
SMS_TYPE: 'SMS_TYPE'
};
/**
* Open the barcode scanner.
* @param options {BarcodeScannerOptions} Optional options to pass to the scanner
* @returns {Promise<any>} Returns a Promise that resolves with scanner data, or rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
scan(options?: BarcodeScannerOptions): Promise<any> { return; }
/**
* Encodes data into a barcode.
* NOTE: not well supported on Android
* @param type {string} Type of encoding
* @param data {any} Data to encode
* @returns {Promise<any>}
*/
@Cordova()
encode(type: string, data: any): Promise<any> { return; }
}
@@ -1,34 +1,46 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Base64 To Gallery
* @description This plugin allows you to save base64 data as a png image into the device
* @usage
* ```typescript
* import { Base64ToGallery } from 'ionic-native';
* import { Base64ToGallery } from '@ionic-native/base64-to-gallery';
*
* constructor(private base64ToGallery: Base64ToGallery) { }
*
*
* Base64ToGallery.base64ToGallery(base64Data, 'img_').then(
* ...
*
*
* this.base64ToGallery.base64ToGallery(base64Data, { prefix: '_img' }).then(
* res => console.log('Saved image to gallery ', res),
* err => console.log('Error saving image to gallery ', err)
* );
* ```
*/
@Plugin({
pluginName: 'Base64ToGallery',
plugin: 'cordova-base64-to-gallery',
pluginRef: 'cordova',
repo: 'https://github.com/Nexxa/cordova-base64-to-gallery',
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
@Injectable()
export class Base64ToGallery {
/**
* Converts a base64 string to an image file in the device gallery
* @param {string} data The actual base64 string that you want to save
* @param {any} options (optional) An object with properties: prefix: string, mediaScanner: boolean. Prefix will be prepended to the filename. If true, mediaScanner runs Media Scanner on Android and saves to Camera Roll on iOS; if false, saves to Library folder on iOS.
* @returns {Promise} returns a promise that resolves when the image is saved.
* @param {any} options (optional) An object with properties: prefix: string, mediaScanner: boolean. Prefix will be prepended to the filename. If true, mediaScanner runs Media Scanner on Android and saves to Camera Roll on iOS; if false, saves to Library folder on iOS.
* @returns {Promise<any>} returns a promise that resolves when the image is saved.
*/
@Cordova()
static base64ToGallery(data: string, options?: {prefix?: string; mediaScanner?: boolean}): Promise<any> {
@Cordova({
successIndex: 2,
errorIndex: 3
})
base64ToGallery(data: string, options?: {prefix?: string; mediaScanner?: boolean}): Promise<any> {
return;
}
@@ -1,68 +1,9 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* @name Battery Status
* @description
* Requires Cordova plugin: cordova-plugin-batterystatus. For more info, please see the [BatteryStatus plugin docs](https://github.com/apache/cordova-plugin-battery-status).
*
* @usage
* ```typescript
* import { BatteryStatus } from 'ionic-native';
*
*
* // watch change in battery status
* let subscription = BatteryStatus.onChange().subscribe(
* (status: StatusObject) => {
* console.log(status.level, status.isPlugged);
* }
* );
*
* // stop watch
* subscription.unsubscribe();
*
* ```
*/
@Plugin({
plugin: 'cordova-plugin-battery-status',
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']
})
export class BatteryStatus {
export interface BatteryStatusResponse {
/**
* Watch the change in battery level
* @returns {Observable} Returns an observable that pushes a status object
*/
@Cordova({
eventObservable: true,
event: 'batterystatus'
})
static onChange(): Observable<StatusObject> { return; }
/**
* Watch when the battery level goes low
* @returns {Observable<StatusObject>} Returns an observable that pushes a status object
*/
@Cordova({
eventObservable: true,
event: 'batterylow'
})
static onLow(): Observable<StatusObject> { return; }
/**
* Watch when the battery level goes to critial
* @returns {Observable<StatusObject>} Returns an observable that pushes a status object
*/
@Cordova({
eventObservable: true,
event: 'batterycritical'
})
static onCritical(): Observable<StatusObject> { return; }
}
export interface StatusObject {
/**
* The battery charge percentage
*/
@@ -72,4 +13,75 @@ export interface StatusObject {
* A boolean that indicates whether the device is plugged in
*/
isPlugged: boolean;
}
/**
* @name Battery Status
* @description
* Requires Cordova plugin: cordova-plugin-batterystatus. For more info, please see the [BatteryStatus plugin docs](https://github.com/apache/cordova-plugin-battery-status).
*
* @usage
* ```typescript
* import { BatteryStatus } from '@ionic-native/battery-status';
*
* constructor(private batteryStatus: BatteryStatus) { }
*
* ...
*
*
* // watch change in battery status
* let subscription = this.batteryStatus.onChange().subscribe(
* (status: StatusObject) => {
* console.log(status.level, status.isPlugged);
* }
* );
*
* // stop watch
* subscription.unsubscribe();
*
* ```
* @interfaces
* BatteryStatusResponse
*/
@Plugin({
pluginName: 'BatteryStatus',
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']
})
@Injectable()
export class BatteryStatus {
/**
* Watch the change in battery level
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
*/
@Cordova({
eventObservable: true,
event: 'batterystatus'
})
onChange(): Observable<BatteryStatusResponse> { return; }
/**
* Watch when the battery level goes low
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
*/
@Cordova({
eventObservable: true,
event: 'batterylow'
})
onLow(): Observable<BatteryStatusResponse> { return; }
/**
* Watch when the battery level goes to critial
* @returns {Observable<BatteryStatusResponse>} Returns an observable that pushes a status object
*/
@Cordova({
eventObservable: true,
event: 'batterycritical'
})
onCritical(): Observable<BatteryStatusResponse> { return; }
}
@@ -1,4 +1,5 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
@@ -20,6 +21,14 @@ import { Observable } from 'rxjs/Observable';
*
* @usage
*
* ```typescript
*
* import { BLE } from '@ionic-native/ble';
*
* constructor(private ble: BLE) { }
*
* ```
*
* ## Peripheral Data
*
* Peripheral Data is passed to the success callback when scanning and connecting. Limited data is passed when scanning.
@@ -160,12 +169,15 @@ import { Observable } from 'rxjs/Observable';
*
*/
@Plugin({
pluginName: 'BLE',
plugin: 'cordova-plugin-ble-central',
pluginRef: 'ble',
repo: 'https://github.com/don/cordova-plugin-ble-central',
platforms: ['iOS', 'Android']
})
@Injectable()
export class BLE {
/**
* Scan and discover BLE peripherals for the specified amount of time.
*
@@ -177,12 +189,12 @@ export class BLE {
* ```
* @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices
* @param {number} seconds Number of seconds to run discovery
* @return Returns an Observable that notifies of each peripheral that is discovered during the specified time.
* @returns {Observable<any>} Returns an Observable that notifies of each peripheral that is discovered during the specified time.
*/
@Cordova({
observable: true
})
static scan(services: string[], seconds: number): Observable<any> { return; }
scan(services: string[], seconds: number): Observable<any> { return; }
/**
* Scan and discover BLE peripherals until `stopScan` is called.
@@ -198,14 +210,27 @@ export class BLE {
* }, 5000);
* ```
* @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices
* @return Returns an Observable that notifies of each peripheral discovered.
* @returns {Observable<any>} Returns an Observable that notifies of each peripheral discovered.
*/
@Cordova({
observable: true,
clearFunction: 'stopScan',
clearWithArgs: true
clearWithArgs: false
})
static startScan(services: string[]): Observable<any> { return; }
startScan(services: string[]): Observable<any> { return; }
/**
* Scans for BLE devices. This function operates similarly to the `startScan` function, but allows you to specify extra options (like allowing duplicate device reports).
* @param {string[]} services List of service UUIDs to discover, or `[]` to find all devices
* @param options {any}
* @returns {Observable<any>} Returns an Observable that notifies of each peripheral discovered.
*/
@Cordova({
observable: true,
clearFunction: 'stopScan',
clearWithArgs: false
})
startScanWithOptions(services: string[], options: {reportDuplicates?: boolean} | any): Observable<any> { return; }
/**
* Stop a scan started by `startScan`.
@@ -222,7 +247,7 @@ export class BLE {
* @return returns a Promise.
*/
@Cordova()
static stopScan(): Promise<any> { return; }
stopScan(): Promise<any> { return; }
/**
* Connect to a peripheral.
@@ -243,7 +268,7 @@ export class BLE {
clearFunction: 'disconnect',
clearWithArgs: true
})
static connect(deviceId: string): Observable<any> { return; }
connect(deviceId: string): Observable<any> { return; }
/**
* Disconnect from a peripheral.
@@ -257,7 +282,7 @@ export class BLE {
* @return Returns a Promise
*/
@Cordova()
static disconnect(deviceId: string): Promise<any> { return; }
disconnect(deviceId: string): Promise<any> { return; }
/**
* Read the value of a characteristic.
@@ -268,7 +293,7 @@ export class BLE {
* @return Returns a Promise
*/
@Cordova()
static read(
read(
deviceId: string,
serviceUUID: string,
characteristicUUID: string
@@ -303,7 +328,7 @@ export class BLE {
* @return Returns a Promise
*/
@Cordova()
static write(
write(
deviceId: string,
serviceUUID: string,
characteristicUUID: string,
@@ -320,7 +345,7 @@ export class BLE {
* @return Returns a Promise
*/
@Cordova()
static writeWithoutResponse(
writeWithoutResponse(
deviceId: string,
serviceUUID: string,
characteristicUUID: string,
@@ -347,7 +372,7 @@ export class BLE {
clearFunction: 'stopNotification',
clearWithArgs: true
})
static startNotification(
startNotification(
deviceId: string,
serviceUUID: string,
characteristicUUID: string
@@ -359,10 +384,10 @@ export class BLE {
* @param {string} deviceId UUID or MAC address of the peripheral
* @param {string} serviceUUID UUID of the BLE service
* @param {string} characteristicUUID UUID of the BLE characteristic
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static stopNotification(
stopNotification(
deviceId: string,
serviceUUID: string,
characteristicUUID: string
@@ -379,39 +404,33 @@ export class BLE {
* );
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static isConnected(deviceId: string): Promise<any> { return; }
isConnected(deviceId: string): Promise<any> { return; }
/**
* Report if bluetooth is enabled.
*
* @usage
* ```
* BLE.isEnabled().then(
* () => { console.log('enabled'); },
* () => { console.log('not enabled'); }
* );
* ```
* @return Returns a Promise.
* @returns {Promise<void>} Returns a Promise that resolves if Bluetooth is enabled, and rejects if disabled.
*/
@Cordova()
static isEnabled(): Promise<any> { return; }
isEnabled(): Promise<void> { return; }
/**
* Open System Bluetooth settings (Android only).
*
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static showBluetoothSettings(): Promise<any> { return; }
showBluetoothSettings(): Promise<any> { return; }
/**
* Enable Bluetooth on the device (Android only).
*
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static enable(): Promise<any> { return; }
enable(): Promise<any> { return; }
}
@@ -1,4 +1,5 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
@@ -6,14 +7,16 @@ import { Observable } from 'rxjs/Observable';
* @description This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino.
* @usage
* ```typescript
* import { BluetoothSerial } from 'ionic-native';
* import { BluetoothSerial } from '@ionic-native/bluetooth-serial';
*
* constructor(private bluetoothSerial: BluetoothSerial) { }
*
*
* // Write a string
* BluetoothSerial.write("hello world").then(success, failure);
* this.bluetoothSerial.write("hello world").then(success, failure);
*
* // Array of int or bytes
* BluetoothSerial.write([186, 220, 222]).then(success, failure);
* this.bluetoothSerial.write([186, 220, 222]).then(success, failure);
*
* // Typed Array
* var data = new Uint8Array(4);
@@ -21,186 +24,188 @@ import { Observable } from 'rxjs/Observable';
* data[1] = 0x42;
* data[2] = 0x43;
* data[3] = 0x44;
* BluetoothSerial.write(data).then(success, failure);
* this.bluetoothSerial.write(data).then(success, failure);
*
* // Array Buffer
* BluetoothSerial.write(data.buffer).then(success, failure);
* this.bluetoothSerial.write(data.buffer).then(success, failure);
* ```
*/
@Plugin({
pluginName: 'BluetoothSerial',
repo: 'https://github.com/don/BluetoothSerial',
plugin: 'cordova-plugin-bluetooth-serial',
pluginRef: 'bluetoothSerial',
platforms: ['Android', 'iOS', 'Windows Phone', 'Browser']
})
@Injectable()
export class BluetoothSerial {
/**
* Connect to a Bluetooth device
* @param {string} macAddress_or_uuid Identifier of the remote device
* @returns {Observable} Subscribe to connect, unsubscribe to disconnect.
* @returns {Observable<any>} Subscribe to connect, unsubscribe to disconnect.
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone'],
observable: true,
clearFunction: 'disconnect'
})
static connect(macAddress_or_uuid: string): Observable<any> { return; }
connect(macAddress_or_uuid: string): Observable<any> { return; }
/**
* Connect insecurely to a Bluetooth device
* @param {string} macAddress Identifier of the remote device
* @returns {Observable} Subscribe to connect, unsubscribe to disconnect.
* @returns {Observable<any>} Subscribe to connect, unsubscribe to disconnect.
*/
@Cordova({
platforms: ['Android'],
observable: true,
clearFunction: 'disconnect'
})
static connectInsecure(macAddress: string): Observable<any> { return; }
connectInsecure(macAddress: string): Observable<any> { return; }
/**
* Writes data to the serial port
* @param {any} data ArrayBuffer of data
* @returns {Promise} returns a promise when data has been written
* @returns {Promise<any>} returns a promise when data has been written
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static write(data: any): Promise<any> { return; }
write(data: any): Promise<any> { return; }
/**
* Gets the number of bytes of data available
* @returns {Promise} returns a promise that contains the available bytes
* @returns {Promise<any>} returns a promise that contains the available bytes
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
}) static available(): Promise<any> { return; }
}) available(): Promise<any> { return; }
/**
* Reads data from the buffer
* @returns {Promise} returns a promise with data from the buffer
* @returns {Promise<any>} returns a promise with data from the buffer
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static read(): Promise<any> { return; }
read(): Promise<any> { return; }
/**
* Reads data from the buffer until it reaches a delimiter
* @param {string} delimiter string that you want to search until
* @returns {Promise} returns a promise
* @returns {Promise<any>} returns a promise
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static readUntil(delimiter: string): Promise<any> { return; }
readUntil(delimiter: string): Promise<any> { return; }
/**
* Subscribe to be notified when data is received
* @param {string} delimiter the string you want to watch for
* @returns {Observable} returns an observable.
* @returns {Observable<any>} returns an observable.
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone'],
observable: true,
clearFunction: 'unsubscribe'
})
static subscribe(delimiter: string): Observable<any> { return; }
subscribe(delimiter: string): Observable<any> { return; }
/**
* Subscribe to be notified when data is received
* @returns {Observable} returns an observable
* @returns {Observable<any>} returns an observable
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone'],
observable: true,
clearFunction: 'unsubscribeRawData'
})
static subscribeRawData(): Observable<any> { return; }
subscribeRawData(): Observable<any> { return; }
/**
* Clears data in buffer
* @returns {Promise} returns a promise when completed
* @returns {Promise<any>} returns a promise when completed
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static clear(): Promise<any> { return; }
clear(): Promise<any> { return; }
/**
* Lists bonded devices
* @returns {Promise} returns a promise
* @returns {Promise<any>} returns a promise
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static list(): Promise<any> { return; }
list(): Promise<any> { return; }
/**
* Reports if bluetooth is enabled
* @returns {Promise} returns a promise
* @returns {Promise<any>} returns a promise
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static isEnabled(): Promise<any> { return; }
isEnabled(): Promise<any> { return; }
/**
* Reports the connection status
* @returns {Promise} returns a promise
* @returns {Promise<any>} returns a promise
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static isConnected(): Promise<any> { return; }
isConnected(): Promise<any> { return; }
/**
* Reads the RSSI from the connected peripheral
* @returns {Promise} returns a promise
* @returns {Promise<any>} returns a promise
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static readRSSI(): Promise<any> { return; }
readRSSI(): Promise<any> { return; }
/**
* Show the Bluetooth settings on the device
* @returns {Promise} returns a promise
* @returns {Promise<any>} returns a promise
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static showBluetoothSettings(): Promise<any> { return; }
showBluetoothSettings(): Promise<any> { return; }
/**
* Enable Bluetooth on the device
* @returns {Promise} returns a promise
* @returns {Promise<any>} returns a promise
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static enable(): Promise<any> { return; }
enable(): Promise<any> { return; }
/**
* Discover unpaired devices
* @returns {Promise} returns a promise
* @returns {Promise<any>} returns a promise
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone']
})
static discoverUnpaired(): Promise<any> { return; }
discoverUnpaired(): Promise<any> { return; }
/**
* Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
* @returns {Observable} Returns an observable
* @returns {Observable<any>} Returns an observable
*/
@Cordova({
platforms: ['Android', 'iOS', 'Windows Phone'],
observable: true,
clearFunction: 'clearDeviceDiscoveredListener'
})
static setDeviceDiscoveredListener(): Observable<any> { return; }
setDeviceDiscoveredListener(): Observable<any> { return; }
/**
* Sets the human readable device name that is broadcasted to other devices
@@ -210,7 +215,7 @@ export class BluetoothSerial {
platforms: ['Android'],
sync: true
})
static setName(newName: string): void { }
setName(newName: string): void { }
/**
* Makes the device discoverable by other devices
@@ -220,6 +225,6 @@ export class BluetoothSerial {
platforms: ['Android'],
sync: true
})
static setDiscoverable(discoverableDuration: number): void { }
setDiscoverable(discoverableDuration: number): void { }
}
@@ -1,4 +1,5 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Brightness
@@ -9,44 +10,49 @@ import { Cordova, Plugin } from './plugin';
*
* @usage
* ```typescript
* import { Brightness } from 'ionic-native';
* import { Brightness } from '@ionic-native/brightness';
*
* constructor(private brightness: Brightness) { }
*
* ...
*
* let brightnessValue: number = 0.8;
* Brightness.setBrightness(brightnessValue);
* this.brightness.setBrightness(brightnessValue);
* ```
*
*/
@Plugin({
pluginName: 'Brightness',
plugin: 'cordova-plugin-brightness',
pluginRef: 'cordova.plugins.brightness',
repo: 'https://github.com/mgcrea/cordova-plugin-brightness',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Brightness {
/**
* Sets the brightness of the display.
*
* @param {value} Floating number between 0 and 1 in which case 1 means 100% brightness and 0 means 0% brightness.
* @returns {Promise} Returns a Promise that resolves if setting brightness was successful.
* @returns {Promise<any>} Returns a Promise that resolves if setting brightness was successful.
*/
@Cordova()
static setBrightness(value: number): Promise<any> { return; }
setBrightness(value: number): Promise<any> { return; }
/**
* Reads the current brightness of the device display.
*
* @returns {Promise} Returns a Promise that resolves with the
* @returns {Promise<any>} Returns a Promise that resolves with the
* brightness value of the device display (floating number between 0 and 1).
*/
@Cordova()
static getBrightness(): Promise<any> { return; }
getBrightness(): Promise<any> { return; }
/**
* Keeps the screen on. Prevents the device from setting the screen to sleep.
*/
@Cordova()
static setKeepScreenOn(value: boolean): void { }
setKeepScreenOn(value: boolean): void { }
}
@@ -0,0 +1,57 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* @name Broadcaster
* @description
* This plugin adds exchanging events between native code and your app.
*
* @usage
* ```
* import { Broadcaster } from '@ionic-native/broadcaster';
*
* constructor(private broadcaster: Broadcaster) { }
*
* ...
*
* // Listen to events from Native
* this.broadcaster.addEventListener('eventName').then((event) => console.log(event));
*
* // Send event to Native
* this.broadcaster.fireNativeEvent('eventName', {}).then(() => console.log('success'));
*
* ```
*/
@Plugin({
pluginName: 'Broadcaster',
plugin: 'cordova-plugin-broadcaster',
pluginRef: 'broadcaster',
repo: 'https://github.com/bsorrentino/cordova-broadcaster',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Broadcaster {
/**
* This function listen to an event sent from the native code
* @param eventName {string}
* @return {Observable<any>} Returns an observable to watch when an event is received
*/
@Cordova({
observable: true,
clearFunction: 'removeEventListener',
clearWithArgs: true
})
addEventListener(eventName: string): Observable<any> { return; }
/**
* This function sends data to the native code
* @param eventName {string}
* @param eventData {any}
* @return {Promise<any>} Returns a promise that resolves when an event is successfully fired
*/
@Cordova()
fireNativeEvent(eventName: string, eventData: any): Promise<any> { return; }
}
@@ -0,0 +1,66 @@
import { Plugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @name BrowserTab
* @description
* This plugin provides an interface to in-app browser tabs that exist on some mobile platforms, specifically [Custom Tabs](http://developer.android.com/tools/support-library/features.html#custom-tabs) on Android (including the [Chrome Custom Tabs](https://developer.chrome.com/multidevice/android/customtabs) implementation), and [SFSafariViewController](https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewController_Ref/) on iOS.
*
* @usage
* ```
* import { BrowserTab } from '@ionic-native/browser-tab';
*
* constructor(private browserTab: BrowserTab) {
*
* browserTab.isAvailable()
* .then((isAvailable: boolean) => {
*
* if (isAvailable) {
*
* browserTab.open('https://ionic.io');
*
* } else {
*
* // open URL with InAppBrowser instead or SafariViewController
*
* }
*
* });
*
*
* }
*
* ```
*/
@Plugin({
pluginName: 'BrowserTab',
plugin: 'cordova-plugin-browsertab',
pluginRef: 'cordova.plugins.browsertab',
repo: 'https://github.com/google/cordova-plugin-browsertab',
platforms: ['Android', 'iOS']
})
@Injectable()
export class BrowserTab {
/**
* Check if BrowserTab option is available
* @return {Promise<any>} Returns a promise that resolves when check is successful and returns true or false
*/
@Cordova()
isAvailable(): Promise<any> { return; }
/**
* Opens the provided URL using a browser tab
* @param {string} url The URL you want to open
* @return {Promise<any>} Returns a promise that resolves when check open was successful
*/
@Cordova()
openUrl(url: string): Promise<any> { return; }
/**
* Closes browser tab
* @return {Promise<any>} Returns a promise that resolves when close was finished
*/
@Cordova()
close(): Promise<any> { return; }
}
@@ -1,18 +1,56 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @private
*/
export interface CalendarOptions {
/**
* Id
*/
id?: string;
/**
*
*/
firstReminderMinutes?: number;
/**
*
*/
secondReminderMinutes?: number;
recurrence?: string; // options are: 'daily', 'weekly', 'monthly', 'yearly'
recurrenceInterval?: number; // only used when recurrence is set
/**
* Recurrence. Can be set to `daily`, `weekly`, `monthly` or `yearly`
*/
recurrence?: string;
/**
* Recurrence interval. Valid only when `recurrence` option is set.
*/
recurrenceInterval?: number;
/**
* Recurrence end date. Valid only when `recurrence` option is set.
*/
recurrenceEndDate?: Date;
/**
* Calendar name. Ths is supported by `iOS` only.
*/
calendarName?: string;
/**
* Calendar id
*/
calendarId?: number;
/**
* URL
*/
url?: string;
}
/**
@@ -25,23 +63,27 @@ export interface CalendarOptions {
*
* @usage
* ```
* import {Calendar} from 'ionic-native';
* import {Calendar} from '@ionic-native/calendar';
*
* constructor(private calendar: Calendar) { }
*
*
*
* Calendar.createCalendar('MyCalendar').then(
* this.calendar.createCalendar('MyCalendar').then(
* (msg) => { console.log(msg); },
* (err) => { console.log(err); }
* );
* ```
*
* @interfaces
* CalendarOptions
*/
@Plugin({
pluginName: 'Calendar',
plugin: 'cordova-plugin-calendar',
pluginRef: 'plugins.calendar',
repo: 'https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Calendar {
/**
@@ -52,94 +94,73 @@ export class Calendar {
* - You're using Android < 6, or
* - You've already granted permission
*
* If this returns false, you should call `requestReadWritePermissions` function
* If this returns false, you should call the `requestReadWritePermission` function
* @returns {Promise<boolean>}
*/
@Cordova()
static hasReadWritePermission(): Promise<boolean> { return; }
hasReadWritePermission(): Promise<boolean> { return; }
/**
* Check if we have read permission
* @returns {Promise<boolean>}
*/
@Cordova()
static hasReadPermission(): Promise<boolean> { return; }
hasReadPermission(): Promise<boolean> { return; }
/**
* Check if we have write permission
* @returns {Promise<boolean>}
*/
@Cordova()
static hasWritePermission(): Promise<boolean> { return; }
hasWritePermission(): Promise<boolean> { return; }
/**
* Request write permission
* @returns {Promise<any>}
*/
@Cordova()
static requestWritePermission(): Promise<any> { return; }
requestWritePermission(): Promise<any> { return; }
/**
* Request read permission
* @returns {Promise<any>}
*/
@Cordova()
static requestReadPermission(): Promise<any> { return; }
requestReadPermission(): Promise<any> { return; }
/**
* Requests read/write permissions
* @returns {Promise<any>}
*/
@Cordova()
static requestReadWritePermission(): Promise<any> { return; }
requestReadWritePermission(): Promise<any> { return; }
/**
* Create a calendar. (iOS only)
*
* @param {string | Object} nameOrOptions either a string name or a options object. If string, provide the calendar name. IF an object, provide a calendar name as a string and a calendar color in hex format as a string
* @return {Promise} Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
static createCalendar(
nameOrOptions: string | { calendarName: string, calendarColor: string }
): Promise<any> { return; }
createCalendar(nameOrOptions: string | any): Promise<any> { return; }
/**
* Delete a calendar. (iOS only)
* @param {string} name Name of the calendar to delete.
* @return Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
static deleteCalendar(name: string): Promise<any> { return; }
deleteCalendar(name: string): Promise<any> { return; }
/**
* Returns the default calendar options.
*
* @return Returns an object with the default calendar options:
* firstReminderMinutes: 60,
* secondReminderMinutes: null,
* recurrence: null, // options are: 'daily', 'weekly', 'monthly', 'yearly'
* recurrenceInterval: 1, // only used when recurrence is set
* recurrenceEndDate: null,
* calendarName: null,
* calendarId: null,
* url: null
* @return {CalendarOptions} Returns an object with the default calendar options
*/
@Cordova({
sync: true
})
static getCalendarOptions(): CalendarOptions {
return {
firstReminderMinutes: 60,
secondReminderMinutes: null,
recurrence: null,
recurrenceInterval: 1,
recurrenceEndDate: null,
calendarName: null,
calendarId: null,
url: null
};
}
getCalendarOptions(): CalendarOptions { return; }
/**
* Silently create an event.
@@ -148,10 +169,10 @@ export class Calendar {
* @param {string} [notes] The event notes
* @param {Date} [startDate] The event start date
* @param {Date} [endDate] The event end date
* @return Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
static createEvent(
createEvent(
title?: string,
location?: string,
notes?: string,
@@ -168,10 +189,10 @@ export class Calendar {
* @param {Date} [startDate] The event start date
* @param {Date} [endDate] The event end date
* @param {CalendarOptions} [options] Additional options, see `getCalendarOptions`
* @return Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
static createEventWithOptions(
createEventWithOptions(
title?: string,
location?: string,
notes?: string,
@@ -188,10 +209,10 @@ export class Calendar {
* @param {string} [notes] The event notes
* @param {Date} [startDate] The event start date
* @param {Date} [endDate] The event end date
* @return Returns a Promise
* @returns {Promise<any>} Returns a Promise
*/
@Cordova()
static createEventInteractively(
createEventInteractively(
title?: string,
location?: string,
notes?: string,
@@ -208,10 +229,10 @@ export class Calendar {
* @param {Date} [startDate] The event start date
* @param {Date} [endDate] The event end date
* @param {CalendarOptions} [options] Additional options, see `getCalendarOptions`
* @return Returns a Promise
* @returns {Promise<any>}
*/
@Cordova()
static createEventInteractivelyWithOptions(
createEventInteractivelyWithOptions(
title?: string,
location?: string,
notes?: string,
@@ -222,7 +243,7 @@ export class Calendar {
// deprecated
// @Cordova()
// static createEventInNamedCalendar(
// createEventInNamedCalendar(
// title?: string,
// location?: string,
// notes?: string,
@@ -239,10 +260,10 @@ export class Calendar {
* @param {string} [notes] The event notes
* @param {Date} [startDate] The event start date
* @param {Date} [endDate] The event end date
* @return Returns a Promise
* @returns {Promise<any>}
*/
@Cordova()
static findEvent(
findEvent(
title?: string,
location?: string,
notes?: string,
@@ -258,10 +279,10 @@ export class Calendar {
* @param {Date} [startDate] The event start date
* @param {Date} [endDate] The event end date
* @param {CalendarOptions} [options] Additional options, see `getCalendarOptions`
* @return Returns a Promise that resolves with the event, or rejects with an error.
* @returns {Promise<any>} Returns a Promise that resolves with the event, or rejects with an error.
*/
@Cordova()
static findEventWithOptions(
findEventWithOptions(
title?: string,
location?: string,
notes?: string,
@@ -275,24 +296,28 @@ export class Calendar {
*
* @param {Date} [startDate] The start date
* @param {Date} [endDate] The end date
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
* @returns {Promise<any>} Returns a Promise that resolves with the list of events, or rejects with an error.
*/
@Cordova()
static listEventsInRange(startDate: Date, endDate: Date): Promise<any> { return; }
@Cordova({
platforms: ['Android']
})
listEventsInRange(startDate: Date, endDate: Date): Promise<any> { return; }
/**
* Get a list of all calendars.
* @return A Promise that resolves with the list of calendars, or rejects with an error.
* @returns {Promise<any>} A Promise that resolves with the list of calendars, or rejects with an error.
*/
@Cordova()
static listCalendars(): Promise<any> { return; }
listCalendars(): Promise<any> { return; }
/**
* Get a list of all future events in the specified calendar. (iOS only)
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
* @returns {Promise<any>} Returns a Promise that resolves with the list of events, or rejects with an error.
*/
@Cordova()
static findAllEventsInNamedCalendar(calendarName: string): Promise<any> { return; }
@Cordova({
platforms: ['iOS']
})
findAllEventsInNamedCalendar(calendarName: string): Promise<any> { return; }
/**
* Modify an event. (iOS only)
@@ -309,8 +334,10 @@ export class Calendar {
* @param {Date} [newEndDate] The new event end date
* @return Returns a Promise
*/
@Cordova()
static modifyEvent(
@Cordova({
platforms: ['iOS']
})
modifyEvent(
title?: string,
location?: string,
notes?: string,
@@ -336,11 +363,14 @@ export class Calendar {
* @param {string} [newNotes] The new event notes
* @param {Date} [newStartDate] The new event start date
* @param {Date} [newEndDate] The new event end date
* @param {CalendarOptions} [options] Additional options, see `getCalendarOptions`
* @param {CalendarOptions} [filterOptions] Event Options, see `getCalendarOptions`
* @param {CalendarOptions} [newOptions] New event options, see `getCalendarOptions`
* @return Returns a Promise
*/
@Cordova()
static modifyEventWithOptions(
@Cordova({
platforms: ['iOS']
})
modifyEventWithOptions(
title?: string,
location?: string,
notes?: string,
@@ -351,8 +381,9 @@ export class Calendar {
newNotes?: string,
newStartDate?: Date,
newEndDate?: Date,
options?: CalendarOptions
) { return; }
filterOptions?: CalendarOptions,
newOptions?: CalendarOptions
): Promise<any> { return; }
/**
* Delete an event.
@@ -365,7 +396,7 @@ export class Calendar {
* @return Returns a Promise
*/
@Cordova()
static deleteEvent(
deleteEvent(
title?: string,
location?: string,
notes?: string,
@@ -384,8 +415,10 @@ export class Calendar {
* @param {string} calendarName
* @return Returns a Promise
*/
@Cordova()
static deleteEventFromNamedCalendar(
@Cordova({
platforms: ['iOS']
})
deleteEventFromNamedCalendar(
title?: string,
location?: string,
notes?: string,
@@ -400,6 +433,6 @@ export class Calendar {
* @return {Promise<any>} Promise returns a promise
*/
@Cordova()
static openCalendar(date: Date): Promise<any> { return; }
openCalendar(date: Date): Promise<any> { return; }
}
@@ -0,0 +1,46 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
/**
* @name CallNumber
* @description
* Call a number directly from your Cordova/Ionic application.
*
* @usage
* ```
* import {CallNumber} from '@ionic-native/call-number';
*
* constructor(private callNumber: CallNumber) { }
*
* ...
*
*
* this.callNumber.callNumber(18001010101, true)
* .then(() => console.log('Launched dialer!'))
* .catch(() => console.log('Error launching dialer'));
*
* ```
*/
@Plugin({
pluginName: 'CallNumber',
plugin: 'call-number',
pluginRef: 'plugins.CallNumber',
repo: 'https://github.com/Rohfosho/CordovaCallNumberPlugin',
platforms: ['iOS', 'Android']
})
@Injectable()
export class CallNumber {
/**
* Calls a phone number
* @param numberToCall {string} The phone number to call as a string
* @param bypassAppChooser {boolean} Set to true to bypass the app chooser and go directly to dialer
* @return {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse'
})
callNumber(numberToCall: string, bypassAppChooser: boolean): Promise<any> {
return;
}
}
@@ -1,33 +1,97 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface CameraPreviewRect {
x: number;
y: number;
width: number;
height: number;
}
export interface CameraPreviewSize {
maxWidth: number;
maxHeight: number;
}
/**
* @beta
* @name CameraPreview
* @description
* Showing camera preview in HTML
*
* For more info, please see the [Cordova Camera Preview Plugin Docs](https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview).
*
* @usage
* ```
* import { CameraPreview, CameraPreviewRect } from '@ionic-native/camera-preview';
*
* constructor(private cameraPreview: CameraPreview) { }
*
* ...
*
* // camera options (Size and location)
* let cameraRect: CameraPreviewRect = {
* x: 100,
* y: 100,
* width: 200,
* height: 200
* };
*
*
* // start camera
* this.cameraPreview.startCamera(
* cameraRect, // position and size of preview
* 'front', // default camera
* true, // tap to take picture
* false, // disable drag
* false, // keep preview in front. Set to true (back of the screen) to apply overlaying elements
* 1 // set the preview alpha
* );
*
* // Set the handler to run every time we take a picture
* this.cameraPreview.setOnPictureTakenHandler().subscribe((result) => {
* console.log(result);
* // do something with the result
* });
*
*
* // take a picture
* this.cameraPreview.takePicture({
* maxWidth: 640,
* maxHeight: 640
* });
*
* // Switch camera
* this.cameraPreview.switchCamera();
*
* // set color effect to negative
* this.cameraPreview.setColorEffect('negative');
*
* // Stop the camera preview
* this.cameraPreview.stopCamera();
*
* ```
*
* @interfaces
* CameraPreviewRect
* CameraPreviewSize
*/
@Plugin({
pluginName: 'CameraPreview',
plugin: 'cordova-plugin-camera-preview',
pluginRef: 'cordova.plugins.camerapreview',
repo: 'https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview',
platforms: ['Android', 'iOS']
})
@Injectable()
export class CameraPreview {
/**
@@ -42,9 +106,7 @@ export class CameraPreview {
@Cordova({
sync: true
})
static startCamera(rect: CameraPreviewRect, defaultCamera: string, tapEnabled: boolean, dragEnabled: boolean, toBack: boolean, alpha: number): void {
};
startCamera(rect: CameraPreviewRect, defaultCamera: string, tapEnabled: boolean, dragEnabled: boolean, toBack: boolean, alpha: number): void { }
/**
* Stops the camera preview instance.
@@ -52,7 +114,7 @@ export class CameraPreview {
@Cordova({
sync: true
})
static stopCamera(): void { };
stopCamera(): void { }
/**
* Take the picture, the parameter size is optional
@@ -61,15 +123,16 @@ export class CameraPreview {
@Cordova({
sync: true
})
static takePicture(size: CameraPreviewSize): void { };
takePicture(size?: CameraPreviewSize): void { }
/**
* Register a callback function that receives the original picture and the image captured from the preview box.
* @returns {Observable<any>}
*/
@Cordova({
observable: true
})
static setOnPictureTakenHandler(): Observable<any> { return; };
setOnPictureTakenHandler(): Observable<any> { return; }
/**
* Switch from the rear camera and front camera, if available.
@@ -77,7 +140,7 @@ export class CameraPreview {
@Cordova({
sync: true
})
static switchCamera(): void { };
switchCamera(): void { }
/**
* Show the camera preview box.
@@ -85,7 +148,7 @@ export class CameraPreview {
@Cordova({
sync: true
})
static show(): void { };
show(): void { }
/**
* Hide the camera preview box.
@@ -93,15 +156,15 @@ export class CameraPreview {
@Cordova({
sync: true
})
static hide(): void { };
hide(): void { }
/**
* Set the default mode for the Flash.
* Disables the camera preview
*/
// @Cordova({
// sync: true
// })
// static setFlashMode(mode: number): void { };
@Cordova({
sync: true
})
disable(): void { }
/**
* Set camera color effect.
@@ -109,16 +172,6 @@ export class CameraPreview {
@Cordova({
sync: true
})
static setColorEffect(effect: string): void { };
/**
* @private
* @enum {number}
*/
static FlashMode = {
OFF: 0,
ON: 1,
AUTO: 2
};
setColorEffect(effect: string): void { }
}
@@ -1,21 +1,21 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
export interface CameraOptions {
/** Picture quality in range 0-100. Default is 50 */
quality?: number;
/**
* Choose the format of the return value.
* Defined in navigator.camera.DestinationType. Default is FILE_URI.
* DATA_URL : 0, Return image as base64-encoded string
* FILE_URI : 1, Return image file URI
* Defined in Camera.DestinationType. Default is FILE_URI.
* DATA_URL : 0, Return image as base64-encoded string,
* FILE_URI : 1, Return image file URI,
* NATIVE_URI : 2 Return image native URI
* (e.g., assets-library:// on iOS or content:// on Android)
*/
destinationType?: number;
/**
* Set the source of the picture.
* Defined in navigator.camera.PictureSourceType. Default is CAMERA.
* Defined in Camera.PictureSourceType. Default is CAMERA.
* PHOTOLIBRARY : 0,
* CAMERA : 1,
* SAVEDPHOTOALBUM : 2
@@ -25,7 +25,7 @@ export interface CameraOptions {
allowEdit?: boolean;
/**
* Choose the returned image file's encoding.
* Defined in navigator.camera.EncodingType. Default is JPEG
* Defined in Camera.EncodingType. Default is JPEG
* JPEG : 0 Return JPEG encoded image
* PNG : 1 Return PNG encoded image
*/
@@ -42,7 +42,7 @@ export interface CameraOptions {
targetHeight?: number;
/**
* Set the type of media to select from. Only works when PictureSourceType
* is PHOTOLIBRARY or SAVEDPHOTOALBUM. Defined in nagivator.camera.MediaType
* is PHOTOLIBRARY or SAVEDPHOTOALBUM. Defined in Camera.MediaType
* PICTURE: 0 allow selection of still pictures only. DEFAULT.
* Will return format specified via DestinationType
* VIDEO: 1 allow selection of video only, WILL ALWAYS RETURN FILE_URI
@@ -55,9 +55,9 @@ export interface CameraOptions {
saveToPhotoAlbum?: boolean;
/**
* Choose the camera to use (front- or back-facing).
* Defined in navigator.camera.Direction. Default is BACK.
* FRONT: 0
* BACK: 1
* Defined in Camera.Direction. Default is BACK.
* BACK: 0
* FRONT: 1
*/
cameraDirection?: number;
/** iOS-only options that specify popover location in iPad. Defined in CameraPopoverOptions. */
@@ -94,10 +94,14 @@ export interface CameraPopoverOptions {
*
* @usage
* ```typescript
* import { Camera } from 'ionic-native';
* import { Camera } from '@ionic-native/camera';
*
* constructor(private camera: Camera) { }
*
* ...
*
*
* Camera.getPicture(options).then((imageData) => {
* this.camera.getPicture(options).then((imageData) => {
* // imageData is either a base64 encoded string or a file URI
* // If it's base64:
* let base64Image = 'data:image/jpeg;base64,' + imageData;
@@ -105,19 +109,25 @@ export interface CameraPopoverOptions {
* // Handle error
* });
* ```
* @interfaces
* CameraOptions
* CameraPopoverOptions
*/
@Injectable()
@Plugin({
pluginName: 'Camera',
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']
})
export class Camera {
/**
* @private
* @enum {number}
*/
public static DestinationType = {
static DestinationType = {
/** Return base64 encoded string. DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI or NATIVE_URI if possible */
DATA_URL: 0,
/** Return file uri (content://media/external/images/media/2 for Android) */
@@ -130,7 +140,7 @@ export class Camera {
* @private
* @enum {number}
*/
public static EncodingType = {
static EncodingType = {
/** Return JPEG encoded image */
JPEG: 0,
/** Return PNG encoded image */
@@ -140,7 +150,7 @@ export class Camera {
* @private
* @enum {number}
*/
public static MediaType = {
static MediaType = {
/** Allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType */
PICTURE: 0,
/** Allow selection of video only, ONLY RETURNS URL */
@@ -153,7 +163,7 @@ export class Camera {
* @private
* @enum {number}
*/
public static PictureSourceType = {
static PictureSourceType = {
/** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */
PHOTOLIBRARY: 0,
/** Take picture from camera */
@@ -167,7 +177,7 @@ export class Camera {
* Matches iOS UIPopoverArrowDirection constants to specify arrow location on popover.
* @enum {number}
*/
public static PopoverArrowDirection = {
static PopoverArrowDirection = {
ARROW_UP: 1,
ARROW_DOWN: 2,
ARROW_LEFT: 4,
@@ -179,7 +189,7 @@ export class Camera {
* @private
* @enum {number}
*/
public static Direction = {
static Direction = {
/** Use the back-facing camera */
BACK: 0,
/** Use the front-facing camera */
@@ -188,22 +198,22 @@ export class Camera {
/**
* Take a picture or video, or load one from the library.
* @param {CameraOptions?} options Options that you want to pass to the camera. Encoding type, quality, etc. Optional
* @return {Promise} Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error.
* @param {CameraOptions?} options optional. Options that you want to pass to the camera. Encoding type, quality, etc. Platform-specific quirks are described in the [Cordova plugin docs](https://github.com/apache/cordova-plugin-camera#cameraoptions-errata-).
* @returns {Promise<any>} Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
static getPicture(options?: CameraOptions): Promise<any> { return; }
getPicture(options?: CameraOptions): Promise<any> { return; }
/**
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
* Applies only when the value of Camera.sourceType equals Camera.PictureSourceType.CAMERA and the Camera.destinationType equals Camera.DestinationType.FILE_URI.
* @return Returns a Promise
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS']
})
static cleanup() { };
cleanup(): Promise<any> { return; };
}
+196
View File
@@ -0,0 +1,196 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
export interface CardIOOptions {
/**
* Set to true to require expiry date
*/
requireExpiry?: boolean;
/**
* The user will be prompted for the card CVV
*/
requireCVV?: boolean;
/**
* The user will be prompted for the card billing postal code.
*/
requirePostalCode?: boolean;
/**
* Removes the keyboard button from the scan screen.
*/
supressManual?: boolean;
/**
* The postal code will only collect numeric input. Set this if you know the expected country's postal code has only numeric postal codes.
*/
restrictPostalCodeToNumericOnly?: boolean;
/**
* The theme for the card.io Activity's will be set to the theme of the application.
*/
keepApplicationTheme?: boolean;
/**
* The user will be prompted for the cardholder name
*/
requireCardholderName?: boolean;
/**
* Used to display instructions to the user while they are scanning their card.
*/
scanInstructions?: string;
/**
* If set, the card will not be scanned with the camera.
*/
noCamera?: boolean;
/**
* If scanExpiry is true, an attempt to extract the expiry from the card image will be made.
*/
scanExpiry?: boolean;
/**
* The preferred language for all strings appearing in the user interface. If not set, or if set to null, defaults to the device's current language setting.
*/
languageOrLocale?: string;
/**
* Changes the color of the guide overlay on the camera. The color is provided in hexadecimal format (e.g. `#FFFFFF`)
*/
guideColor?: string;
/**
* The user will not be prompted to confirm their card number after processing.
*/
supressConfirmation?: boolean;
/**
* The card.io logo will not be shown overlaid on the camera.
*/
hideCardIOLogo?: boolean;
/**
* The card.io logo will be shown instead of the PayPal logo.
*/
useCardIOLogo?: boolean;
/**
* Once a card image has been captured but before it has been processed, this value will determine whether to continue processing as usual.
*/
supressScan?: boolean;
}
export interface CardIOResponse {
/**
* Card type
*/
cardType: string;
/**
* Masked card number, showing only last 4 digits
*/
redactedCardNumber: string;
/**
* Full card number
*/
cardNumber: string;
/**
* Expiry month
*/
expiryMonth: number;
/**
* Expiry year
*/
expiryYear: number;
/**
* CVV
*/
cvv: string;
/**
* Postal code
*/
postalCode: string;
/**
* Cardholder name
*/
cardholderName: string;
}
/**
* @name CardIO
* @description
* @usage
* ```
* import { CardIO } from '@ionic-native/card-io';
*
* constructor(private cardIO: CardIO) { }
*
* ...
*
*
* this.cardIO.canScan()
* .then(
* (res: boolean) => {
* if(res){
* let options = {
* requireExpiry: true,
* requireCCV: false,
* requirePostalCode: false
* };
* CardIO.scan(options);
* }
* }
* );
* ```
* @interfaces
* CardIOOptions
* CardIOResponse
*/
@Plugin({
pluginName: 'CardIO',
plugin: 'card.io.cordova.mobilesdk',
pluginRef: 'CardIO',
repo: 'https://github.com/card-io/card.io-Cordova-Plugin',
platforms: ['iOS', 'Android']
})
@Injectable()
export class CardIO {
/**
* Check whether card scanning is currently available. (May vary by
* device, OS version, network connectivity, etc.)
*
* @returns {Promise<boolean>}
*/
@Cordova()
canScan(): Promise<boolean> { return; }
/**
* Scan a credit card with card.io.
* @param {CardIOOptions} options Options for configuring the plugin
* @returns {Promise<any>}
*/
@Cordova()
scan(options?: CardIOOptions): Promise<CardIOResponse> { return; }
/**
* Retrieve the version of the card.io library. Useful when contacting support.
* @returns {Promise<string>}
*/
@Cordova()
version(): Promise<string> { return; }
}
@@ -1,6 +1,5 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Clipboard
* @description
@@ -11,43 +10,48 @@ import { Cordova, Plugin } from './plugin';
*
* @usage
* ```typescript
* import { Clipboard } from 'ionic-native';
* import { Clipboard } from '@ionic-native/clipboard';
*
* constructor(private clipboard: Clipboard) { }
*
* ...
*
*
* Clipboard.copy('Hello world');
* this.clipboard.copy('Hello world');
*
* Clipboard.paste().then(
* this.clipboard.paste().then(
* (resolve: string) => {
* alert(resolve);
* alert(resolve);
* },
* (reject: string) => {
* alert('Error: ' + reject);
* alert('Error: ' + reject);
* }
* );
* );
* );
* ```
*/
@Plugin({
pluginName: 'Clipboard',
plugin: 'https://github.com/VersoSolutions/CordovaClipboard.git',
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']
})
@Injectable()
export class Clipboard {
/**
* Copies the given text
* @param {string} text Text that gets copied on the system clipboard
* @returns {Promise<T>} Returns a promise after the text has been copied
* @returns {Promise<any>} Returns a promise after the text has been copied
*/
@Cordova()
static copy(text: string): Promise<any> { return; }
copy(text: string): Promise<any> { return; }
/**
* Pastes the text stored in clipboard
* @returns {Promise<T>} Returns a promise after the text has been pasted
* @returns {Promise<any>} Returns a promise after the text has been pasted
*/
@Cordova()
static paste(): Promise<any> { return; }
paste(): Promise<any> { return; }
}
@@ -1,10 +1,6 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
// below are taken from
// https://raw.githubusercontent.com/Microsoft/cordova-plugin-code-push/master/typings/codePush.d.ts
// and adjusted to remove warnings and access control
namespace Http {
export const enum Verb {
GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, PATCH
@@ -401,29 +397,36 @@ export interface DownloadProgress {
/**
* @name CodePush
* @description
* CodePush plugin for Cordova by Microsoft that supports iOS and Android.
*
* For more info, please see https://github.com/ksachdeva/ionic2-code-push-example
*
* @usage
* ```typescript
* import { CodePush } from 'ionic-native';
* import { CodePush } from '@ionic-native/code-push';
*
* constructor(private codePush: CodePush) { }
*
* ...
*
* // note - mostly error & completed methods of observable will not fire
* // as syncStatus will contain the current state of the update
* CodePush.sync().subscribe((syncStatus) => console.log(syncStatus));
* this.codePush.sync().subscribe((syncStatus) => console.log(syncStatus));
*
* const downloadProgress = (progress) => { console.log(`Downloaded ${progress.receivedBytes} of ${progress.totalBytes}`); }
* CodePush.sync({}, downloadProgress).subscribe((syncStatus) => console.log(syncStatus));
* this.codePush.sync({}, downloadProgress).subscribe((syncStatus) => console.log(syncStatus));
*
* ```
*/
@Plugin({
pluginName: 'CodePush',
plugin: 'cordova-plugin-code-push',
pluginRef: 'codePush',
repo: 'https://github.com/Microsoft/cordova-plugin-code-push',
platforms: ['Android', 'iOS']
})
@Injectable()
export class CodePush {
/**
@@ -431,18 +434,20 @@ export class CodePush {
*
* @param packageSuccess Callback invoked with the currently deployed package information.
* @param packageError Optional callback invoked in case of an error.
* @returns {Promise<ILocalPackage>}
*/
@Cordova()
static getCurrentPackage(): Promise<ILocalPackage> {
getCurrentPackage(): Promise<ILocalPackage> {
return;
}
/**
* Gets the pending package information, if any. A pending package is one that has been installed but the application still runs the old code.
* This happends only after a package has been installed using ON_NEXT_RESTART or ON_NEXT_RESUME mode, but the application was not restarted/resumed yet.
* @returns {Promise<ILocalPackage>}
*/
@Cordova()
static getPendingPackage(): Promise<ILocalPackage> {
getPendingPackage(): Promise<ILocalPackage> {
return;
}
@@ -454,11 +459,12 @@ export class CodePush {
* A null package means the application is up to date for the current native application version.
* @param queryError Optional callback invoked in case of an error.
* @param deploymentKey Optional deployment key that overrides the config.xml setting.
* @returns {Promise<IRemotePackage>}
*/
@Cordova({
callbackOrder: 'reverse'
})
static checkForUpdate(deploymentKey?: string): Promise<IRemotePackage> {
checkForUpdate(deploymentKey?: string): Promise<IRemotePackage> {
return;
}
@@ -469,18 +475,20 @@ export class CodePush {
*
* @param notifySucceeded Optional callback invoked if the plugin was successfully notified.
* @param notifyFailed Optional callback invoked in case of an error during notifying the plugin.
* @returns {Promise<void>}
*/
@Cordova()
static notifyApplicationReady(): Promise<void> {
notifyApplicationReady(): Promise<void> {
return;
}
/**
* Reloads the application. If there is a pending update package installed using ON_NEXT_RESTART or ON_NEXT_RESUME modes, the update
* will be immediately visible to the user. Otherwise, calling this function will simply reload the current version of the application.
* @returns {Promise<void>}
*/
@Cordova()
static restartApplication(): Promise<void> {
restartApplication(): Promise<void> {
return;
}
@@ -502,6 +510,7 @@ export class CodePush {
* @param syncCallback Optional callback to be called with the status of the sync operation.
* @param syncOptions Optional SyncOptions parameter configuring the behavior of the sync operation.
* @param downloadProgress Optional callback invoked during the download process. It is called several times with one DownloadProgress parameter.
* @returns {Observable<SyncStatus>}
*
*/
@Cordova({
@@ -509,7 +518,7 @@ export class CodePush {
successIndex: 0,
errorIndex: 3 // we don't need this, so we set it to a value higher than # of args
})
static sync(syncOptions?: SyncOptions, downloadProgress?: SuccessCallback<DownloadProgress>): Observable<SyncStatus> {
sync(syncOptions?: SyncOptions, downloadProgress?: SuccessCallback<DownloadProgress>): Observable<SyncStatus> {
return;
}
+339
View File
@@ -0,0 +1,339 @@
import { Injectable } from '@angular/core';
import { CordovaInstance, InstanceProperty, Plugin, getPromise } from '@ionic-native/core';
declare var window: any,
navigator: any;
export type ContactFieldType = '*' | 'addresses' | 'birthday' | 'categories' | 'country' | 'department' | 'displayName' | 'emails' | 'familyName' | 'formatted' | 'givenName' | 'honorificPrefix' | 'honorificSuffix' | 'id' | 'ims' | 'locality' | 'middleName' | 'name' | 'nickname' | 'note' | 'organizations' | 'phoneNumbers' | 'photos' | 'postalCode' | 'region' | 'streetAddress' | 'title' | 'urls';
/**
* @private
*/
export interface IContactProperties {
/** A globally unique identifier. */
id?: string;
/** The name of this Contact, suitable for display to end users. */
displayName?: string;
/** An object containing all components of a persons name. */
name?: IContactName;
/** A casual name by which to address the contact. */
nickname?: string;
/** An array of all the contact's phone numbers. */
phoneNumbers?: IContactField[];
/** An array of all the contact's email addresses. */
emails?: IContactField[];
/** An array of all the contact's addresses. */
addresses?: IContactAddress[];
/** An array of all the contact's IM addresses. */
ims?: IContactField[];
/** An array of all the contact's organizations. */
organizations?: IContactOrganization[];
/** The birthday of the contact. */
birthday?: Date;
/** A note about the contact. */
note?: string;
/** An array of the contact's photos. */
photos?: IContactField[];
/** An array of all the user-defined categories associated with the contact. */
categories?: IContactField[];
/** An array of web pages associated with the contact. */
urls?: IContactField[];
}
/**
* @private
*/
export class Contact implements IContactProperties {
private _objectInstance: any;
@InstanceProperty id: string;
@InstanceProperty displayName: string;
@InstanceProperty name: IContactName;
@InstanceProperty nickname: string;
@InstanceProperty phoneNumbers: IContactField[];
@InstanceProperty emails: IContactField[];
@InstanceProperty addresses: IContactAddress[];
@InstanceProperty ims: IContactField[];
@InstanceProperty organizations: IContactOrganization[];
@InstanceProperty birthday: Date;
@InstanceProperty note: string;
@InstanceProperty photos: IContactField[];
@InstanceProperty categories: IContactField[];
@InstanceProperty urls: IContactField[];
constructor() {
this._objectInstance = navigator.contacts.create();
}
clone(): Contact {
let newContact = new Contact();
for (let prop in this) {
if (prop === 'id') return;
newContact[prop] = this[prop];
}
return newContact;
}
@CordovaInstance()
remove(): Promise<any> { return; }
save(): Promise<any> {
return getPromise((resolve, reject) => {
this._objectInstance.save((contact) => {
this._objectInstance = contact;
resolve(this);
}, reject);
});
}
}
/**
* @private
*/
export interface IContactError {
/** Error code */
code: number;
/** Error message */
message: string;
}
/**
* @private
*/
export declare var ContactError: {
new (code: number): IContactError;
UNKNOWN_ERROR: number;
INVALID_ARGUMENT_ERROR: number;
TIMEOUT_ERROR: number;
PENDING_OPERATION_ERROR: number;
IO_ERROR: number;
NOT_SUPPORTED_ERROR: number;
PERMISSION_DENIED_ERROR: number
};
export interface IContactName {
/** The complete name of the contact. */
formatted?: string;
/** The contact's family name. */
familyName?: string;
/** The contact's given name. */
givenName?: string;
/** The contact's middle name. */
middleName?: string;
/** The contact's prefix (example Mr. or Dr.) */
honorificPrefix?: string;
/** The contact's suffix (example Esq.). */
honorificSuffix?: string;
}
/**
* @private
*/
export class ContactName implements IContactName {
constructor(public formatted?: string,
public familyName?: string,
public givenName?: string,
public middleName?: string,
public honorificPrefix?: string,
public honorificSuffix?: string) {}
}
export interface IContactField {
/** A string that indicates what type of field this is, home for example. */
type?: string;
/** The value of the field, such as a phone number or email address. */
value?: string;
/** Set to true if this ContactField contains the user's preferred value. */
pref?: boolean;
}
/**
* @private
*/
export class ContactField implements IContactField {
constructor(public type?: string,
public value?: string,
public pref?: boolean) {}
}
export interface IContactAddress {
/** Set to true if this ContactAddress contains the user's preferred value. */
pref?: boolean;
/** A string indicating what type of field this is, home for example. */
type?: string;
/** The full address formatted for display. */
formatted?: string;
/** The full street address. */
streetAddress?: string;
/** The city or locality. */
locality?: string;
/** The state or region. */
region?: string;
/** The zip code or postal code. */
postalCode?: string;
/** The country name. */
country?: string;
}
/**
* @private
*/
export class ContactAddress implements IContactAddress {
constructor(public pref?: boolean,
public type?: string,
public formatted?: string,
public streetAddress?: string,
public locality?: string,
public region?: string,
public postalCode?: string,
public country?: string) {}
}
export interface IContactOrganization {
/** Set to true if this ContactOrganization contains the user's preferred value. */
pref?: boolean;
/** A string that indicates what type of field this is, home for example. */
type?: string;
/** The name of the organization. */
name?: string;
/** The department the contract works for. */
department?: string;
/** The contact's title at the organization. */
title?: string;
}
/**
* @private
*/
export class ContactOrganization implements IContactOrganization {
constructor(
public type?: string,
public name?: string,
public department?: string,
public title?: string,
public pref?: boolean
) {}
}
/** Search options to filter navigator.contacts. */
export interface IContactFindOptions {
/** The search string used to find navigator.contacts. */
filter?: string;
/** Determines if the find operation returns multiple navigator.contacts. Defaults to false. */
multiple?: boolean;
/** Contact fields to be returned back. If specified, the resulting Contact object only features values for these fields. */
desiredFields?: string[];
/**
* (Android only): Filters the search to only return contacts with a phone number informed.
*/
hasPhoneNumber?: boolean;
}
/**
* @private
*/
export class ContactFindOptions implements IContactFindOptions {
constructor(public filter?: string,
public multiple?: boolean,
public desiredFields?: string[],
public hasPhoneNumber?: boolean) {}
}
/**
* @name Contacts
* @description
* Access and manage Contacts on the device.
*
* @usage
*
* ```typescript
* import { Contacts, Contact, ContactField, ContactName } from '@ionic-native/contacts';
*
* constructor(private contacts: Contacts) { }
*
* let contact: Contact = this.contacts.create();
*
* contact.name = new ContactName(null, 'Smith', 'John');
* contact.phoneNumbers = [new ContactField('mobile', '6471234567')];
* contact.save().then(
* () => console.log('Contact saved!', contact),
* (error: any) => console.error('Error saving contact.', error)
* );
*
* ```
* @interfaces
* IContactProperties
* IContactError
* IContactName
* IContactField
* IContactAddress
* IContactOrganization
* IContactFindOptions
*/
@Plugin({
pluginName: 'Contacts',
plugin: 'cordova-plugin-contacts',
pluginRef: 'navigator.contacts',
repo: 'https://github.com/apache/cordova-plugin-contacts'
})
@Injectable()
export class Contacts {
/**
* Create a single contact.
* @returns {Contact} Returns a Contact object
*/
create(): Contact {
return new Contact();
}
/**
* Search for contacts in the Contacts list.
* @param fields {ContactFieldType[]} Contact fields to be used as a search qualifier
* @param options {IContactFindOptions} Optional options for the query
* @returns {Promise<Contact[]>} Returns a Promise that resolves with the search results (an array of Contact objects)
*/
find(fields: ContactFieldType[], options?: IContactFindOptions): Promise<Contact[]> {
return getPromise((resolve, reject) => {
navigator.contacts.find(fields, (contacts) => {
resolve(contacts.map(processContact));
}, reject, options);
});
}
/**
* Select a single Contact.
* @returns {Promise<Contact>} Returns a Promise that resolves with the selected Contact
*/
pickContact(): Promise<Contact> {
return getPromise((resolve, reject) => {
navigator.contacts.pickContact((contact) => resolve(processContact(contact)), reject);
});
}
}
/**
* @private
*/
function processContact(contact) {
let newContact = new Contact();
for (let prop in contact) {
if (typeof contact[prop] === 'function') continue;
newContact[prop] = contact[prop];
}
return newContact;
}
@@ -0,0 +1,42 @@
import { Plugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @name Couchbase Lite
* @description
* Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android
*
* @usage
* ```
* import { CouchbaseLite } from '@ionic-native/couchbase-lite';
*
* constructor(private couchbase: CouchbaseLite) {
*
* couchbase.getURL()
* .then(url => console.log(url))
* .catch(error => console.error(error));
*
* }
*
* ```
*/
@Plugin({
pluginName: 'CouchbaseLite',
plugin: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
pluginRef: 'cblite',
repo: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
})
@Injectable()
export class CouchbaseLite {
/**
* Get the database url
* @return {Promise<any>} Returns a promise that resolves with the local database url
*/
@Cordova({
callbackStyle: 'node'
})
getURL(): Promise<any> { return; }
}
@@ -1,14 +1,18 @@
import {Cordova, Plugin} from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Crop
* @description Crops images
* @usage
* ```
* import {Crop} from 'ionic-native';
* import {Crop} from '@ionic-native/crop';
*
* constructor(private crop: Crop) { }
*
* ...
*
* Crop.crop('path/to/image.jpg', {quality: 75})
* this.crop.crop('path/to/image.jpg', {quality: 75})
* .then(
* newImage => console.log("new image path is: " + newImage),
* error => console.error("Error cropping image", error)
@@ -16,19 +20,23 @@ import {Cordova, Plugin} from './plugin';
* ```
*/
@Plugin({
pluginName: 'Crop',
plugin: 'cordova-plugin-crop',
pluginRef: 'plugins',
repo: 'https://github.com/jeduan/cordova-plugin-crop'
})
@Injectable()
export class Crop {
/**
* Crops an image
* @param pathToImage
* @param options
* @return {Promise<string>} Returns a promise that resolves with the new image path, or rejects if failed to crop.
* @returns {Promise<string>} Returns a promise that resolves with the new image path, or rejects if failed to crop.
*/
@Cordova({
callbackOrder: 'reverse'
})
static crop(pathToImage: string, options?: {quality: number}): Promise<string> {return; }
crop(pathToImage: string, options?: {quality: number}): Promise<string> { return; }
}
@@ -0,0 +1,179 @@
import { Injectable } from '@angular/core';
import {Cordova, Plugin} from '@ionic-native/core';
export interface DatePickerOptions {
/**
* The mode of the date picker
* Values: date | time | datetime
*/
mode: string;
/**
* Selected date
*/
date: Date | string | number;
/**
* Minimum date
* Default: empty String
*/
minDate?: Date | string | number;
/**
* Maximum date
* Default?: empty String
*/
maxDate?: Date | string | number;
/**
* Label for the dialog title. If empty, uses android default (Set date/Set time).
* Default?: empty String
*/
titleText?: string;
/**
* Label of BUTTON_POSITIVE (done button) on Android
*/
okText?: string;
/**
* Label of BUTTON_NEGATIVE (cancel button). If empty, uses android.R.string.cancel.
*/
cancelText?: string;
/**
* Label of today button. If empty, doesn't show the option to select current date.
*/
todayText?: string;
/**
* Label of now button. If empty, doesn't show the option to select current time.
*/
nowText?: string;
/**
* Shows time dialog in 24 hours format.
*/
is24Hour?: boolean;
/**
* Choose the Android theme for the picker. You can use the DatePicker.ANDROID_THEMES property.
* Values: 1: THEME_TRADITIONAL | 2: THEME_HOLO_DARK | 3: THEME_HOLO_LIGHT | 4: THEME_DEVICE_DEFAULT_DARK | 5: THEME_DEVICE_DEFAULT_LIGHT
*/
androidTheme?: number;
/**
* Shows or hide dates earlier then selected date.
*/
allowOldDates?: boolean;
/**
* Shows or hide dates after selected date.
*/
allowFutureDates?: boolean;
/**
* Label of done button.
*/
doneButtonLabel?: string;
/**
* Hex color of done button.
*/
doneButtonColor?: string;
/**
* Label of cancel button.
*/
cancelButtonLabel?: string;
/**
* Hex color of cancel button.
*/
cancelButtonColor?: string;
/**
* X position of date picker. The position is absolute to the root view of the application.
*/
x?: number;
/**
* Y position of date picker. The position is absolute to the root view of the application.
*/
y?: number;
/**
* Interval between options in the minute section of the date picker.
*/
minuteInterval?: number;
/**
* Force the UIPopoverArrowDirection enum. The value any will revert to default UIPopoverArrowDirectionAny and let the app choose the proper direction itself.
*/
popoverArrowDirection?: string;
/**
* Force locale for datePicker.
*/
locale?: string;
}
/**
* @name Date Picker
* @description
* The DatePicker plugin allows the user to fetch date or time using native dialogs.
*
* @usage
* ```typescript
* import { DatePicker } from '@ionic-native/date-picker';
*
* constructor(private datePicker: DatePicker) { }
*
*
* ...
*
*
* this.datePicker.show({
* date: new Date(),
* mode: 'date'
* }).then(
* date => console.log('Got date: ', date),
* err => console.log('Error occurred while getting date: ', err)
* );
* ```
* @interfaces
* DatePickerOptions
*/
@Plugin({
pluginName: 'DatePicker',
plugin: 'cordova-plugin-datepicker',
pluginRef: 'datePicker',
repo: 'https://github.com/VitaliiBlagodir/cordova-plugin-datepicker',
platforms: ['Android', 'iOS', 'Windows']
})
@Injectable()
export class DatePicker {
/**
* @private
*/
static ANDROID_THEMES = {
THEME_TRADITIONAL: 1,
THEME_HOLO_DARK: 2,
THEME_HOLO_LIGHT: 3,
THEME_DEVICE_DEFAULT_DARK: 4,
THEME_DEVICE_DEFAULT_LIGHT: 5
};
/**
* Shows the date and/or time picker dialog(s)
* @param {DatePickerOptions} options Options for the date picker.
* @returns {Promise<Date>} Returns a promise that resolves with the picked date and/or time, or rejects with an error.
*/
@Cordova()
show(options: DatePickerOptions): Promise<Date> {
return;
}
}
@@ -1,22 +1,26 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* @name DB Meter
* @description This plugin defines a global DBMeter object, which permits to get the decibel values from the microphone.
* @usage
* ```typescript
* import { DBMeter } from 'ionic-native';
* import { DBMeter } from '@ionic-native/db-meter';
*
* constructor(private dbMeter: DBMeter) { }
*
* ...
*
*
* // Start listening
* let subscription = DBMeter.start().subscribe(
* let subscription = this.dbMeter.start().subscribe(
* data => console.log(data)
* );
*
* // Check if we are listening
* DBMeter.isListening().then(
* this.dbMeter.isListening().then(
* (isListening: boolean) => console.log(isListening)
* );
*
@@ -24,49 +28,51 @@ import { Observable } from 'rxjs/Observable';
* subscription.unsubscribe();
*
* // Delete DBMeter instance from memory
* DBMeter.delete().then(
* this.dbMeter.delete().then(
* () => console.log('Deleted DB Meter instance'),
* error => console.log('Error occurred while deleting DB Meter instance')
* );
* ```
*/
@Plugin({
pluginName: 'DBMeter',
plugin: 'cordova-plugin-dbmeter',
pluginRef: 'DBMeter',
repo: 'https://github.com/akofman/cordova-plugin-dbmeter',
platforms: ['iOS', 'Android']
})
@Injectable()
export class DBMeter {
/**
* Starts listening
* @return {Observable<string>} Returns an observable. Subscribe to start listening. Unsubscribe to stop listening.
* @returns {Observable<any>} Returns an observable. Subscribe to start listening. Unsubscribe to stop listening.
*/
@Cordova({
observable: true,
clearFunction: 'stop'
})
static start(): Observable<any> { return; }
start(): Observable<any> { return; }
/**
* Stops listening
* @private
*/
@Cordova()
static stop(): Promise<any> { return; }
stop(): Promise<any> { return; }
/**
* Check if the DB Meter is listening
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean that tells us whether the DB meter is listening
*/
@Cordova()
static isListening(): Promise<boolean> { return; }
isListening(): Promise<boolean> { return; }
/**
* Delete the DB Meter instance
* @return {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
* @returns {Promise<any>} Returns a promise that will resolve if the instance has been deleted, and rejects if errors occur.
*/
@Cordova()
static delete(): Promise<any> { return; }
delete(): Promise<any> { return; }
}
@@ -0,0 +1,126 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface DeeplinkMatch {
/**
* The route info for the matched route
*/
$route: any;
/**
* Any arguments passed either through route parameters or GET parameters
*/
$args: any;
/**
* The deeplink object processed from the plugin, along with any
* any internal native data available as "extras" at the time
* the route was matched (for example, Facebook sometimes adds extra data)
*/
$link: any;
}
/**
* @name Ionic Deeplinks
* @description This plugin handles deeplinks on iOS and Android for both custom URL scheme links
* and Universal App Links.
*
* @usage
* ```typescript
* import { Deeplinks } from '@ionic-native/deeplinks';
*
* constructor(private deepLinks: DeepLinks) { }
*
* this.deepLinks.route({
* '/about-us': AboutPage,
* '/universal-links-test': AboutPage,
* '/products/:productId': ProductPage
* }).subscribe((match) => {
* // match.$route - the route we matched, which is the matched entry from the arguments to route()
* // match.$args - the args passed in the link
* // match.$link - the full link data
* console.log('Successfully matched route', match);
* }, (nomatch) => {
* // nomatch.$link - the full link data
* console.error('Got a deeplink that didn\'t match', nomatch);
* });
* ```
*
* Alternatively, if you're using Ionic 2, there's a convenience method that takes a reference to a `NavController` and handles
* the actual navigation for you:
*
* ```typescript
* this.deepLinks.routeWithNavController(this.navController, {
* '/about-us': AboutPage,
* '/products/:productId': ProductPage
* }).subscribe((match) => {
* // match.$route - the route we matched, which is the matched entry from the arguments to route()
* // match.$args - the args passed in the link
* // match.$link - the full link data
* console.log('Successfully matched route', match);
* }, (nomatch) => {
* // nomatch.$link - the full link data
* console.error('Got a deeplink that didn\'t match', nomatch);
* });
* ```
*
* See the [Ionic 2 Deeplinks Demo](https://github.com/driftyco/ionic2-deeplinks-demo/blob/master/app/app.ts) for an example of how to
* retrieve the `NavController` reference at runtime.
*
* @interfaces
* DeeplinkMatch
*/
@Plugin({
pluginName: 'Deeplinks',
plugin: 'ionic-plugin-deeplinks',
pluginRef: 'IonicDeeplink',
repo: 'https://github.com/driftyco/ionic-plugin-deeplinks',
platforms: ['iOS', 'Android'],
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']
})
@Injectable()
export class Deeplinks {
/**
* Define a set of paths to match against incoming deeplinks.
*
* @param {paths} Define a set of paths to match against incoming deeplinks.
* paths takes an object of the form { 'path': data }. If a deeplink
* matches the path, the resulting path-data pair will be returned in the
* promise result which you can then use to navigate in the app as you see fit.
* @returns {Observable<DeeplinkMatch>} Returns an Observable that is called each time a deeplink comes through, and
* errors if a deeplink comes through that does not match a given path.
*/
@Cordova({
observable: true
})
route(paths): Observable<DeeplinkMatch> { return; }
/**
*
* 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:
*
* NavController.push = function(View, Params){}
*
* This handler will automatically navigate when a route matches. If you need finer-grained
* control over the behavior of a matching deeplink, use the plain `route` method.
*
* @param {paths} Define a set of paths to match against incoming deeplinks.
* paths takes an object of the form { 'path': data }. If a deeplink
* matches the path, the resulting path-data pair will be returned in the
* promise result which you can then use to navigate in the app as you see fit.
*
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
* errors if a deeplink comes through that does not match a given path.
*/
@Cordova({
observable: true
})
routeWithNavController(navController, paths): Observable<DeeplinkMatch> { return; }
}
@@ -0,0 +1,61 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Device Accounts
* @description
* Gets the Google accounts associated with the Android device
*
* @usage
* ```typescript
* import { DeviceAccounts } from '@ionic-native/device-accounts';
*
* constructor(private deviceAccounts: DeviceAccounts) { }
*
* ...
*
* this.deviceAccounts.get()
* .then(accounts => console.log(accounts))
* .catch(error => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'DeviceAccounts',
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
pluginRef: 'plugins.DeviceAccounts',
repo: 'https://github.com/loicknuchel/cordova-device-accounts',
platforms: ['Android']
})
@Injectable()
export class DeviceAccounts {
/**
* Gets all accounts registered on the Android Device
* @returns {Promise<any>}
*/
@Cordova()
get(): Promise<any> { return; }
/**
* Get all accounts registered on Android device for requested type
* @returns {Promise<any>}
*/
@Cordova()
getByType(type: string): Promise<any> { return; }
/**
* Get all emails registered on Android device (accounts with 'com.google' type)
* @returns {Promise<any>}
*/
@Cordova()
getEmails(): Promise<any> { return; }
/**
* Get the first email registered on Android device
* @returns {Promise<any>}
*/
@Cordova()
getEmail(): Promise<any> { return; }
}
@@ -0,0 +1,63 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
/**
* @name DeviceFeedback
* @description
*
* Plugin that lets you provide haptic or acoustic feedback on Android devices.
*
* @usage
* ```
* import { DeviceFeedback } from '@ionic-native/device-feedback';
*
* constructor(private deviceFeedback: DeviceFeedback) { }
*
* ...
*
*
* this.deviceFeedback.acoustic();
*
* this.deviceFeedback.haptic(0);
*
* this.deviceFeedback.isFeedbackEnabled()
* .then((feedback) => {
* console.log(feedback);
* // {
* // acoustic: true,
* // haptic: true
* // }
* });
*
* ```
*/
@Plugin({
pluginName: 'DeviceFeedback',
plugin: 'cordova-plugin-velda-devicefeedback',
pluginRef: 'plugins.deviceFeedback',
repo: 'https://github.com/VVelda/device-feedback',
platforms: ['Android']
})
@Injectable()
export class DeviceFeedback {
/**
* Provide sound feedback to user, nevertheless respect user's settings and current active device profile as native feedback do.
*/
@Cordova({ sync: true })
acoustic(): void { }
/**
* Provide vibrate feedback to user, nevertheless respect user's tactile feedback setting as native feedback do.
* @param type {Number} Specify type of vibration feedback. 0 for long press, 1 for virtual key, or 3 for keyboard tap.
*/
@Cordova({ sync: true })
haptic(type: number): void { }
/**
* Check if haptic and acoustic feedback is enabled by user settings.
* @returns {Promise<any>}
*/
@Cordova()
isFeedbackEnabled(): Promise<{ haptic: boolean; acoustic: boolean; }> { return; }
}
@@ -1,8 +1,8 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface AccelerationData {
export interface DeviceMotionAccelerationData {
/**
* Amount of acceleration on the x-axis. (in m/s^2)
@@ -26,7 +26,7 @@ export interface AccelerationData {
}
export interface AccelerometerOptions {
export interface DeviceMotionAccelerometerOptions {
/**
* Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
@@ -42,17 +42,16 @@ export interface AccelerometerOptions {
*
* @usage
* ```typescript
* import { DeviceMotion } from 'ionic-native';
*
* import { DeviceMotion, DeviceMotionAccelerationData } from '@ionic-native/device-motion';
*
* // Get the device current acceleration
* DeviceMotion.getCurrentAcceleration().then(
* (acceleration: AccelerationData) => console.log(acceleration),
* (acceleration: DeviceMotionAccelerationData) => console.log(acceleration),
* (error: any) => console.log(error)
* );
*
* // Watch device acceleration
* var subscription = DeviceMotion.watchAcceleration().subscribe((acceleration: AccelerationData) => {
* var subscription = DeviceMotion.watchAcceleration().subscribe((acceleration: DeviceMotionAccelerationData) => {
* console.log(acceleration);
* });
*
@@ -60,31 +59,36 @@ export interface AccelerometerOptions {
* subscription.unsubscribe();
*
* ```
* @interfaces
* DeviceMotionAccelerationData
* DeviceMotionAccelerometerOptions
*/
@Plugin({
pluginName: 'DeviceMotion',
plugin: 'cordova-plugin-device-motion',
pluginRef: 'navigator.accelerometer',
repo: 'https://github.com/apache/cordova-plugin-device-motion'
})
@Injectable()
export class DeviceMotion {
/**
* Get the current acceleration along the x, y, and z axes.
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
* @returns {Promise<DeviceMotionAccelerationData>} Returns object with x, y, z, and timestamp properties
*/
@Cordova()
static getCurrentAcceleration(): Promise<AccelerationData> { return; }
getCurrentAcceleration(): Promise<DeviceMotionAccelerationData> { return; }
/**
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
* @param {AccelerometerOptions} options list of options for the accelerometer.
* @returns {Observable<AccelerationData>} Observable returns an observable that you can subscribe to
* @returns {Observable<DeviceMotionAccelerationData>} Observable returns an observable that you can subscribe to
*/
@Cordova({
callbackOrder: 'reverse',
observable: true,
clearFunction: 'clearWatch'
})
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> { return; }
watchAcceleration(options?: DeviceMotionAccelerometerOptions): Observable<DeviceMotionAccelerationData> { return; }
}
@@ -1,8 +1,8 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface CompassHeading {
export interface DeviceOrientationCompassHeading {
/**
* The heading in degrees from 0-359.99 at a single moment in time. (Number)
@@ -26,7 +26,7 @@ export interface CompassHeading {
}
export interface CompassOptions {
export interface DeviceOrientationCompassOptions {
/**
* How often to retrieve the compass heading in milliseconds. (Number) (Default: 100)
@@ -47,51 +47,56 @@ export interface CompassOptions {
*
* @usage
* ```typescript
* // CompassHeading is an interface for compass
* import { DeviceOrientation, CompassHeading } from 'ionic-native';
* // DeviceOrientationCompassHeading is an interface for compass
* import { DeviceOrientation, DeviceOrientationCompassHeading } from '@ionic-native/device-orientation';
*
*
* // Get the device current compass heading
* DeviceOrientation.getCurrentHeading().then(
* (data: CompassHeading) => console.log(data),
* (data: DeviceOrientationCompassHeading) => console.log(data),
* (error: any) => console.log(error)
* );
*
* // Watch the device compass heading change
* var subscription = DeviceOrientation.watchHeading().subscribe(
* (data: CompassHeading) => console.log(data)
* (data: DeviceOrientationCompassHeading) => console.log(data)
* );
*
* // Stop watching heading change
* subscription.unsubscribe();
* ```
* @interfaces
* DeviceOrientationCompassOptions
* DeviceOrientationCompassHeading
*/
@Plugin({
pluginName: 'DeviceOrientation',
plugin: 'cordova-plugin-device-orientation',
pluginRef: 'navigator.compass',
repo: 'https://github.com/apache/cordova-plugin-device-orientation'
})
@Injectable()
export class DeviceOrientation {
/**
* Get the current compass heading.
* @returns {Promise<CompassHeading>}
* @returns {Promise<DeviceOrientationCompassHeading>}
*/
@Cordova()
static getCurrentHeading(): Promise<CompassHeading> { return; }
getCurrentHeading(): Promise<DeviceOrientationCompassHeading> { return; }
/**
* Get the device current heading at a regular interval
*
* Stop the watch by unsubscribing from the observable
* @param {CompassOptions} options Options for compass. Frequency and Filter. Optional
* @returns {Observable<CompassHeading>} Returns an observable that contains the compass heading
* @param {DeviceOrientationCompassOptions} options Options for compass. Frequency and Filter. Optional
* @returns {Observable<DeviceOrientationCompassHeading>} Returns an observable that contains the compass heading
*/
@Cordova({
callbackOrder: 'reverse',
observable: true,
clearFunction: 'clearWatch'
})
static watchHeading(options?: CompassOptions): Observable<CompassHeading> { return; }
watchHeading(options?: DeviceOrientationCompassOptions): Observable<DeviceOrientationCompassHeading> { return; }
}
@@ -1,31 +1,7 @@
import { CordovaProperty, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin } from '@ionic-native/core';
declare var window: {
device: Device
};
export interface Device {
/** Get the version of Cordova running on the device. */
cordova: string;
/**
* The device.model returns the name of the device's model or product. The value is set
* by the device manufacturer and may be different across versions of the same product.
*/
model: string;
/** Get the device's operating system name. */
platform: string;
/** Get the device's Universally Unique Identifier (UUID). */
uuid: string;
/** Get the operating system version. */
version: string;
/** Get the device's manufacturer. */
manufacturer: string;
/** Whether the device is running on a simulator. */
isVirtual: boolean;
/** Get the device hardware serial number. */
serial: string;
}
declare var window: any;
/**
* @name Device
@@ -34,25 +10,57 @@ export interface Device {
*
* @usage
* ```typescript
* import { Device } from 'ionic-native';
* import { Device } from '@ionic-native/device';
*
* constructor(private device: Device) { }
*
* console.log('Device UUID is: ' + Device.device.uuid);
* ...
*
* console.log('Device UUID is: ' + this.device.uuid);
* ```
*/
@Plugin({
pluginName: 'Device',
plugin: 'cordova-plugin-device',
pluginRef: 'device',
repo: 'https://github.com/apache/cordova-plugin-device'
})
@Injectable()
export class Device {
/** Get the version of Cordova running on the device. */
@CordovaProperty
cordova: string;
/**
* Returns the whole device object.
*
* @returns {Object} The device object.
* The device.model returns the name of the device's model or product. The value is set
* by the device manufacturer and may be different across versions of the same product.
*/
@CordovaProperty
static get device() { return window.device; }
model: string;
/** Get the device's operating system name. */
@CordovaProperty
platform: string;
/** Get the device's Universally Unique Identifier (UUID). */
@CordovaProperty
uuid: string;
/** Get the operating system version. */
@CordovaProperty
version: string;
/** Get the device's manufacturer. */
@CordovaProperty
manufacturer: string;
/** Whether the device is running on a simulator. */
@CordovaProperty
isVirtual: boolean;
/** Get the device hardware serial number. */
@CordovaProperty
serial: string;
}
@@ -0,0 +1,719 @@
import { Injectable } from '@angular/core';
import {Cordova, Plugin, CordovaProperty} from '@ionic-native/core';
/**
* @name Diagnostic
* @description
* Checks whether device hardware features are enabled or available to the app, e.g. camera, GPS, wifi
*
* @usage
* ```typescript
* import { Diagnostic } from '@ionic-native/diagnostic';
*
* let successCallback = (isAvailable) => { console.log('Is available? ' + isAvailable); };
* let errorCallback = (e) => console.error(e);
*
* Diagnostic.isCameraAvailable().then(successCallback).catch(errorCallback);
*
* Diagnostic.isBluetoothAvailable().then(successCallback, errorCallback);
*
*
* Diagnostic.getBluetoothState()
* .then((state) => {
* if (state == Diagnostic.bluetoothStates.POWERED_ON){
* // do something
* } else {
* // do something else
* }
* }).catch(e => console.error(e));
*
* ```
*
*/
@Plugin({
pluginName: 'Diagnostic',
plugin: 'cordova.plugins.diagnostic',
pluginRef: 'cordova.plugins.diagnostic',
repo: 'https://github.com/dpa99c/cordova-diagnostic-plugin'
})
@Injectable()
export class Diagnostic {
static permission = {
READ_CALENDAR: 'READ_CALENDAR',
WRITE_CALENDAR: 'WRITE_CALENDAR',
CAMERA: 'CAMERA',
READ_CONTACTS: 'READ_CONTACTS',
WRITE_CONTACTS: 'WRITE_CONTACTS',
GET_ACCOUNTS: 'GET_ACCOUNTS',
ACCESS_FINE_LOCATION: 'ACCESS_FINE_LOCATION',
ACCESS_COARSE_LOCATION: 'ACCESS_COARSE_LOCATION',
RECORD_AUDIO: 'RECORD_AUDIO',
READ_PHONE_STATE: 'READ_PHONE_STATE',
CALL_PHONE: 'CALL_PHONE',
ADD_VOICEMAIL: 'ADD_VOICEMAIL',
USE_SIP: 'USE_SIP',
PROCESS_OUTGOING_CALLS: 'PROCESS_OUTGOING_CALLS',
READ_CALL_LOG: 'READ_CALL_LOG',
WRITE_CALL_LOG: 'WRITE_CALL_LOG',
SEND_SMS: 'SEND_SMS',
RECEIVE_SMS: 'RECEIVE_SMS',
READ_SMS: 'READ_SMS',
RECEIVE_WAP_PUSH: 'RECEIVE_WAP_PUSH',
RECEIVE_MMS: 'RECEIVE_MMS',
WRITE_EXTERNAL_STORAGE: 'WRITE_EXTERNAL_STORAGE',
READ_EXTERNAL_STORAGE: 'READ_EXTERNAL_STORAGE',
BODY_SENSORS: 'BODY_SENSORS'
};
@CordovaProperty
static permissionStatus: {
GRANTED: string;
DENIED: string;
NOT_REQUESTED: string;
DENIED_ALWAYS: string;
RESTRICTED: string;
GRANTED_WHEN_IN_USE: string;
};
static locationAuthorizationMode = {
ALWAYS: 'always',
WHEN_IN_USE: 'when_in_use'
};
static permissionGroups = {
CALENDAR: ['READ_CALENDAR', 'WRITE_CALENDAR'],
CAMERA: ['CAMERA'],
CONTACTS: ['READ_CONTACTS', 'WRITE_CONTACTS', 'GET_ACCOUNTS'],
LOCATION: ['ACCESS_FINE_LOCATION', 'ACCESS_COARSE_LOCATION'],
MICROPHONE: ['RECORD_AUDIO'],
PHONE: ['READ_PHONE_STATE', 'CALL_PHONE', 'ADD_VOICEMAIL', 'USE_SIP', 'PROCESS_OUTGOING_CALLS', 'READ_CALL_LOG', 'WRITE_CALL_LOG'],
SENSORS: ['BODY_SENSORS'],
SMS: ['SEND_SMS', 'RECEIVE_SMS', 'READ_SMS', 'RECEIVE_WAP_PUSH', 'RECEIVE_MMS'],
STORAGE: ['READ_EXTERNAL_STORAGE', 'WRITE_EXTERNAL_STORAGE']
};
static locationMode = {
HIGH_ACCURACY: 'high_accuracy',
DEVICE_ONLY: 'device_only',
BATTERY_SAVING: 'battery_saving',
LOCATION_OFF: 'location_off'
};
static bluetoothState = {
UNKNOWN: 'unknown',
RESETTING: 'resetting', // iOS
UNSUPPORTED: 'unsupported', // iOS
UNAUTHORIZED: 'unauthorized', // iOS
POWERED_OFF: 'powered_off',
POWERED_ON: 'powered_on',
POWERING_OFF: 'powering_off',
POWERING_ON: 'powering_on'
};
@CordovaProperty
static NFCState: {
UNKNOWN: string;
POWERED_OFF: string;
POWERED_ON: string;
POWERING_ON: string;
POWERING_OFF: string;
};
/**
* Checks if app is able to access device location.
* @returns {Promise<any>}
*/
@Cordova()
isLocationAvailable(): Promise<any> { return; }
/**
* Checks if Wifi is connected/enabled. On iOS this returns true if the device is connected to a network by WiFi. On Android and Windows 10 Mobile this returns true if the WiFi setting is set to enabled.
* On Android this requires permission. `<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />`
* @returns {Promise<any>}
*/
@Cordova()
isWifiAvailable(): Promise<any> { return; }
/**
* Checks if the device has a camera. On Android this returns true if the device has a camera. On iOS this returns true if both the device has a camera AND the application is authorized to use it. On Windows 10 Mobile this returns true if both the device has a rear-facing camera AND the
* application is authorized to use it.
* @returns {Promise<any>}
*/
@Cordova()
isCameraAvailable(): Promise<any> { return; }
/**
* Checks if the device has Bluetooth capabilities and if so that Bluetooth is switched on (same on Android, iOS and Windows 10 Mobile)
* On Android this requires permission <uses-permission android:name="android.permission.BLUETOOTH" />
* @returns {Promise<any>}
*/
@Cordova()
isBluetoothAvailable(): Promise<any> { return; }
/**
* Displays the device location settings to allow user to enable location services/change location mode.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10'] })
switchToLocationSettings(): void { }
/**
* Displays mobile settings to allow user to enable mobile data.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10'] })
switchToMobileDataSettings(): void { }
/**
* Displays Bluetooth settings to allow user to enable Bluetooth.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10'] })
switchToBluetoothSettings(): void { }
/**
* Displays WiFi settings to allow user to enable WiFi.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10'] })
switchToWifiSettings(): void { }
/**
* Returns true if the WiFi setting is set to enabled, and is the same as `isWifiAvailable()`
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'Windows 10'] })
isWifiEnabled(): Promise<boolean> { return; }
/**
* Enables/disables WiFi on the device.
* Requires `ACCESS_WIFI_STATE` and `CHANGE_WIFI_STATE` permissions on Android
* @param state {boolean}
* @returns {Promise<any>}
*/
@Cordova({ callbackOrder: 'reverse', platforms: ['Android', 'Windows 10'] })
setWifiState(state: boolean): Promise<any> { return; }
/**
* Enables/disables Bluetooth on the device.
* Requires `BLUETOOTH` and `BLUETOOTH_ADMIN` permissions on Android
* @param state {boolean}
* @returns {Promise<any>}
*/
@Cordova({ callbackOrder: 'reverse', platforms: ['Android', 'Windows 10'] })
setBluetoothState(state: boolean): Promise<any> { return; }
// ANDROID AND IOS ONLY
/**
* Returns true if the device setting for location is on. On Android this returns true if Location Mode is switched on. On iOS this returns true if Location Services is switched on.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isLocationEnabled(): Promise<boolean> { return; }
/**
* Checks if the application is authorized to use location.
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
* @returns {Promise<any>}
*/
@Cordova()
isLocationAuthorized(): Promise<any> { return; }
/**
* Returns the location authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getLocationAuthorizationStatus(): Promise<any> { return; }
/**
* Returns the location authorization status for the application.
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
*
* mode - (iOS-only / optional) location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use".
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
requestLocationAuthorization(mode?: string): Promise<any> { return; }
/**
* Checks if camera hardware is present on device.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isCameraPresent(): Promise<any> { return; }
/**
* Checks if the application is authorized to use the camera.
* Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isCameraAuthorized(): Promise<any> { return; }
/**
* Returns the camera authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getCameraAuthorizationStatus(): Promise<any> { return; }
/**
* Requests camera authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
requestCameraAuthorization(): Promise<any> { return; }
/**
* Checks if the application is authorized to use the microphone.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isMicrophoneAuthorized(): Promise<boolean> { return; }
/**
* Returns the microphone authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getMicrophoneAuthorizationStatus(): Promise<any> { return; }
/**
* Requests microphone authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
requestMicrophoneAuthorization(): Promise<any> { return; }
/**
* Checks if the application is authorized to use contacts (address book).
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isContactsAuthorized(): Promise<boolean> { return; }
/**
* Returns the contacts authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getContactsAuthorizationStatus(): Promise<any> { return; }
/**
* Requests contacts authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
requestContactsAuthorization(): Promise<any> { return; }
/**
* Checks if the application is authorized to use the calendar.
*
* Notes for Android:
* - This is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return TRUE as permissions are already granted at installation time.
*
* Notes for iOS:
* - This relates to Calendar Events (not Calendar Reminders)
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
isCalendarAuthorized(): Promise<boolean> { return; }
/**
* Returns the calendar authorization status for the application.
*
* Notes for Android:
* - This is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return `GRANTED` status as permissions are already granted at installation time.
*
* Notes for iOS:
* - This relates to Calendar Events (not Calendar Reminders)
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getCalendarAuthorizationStatus(): Promise<any> { return; }
/**
* Requests calendar authorization for the application.
*
* Notes for iOS:
* - Should only be called if authorization status is NOT_DETERMINED. Calling it when in any other state will have no effect and just return the current authorization status.
* - This relates to Calendar Events (not Calendar Reminders)
*
* Notes for Android:
* - This is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will have no effect as the permissions are already granted at installation time.
* - This requests permission for `READ_CALENDAR` run-time permission
* - Required permissions must be added to `AndroidManifest.xml` as appropriate - see Android permissions: `READ_CALENDAR`, `WRITE_CALENDAR`
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
requestCalendarAuthorization(): Promise<any> { return; }
/**
* Opens settings page for this app.
* On Android, this opens the "App Info" page in the Settings app.
* On iOS, this opens the app settings page in the Settings app. This works only on iOS 8+ - iOS 7 and below will invoke the errorCallback.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
switchToSettings(): Promise<any> { return; }
/**
* Returns the state of Bluetooth on the device.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android', 'iOS'] })
getBluetoothState(): Promise<any> { return; }
/**
* Registers a function to be called when a change in Bluetooth state occurs.
* @param handler
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
registerBluetoothStateChangeHandler(handler: Function): void { }
/**
* Registers a function to be called when a change in Location state occurs.
* @param handler
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
registerLocationStateChangeHandler(handler: Function): void { }
// ANDROID ONLY
/**
* Checks if high-accuracy locations are available to the app from GPS hardware.
* Returns true if Location mode is enabled and is set to "Device only" or "High accuracy" AND if the app is authorised to use location.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isGpsLocationAvailable(): Promise<boolean> { return; }
/**
* Checks if location mode is set to return high-accuracy locations from GPS hardware.
* Returns true if Location mode is enabled and is set to either:
* - Device only = GPS hardware only (high accuracy)
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
isGpsLocationEnabled(): Promise<any> { return; }
/**
* Checks if low-accuracy locations are available to the app from network triangulation/WiFi access points.
* Returns true if Location mode is enabled and is set to "Battery saving" or "High accuracy" AND if the app is authorised to use location.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
isNetworkLocationAvailable(): Promise<any> { return; }
/**
* Checks if location mode is set to return low-accuracy locations from network triangulation/WiFi access points.
* Returns true if Location mode is enabled and is set to either:
* - Battery saving = network triangulation and Wifi network IDs (low accuracy)
* - High accuracy = GPS hardware, network triangulation and Wifi network IDs (high and low accuracy)
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
isNetworkLocationEnabled(): Promise<any> { return; }
/**
* Returns the current location mode setting for the device.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
getLocationMode(): Promise<any> { return; }
/**
* Returns the current authorisation status for a given permission.
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
* @param permission
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
getPermissionAuthorizationStatus(permission: any): Promise<any> { return; }
/**
* Returns the current authorisation status for multiple permissions.
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
* @param permissions
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
getPermissionsAuthorizationStatus(permissions: any[]): Promise<any> { return; }
/**
* Requests app to be granted authorisation for a runtime permission.
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will have no effect as the permissions are already granted at installation time.
* @param permission
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
requestRuntimePermission(permission: any): Promise<any> { return; }
/**
* Requests app to be granted authorisation for multiple runtime permissions.
* Note: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time.
* @param permissions
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'], callbackOrder: 'reverse' })
requestRuntimePermissions(permissions: any[]): Promise<any> { return; }
/**
* Indicates if the plugin is currently requesting a runtime permission via the native API.
* Note that only one request can be made concurrently because the native API cannot handle concurrent requests,
* so the plugin will invoke the error callback if attempting to make more than one simultaneous request.
* Multiple permission requests should be grouped into a single call since the native API is setup to handle batch requests of multiple permission groups.
* @returns {boolean}
*/
@Cordova({ sync: true })
isRequestingPermission(): boolean { return; }
/**
* Registers a function to be called when a runtime permission request has completed.
* Pass in a falsey value to de-register the currently registered function.
* @param handler {Function}
*/
@Cordova({ sync: true })
registerPermissionRequestCompleteHandler(handler: Function): void { return; }
/**
* Checks if the device setting for Bluetooth is switched on.
* This requires `BLUETOOTH` permission on Android
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isBluetoothEnabled(): Promise<boolean> { return; }
/**
* Checks if the device has Bluetooth capabilities.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
hasBluetoothSupport(): Promise<boolean> { return; }
/**
* Checks if the device has Bluetooth Low Energy (LE) capabilities.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
hasBluetoothLESupport(): Promise<boolean> { return; }
/**
* Checks if the device supports Bluetooth Low Energy (LE) Peripheral mode.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
hasBluetoothLEPeripheralSupport(): Promise<boolean> { return; }
/**
* Checks if the application is authorized to use external storage.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
static isExternalStorageAuthorized(): Promise<boolean> { return; }
/**
* CReturns the external storage authorization status for the application.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
static getExternalStorageAuthorizationStatus(): Promise<any> { return; }
/**
* Requests external storage authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
static requestExternalStorageAuthorization(): Promise<any> { return; }
/**
* Returns details of external SD card(s): absolute path, is writable, free space.
*
* The intention of this method is to return the location and details of removable external SD cards.
* This differs from the "external directories" returned by cordova-plugin-file which return mount points relating to non-removable (internal) storage.
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getexternalsdcarddetails)
*
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
static getExternalSdCardDetails(): Promise<any> { return; }
/**
* Switches to the wireless settings page in the Settings app. Allows configuration of wireless controls such as Wi-Fi, Bluetooth and Mobile networks.
*/
@Cordova({
platforms: ['Android'],
sync: true
})
switchToWirelessSettings(): void { }
/**
* Displays NFC settings to allow user to enable NFC.
*/
@Cordova({
platforms: ['Android'],
sync: true
})
switchToNFCSettings(): void { }
/**
* Checks if NFC hardware is present on device.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
static isNFCPresent(): Promise<boolean> { return; }
/**
* Checks if the device setting for NFC is switched on.
* Note: this operation does not require NFC permission in the manifest.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
static isNFCEnabled(): Promise<boolean> { return; }
/**
* Checks if NFC is available to the app. Returns true if the device has NFC capabilities AND if NFC setting is switched on.
* Note: this operation does not require NFC permission in the manifest.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['Android'] })
static isNFCAvailable(): Promise<boolean> { return; }
/**
* Registers a function to be called when a change in NFC state occurs. Pass in a falsey value to de-register the currently registered function.
* @param hander {Function} callback function to be called when NFC state changes
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
sync: true
})
registerNFCStateChangeHandler(handler: Function): void { }
// IOS ONLY
/**
* Checks if the application is authorized to use the Camera Roll in Photos app.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isCameraRollAuthorized(): Promise<boolean> { return; }
/**
* Returns the authorization status for the application to use the Camera Roll in Photos app.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
getCameraRollAuthorizationStatus(): Promise<boolean> { return; }
/**
* Requests camera roll authorization for the application.
* Should only be called if authorization status is NOT_REQUESTED.
* Calling it when in any other state will have no effect.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
requestCameraRollAuthorization(): Promise<any> { return; }
/**
* Checks if remote (push) notifications are enabled.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isRemoteNotificationsEnabled(): Promise<boolean> { return; }
/**
* Indicates if the app is registered for remote (push) notifications on the device.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isRegisteredForRemoteNotifications(): Promise<boolean> { return; }
/**
* Indicates the current setting of notification types for the app in the Settings app.
* Note: on iOS 8+, if "Allow Notifications" switch is OFF, all types will be returned as disabled.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
getRemoteNotificationTypes(): Promise<any> { return; }
/**
* Checks if the application is authorized to use reminders.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isRemindersAuthorized(): Promise<boolean> { return; }
/**
* Returns the reminders authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
getRemindersAuthorizationStatus(): Promise<any> { return; }
/**
* Requests reminders authorization for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
requestRemindersAuthorization(): Promise<any> { return; }
/**
* Checks if the application is authorized for background refresh.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
isBackgroundRefreshAuthorized(): Promise<boolean> { return; }
/**
* Returns the background refresh authorization status for the application.
* @returns {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
getBackgroundRefreshStatus(): Promise<any> { return; }
/**
* Requests Bluetooth authorization for the application.
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestbluetoothauthorization)
* @return {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
static requestBluetoothAuthorization(): Promise<any> { return; }
/**
* Checks if motion tracking is available on the current device.
* @return {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
static isMotionAvailable(): Promise<boolean> { return; }
/**
* Checks if it's possible to determine the outcome of a motion authorization request on the current device.
* There's no direct way to determine if authorization was granted or denied, so the Pedometer API must be used to indirectly determine this:
* therefore, if the device supports motion tracking but not Pedometer Event Tracking, the outcome of requesting motion detection cannot be determined.
*
* @return {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
static isMotionRequestOutcomeAvailable(): Promise<boolean> { return; }
/**
* Requests and checks motion authorization for the application: there is no way to independently request only or check only, so both must be done in one operation.
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestandcheckmotionauthorization)
*
* @return {Promise<any>}
*/
@Cordova({ platforms: ['iOS'] })
static requestAndCheckMotionAuthorization(): Promise<any> { return; }
}
@@ -1,7 +1,8 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
export interface PromptCallback {
export interface DialogsPromptCallback {
/**
* The index of the pressed button. (Number) Note that the index uses one-based indexing, so the value is 1, 2, 3, etc.
@@ -12,6 +13,7 @@ export interface PromptCallback {
* The text entered in the prompt dialog box. (String)
*/
input1: string;
}
@@ -24,18 +26,22 @@ export interface PromptCallback {
*
* @usage
* ```typescript
* import { Dialogs } from 'ionic-native';
* import { Dialogs } from '@ionic-native/dialogs';
*
*
*
*
* ```
* @interfaces
* DialogsPromptCallback
*/
@Plugin({
pluginName: 'Dialogs',
plugin: 'cordova-plugin-dialogs',
pluginRef: 'navigator.notification',
repo: 'https://github.com/apache/cordova-plugin-dialogs.git'
})
@Injectable()
export class Dialogs {
/**
@@ -49,7 +55,7 @@ export class Dialogs {
successIndex: 1,
errorIndex: 4
})
static alert(
alert(
message,
title: string = 'Alert',
buttonName: string = 'OK'
@@ -66,7 +72,7 @@ export class Dialogs {
successIndex: 1,
errorIndex: 4
})
static confirm(
confirm(
message,
title: string = 'Confirm',
buttonLabels: Array<string> = ['OK', 'Cancel']
@@ -78,18 +84,18 @@ export class Dialogs {
* @param {string} title Dialog title. (Optional, defaults to Prompt)
* @param {Array<string>} buttonLabels Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
* @param {string} defaultText Default textbox input value. (Optional, Default: empty string)
* @returns {Promise<any>} Returns a promise that resolves an object with the button index clicked and the text entered
* @returns {Promise<DialogsPromptCallback>} Returns a promise that resolves an object with the button index clicked and the text entered
*/
@Cordova({
successIndex: 1,
errorIndex: 5
})
static prompt(
prompt(
message?: string,
title: string = 'Prompt',
buttonLabels: Array<string> = ['OK', 'Cancel'],
defaultText: string = ''
): Promise<any> { return; }
): Promise<DialogsPromptCallback> { return; }
/**
@@ -99,6 +105,6 @@ export class Dialogs {
@Cordova({
sync: true
})
static beep(times: number): void { }
beep(times: number): void { }
}
@@ -1,20 +1,42 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
declare var cordova: any;
export interface EmailComposerOptions {
app?: string;
to?: string | Array<string>;
cc?: string | Array<string>;
bcc?: string | Array<string>;
attachments?: Array<any>;
subject?: string;
body?: string;
isHtml?: boolean;
}
/**
* @beta
* @name Email Composer
* @description
*
* Requires Cordova plugin: cordova-plugin-email-composer. For more info, please see the [Email Composer plugin docs](https://github.com/katzer/cordova-plugin-email-composer).
* Requires Cordova plugin: cordova-plugin-email-composer. For more info, please see the [Email Composer plugin docs](https://github.com/hypery2k/cordova-email-plugin).
*
* DISCLAIMER: This plugin is experiencing issues with the latest versions of Cordova. Use at your own risk. Functionality is not guaranteed. Please stay tuned for a more stable version.
* A good alternative to this plugin is the social sharing plugin.
*
* @usage
* ```typescript
* import { EmailComposer } from 'ionic-native';
* import { EmailComposer } from '@ionic-native/email-composer';
*
*
* EmailComposer.isAvailable().then((available: boolean) =>{
@@ -42,22 +64,26 @@ declare var cordova: any;
* EmailComposer.open(email);
*
* ```
* @interfaces
* EmailComposerOptions
*/
@Plugin({
plugin: 'cordova-plugin-email-composer',
pluginName: 'EmailComposer',
plugin: 'cordova-plugin-email',
pluginRef: 'cordova.plugins.email',
repo: 'https://github.com/katzer/cordova-plugin-email-composer.git',
platforms: ['Android', 'iOS', 'Windows Phone 8']
repo: 'https://github.com/hypery2k/cordova-email-plugin',
platforms: ['Android', 'iOS']
})
@Injectable()
export class EmailComposer {
/**
* Verifies if sending emails is supported on the device.
*
* @param app {string?} An optional app id or uri scheme.
* @returns {Promise<boolean>} Resolves if available, rejects if not available
* @returns {Promise<any>} Resolves if available, rejects if not available
*/
static isAvailable(app?: string): Promise<any> {
isAvailable(app?: string): Promise<any> {
return new Promise<boolean>((resolve, reject) => {
if (app) {
cordova.plugins.email.isAvailable(app, (isAvailable) => {
@@ -86,12 +112,12 @@ export class EmailComposer {
* @param packageName {string} The package name
*/
@Cordova()
static addAlias(alias: string, packageName: string): void { }
addAlias(alias: string, packageName: string): void { }
/**
* Displays the email composer pre-filled with data.
*
* @param email {Email} Email
* @param options {EmailComposerOptions} Email
* @param scope {any?} An optional scope for the promise
* @returns {Promise<any>} Resolves promise when the EmailComposer has been opened
*/
@@ -99,17 +125,6 @@ export class EmailComposer {
successIndex: 1,
errorIndex: 3
})
static open(email: Email, scope?: any): Promise<any> { return; }
open(options: EmailComposerOptions, scope?: any): Promise<any> { return; }
}
export interface Email {
app?: string;
to?: string | Array<string>;
cc?: string | Array<string>;
bcc?: string | Array<string>;
attachments?: Array<any>;
subject?: string;
body?: string;
isHtml?: boolean;
}
@@ -1,19 +1,38 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface EstimoteBeaconRegion {
state?: string;
major: number;
minor: number;
identifier?: string;
uuid: string;
}
/**
* @name EstimoteBeacons
*
* @description
* This plugin enables communication between a phone and Estimote Beacons peripherals.
*
* @interfaces
* EstimoteBeaconRegion
*/
@Plugin({
pluginName: 'EstimoteBeacons',
plugin: 'cordova-plugin-estimote',
pluginRef: 'estimote.beacons',
repo: 'https://github.com/evothings/phonegap-estimotebeacons',
platforms: ['iOS', 'Android']
})
@Injectable()
export class EstimoteBeacons {
/** Proximity value */
@@ -39,6 +58,7 @@ export class EstimoteBeacons {
/** Beacon colour */
static BeaconColorBlueberryPie = 3;
/**
* Beacon colour.
*/
@@ -87,10 +107,10 @@ export class EstimoteBeacons {
* ```
*
* @see {@link https://community.estimote.com/hc/en-us/articles/203393036-Estimote-SDK-and-iOS-8-Location-Services|Estimote SDK and iOS 8 Location Services}
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static requestWhenInUseAuthorization(): Promise<any> { return; }
requestWhenInUseAuthorization(): Promise<any> { return; }
/**
* Ask the user for permission to use location services
@@ -108,10 +128,10 @@ export class EstimoteBeacons {
* ```
*
* @see {@link https://community.estimote.com/hc/en-us/articles/203393036-Estimote-SDK-and-iOS-8-Location-Services|Estimote SDK and iOS 8 Location Services}
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static requestAlwaysAuthorization(): Promise<any> { return; }
requestAlwaysAuthorization(): Promise<any> { return; }
/**
* Get the current location authorization status.
@@ -127,10 +147,10 @@ export class EstimoteBeacons {
* ```
*
* @see {@link https://community.estimote.com/hc/en-us/articles/203393036-Estimote-SDK-and-iOS-8-Location-Services|Estimote SDK and iOS 8 Location Services}
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static authorizationStatus(): Promise<any> { return; }
authorizationStatus(): Promise<any> { return; }
/**
* Start advertising as a beacon.
@@ -147,12 +167,12 @@ export class EstimoteBeacons {
* @param major {number} Major value to advertise (mandatory).
* @param minor {number} Minor value to advertise (mandatory).
* @param regionId {string} Identifier of the region used to advertise (mandatory).
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova({
clearFunction: 'stopAdvertisingAsBeacon'
})
static startAdvertisingAsBeacon(uuid: string, major: number, minor: number, regionId: string): Promise<any> { return; }
startAdvertisingAsBeacon(uuid: string, major: number, minor: number, regionId: string): Promise<any> { return; }
/**
* Stop advertising as a beacon.
@@ -165,10 +185,10 @@ export class EstimoteBeacons {
* EstimoteBeacons.stopAdvertisingAsBeacon().then((result) => { console.log('Beacon stopped'); });
* }, 5000);
* ```
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static stopAdvertisingAsBeacon(): Promise<any> { return; }
stopAdvertisingAsBeacon(): Promise<any> { return; }
/**
* Enable analytics.
@@ -180,10 +200,10 @@ export class EstimoteBeacons {
* EstimoteBeacons.enableAnalytics(true).then(() => { console.log('Analytics enabled'); });
* ```
* @param enable {number} Boolean value to turn analytics on or off (mandatory).
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static enableAnalytics(enable: boolean): Promise<any> { return; }
enableAnalytics(enable: boolean): Promise<any> { return; }
/**
* Test if analytics is enabled.
@@ -194,10 +214,10 @@ export class EstimoteBeacons {
* ```
* EstimoteBeacons.isAnalyticsEnabled().then((enabled) => { console.log('Analytics enabled: ' + enabled); });
* ```
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static isAnalyticsEnabled(): Promise<any> { return; }
isAnalyticsEnabled(): Promise<any> { return; }
/**
* Test if App ID and App Token is set.
@@ -208,10 +228,10 @@ export class EstimoteBeacons {
* ```
* EstimoteBeacons.isAuthorized().then((isAuthorized) => { console.log('App ID and App Token is set: ' + isAuthorized); });
* ```
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static isAuthorized(): Promise<any> { return; }
isAuthorized(): Promise<any> { return; }
/**
* Set App ID and App Token.
@@ -224,10 +244,10 @@ export class EstimoteBeacons {
* ```
* @param appID {string} The App ID (mandatory).
* @param appToken {string} The App Token (mandatory).
* @return Returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static setupAppIDAndAppToken(appID: string, appToken: string): Promise<any> { return; }
setupAppIDAndAppToken(appID: string, appToken: string): Promise<any> { return; }
/**
* Start scanning for all nearby beacons using CoreBluetooth (no region object is used).
@@ -242,13 +262,13 @@ export class EstimoteBeacons {
* EstimoteBeacons.stopEstimoteBeaconDiscovery().then(() => { console.log('scan stopped'); });
* }, 5000);
* ```
* @return Returns an Observable that notifies of each beacon discovered.
* @returns {Observable<any>} Returns an Observable that notifies of each beacon discovered.
*/
@Cordova({
observable: true,
clearFunction: 'stopEstimoteBeaconDiscovery'
})
static startEstimoteBeaconDiscovery(): Observable<any> { return; }
startEstimoteBeaconDiscovery(): Observable<any> { return; }
/**
* Stop CoreBluetooth scan. Available on iOS.
@@ -262,17 +282,17 @@ export class EstimoteBeacons {
* EstimoteBeacons.stopEstimoteBeaconDiscovery().then(() => { console.log('scan stopped'); });
* }, 5000);
* ```
* @return returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static stopEstimoteBeaconDiscovery(): Promise<any> { return; }
stopEstimoteBeaconDiscovery(): Promise<any> { return; }
/**
* Start ranging beacons. Available on iOS and Android.
*
* @usage
* ```
* let region: BeaconRegion = {} // Empty region matches all beacons.
* let region: EstimoteBeaconRegion = {} // Empty region matches all beacons.
* EstimoteBeacons.startRangingBeaconsInRegion(region).subscribe(info => {
* console.log(JSON.stringify(info));
* });
@@ -280,22 +300,22 @@ export class EstimoteBeacons {
* EstimoteBeacons.stopRangingBeaconsInRegion(region).then(() => { console.log('scan stopped'); });
* }, 5000);
* ```
* @param region {BeaconRegion} Dictionary with region properties (mandatory).
* @return Returns an Observable that notifies of each beacon discovered.
* @param region {EstimoteBeaconRegion} Dictionary with region properties (mandatory).
* @returns {Observable<any>} Returns an Observable that notifies of each beacon discovered.
*/
@Cordova({
observable: true,
clearFunction: 'stopRangingBeaconsInRegion',
clearWithArgs: true
})
static startRangingBeaconsInRegion(region: BeaconRegion): Observable<any> { return; }
startRangingBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> { return; }
/**
* Stop ranging beacons. Available on iOS and Android.
*
* @usage
* ```
* let region: BeaconRegion = {} // Empty region matches all beacons.
* let region: EstimoteBeaconRegion = {} // Empty region matches all beacons.
* EstimoteBeacons.startRangingBeaconsInRegion(region).subscribe(info => {
* console.log(JSON.stringify(info));
* });
@@ -303,11 +323,11 @@ export class EstimoteBeacons {
* EstimoteBeacons.stopRangingBeaconsInRegion(region).then(() => { console.log('scan stopped'); });
* }, 5000);
* ```
* @param region {BeaconRegion} Dictionary with region properties (mandatory).
* @return returns a Promise.
* @param region {EstimoteBeaconRegion} Dictionary with region properties (mandatory).
* @returns {Promise<any>}
*/
@Cordova()
static stopRangingBeaconsInRegion(region: BeaconRegion): Promise<any> { return; }
stopRangingBeaconsInRegion(region: EstimoteBeaconRegion): Promise<any> { return; }
/**
* Start ranging secure beacons. Available on iOS.
@@ -315,38 +335,40 @@ export class EstimoteBeacons {
* {@link EstimoteBeacons.startRangingBeaconsInRegion}.
* To use secure beacons set the App ID and App Token using
* {@link EstimoteBeacons.setupAppIDAndAppToken}.
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
clearFunction: 'stopRangingSecureBeaconsInRegion',
clearWithArgs: true
})
static startRangingSecureBeaconsInRegion(region: BeaconRegion): Observable<any> { return; }
startRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Observable<any> { return; }
/**
* Stop ranging secure beacons. Available on iOS.
* This function has the same parameters/behaviour as
* {@link EstimoteBeacons.stopRangingBeaconsInRegion}.
* @returns {Promise<any>}
*/
@Cordova()
static stopRangingSecureBeaconsInRegion(region: BeaconRegion): Promise<any> { return; }
stopRangingSecureBeaconsInRegion(region: EstimoteBeaconRegion): Promise<any> { return; }
/**
* Start monitoring beacons. Available on iOS and Android.
*
* @usage
* ```
* let region: BeaconRegion = {} // Empty region matches all beacons.
* let region: EstimoteBeaconRegion = {} // Empty region matches all beacons.
* EstimoteBeacons.startMonitoringForRegion(region).subscribe(state => {
* console.log('Region state: ' + JSON.stringify(state));
* });
* ```
* @param region {BeaconRegion} Dictionary with region properties (mandatory).
* @param region {EstimoteBeaconRegion} Dictionary with region properties (mandatory).
* @param [notifyEntryStateOnDisplay=false] {boolean} Set to true to detect if you
* are inside a region when the user turns display on, see
* {@link https://developer.apple.com/library/prerelease/ios/documentation/CoreLocation/Reference/CLBeaconRegion_class/index.html#//apple_ref/occ/instp/CLBeaconRegion/notifyEntryStateOnDisplay|iOS documentation}
* for further details (optional, defaults to false, iOS only).
* @return Returns an Observable that notifies of each region state discovered.
* @returns {Observable<any>} Returns an Observable that notifies of each region state discovered.
*/
@Cordova({
observable: true,
@@ -355,21 +377,21 @@ export class EstimoteBeacons {
successIndex: 1,
errorIndex: 2
})
static startMonitoringForRegion(region: BeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> { return; }
startMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> { return; }
/**
* Stop monitoring beacons. Available on iOS and Android.
*
* @usage
* ```
* let region: BeaconRegion = {} // Empty region matches all beacons.
* let region: EstimoteBeaconRegion = {} // Empty region matches all beacons.
* EstimoteBeacons.stopMonitoringForRegion(region).then(() => { console.log('monitoring is stopped'); });
* ```
* @param region {BeaconRegion} Dictionary with region properties (mandatory).
* @return returns a Promise.
* @param region {EstimoteBeaconRegion} Dictionary with region properties (mandatory).
* @returns {Promise<any>}
*/
@Cordova()
static stopMonitoringForRegion(region: BeaconRegion): Promise<any> { return; }
stopMonitoringForRegion(region: EstimoteBeaconRegion): Promise<any> { return; }
/**
* Start monitoring secure beacons. Available on iOS.
@@ -378,6 +400,9 @@ export class EstimoteBeacons {
* To use secure beacons set the App ID and App Token using
* {@link EstimoteBeacons.setupAppIDAndAppToken}.
* @see {@link EstimoteBeacons.startMonitoringForRegion}
* @param region {EstimoteBeaconRegion} Region
* @param notifyEntryStateOnDisplay {boolean}
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
@@ -386,16 +411,17 @@ export class EstimoteBeacons {
successIndex: 1,
errorIndex: 2
})
static startSecureMonitoringForRegion(region: BeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> { return; }
startSecureMonitoringForRegion(region: EstimoteBeaconRegion, notifyEntryStateOnDisplay: boolean): Observable<any> { return; }
/**
* Stop monitoring secure beacons. Available on iOS.
* This function has the same parameters/behaviour as
* {@link EstimoteBeacons.stopMonitoringForRegion}.
* @param region {EstimoteBeaconRegion} Region
* @returns {Promise<any>}
*/
@Cordova()
static stopSecureMonitoringForRegion(region: BeaconRegion): Promise<any> { return; }
stopSecureMonitoringForRegion(region: EstimoteBeaconRegion): Promise<any> { return; }
/**
* Connect to Estimote Beacon. Available on Android.
@@ -412,10 +438,10 @@ export class EstimoteBeacons {
* });
* ```
* @param beacon {Beacon} Beacon to connect to.
* @return returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static connectToBeacon(beacon: any): Promise<any> { return; }
connectToBeacon(beacon: any): Promise<any> { return; }
/**
* Disconnect from connected Estimote Beacon. Available on Android.
@@ -424,10 +450,10 @@ export class EstimoteBeacons {
* ```
* EstimoteBeacons.disconnectConnectedBeacon();
* ```
* @return returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static disconnectConnectedBeacon(): Promise<any> { return; }
disconnectConnectedBeacon(): Promise<any> { return; }
/**
* Write proximity UUID to connected Estimote Beacon. Available on Android.
@@ -438,10 +464,10 @@ export class EstimoteBeacons {
* EstimoteBeacons.writeConnectedProximityUUID(ESTIMOTE_PROXIMITY_UUID);
*
* @param uuid {string} String to write as new UUID
* @return returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static writeConnectedProximityUUID(uuid: any): Promise<any> { return; }
writeConnectedProximityUUID(uuid: any): Promise<any> { return; }
/**
* Write major to connected Estimote Beacon. Available on Android.
@@ -452,10 +478,10 @@ export class EstimoteBeacons {
* EstimoteBeacons.writeConnectedMajor(1);
*
* @param major {number} number to write as new major
* @return returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static writeConnectedMajor(major: number): Promise<any> { return; }
writeConnectedMajor(major: number): Promise<any> { return; }
/**
* Write minor to connected Estimote Beacon. Available on Android.
@@ -466,17 +492,10 @@ export class EstimoteBeacons {
* EstimoteBeacons.writeConnectedMinor(1);
*
* @param minor {number} number to write as new minor
* @return returns a Promise.
* @returns {Promise<any>}
*/
@Cordova()
static writeConnectedMinor(minor: number): Promise<any> { return; }
writeConnectedMinor(minor: number): Promise<any> { return; }
}
export interface BeaconRegion {
state?: string;
major: number;
minor: number;
identifier?: string;
uuid: string;
}
@@ -1,4 +1,27 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
export interface FacebookLoginResponse {
status: string;
authResponse: {
session_key: boolean;
accessToken: string;
expiresIn: number;
sig: string;
secret: string;
userID: string;
};
}
/**
* @name Facebook
@@ -70,7 +93,7 @@ import { Cordova, Plugin } from './plugin';
*
* @usage
* ```typescript
* import { Facebook } from 'ionic-native';
* import { Facebook } from '@ionic-native/facebook';
*
*
*
@@ -78,20 +101,24 @@ import { Cordova, Plugin } from './plugin';
*
*/
@Plugin({
pluginName: 'Facebook',
plugin: 'cordova-plugin-facebook4',
pluginRef: 'facebookConnectPlugin',
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
install: 'cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"'
install: 'ionic plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
installVariables: ['APP_ID', 'APP_NAME']
})
@Injectable()
export class Facebook {
/**
* Browser wrapper
* @param {number} appId Your Facebook AppID from their dashboard
* @param {string} version The version of API you may want to use. Optional
* @returns {Promise<any>}
*/
@Cordova()
static browserInit(appId: number, version?: string): Promise<any> {
browserInit(appId: number, version?: string): Promise<any> {
return;
}
@@ -113,19 +140,19 @@ export class Facebook {
* ```
*
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) this app has upon logging in.
* @return {Promise<FacebookLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
* @returns {Promise<FacebookLoginResponse>} Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
*/
@Cordova()
static login(permissions: string[]): Promise<FacebookLoginResponse> { return; }
login(permissions: string[]): Promise<FacebookLoginResponse> { return; }
/**
* Logout of Facebook.
*
* For more info see the [Facebook docs](https://developers.facebook.com/docs/reference/javascript/FB.logout)
* @return Returns a Promise that resolves on a successful logout, and rejects if logout fails.
* @returns {Promise<any>} Returns a Promise that resolves on a successful logout, and rejects if logout fails.
*/
@Cordova()
static logout(): Promise<any> { return; }
logout(): Promise<any> { return; }
/**
* Determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user:
@@ -151,18 +178,18 @@ export class Facebook {
*
* For more information see the [Facebook docs](https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus)
*
* @return Returns a Promise that resolves with a status, or rejects with an error
* @returns {Promise<any>} Returns a Promise that resolves with a status, or rejects with an error
*/
@Cordova()
static getLoginStatus(): Promise<any> { return; }
getLoginStatus(): Promise<any> { return; }
/**
* Get a Facebook access token for using Facebook services.
*
* @return Returns a Promise that resolves with an access token, or rejects with an error
* @returns {Promise<string>} Returns a Promise that resolves with an access token, or rejects with an error
*/
@Cordova()
static getAccessToken(): Promise<string> { return; }
getAccessToken(): Promise<string> { return; }
/**
* Show one of various Facebook dialogs. Example of options for a Share dialog:
@@ -178,11 +205,11 @@ export class Facebook {
* ```
*
* For more options see the [Cordova plugin docs](https://github.com/jeduan/cordova-plugin-facebook4#show-a-dialog) and the [Facebook docs](https://developers.facebook.com/docs/javascript/reference/FB.ui)
* @options {Object} options The dialog options
* @return Returns a Promise that resolves with success data, or rejects with an error
* @param {Object} options The dialog options
* @returns {Promise<any>} Returns a Promise that resolves with success data, or rejects with an error
*/
@Cordova()
static showDialog(options: any): Promise<any> { return; }
showDialog(options: any): Promise<any> { return; }
/**
* Make a call to Facebook Graph API. Can take additional permissions beyond those granted on login.
@@ -195,10 +222,10 @@ export class Facebook {
*
* @param {string} requestPath Graph API endpoint you want to call
* @param {string[]} permissions List of [permissions](https://developers.facebook.com/docs/facebook-login/permissions) for this request.
* @return Returns a Promise that resolves with the result of the request, or rejects with an error
* @returns {Promise<any>} Returns a Promise that resolves with the result of the request, or rejects with an error
*/
@Cordova()
static api(requestPath: string, permissions: string[]): Promise<any> { return; }
api(requestPath: string, permissions: string[]): Promise<any> { return; }
/**
* Log an event. For more information see the Events section above.
@@ -206,10 +233,13 @@ export class Facebook {
* @param {string} name Name of the event
* @param {Object} [params] An object containing extra data to log with the event
* @param {number} [valueToSum] any value to be added to added to a sum on each event
* @return
* @returns {Promise<any>}
*/
@Cordova()
static logEvent(
@Cordova({
successIndex: 3,
errorIndex: 4
})
logEvent(
name: string,
params?: Object,
valueToSum?: number
@@ -220,10 +250,10 @@ export class Facebook {
*
* @param {number} value Value of the purchase.
* @param {string} currency The currency, as an [ISO 4217 currency code](http://en.wikipedia.org/wiki/ISO_4217)
* @return Returns a Promise
* @returns {Promise<any>}
*/
@Cordova()
static logPurchase(value: number, currency: string): Promise<any> { return; }
logPurchase(value: number, currency: string): Promise<any> { return; }
/**
* Open App Invite dialog. Does not require login.
@@ -238,24 +268,12 @@ export class Facebook {
* url: [App Link](https://developers.facebook.com/docs/applinks) to your app
* picture: image to be displayed in the App Invite dialog
*
* @return Returns a Promise that resolves with the result data, or rejects with an error
* @returns {Promise<any>} Returns a Promise that resolves with the result data, or rejects with an error
*/
@Cordova()
static appInvite(options: {
appInvite(options: {
url: string,
picture: string
}): Promise<any> { return; }
}
export interface FacebookLoginResponse {
status: string;
authResponse: {
session_key: boolean;
accessToken: string;
expiresIn: number;
sig: string;
secret: string;
userID: string;
};
}
@@ -0,0 +1,37 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
/**
* @name FileChooser
* @description
*
* Opens the file picker on Android for the user to select a file, returns a file URI.
*
* @usage
* ```
* import {FileChooser} from '@ionic-native/file';
*
* FileChooser.open()
* .then(uri => console.log(uri))
* .catch(e => console.log(e));
*
* ```
*/
@Plugin({
pluginName: 'FileChooser',
plugin: 'http://github.com/don/cordova-filechooser.git',
pluginRef: 'fileChooser',
repo: 'https://github.com/don/cordova-filechooser',
platforms: ['Android']
})
@Injectable()
export class FileChooser {
/**
* Open a file
* @returns {Promise<string>}
*/
@Cordova()
open(): Promise<string> { return; }
}
@@ -0,0 +1,63 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
/**
* @name FileOpener
* @description
* This plugin will open a file on your device file system with its default application.
*
* @usage
* ```
* import {FileOpener} from '@ionic-native/file-opener';
*
*
*
* ```
*/
@Plugin({
pluginName: 'FileOpener',
plugin: 'cordova-plugin-file-opener2',
pluginRef: 'cordova.plugins.fileOpener2',
repo: 'https://github.com/pwlin/cordova-plugin-file-opener2'
})
@Injectable()
export class FileOpener {
/**
* Open an file
* @param filePath {string} File Path
* @param fileMIMEType {string} File MIME Type
* @returns {Promise<any>}
*/
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'error'
})
open(filePath: string, fileMIMEType: string): Promise<any> {return; }
/**
* Uninstalls a package
* @param packageId {string} Package ID
* @returns {Promise<any>}
*/
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'error'
})
uninstall(packageId: string): Promise<any> {return; }
/**
* Check if an app is already installed
* @param packageId {string} Package ID
* @returns {Promise<any>}
*/
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'error'
})
appIsInstalled(packageId: string): Promise<any> {return; }
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,40 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
declare var window: any;
/**
* @name FilePath
* @description
*
* This plugin allows you to resolve the native filesystem path for Android content URIs and is based on code in the aFileChooser library.
*
* @usage
* ```
* import {FilePath} from '@ionic-native/filepath';
*
* FilePath.resolveNativePath(path)
* .then(filePath => console.log(filePath);
* .catch(err => console.log(err);
*
* ```
*/
@Plugin({
pluginName: 'FilePath',
plugin: 'cordova-plugin-filepath',
pluginRef: 'window.FilePath',
repo: 'https://github.com/hiddentao/cordova-plugin-filepath',
platforms: ['Android']
})
@Injectable()
export class FilePath {
/**
* Resolve native path for given content URL/path.
* @param {String} path Content URL/path.
* @returns {Promise<string>}
*/
@Cordova()
resolveNativePath(path: string): Promise<string> {return; }
}
@@ -0,0 +1,64 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
export interface FingerprintOptions {
/**
* Key for platform keychain
*/
clientId: string;
/**
* Secret password. Only for android
*/
clientSecret?: string;
}
/**
* @beta
* @name FingerprintAIO
* @description
* Use simple fingerprint authentication on Android and iOS.
* Requires Cordova plugin: cordova-plugin-fingerprint-aio. For more info about plugin, vist: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio
*
* @usage
* ```typescript
* import { FingerprintAIO } from '@ionic-native/fingerprint-aio';
*
* FingerprintAIO.show({
* clientId: "Fingerprint-Demo",
* clientSecret: "password" //Only necessary for Android
* })
* .then((result: any) => console.log(any))
* .catch((error: any) => console.log(error));
*
* ```
* @interfaces
* FingerprintOptions
*/
@Plugin({
pluginName: 'FingerprintAIO',
plugin: 'cordova-plugin-fingerprint-aio',
pluginRef: 'Fingerprint',
repo: 'https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio',
platforms: ['Android', 'iOS']
})
@Injectable()
export class FingerprintAIO {
/**
* Check if fingerprint authentication is available
* @return {Promise<any>} Returns a promise with result
*/
@Cordova()
isAvailable(): Promise<any> { return; }
/**
* Show authentication dialogue
* @param options {FingerprintOptions} options for platform specific fingerprint API
* @return {Promise<any>} Returns a promise that resolves when authentication was successfull
*/
@Cordova()
show(options: FingerprintOptions): Promise<any> { return; }
}
+212
View File
@@ -0,0 +1,212 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* @name Firebase
* @description
* This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported (including iOS 10).
*
* @usage
* ```
* import { Firebase } from '@ionic-native/firebase';
*
* Firebase.getToken()
* .then(token => console.log(`The token is ${token}`)) // save the token server-side and use it to push notifications to this device
* .catch(error => console.error('Error getting token', error));
*
* Firebase.onTokenRefresh()
* .subscribe((token: string) => console.log(`Got a new token ${token}`));
*
* ```
*/
@Plugin({
pluginName: 'Firebase',
plugin: 'cordova-plugin-firebase',
pluginRef: 'FirebasePlugin',
repo: 'https://github.com/arnesson/cordova-plugin-firebase',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Firebase {
/**
* Get the device token
* @return {Promise<any>}
*/
@Cordova()
getToken(): Promise<any> { return; }
/**
* Get notified when a token is refreshed
* @return {Observable<any>}
*/
@Cordova({
observable: true
})
onTokenRefresh(): Observable<any> { return; }
/**
* Get notified when the user opens a notification
* @return {Observable<any>}
*/
@Cordova({
observable: true
})
onNotificationOpen(): Observable<any> { return; }
/**
* Grant permission to recieve push notifications
* @return {Promise<any>}
*/
@Cordova({
platforms: ['iOS']
})
grantPermission(): Promise<any> { return; }
/**
* Check permission to recieve push notifications
* @return {Promise<any>}
*/
@Cordova({
platforms: ['iOS']
})
static hasPermission(): Promise<any> { return; }
/**
* Set icon badge number. Set to 0 to clear the badge.
* @param badgeNumber {number}
* @return {Promise<any>}
*/
@Cordova()
setBadgeNumber(badgeNumber: number): Promise<any> { return; }
/**
* Get icon badge number
* @return {Promise<any>}
*/
@Cordova()
getBadgeNumber(): Promise<any> { return; }
/**
* Subscribe to a topic
* @param topic {string}
* @return {Promise<any>}
*/
@Cordova()
subscribe(topic: string): Promise<any> { return; }
/**
* Unsubscribe from a topic
* @param topic {string}
* @return {Promise<any>}
*/
@Cordova()
unsubscribe(topic: string): Promise<any> { return; }
/**
* Log an event using Analytics
* @param type {string}
* @param data {Object}
* @return {Promise<any>}
*/
@Cordova()
logEvent(type: string, data: any): Promise<any> { return; }
/**
* Set a user id for use in Analytics
* @param userId {string}
* @return {Promise<any>}
*/
@Cordova()
setUserId(userId: string): Promise<any> { return; }
/**
* Set a user property for use in Analytics
* @param name {string}
* @param value {string}
* @return {Promise<any>}
*/
@Cordova()
setUserProperty(name: string, value: string): Promise<any> { return; }
/**
* Fetch Remote Config parameter values for your app
* @param cacheExpirationSeconds
* @return {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
successIndex: 1,
errorIndex: 2
})
fetch(cacheExpirationSeconds?: number): Promise<any> { return; }
/**
* Activate the Remote Config fetched config
* @return {Promise<any>}
*/
@Cordova({
platforms: ['Android']
})
activateFetched(): Promise<any> { return; }
/**
* Retrieve a Remote Config value
* @param key {string}
* @param namespace {string}
* @return {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
successIndex: 2,
errorIndex: 3
})
getValue(key: string, namespace?: string): Promise<any> { return; }
/**
* Retrieve a Remote Config byte array
* @param key {string}
* @param namespace {string}
* @return {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
successIndex: 2,
errorIndex: 3
})
getByteArray(key: string, namespace?: string): Promise<any> { return; }
/**
* Get the current state of the FirebaseRemoteConfig singleton object
* @return {Promise<any>}
*/
@Cordova({
platforms: ['Android']
})
getInfo(): Promise<any> { return; }
/**
* Change the settings for the FirebaseRemoteConfig object's operations
* @param settings {Object}
* @return {Promise<any>}
*/
@Cordova({
platforms: ['Android']
})
setConfigSettings(settings: any): Promise<any> { return; }
/**
* Set defaults in the Remote Config
* @param defaults {Object}
* @param namespace {string}
* @return {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
successIndex: 2,
errorIndex: 3
})
setDefaults(defaults: any, namespace: string): Promise<any> { return; }
}
@@ -1,5 +1,5 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Flashlight
@@ -9,17 +9,19 @@ import { Cordova, Plugin } from './plugin';
*
* @usage
* ```typescript
* import { Flashlight } from 'ionic-native';
* import { Flashlight } from '@ionic-native/flashlight';
*
*
*
* ```
*/
@Plugin({
pluginName: 'Flashlight',
plugin: 'cordova-plugin-flashlight',
pluginRef: 'window.plugins.flashlight',
repo: 'https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git'
})
@Injectable()
export class Flashlight {
/**
@@ -27,28 +29,28 @@ export class Flashlight {
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flashlight is available.
*/
@Cordova()
static available(): Promise<boolean> { return; }
available(): Promise<boolean> { return; }
/**
* Switches the flashlight on
* @returns {Promise<boolean>}
*/
@Cordova()
static switchOn(): Promise<boolean> { return; }
switchOn(): Promise<boolean> { return; }
/**
* Switches the flashlight off
* @returns {Promise<boolean>}
*/
@Cordova()
static switchOff(): Promise<boolean> { return; }
switchOff(): Promise<boolean> { return; }
/**
* Toggles the flashlight
* @returns {Promise<any>}
*/
@Cordova()
static toggle(): Promise<any> { return; }
toggle(): Promise<any> { return; }
/**
@@ -58,6 +60,6 @@ export class Flashlight {
@Cordova({
sync: true
})
static isSwitchedOn(): boolean { return; }
isSwitchedOn(): boolean { return; }
}
@@ -1,12 +1,16 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare var window: any;
/**
* @name Geofence
* @description Monitors circular geofences around latitude/longitude coordinates, and sends a notification to the user when the boundary of a geofence is crossed. Notifications can be sent when the user enters and/or exits a geofence.
* Geofences persist after device reboot. Geofences will be monitored even when the app is not running.
* @usage
* ```
* import { Geofence } from 'ionic-native';
* import { Geofence } from '@ionic-native/geofence';
* import { Platform } from 'ionic-angular'
* ...
*
@@ -71,15 +75,15 @@ import { Observable } from 'rxjs/Observable';
* Try running `ionic platform rm <platform>` then run `ionic platform add <platform>` to recreate the
* platform directories.
*/
declare var window: any;
@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']
})
@Injectable()
export class Geofence {
public static TransitionType = {
@@ -93,51 +97,50 @@ export class Geofence {
/**
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
*
* @return {Promise<any>}
* @returns {Promise<void>}
*/
@Cordova()
static initialize(): Promise<void> { return; };
initialize(): Promise<void> { return; };
/**
* Adds a new geofence or array of geofences. For geofence object, see above.
*
* @return {Promise<any>}
* @returns {Promise<void>}
*/
@Cordova()
static addOrUpdate(geofences: Object | Array<Object>): Promise<void> { return; };
addOrUpdate(geofences: Object | Array<Object>): Promise<void> { return; };
/**
* Removes a geofence or array of geofences. `geofenceID` corresponds to one or more IDs specified when the
* geofence was created.
*
* @return {Promise<any>}
* @returns {Promise<void>}
*/
@Cordova()
static remove(geofenceId: string | Array<string>): Promise<void> { return; };
remove(geofenceId: string | Array<string>): Promise<void> { return; };
/**
* Removes all geofences.
*
* @return {Promise<any>}
* @returns {Promise<void>}
*/
@Cordova()
static removeAll(): Promise<void> { return; };
removeAll(): Promise<void> { return; };
/**
* Returns an array of geofences currently being monitored.
*
* @return {Promise<Array<string>>}
* @returns {Promise<Array<string>>}
*/
@Cordova()
static getWatched(): Promise<string> { return; };
getWatched(): Promise<string> { return; };
/**
* Called when a geofence is crossed in the direction specified by `TransitType`.
* Commenting out. Not yet implemented in plugin.
*
* @return {Promise<any>}
* @returns {Observable<any>}
*/
static onTransitionReceived(): Observable<any> {
onTransitionReceived(): Observable<any> {
return new Observable<any>((observer) => {
window && window.geofence && (window.geofence.onTransitionReceived = observer.next.bind(observer));
@@ -148,11 +151,10 @@ export class Geofence {
/**
* Called when the user clicks a geofence notification. iOS and Android only.
* Commenting out. Not yet implemented in plugin.
*
* @return {Promise<Object>}
* @returns {Observable<any>}
*/
static onNotificationClicked(): Observable<any> {
onNotificationClicked(): Observable<any> {
return new Observable<any>((observer) => {
window && window.geofence && (window.geofence.onNotificationClicked = observer.next.bind(observer));
@@ -1,10 +1,11 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare var navigator: any;
export interface Coordinates {
/**
* a double representing the position's latitude in decimal degrees.
*/
@@ -48,6 +49,7 @@ export interface Coordinates {
* This value can be null.
*/
speed: number;
}
export interface Geoposition {
@@ -62,7 +64,22 @@ export interface Geoposition {
timestamp: number;
}
export interface PositionError {
/**
* A code that indicates the error that occurred
*/
code: number;
/**
* A message that can describe the error that occurred
*/
message: string;
}
export interface GeolocationOptions {
/**
* Is a positive long value indicating the maximum age in milliseconds of a
* possible cached position that is acceptable to return. If set to 0, it
@@ -90,8 +107,8 @@ export interface GeolocationOptions {
* @type {boolean}
*/
enableHighAccuracy?: boolean;
}
}
/**
* @name Geolocation
@@ -103,44 +120,57 @@ export interface GeolocationOptions {
* @usage
*
* ```typescript
* import { Geolocation } from 'ionic-native';
* import { Geolocation } from '@ionic-native/geolocation';
*
*
* Geolocation.getCurrentPosition().then((resp) => {
* // resp.coords.latitude
* // resp.coords.longitude
* })
* }).catch((error) => {
* console.log('Error getting location', error);
* });
*
* let watch = Geolocation.watchPosition();
* watch.subscribe((data) => {
* // data can be a set of coordinates, or an error (if an error occurred).
* // data.coords.latitude
* // data.coords.longitude
* })
* });
* ```
* @interfaces
* Coordinates
* Geoposition
* PositionError
* GeolocationOptions
*/
@Plugin({
pluginName: 'Geolocation',
plugin: 'cordova-plugin-geolocation',
pluginRef: 'navigator.geolocation',
repo: 'https://github.com/apache/cordova-plugin-geolocation'
})
@Injectable()
export class Geolocation {
/**
* Get the device's current position.
*
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
* @return Returns a Promise that resolves with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or rejects with an error.
* @returns {Promise<Geoposition>} Returns a Promise that resolves with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or rejects with an error.
*/
@Cordova({
callbackOrder: 'reverse'
})
static getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return; }
getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return; }
/**
* Watch the current device's position. Clear the watch by unsubscribing from
* Observable changes.
*
* ```typescript
* var subscription = Geolocation.watchPosition().subscribe(position => {
* var subscription = Geolocation.watchPosition()
* .filter((p) => p.coords !== undefined) //Filter Out Errors
* .subscribe(position => {
* console.log(position.coords.longitude + ' ' + position.coords.latitude);
* });
*
@@ -149,14 +179,15 @@ export class Geolocation {
* ```
*
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
* @return Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
*/
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
return new Observable<Geoposition>(
(observer: any) => {
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.error.bind(observer), options);
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.next.bind(observer), options);
return () => navigator.geolocation.clearWatch(watchId);
}
);
}
}
@@ -0,0 +1,138 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Globalization
* @description
* @usage
* ```typescript
* import { Globalization } from '@ionic-native/globalization';
*
*
* ```
*/
@Plugin({
pluginName: 'Globalization',
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']
})
@Injectable()
export class Globalization {
/**
* Returns the BCP-47 compliant language identifier tag to the successCallback with a properties object as a parameter. That object should have a value property with a String value.
* @returns {Promise<{value: string}>}
*/
@Cordova()
getPreferredLanguage(): Promise<{ value: string }> { return; }
/**
* Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter.
* @returns {Promise<{value: string}>}
*/
@Cordova()
getLocaleName(): Promise<{ value: string }> { return; }
/**
* Converts date to string
* @param {Date} date Date you wish to convert
* @param options Options for the converted date. Length, selector.
* @returns {Promise<{value: string}>} Returns a promise when the date has been converted.
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
dateToString(date: Date, options: { formatLength: string, selector: string }): Promise<{ value: string }> { return; }
/**
* Parses a date formatted as a string, according to the client's user preferences and calendar using the time zone of the client, and returns the corresponding date object.
* @param {string} dateString Date as a string to be converted
* @param options Options for the converted date. Length, selector.
* @returns {Promise<{ year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number }>} Returns a promise when the date has been converted.
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
stringToDate(dateString: string, options: { formatLength: string, selector: string }): Promise<{ year: number, month: number, day: number, hour: number, minute: number, second: number, millisecond: number }> { return; }
/**
* Returns a pattern string to format and parse dates according to the client's user preferences.
* @param options Object with the format length and selector
* @returns {Promise<{pattern: string}>} Returns a promise.
*/
@Cordova({
callbackOrder: 'reverse'
})
getDatePattern(options: { formatLength: string, selector: string }): Promise<{ pattern: string }> { return; }
/**
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
* @param options Object with type (narrow or wide) and item (month or days).
* @returns {Promise<{value: Array<string>}>} Returns a promise.
*/
@Cordova({
callbackOrder: 'reverse'
})
getDateNames(options: { type: string, item: string }): Promise<{ value: Array<string> }> { return; }
/**
* Indicates whether daylight savings time is in effect for a given date using the client's time zone and calendar.
* @param {data} date Date to process
* @returns {Promise<{dst: string}>} reutrns a promise with the value
*/
@Cordova()
isDayLightSavingsTime(date: Date): Promise<{ dst: string }> { return; }
/**
* Returns the first day of the week according to the client's user preferences and calendar.
* @returns {Promise<{value: string}>} returns a promise with the value
*/
@Cordova()
getFirstDayOfWeek(): Promise<{ value: string }> { return; }
/**
* Returns a number formatted as a string according to the client's user preferences.
* @param numberToConvert {Number} The number to convert
* @param options {Object} Object with property `type` that can be set to: decimal, percent, or currency.
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
numberToString(numberToConvert: number, options: { type: string }): Promise<{ value: string }> { return; }
/**
*
* @param {string} stringToConvert String you want to conver to a number
* @param options The type of number you want to return. Can be decimal, percent, or currency.
* @returns {Promise<{ value: number | string }>} Returns a promise with the value.
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
stringToNumber(stringToConvert: string, options: { type: string }): Promise<{ value: number | string }> { return; }
/**
* Returns a pattern string to format and parse numbers according to the client's user preferences.
* @param options Can be decimal, percent, or currency.
* @returns {Promise<{ pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string }>}
*/
@Cordova({
callbackOrder: 'reverse'
})
getNumberPattern(options: { type: string }): Promise<{ pattern: string, symbol: string, fraction: number, rounding: number, positive: string, negative: string, decimal: string, grouping: string }> { return; }
/**
* Returns a pattern string to format and parse currency values according to the client's user preferences and ISO 4217 currency code.
* @param {string} currencyCode Currency Code.A
* @returns {Promise<{ pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string }>}
*/
@Cordova()
getCurrencyPattern(currencyCode: string): Promise<{ pattern: string, code: string, fraction: number, rounding: number, decimal: number, grouping: string }> { return; }
}
@@ -0,0 +1,210 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
declare var window;
/**
* @name Google Analytics
* @description
* This plugin connects to Google's native Universal Analytics SDK
* Prerequisites:
* - A Cordova 3.0+ project for iOS and/or Android
* - A Mobile App property through the Google Analytics Admin Console
* - (Android) Google Play Services SDK installed via [Android SDK Manager](https://developer.android.com/sdk/installing/adding-packages.html)
* @usage
* ```typescript
* import { GoogleAnalytics } from '@ionic-native/google-analytics';
*
* GoogleAnalytics.startTrackerWithId('YOUR_TRACKER_ID')
* .then(() => {
* console.log('Google analytics is ready now');
* // Tracker is ready
* // You can now track pages or set additional information such as AppVersion or UserId
* })
* .catch(e => console.log('Error starting GoogleAnalytics', e));
*
*
* ```
*/
@Plugin({
pluginName: 'GoogleAnalytics',
plugin: 'cordova-plugin-google-analytics',
pluginRef: 'ga',
repo: 'https://github.com/danwilson/google-analytics-plugin',
platforms: ['Android', 'iOS', 'Browser']
})
@Injectable()
export class GoogleAnalytics {
/**
* In your 'deviceready' handler, set up your Analytics tracker.
* https://developers.google.com/analytics/devguides/collection/analyticsjs/
* @param {string} id Your Google Analytics Mobile App property
* @param {number} interval Optional dispatch period in seconds. Defaults to 30.
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 2,
errorIndex: 3
})
startTrackerWithId(id: string, interval?: number): Promise<any> { return; }
/**
* Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more
* @param allow {boolean}
* @returns {Promise<any>}
*/
@Cordova()
setAllowIDFACollection(allow: boolean): Promise<any> { return; }
/**
* Set a UserId
* https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id
* @param {string} id User ID
* @returns {Promise<any>}
*/
@Cordova()
setUserId(id: string): Promise<any> { return; }
/**
* Set a anonymize Ip address
* @param anonymize {boolean} Set to true to anonymize the IP Address
* @returns {Promise<any>}
*/
@Cordova()
setAnonymizeIp(anonymize: boolean): Promise<any> { return; }
/**
* Sets the app version
* @param appVersion {string} App version
* @returns {Promise<any>}
*/
@Cordova()
setAppVersion(appVersion: string): Promise<any> { return; }
/**
* Set OptOut
* @param optout {boolean}
* @returns {Promise<any>}
*/
@Cordova()
setOptOut(optout: boolean): Promise<any> { return; }
/**
* Enable verbose logging
* @returns {Promise<any>}
*/
@Cordova()
debugMode(): Promise<any> { return; }
/**
* Track custom metric
* @param key {string}
* @param value {any}
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 2,
errorIndex: 3
})
trackMetric(key: string, value?: any): Promise<any> { return; }
/**
* Track a screen
* https://developers.google.com/analytics/devguides/collection/analyticsjs/screens
*
* @param title {string} Screen title
* @param campaignUrl {string} Campaign url for measuring referrals
* @param newSession {boolean} Set to true to create a new session
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 3,
errorIndex: 4
})
trackView(title: string, campaignUrl?: string, newSession?: boolean): Promise<any> { return; }
/**
* Add a Custom Dimension
* https://developers.google.com/analytics/devguides/platform/customdimsmets
* @param key {number}
* @param value {string}
* @returns {Promise<any>}
*/
@Cordova()
addCustomDimension(key: number, value: string): Promise<any> { return; }
/**
* Track an event
* https://developers.google.com/analytics/devguides/collection/analyticsjs/events
* @param category {string}
* @param action {string}
* @param label {string}
* @param value {number}
* @param newSession {boolean} Set to true to create a new session
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 5,
errorIndex: 6
})
trackEvent(category: string, action: string, label?: string, value?: number, newSession?: boolean): Promise<any> { return; }
/**
* Track an exception
* @param description {string}
* @param fatal {boolean}
* @returns {Promise<any>}
*/
@Cordova()
trackException(description: string, fatal: boolean): Promise<any> { return; }
/**
* Track User Timing (App Speed)
* @param category {string}
* @param intervalInMilliseconds {number}
* @param variable {string}
* @param label {string}
* @returns {Promise<any>}
*/
@Cordova()
trackTiming(category: string, intervalInMilliseconds: number, variable: string, label: string): Promise<any> { return; }
/**
* Add a Transaction (Ecommerce)
* https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#addTrans
* @param id {string}
* @param affiliation {string}
* @param revenue {number}
* @param tax {number}
* @param shipping {number}
* @param currencyCode {string}
* @returns {Promise<any>}
*/
@Cordova()
addTransaction(id: string, affiliation: string, revenue: number, tax: number, shipping: number, currencyCode: string): Promise<any> { return; }
/**
* Add a Transaction Item (Ecommerce)
* https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#addItem
* @param {string} id
* @param {string} name
* @param {string} sku
* @param {string} category
* @param {number} price
* @param {number} quantity
* @param {string} currencyCode
* @returns {Promise<any>}
*/
@Cordova()
addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise<any> { return; }
/**
* Enable/disable automatic reporting of uncaught exceptions
* @param shouldEnable {boolean}
* @returns {Promise<any>}
*/
@Cordova()
enableUncaughtExceptionReporting(shouldEnable: boolean): Promise<any> { return; }
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,62 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
/**
* @name Google Plus
* @description
* @usage
* ```typescript
* import { GooglePlus } from '@ionic-native/google-plus';
*
* GooglePlus.login()
* .then(res => console.log(res))
* .catch(err => console.error(err));
*
* ```
*/
@Plugin({
pluginName: 'GooglePlus',
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']
})
@Injectable()
export class GooglePlus {
/**
* The login function walks the user through the Google Auth process.
* @param options
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
})
login(options?: any): Promise<any> { return; }
/**
* You can call trySilentLogin to check if they're already signed in to the app and sign them in silently if they are.
* @param options
* @returns {Promise<any>}
*/
@Cordova()
trySilentLogin(options?: any): Promise<any> { return; }
/**
* This will clear the OAuth2 token.
* @returns {Promise<any>}
*/
@Cordova()
logout(): Promise<any> { return; }
/**
* This will clear the OAuth2 token, forget which account was used to login, and disconnect that account from the app. This will require the user to allow the app access again next time they sign in. Be aware that this effect is not always instantaneous. It can take time to completely disconnect.
* @returns {Promise<any>}
*/
@Cordova()
disconnect(): Promise<any> { return; }
}
@@ -0,0 +1,109 @@
import { Plugin, Cordova } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Injectable } from '@angular/core';
declare var navigator: any;
/**
* @private
*/
export interface GyroscopeOrientation {
/**
* Represent x-axis
*/
x: number;
/**
* Represent y-axis
*/
y: number;
/**
* Represent z-axis
*/
z: number;
/**
* Represent timestamp of sensor read. Default is 10000ms
*/
timestamp: number;
}
/**
* @private
*/
export interface GyroscopeOptions {
/**
* Represent how often (in milliseconds) sensor should be read. Default is 10000 ms
*/
frequency: number;
}
/**
* @name Gyroscope
* @description Read Gyroscope sensor data
* @usage
* ```
* import { Gyroscope, GyroscopeOrientation, GyroscopeOptions } from '@ionic-native/gyroscope';
*
*
* constructor(private gyroscope: Gyroscope) { }
*
* ...
*
*
* let options: GyroscopeOptions = {
* frequency: 1000
* };
*
* this.gyroscope.getCurrent(options)
* .then((orientation: GyroscopeOrientation) => {
* console.log(orientation.x, orientation.y, orientation.z, orientation.timestamp);
* })
* .catch()
*
*
* this.gyroscope.watch()
* .subscribe((orientation: GyroscopeOrientation) => {
* console.log(orientation.x, orientation.y, orientation.z, orientation.timestamp);
* });
*
* ```
* @interfaces
* GyroscopeOrientation
* GyroscopeOptions
*/
@Plugin({
pluginName: 'Gyroscope',
plugin: 'cordova-plugin-gyroscope',
pluginRef: 'navigator.gyroscope',
repo: 'https://github.com/NeoLSN/cordova-plugin-gyroscope',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Gyroscope {
/**
* Watching for gyroscope sensor changes
* @param options {GyroscopeOptions} (optional)
* @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
*/
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
return new Observable<GyroscopeOrientation> (
(observer: any) => {
let watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
return () => navigator.gyroscope.clearWatch(watchId);
}
);
}
/**
* Get current data from gyroscope sensor
* @param options {GyroscopeOptions} (optional)
* @return {Promise<GyroscopeOrientation>} Returns a promise that resolves GyroscopeOrientation
*/
@Cordova({
callbackOrder: 'reverse'
})
getCurrent(options?: GyroscopeOptions): Promise<GyroscopeOrientation> { return; }
}
@@ -0,0 +1,38 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
/**
* @name HeaderColor
* @description
* Cordova plugin to change color of header in multitask view
*
* @usage
* ```typescript
* import { HeaderColor } from '@ionic-native/header-color';
*
* HeaderColor.tint("#becb29");
* ```
*/
@Plugin({
pluginName: 'HeaderColor',
plugin: 'cordova-plugin-headercolor',
pluginRef: 'plugins.headerColor',
repo: 'https://github.com/tomloprod/cordova-plugin-headercolor',
platforms: ['Android']
})
@Injectable()
export class HeaderColor {
/**
* Set a color to the task header
* @param color {string} The hex value of the color
* @returns {Promise<any>}
*/
@Cordova({
callbackStyle: 'object',
successName: 'success',
errorName: 'failure'
})
tint(color: string): Promise<any> { return; }
}
+307
View File
@@ -0,0 +1,307 @@
import { Plugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @private
*/
export interface HealthQueryOptions {
/**
* Start date from which to get data
*/
startDate: Date;
/**
* End date from which to get data
*/
endDate: Date;
/**
* Datatype to be queried (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
dataType: string;
/**
* Optional limit the number of values returned. Defaults to 1000
*/
limit?: number;
/**
* Optional indicator to sort values ascending or descending
*/
ascending?: boolean;
/**
* In Android, it is possible to query for "raw" steps or to select those as filtered by the Google Fit app.
* In the latter case the query object must contain the field filtered: true.
*/
filtered?: boolean;
}
/**
* @private
*/
export interface HealthQueryOptionsAggregated {
/**
* Start date from which to get data
*/
startDate: Date;
/**
* End date from which to get data
*/
endDate: Date;
/**
* Datatype to be queried (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
dataType: string;
/**
* if specified, aggregation is grouped an array of "buckets" (windows of time),
* supported values are: 'hour', 'day', 'week', 'month', 'year'.
*/
bucket: string;
}
/**
* @private
*/
export interface HealthStoreOptions {
/**
* Start date from which to get data
*/
startDate: Date;
/**
* End date from which to get data
*/
endDate: Date;
/**
* Datatype to be queried (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
dataType: string;
/**
* Value of corresponding Datatype (see "Overview of valid datatypes")
*/
value: string;
/*
* The source that produced this data. In iOS this is ignored and
* set automatically to the name of your app.
*/
sourceName: string;
/*
* The complete package of the source that produced this data.
* In Android, if not specified, it's assigned to the package of the App. In iOS this is ignored and
* set automatically to the bunde id of the app.
*/
sourceBundleId: string;
}
/**
* @private
*/
export interface HealthData {
/**
* Start date from which to get data
*/
startDate: Date;
/**
* End date from which to get data
*/
endDate: Date;
/**
* Value of corresponding Datatype (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
value: string;
/**
* Unit of corresponding value of Datatype (see https://github.com/dariosalvi78/cordova-plugin-health#supported-data-types)
*/
unit: string;
/**
* The source that produced this data. In iOS this is ignored and
* set automatically to the name of your app.
*/
sourceName: string;
/**
* The complete package of the source that produced this data.
* In Android, if not specified, it's assigned to the package of the App. In iOS this is ignored and
* set automatically to the bunde id of the app.
*/
sourceBundleId: string;
}
/**
* @name Health
* @description
* A plugin that abstracts fitness and health repositories like Apple HealthKit or Google Fit.
*
* @usage
* ```
* import { Health } from '@ionic-native/health';
*
*
* constructor(private health: Health) { }
*
*
* ```
* See description at https://github.com/dariosalvi78/cordova-plugin-health for a full list of Datatypes and see examples.
*
* @interfaces
* HealthQueryOptions
* HealthQueryOptionsAggregated
* HealthStoreOptions
* HealthData
*/
@Injectable()
@Plugin({
pluginName: 'Health',
plugin: 'cordova-plugin-health',
pluginRef: 'navigator.health',
repo: 'https://github.com/dariosalvi78/cordova-plugin-health'
})
export class Health {
/**
* Tells if either Google Fit or HealthKit are available.
*
* @return {Promise<boolean>}
*/
@Cordova({
callbackOrder: 'reverse'
})
isAvailable(): Promise<boolean> { return; }
/**
* Checks if recent Google Play Services and Google Fit are installed. If the play services are not installed,
* or are obsolete, it will show a pop-up suggesting to download them. If Google Fit is not installed,
* it will open the Play Store at the location of the Google Fit app.
* The plugin does not wait until the missing packages are installed, it will return immediately.
* If both Play Services and Google Fit are available, this function just returns without any visible effect.
*
* This function is only available on Android.
*
* @return {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse'
})
promptInstallFit(): Promise<any> { return; }
/**
* Requests read and write access to a set of data types. It is recommendable to always explain why the app
* needs access to the data before asking the user to authorize it.
* This function must be called before using the query and store functions, even if the authorization has already
* been given at some point in the past.
*
* Quirks of requestAuthorization()
* In Android, it will try to get authorization from the Google Fit APIs.
* It is necessary that the app's package name and the signing key are registered in the Google API console.
* In Android, be aware that if the activity is destroyed (e.g. after a rotation) or is put in background,
* the connection to Google Fit may be lost without any callback. Going through the authorization will ensure that
* the app is connected again.
* In Android 6 and over, this function will also ask for some dynamic permissions if needed
* (e.g. in the case of "distance", it will need access to ACCESS_FINE_LOCATION).
*
* @param {Array<String>} datatypes a list of data types you want to be granted access to
*
* @return {Promise<any>}
*/
@Cordova()
requestAuthorization(datatypes: Array<string>): Promise<any> { return; }
/**
* Check if the app has authorization to read/write a set of datatypes.
* This function is similar to requestAuthorization() and has similar quirks.
*
* @param {Array<String>} datatypes a list of data types you want to be granted access to
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
*/
@Cordova()
isAuthorized(datatypes: Array<string>): Promise<boolean> { return; }
/**
* Gets all the data points of a certain data type within a certain time window.
* Warning: if the time span is big, it can generate long arrays!
*
* Quirks of query()
*
* In iOS, the amount of datapoints is limited to 1000 by default.
* You can override this by adding a limit: xxx to your query object.
* In iOS, datapoints are ordered in an descending fashion (from newer to older).
* You can revert this behaviour by adding ascending: true to your query object.
* In Android, it is possible to query for "raw" steps or to select those as filtered by the Google Fit app.
* In the latter case the query object must contain the field filtered: true.
* In Google Fit, calories.basal is returned as an average per day, and usually is not available in all days.
* In Google Fit, calories.active is computed by subtracting the basal calories from the total.
* As basal energy expenditure, an average is computed from the week before endDate.
* While Google Fit calculates basal and active calories automatically,
* HealthKit needs an explicit input from some app.
* When querying for activities, Google Fit is able to determine some activities automatically
* (still, walking, running, biking, in vehicle), while HealthKit only relies on the input of
* the user or of some external app.
* When querying for activities, calories and distance are also provided in HealthKit (units are kcal and meters) and
* never in Google Fit.
* When querying for nutrition, Google Fit always returns all the nutrition elements it has,
* while HealthKit returns only those that are stored as correlation. To be sure to get all stored the quantities
* (regardless of they are stored as correlation or not), it's better to query single nutrients.
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
* Automatic conversion is not trivial and depends on the actual substance.
*
* @param queryOptions {HealthQueryOptions}
* @return {Promise<HealthData>}
*/
@Cordova()
query(queryOptions: HealthQueryOptions): Promise<HealthData> { return; }
/**
* Gets aggregated data in a certain time window. Usually the sum is returned for the given quantity.
*
* Quirks of queryAggregated()
* In Android, to query for steps as filtered by the Google Fit app, the flag filtered:
* true must be added into the query object.
* When querying for activities, calories and distance are provided
* when available in HealthKit and never in Google Fit.
* In Android, the start and end dates returned are the date of the first and the last available samples.
* If no samples are found, start and end may not be set.
* When bucketing, buckets will include the whole hour / day / month / week / year where start and end times
* fall into. For example, if your start time is 2016-10-21 10:53:34,
* the first daily bucket will start at 2016-10-21 00:00:00.
* Weeks start on Monday.
* When querying for nutrition, HealthKit returns only those that are stored as correlation.
* To be sure to get all the stored quantities, it's better to query single nutrients.
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
*
* @param queryOptionsAggregated
* @return {Promise<HealthData>}
*/
@Cordova()
queryAggregated(queryOptionsAggregated: HealthQueryOptionsAggregated): Promise<HealthData> { return; }
/**
* Stores a data point.
*
* Quirks of store()
*
* Google Fit doesn't allow you to overwrite data points that overlap with others already stored of the same type (see here). At the moment there is no support for update nor delete.
* In iOS you cannot store the total calories, you need to specify either basal or active. If you use total calories, the active ones will be stored.
* In Android you can only store active calories, as the basal are estimated automatically. If you store total calories, these will be treated as active.
* In iOS distance is assumed to be of type WalkingRunning, if you want to explicitly set it to Cycling you need to add the field cycling: true.
* In iOS storing the sleep activities is not supported at the moment.
* Storing of nutrients is not supported at the moment.
* @param storeOptions
* @return {Promise<any>}
*/
@Cordova()
store(storeOptions: HealthStoreOptions): Promise<any> { return; }
}
@@ -1,11 +1,115 @@
import { Cordova, Plugin } from './plugin';
import { Injectable } from '@angular/core';
import { Cordova, Plugin } from '@ionic-native/core';
export interface HotspotConnectionInfo {
/**
* The service set identifier (SSID) of the current 802.11 network.
*/
SSID: string;
/**
* The basic service set identifier (BSSID) of the current access point.
*/
BSSID: string;
/**
* The current link speed in Mbps
*/
linkSpeed: string;
/**
* The IP Address
*/
IPAddress: string;
/**
* Each configured network has a unique small integer ID, used to identify the network when performing operations on the supplicant.
*/
networkID: string;
}
export interface HotspotNetwork {
/**
* Human readable network name
*/
SSID: string;
/**
* MAC Address of the access point
*/
BSSID: string;
/**
* The primary 20 MHz frequency (in MHz) of the channel over which the client is communicating with the access point.
*/
frequency: number;
/**
* The detected signal level in dBm, also known as the RSSI.
*/
level: number;
/**
* Timestamp in microseconds (since boot) when this result was last seen.
*/
timestamp: number;
/**
* Describes the authentication, key management, and encryption schemes supported by the access point.
*/
capabilities: string;
}
export interface HotspotNetworkConfig {
/**
* Device IP Address
*/
deviceIPAddress: string;
/**
* Device MAC Address
*/
deviceMacAddress: string;
/**
* Gateway IP Address
*/
gatewayIPAddress: string;
/**
* Gateway MAC Address
*/
gatewayMacAddress: string;
}
export interface HotspotDevice {
/**
* ip
* Hotspot IP Address
*/
ip: string;
/**
* mac
* Hotspot MAC Address
*/
mac: string;
}
/**
* @beta
* @name Hotspot
* @description
* @usage
* ```typescript
* import { Hotspot, Network } from 'ionic-native';
* import { Hotspot, Network } from '@ionic-native/hotspot';
*
*
* Hotspot.scanWifi().then((networks: Array<Network>) => {
@@ -13,20 +117,33 @@ import { Cordova, Plugin } from './plugin';
* });
*
* ```
* @interfaces
* HotspotConnectionInfo
* HotspotNetwork
* HotspotNetworkConfig
* HotspotDevice
*/
@Plugin({
pluginName: 'Hotspot',
plugin: 'cordova-plugin-hotspot',
pluginRef: 'cordova.plugins.hotspot',
repo: 'https://github.com/hypery2k/cordova-hotspot-plugin',
platforms: ['Android']
})
@Injectable()
export class Hotspot {
/**
* @returns {Promise<boolean>}
*/
@Cordova()
static isAvailable(): Promise<boolean> { return; }
isAvailable(): Promise<boolean> { return; }
/**
* @returns {Promise<boolean>}
*/
@Cordova()
static toggleWifi(): Promise<boolean> { return; }
toggleWifi(): Promise<boolean> { return; }
/**
* Configures and starts hotspot with SSID and Password
@@ -35,18 +152,18 @@ export class Hotspot {
* @param {string} mode - encryption mode (Open, WEP, WPA, WPA_PSK)
* @param {string} password - password for your new Access Point
*
* @return {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
* @returns {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
*/
@Cordova()
static createHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
createHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
/**
* Turns on Access Point
*
* @return {Promise<boolean>} - true if AP is started
* @returns {Promise<boolean>} - true if AP is started
*/
@Cordova()
static startHotspot(): Promise<boolean> { return; }
startHotspot(): Promise<boolean> { return; }
/**
* Configures hotspot with SSID and Password
@@ -55,29 +172,32 @@ export class Hotspot {
* @param {string} mode - encryption mode (Open, WEP, WPA, WPA_PSK)
* @param {string} password - password for your new Access Point
*
* @return {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
* @returns {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
*/
@Cordova()
static configureHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
configureHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
/**
* Turns off Access Point
*
* @return {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
* @returns {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
*/
@Cordova()
static stopHotspot(): Promise<boolean> { return; }
stopHotspot(): Promise<boolean> { return; }
/**
* Checks if hotspot is enabled
*
* @return {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
* @returns {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
*/
@Cordova()
static isHotspotEnabled(): Promise<void> { return; }
isHotspotEnabled(): Promise<void> { return; }
/**
* @returns {Promise<Array<HotspotDevice>>}
*/
@Cordova()
static getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
/**
* Connect to a WiFi network
@@ -87,11 +207,11 @@ export class Hotspot {
* @param {string} password
* password to use
*
* @return {Promise<void>}
* @returns {Promise<void>}
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
static connectToWifi(ssid: string, password: string): Promise<void> { return; }
connectToWifi(ssid: string, password: string): Promise<void> { return; }
/**
* Connect to a WiFi network
@@ -105,11 +225,11 @@ export class Hotspot {
* @param {string[]} encryption
* Encryption modes to use (CCMP, TKIP, WEP104, WEP40)
*
* @return {Promise<void>}
* @returns {Promise<void>}
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
/**
* Add a WiFi network
@@ -121,11 +241,11 @@ export class Hotspot {
* @param {string} password
* Password for network
*
* @return {Promise<void>}
* @returns {Promise<void>}
* Promise that adding the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
static addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> { return; }
addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> { return; }
/**
* Remove a WiFi network
@@ -133,175 +253,120 @@ export class Hotspot {
* @param {string} ssid
* SSID of network
*
* @return {Promise<void>}
* @returns {Promise<void>}
* Promise that removing the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
static removeWifiNetwork(ssid: string): Promise<void> { return; }
removeWifiNetwork(ssid: string): Promise<void> { return; }
/**
* @returns {Promise<boolean>}
*/
@Cordova()
static isConnectedToInternet(): Promise<boolean> { return; }
isConnectedToInternet(): Promise<boolean> { return; }
/**
* @returns {Promise<boolean>}
*/
@Cordova()
static isConnectedToInternetViaWifi(): Promise<boolean> { return; }
isConnectedToInternetViaWifi(): Promise<boolean> { return; }
/**
* @returns {Promise<boolean>}
*/
@Cordova()
static isWifiOn(): Promise<boolean> { return; }
isWifiOn(): Promise<boolean> { return; }
/**
* @returns {Promise<boolean>}
*/
@Cordova()
static isWifiSupported(): Promise<boolean> { return; }
isWifiSupported(): Promise<boolean> { return; }
/**
* @returns {Promise<boolean>}
*/
@Cordova()
static isWifiDirectSupported(): Promise<boolean> { return; }
isWifiDirectSupported(): Promise<boolean> { return; }
/**
* @returns {Promise<Array<HotspotNetwork>>}
*/
@Cordova()
static scanWifi(): Promise<Array<Network>> { return; }
scanWifi(): Promise<Array<HotspotNetwork>> { return; }
/**
* @returns {Promise<Array<HotspotNetwork>>}
*/
@Cordova()
static scanWifiByLevel(): Promise<Array<Network>> { return; }
scanWifiByLevel(): Promise<Array<HotspotNetwork>> { return; }
/**
* @returns {Promise<any>}
*/
@Cordova()
static startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> { return; }
startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> { return; }
/**
* @returns {Promise<any>}
*/
@Cordova()
static stopWifiPeriodicallyScan(): Promise<any> { return; }
stopWifiPeriodicallyScan(): Promise<any> { return; }
/**
* @returns {Promise<HotspotNetworkConfig>}
*/
@Cordova()
static getNetConfig(): Promise<NetworkConfig> { return; }
getNetConfig(): Promise<HotspotNetworkConfig> { return; }
/**
* @returns {Promise<HotspotConnectionInfo>}
*/
@Cordova()
static getConnectionInfo(): Promise<ConnectionInfo> { return; }
getConnectionInfo(): Promise<HotspotConnectionInfo> { return; }
/**
* @returns {Promise<string>}
*/
@Cordova()
static pingHost(ip: string): Promise<string> { return; }
pingHost(ip: string): Promise<string> { return; }
/**
* Gets MAC Address associated with IP Address from ARP File
*
* @param {string} ip - IP Address that you want the MAC Address of
*
* @return {Promise<string>} - A Promise for the MAC Address
* @returns {Promise<string>} - A Promise for the MAC Address
*/
@Cordova()
static getMacAddressOfHost(ip: string): Promise<string> { return; }
getMacAddressOfHost(ip: string): Promise<string> { return; }
/**
* Checks if IP is live using DNS
*
* @param {string} ip - IP Address you want to test
*
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
* @returns {Promise<boolean>} - A Promise for whether the IP Address is reachable
*/
@Cordova()
static isDnsLive(ip: string): Promise<boolean> { return; }
isDnsLive(ip: string): Promise<boolean> { return; }
/**
* Checks if IP is live using socket And PORT
*
* @param {string} ip - IP Address you want to test
*
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
* @returns {Promise<boolean>} - A Promise for whether the IP Address is reachable
*/
@Cordova()
static isPortLive(ip: string): Promise<boolean> { return; }
isPortLive(ip: string): Promise<boolean> { return; }
/**
* Checks if device is rooted
*
* @return {Promise<boolean>} - A Promise for whether the device is rooted
* @returns {Promise<boolean>} - A Promise for whether the device is rooted
*/
@Cordova()
static isRooted(): Promise<boolean> { return; }
isRooted(): Promise<boolean> { return; }
}
export interface ConnectionInfo {
/**
* @property {string} SSID
* The service set identifier (SSID) of the current 802.11 network.
*/
SSID: string;
/**
* @property {string} BSSID
* The basic service set identifier (BSSID) of the current access point.
*/
BSSID: string;
/**
* @property {string} linkSpeed
* The current link speed in Mbps
*/
linkSpeed: string;
/**
* @property {string} IPAddress
* The IP Address
*/
IPAddress: string;
/**
* @property {string} networkID
* Each configured network has a unique small integer ID, used to identify the network when performing operations on the supplicant.
*/
networkID: string;
}
export interface Network {
/**
* @property {string} SSID
* Human readable network name
*/
SSID: string;
/**
* @property {string} BSSID
* MAC Address of the access point
*/
BSSID: string;
/**
* @property {number (int)} frequency
* The primary 20 MHz frequency (in MHz) of the channel over which the client is communicating with the access point.
*/
frequency: number;
/**
* @property {number} level
* The detected signal level in dBm, also known as the RSSI.
*/
level: number;
/**
* @property {number} timestamp
* Timestamp in microseconds (since boot) when this result was last seen.
*/
timestamp: number;
/**
* @property {string} capabilities
* Describes the authentication, key management, and encryption schemes supported by the access point.
*/
capabilities: string;
}
export interface NetworkConfig {
/**
* @property {string} deviceIPAddress - Device IP Address
*/
deviceIPAddress: string;
/**
* @property {string} deviceMacAddress - Device MAC Address
*/
deviceMacAddress: string;
/**
* @property {string} gatewayIPAddress - Gateway IP Address
*/
gatewayIPAddress: string;
/**
* @property {string} gatewayMacAddress - Gateway MAC Address
*/
gatewayMacAddress: string;
}
export interface HotspotDevice {
/**
* @property {string} ip
* Hotspot IP Address
*/
ip: string;
/**
* @property {string} mac
* Hotspot MAC Address
*/
mac: string;
}
+161
View File
@@ -0,0 +1,161 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova } from '@ionic-native/core';
export interface HTTPResponse {
/**
* The status number of the response
*/
status: number;
/**
* The data that is in the response. This property usually exists when a promise returned by a request method resolves.
*/
data?: any;
/**
* The headers of the response
*/
headers: any;
/**
* Error response from the server. This property usually exists when a promise returned by a request method rejects.
*/
error?: string;
}
/**
* @name HTTP
* @description
* Cordova / Phonegap plugin for communicating with HTTP servers. Supports iOS and Android.
*
* Advantages over Javascript requests:
* - Background threading - all requests are done in a background thread
* - SSL Pinning
*
* @usage
* ```
* import { HTTP } from '@ionic-native/http';
*
* HTTP.get('http://ionic.io', {}, {})
* .then(data => {
*
* console.log(data.status);
* console.log(data.data); // data received by server
* console.log(data.headers);
*
* })
* .catch(error => {
*
* console.log(error.status);
* console.log(error.error); // error message as string
* console.log(error.headers);
*
* });
*
* ```
* @interfaces
* HTTPResponse
*/
@Plugin({
pluginName: 'HTTP',
plugin: 'cordova-plugin-http',
pluginRef: 'cordovaHTTP',
repo: 'https://github.com/wymsee/cordova-HTTP',
platforms: ['Android', 'iOS']
})
@Injectable()
export class HTTP {
/**
* This returns an object representing a basic HTTP Authorization header of the form.
* @param username {string} Username
* @param password {string} Password
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
*/
@Cordova({ sync: true })
getBasicAuthHeader(username: string, password: string): { Authorization: string; } { return; }
/**
* This sets up all future requests to use Basic HTTP authentication with the given username and password.
* @param username {string} Username
* @param password {string} Password
*/
@Cordova({ sync: true })
useBasicAuth(username: string, password: string): void { }
/**
* Set a header for all future requests. Takes a header and a value.
* @param header {string} The name of the header
* @param value {string} The value of the header
*/
@Cordova({ sync: true })
setHeader(header: string, value: string): void { }
/**
* Enable or disable SSL Pinning. This defaults to false.
*
* To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this stackoverflow answer. You want to convert it to a DER encoded certificate with a .cer extension.
*
* As an alternative, you can store your .cer files in the www/certificates folder.
* @param enable {boolean} Set to true to enable
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
enableSSLPinning(enable: boolean): Promise<void> { return; }
/**
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
* @param accept {boolean} Set to true to accept
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
acceptAllCerts(accept: boolean): Promise<void> { return; }
/**
* Whether or not to validate the domain name in the certificate. This defaults to true.
* @param validate {boolean} Set to true to validate
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
validateDomainName(validate: boolean): Promise<void> { return; }
/**
* Make a POST request
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
post(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
/**
*
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
get(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
/**
*
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
* @param filePath {string} The local path of the file to upload
* @param name {string} The name of the parameter to pass the file along as
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
uploadFile(url: string, body: any, headers: any, filePath: string, name: string): Promise<HTTPResponse> { return; }
/**
*
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
* @param filePath {string} The path to donwload the file to, including the file name.
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
downloadFile(url: string, body: any, headers: any, filePath: string): Promise<HTTPResponse> { return; }
}

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