Compare commits

...

166 Commits

Author SHA1 Message Date
Ibby Hadeed
0a12dc0792 chore(): update changelog 2017-12-08 15:11:23 -05:00
Ibby Hadeed
2093c5cb29 4.5.0 2017-12-08 15:11:17 -05:00
jing-zhou
d43fe72f7b fix(alipay): add 'string' as an alternative type for 'pay()' input parameter; (#2172)
change 'installVariables' name to 'ALI_PID' for Alipay cordova plugin
2017-12-08 15:10:31 -05:00
Philip Browning
c038c6331c fix(ms-adal): add userInfo in the AuthenticationResult (#2160)
User Info is also included in the authentication result
2017-12-08 15:10:04 -05:00
Precious Jahlom Agboado
212bd63191 feat(dns): add cordova-plugin-dns plugin (#2083)
* feat(cordova-plugin-dns added): Resolve hostnames into an underlying network address.

* Update index.ts
2017-12-08 15:09:07 -05:00
Chris Morbitzer
4694c422aa fix(push): add senderID to AndroidPushOptions (#2060) 2017-12-08 15:07:29 -05:00
Sandip Gadekar
38bbf01e8c docs(couchbase-lite): update usage (#2059)
* adding detailed usage for couchbase lite

* added get url method

* create database method added

* delete database method added

* get all database method added

* space added in comments

* comments added unwanted import removed

* whitespaces added

* usage added in commented section

* get all documents,create document methods added

* spell mistake corrected

* getAllDocs Method Usage added

* create document example added

* update document example added

* delete document example added
2017-12-08 15:07:04 -05:00
Victor Ramos
b9b781ddee fix(camera-preview): add missing tapToFocus camera option (#2046) 2017-12-08 15:05:59 -05:00
Jesús Gómez Bellido
6053296998 feat(call-number): add isCallSupported method (#2051) 2017-12-08 15:05:34 -05:00
lehrenberg
9f72592fcc feat(nfc): add support for iOS (#2050)
* Added missing methods beginSession and invalidateSession for iOS support

* Removed invalidateSession function and package-lock.json

* added current package-lock again
2017-12-08 15:05:11 -05:00
Niklas Merz
7c2a761078 refactor(three-dee-touch): use CordovaFunctionOverride decorator (#2028) 2017-12-08 14:58:53 -05:00
Niklas Merz
9a5211001f fix(indexappcontent): Return observable for onItemPressed (#2006) 2017-12-08 14:57:58 -05:00
Martin Hughes
03f578909b feat(GooglePlayGamesServices): add plugin (#1904)
* feat(GooglePlayGamesServices): add plugin

* feat(GooglePlayGamesServices): add plugin

* fix(GooglePlayGamesServices): trailing whitespace
2017-12-08 14:57:13 -05:00
Matheus Valiente Souza
acd1a80e4d Missing single quotation mark (#2175)
Missing single quotation mark on doc.
2017-12-08 14:57:02 -05:00
Andrew Crites
bf41506324 feat(apple-pay): update for version 3 of the Apple Pay plugin. (#2177)
trueflywood's fork is currently used for this plugin. I'm changing it back to the original which contains the current changes and also includes type definitions and methods for the new version as well as documentation updates
2017-12-08 14:56:53 -05:00
Developer
47dd7e90ed docs(@ionic-native/ibeacon): remove semicolon on the example (#2179) 2017-12-08 14:56:27 -05:00
Gaven Henry
afca8761d7 fix(music-controls): various fixes (#2094)
Add hasScrubbing variable to options - used to enable or disable scrubbing from the iOS control center or lockscreen progress bar
Make optional items actually optional...
2017-12-08 14:56:12 -05:00
Paul John Diwa
5159367db8 fix(ftp): return observable (not promise) for upload and download method (#2174)
* style(network-interface): remove trailing whitespace

* fix(ftp): return an observable instead of a promise for upload and download method
2017-12-08 14:55:30 -05:00
Guillaume
d06fa48866 feat(android exoplayer): add cordova-plugin-exoplayer (#2180) 2017-12-08 14:53:21 -05:00
Ibby Hadeed
8f00e44d21 Merge branch 'master' of github.com:ionic-team/ionic-native 2017-12-08 14:51:12 -05:00
Ibby Hadeed
9e6f178378 chore(): lint 2017-12-08 14:51:03 -05:00
Josh Babb
997c96b97f docs(android-permissions): note checkPermission return/result format and Android API version 26 changes that impact requestPermission and requestPermissions (#2183)
* docs(android-permissions): note checkPermission() return/result format

* docs(android-permissions): note requestPermission API ver. 26 behavior
2017-12-08 14:50:20 -05:00
Hugo Des
ae94c710af fix(web-intent): fix false negative of plugin installation (#2062)
* fix(web-intent): Fix false negative of plugin installation

* Update index.ts
2017-12-01 23:09:34 -05:00
Samer Albahra
86b2a2ca73 feat(network-interface): add plugin support (#2063)
* feat(network-interface): add plugin support

* Remove unnecessary options

* add getIPAddress method
2017-12-01 23:09:08 -05:00
Dominik Garcia
c1ce5dac18 feat(push): add support for version 2.1.0 (#2064) 2017-12-01 23:07:25 -05:00
codinronan
091ac7a68c feat(braintree): add support for cordova-plugin-braintree to @ionic-native (#2073) 2017-12-01 23:06:57 -05:00
Nik Martin
bd5bcdc9b7 feat(android-fingerprint): add getSigningCertificateFingerprint() method (#2076)
* Add getSigningCertificateFingerprint() method

Method was added in 5.0.3

* fix lint whitespace error
2017-12-01 23:05:51 -05:00
Jan Peeters
dc707fd80c docs(): add missing comma in example (#2077) 2017-12-01 23:05:27 -05:00
dbandstra
3e933bbaff chore(): fix comment in sms plugin referring to wrong cordova plugin (#2079) 2017-12-01 23:05:09 -05:00
Nik Martin
86181afc27 feat(firebase): add new Firebase phone verification methods (#2157)
* feat(firebase): add missing method

* feat(firebase): add missing ios method

* Update index.ts
2017-12-01 23:04:54 -05:00
Aleksey Kompanets
784f948a5b feat(apple-pay): add cordova-plugin-applepay (#2081)
* feat(apple-pay) add cordova-plugin-applepay

* Update index.ts
2017-12-01 23:03:40 -05:00
mburger81
2a4bcee6a0 feat(ble): support startStateNotifications & stopStateNotifications (#2085) 2017-12-01 23:00:13 -05:00
jdgeier
d95ae68c9c fix(app-rate): change openStoreInApp to inAppReview (#2097) 2017-12-01 22:57:29 -05:00
Thomas Waldecker
8b78644680 feat(nfc): add interfaces and missing references to UriHelper and TextHelper (#2104)
* feat(nfc): Add interfaces and missing references to UriHelper and TextHelper

This commit adds the missing references to UriHelper and TextHeler.

There were missing references to some methods of nfc and ndef modules.

The constants for ndef has ben added.

* feat(nfc): add NfcUtil class.
2017-12-01 22:57:12 -05:00
Alex
5d48cfd419 docs(): fix typo (#2123)
love contributing
2017-12-01 22:56:28 -05:00
Kelvin Dart
b2c873cc99 fix(mobile-accessibility): change signature references to the correct names (#2139) 2017-12-01 22:54:39 -05:00
Harshith Kashyap
bb2291cd16 fix(deeplinks): add options parameter(#1601) (#2141) 2017-12-01 22:54:16 -05:00
Eric McNiece
7255795ae5 feat(zeroconf): add reInit() method (#2144) 2017-12-01 22:53:38 -05:00
Josh Babb
c9b49ccc39 docs(jins-meme): update plugin information (#2150)
The most important change here is to point to the BlyncSync version of the plugin, which is actively maintained.  The jins-meme version lacks a package.json, which causes issues on some platforms that will result in an inability to build.

The BlyncSync plugin uses standard naming convention for cordova plugins (cordova-plugin-jins-meme-es)

The plugin name should be JINS MEME ES (ES for Eye-Sensing,) as this is how the product is actually named: not "Jins Meme."
2017-12-01 22:52:57 -05:00
Stephen Redeker
9844274213 fix(app-rate): add simpleMode (#2155)
Adding the simpleMode preference from https://github.com/pushandplay/cordova-plugin-apprate#options--preferences to resolve https://github.com/ionic-team/ionic-native/issues/2154.
2017-12-01 22:51:49 -05:00
Dave Alden
154a4bcacb refactor(launch-review): update the definitions for new v3 plugin API (#2162) 2017-12-01 22:50:21 -05:00
Dave Alden
10a96fcdd6 refactor(diagnostic): update API to plugin v3.7.2(#2163)
closes #2161
2017-12-01 22:50:12 -05:00
Jay Ordway
7ab522edec docs(): fix import statement (#2166) 2017-12-01 22:49:46 -05:00
mhartington
50d7762b8a docs(): update plugin name for local-notifications 2017-11-27 09:15:39 -05:00
Ibby Hadeed
0a8146b76c 4.4.2 2017-11-15 08:52:51 -05:00
Ibby Hadeed
2d60db9d3b chore(): update changelog 2017-11-13 16:21:09 -05:00
Ibby Hadeed
3378d7a398 4.4.1 2017-11-13 16:12:23 -05:00
Ibby Hadeed
61defd480c chore(): revert back to angular 4.4.4 2017-11-13 16:11:45 -05:00
Ibby Hadeed
4e28295486 Hide function/interface properly 2017-11-09 18:13:29 -05:00
Ibby Hadeed
dee32c921c Fix build issue 2017-11-09 18:09:40 -05:00
Ibby Hadeed
2475c57e00 Update 2017-11-09 16:19:48 -05:00
Ibby Hadeed
79b522f832 chore(): update changelog 2017-11-09 16:18:09 -05:00
Ibby Hadeed
ccb2e55435 4.4.0 2017-11-09 16:18:01 -05:00
FallenRiteMonk
f09c9cfe9a docs(): fix typo (#2071) 2017-11-09 16:13:47 -05:00
Sefa Ilkimen
d96d3eef07 feat(http): add support for new methods (#2054)
* feat(http): add patch request support (#2052)

* feat(http): add "disableRedirect" support (#2022)

* fix(http): remove obsolete "validateDomainName" function (#2053)
2017-11-09 16:13:36 -05:00
Daniel Sogl
95daca166b chore(package): Angular 5 support (#2089)
* docs(github): issue template

* initial commit

* Added StatusObject Interface

* style(wrap.tmpl): added missing field

* style(wrap.tmpl): added missing field

* chore(package.json): Angular 5 support

I also bumped the tslint rules and tslint

* Update package.json
2017-11-09 16:12:48 -05:00
Masashi Katsumata
196be026ea feat(google-maps): accept own properties for addMarker() and others (#2093)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class

* Bug fix: Can not create an instance of BaseArrayClass

* Bug fix: the icons property of MarkerClusterOptions

* Bug fix: the zoom option is missing

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1712

* Update index.ts

* fix: need to convert instance type from the JS class to the wrapper class

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1706

* remove test file

* fix: Error: Illegal use of "@private" tag.

* fix: The Environment, Encode, and Spherical  are static class

* fix:  convert JS instance to the ionic instance
add: BaseClass.destroy()
add: getId() method for all instance classes

* Documentation Error https://github.com/ionic-team/ionic-native/issues/1994

* Need to create another way to convert the instance for marker cluster

* save

* Remove the instance of wrapper class if the JS instance is removed.

* Bug fix: HtmlInfoWindow missing .on and .one methods
https://github.com/ionic-team/ionic-native/issues/2034

* Bug fix: HtmlInfoWindow constructor cause the error
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1661

* Fix: Error when removing map
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1823

* Add: the cssOptions argument for HtmlInfoWindow.setContent() method

* Bug fix: Polyline.getPoints(), Polygon.getPoints() and Polygon.getHoles()

Those methods need to create new instance of BaseArrayClass of wrapper plugin.

* Add: forEachAsync(), mapAsync(), and filterAsync() methods into BaseArray class

* update: use document.querySelector() instead of document.getElementById() if the passed element is string

update: map.setDiv()

Bug fix: can not create empty GoogleMap (pure JS version is available way)

* Fix: wait until the page is fully ready

* Fix: missing `clickable` option for PolygonOptions and PolylineOptions

* Add: accept own properties for `addMarker()` and others #2087

Fix: some properties are required, but specified as optional.

Add: descriptions for properties

* Bug fix: Static classes are defined as non static class
https://stackoverflow.com/questions/47083289/ionic-native-google-maps-plugin-set-app-background-color/47165721#47165721

* Add: poly class (plugin.google.maps.geometory.poly namespace)
2017-11-08 08:12:07 -05:00
Daniel Sogl
1fa7c91105 chore(package): bump Angular (#2096) 2017-11-08 04:46:25 -05:00
Ibby Hadeed
ba105be55f chore(): update changelog 2017-11-01 05:01:25 -04:00
Ibby Hadeed
92d26eab94 4.3.3 2017-11-01 05:01:21 -04:00
Masashi Katsumata
ce6e412788 fix(google-maps): HtmlInfoWindow should extend BaseClass #2034 (#2035)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class

* Bug fix: Can not create an instance of BaseArrayClass

* Bug fix: the icons property of MarkerClusterOptions

* Bug fix: the zoom option is missing

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1712

* Update index.ts

* fix: need to convert instance type from the JS class to the wrapper class

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1706

* remove test file

* fix: Error: Illegal use of "@private" tag.

* fix: The Environment, Encode, and Spherical  are static class

* fix:  convert JS instance to the ionic instance
add: BaseClass.destroy()
add: getId() method for all instance classes

* Documentation Error https://github.com/ionic-team/ionic-native/issues/1994

* Need to create another way to convert the instance for marker cluster

* save

* Remove the instance of wrapper class if the JS instance is removed.

* Bug fix: HtmlInfoWindow missing .on and .one methods
https://github.com/ionic-team/ionic-native/issues/2034

* Bug fix: HtmlInfoWindow constructor cause the error
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1661

* Fix: Error when removing map
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1823

* Add: the cssOptions argument for HtmlInfoWindow.setContent() method

* Bug fix: Polyline.getPoints(), Polygon.getPoints() and Polygon.getHoles()

Those methods need to create new instance of BaseArrayClass of wrapper plugin.

* Add: forEachAsync(), mapAsync(), and filterAsync() methods into BaseArray class

* update: use document.querySelector() instead of document.getElementById() if the passed element is string

update: map.setDiv()

Bug fix: can not create empty GoogleMap (pure JS version is available way)

* Fix: wait until the page is fully ready

* Fix: missing `clickable` option for PolygonOptions and PolylineOptions
2017-11-01 05:00:52 -04:00
Max Lynch
7243ed3960 Update index.ts 2017-10-19 14:24:37 -05:00
Ibby Hadeed
264670211d chore(): update changelog 2017-10-18 03:25:01 -04:00
Ibby Hadeed
847147a5fa 4.3.2 2017-10-18 03:24:54 -04:00
Ibby Hadeed
4639bf9a94 fix(google-maps): remove type from GoogleMapsEvent constant 2017-10-17 17:37:15 -04:00
William Pelrine
abb77e3e08 Merge pull request #2042 from ionic-team/pro-js-update
feat(pro): support corova-plugin-ionic v2.0.0
2017-10-13 09:28:53 -05:00
William Pelrine
975f08b7b5 feat(pro): support corova-plugin-ionic v2.0.0 2017-10-12 14:54:13 -05:00
Niklas Merz
773722b767 docs(DEVELOPER) Add documentation for CordovaFunctionOverride decorator (#2029) 2017-10-10 23:48:27 -04:00
Daniel Sogl
447aa56e3c chore(package): bump Angular (#2036) 2017-10-10 23:46:31 -04:00
Max Lynch
8d22798278 RxJS 5.4.2 -> 5.4.3 2017-10-10 09:12:49 -05:00
Max Lynch
30297fb81d Merge pull request #1799 from GulinSS/master
Use RxJS 5.4.2 to fix generics checking in TS 2.4.1
2017-10-10 09:12:17 -05:00
Max Lynch
ac777fca40 Merge branch 'master' into master 2017-10-10 09:11:48 -05:00
Max Lynch
43b70a12b5 Merge branch 'master' into master 2017-10-10 09:10:54 -05:00
Ibby Hadeed
ef28078815 Merge branch 'master' of github.com:ionic-team/ionic-native 2017-10-06 13:45:10 -04:00
Ibby Hadeed
e304ce0e53 chore(): fix readmes script 2017-10-06 13:44:58 -04:00
William Pelrine
9e5f03f15d chore(): update changelog 2017-10-06 10:41:37 -05:00
William Pelrine
465d5519d0 feat(pro): Add support for Ionic Pro by incorporating cordova-plugin-ionic 2017-10-06 10:35:54 -05:00
Ibby Hadeed
d683b9e5df chore(): update changelog 2017-10-05 23:28:48 -04:00
Ibby Hadeed
2b2476e873 4.3.1 2017-10-05 23:28:42 -04:00
Sandip Gadekar
196adc8b2f docs(): added methods that can guide how to create document and get all docs (#2005)
* adding detailed usage for couchbase lite

* added get url method

* create database method added

* delete database method added

* get all database method added

* space added in comments

* comments added unwanted import removed

* whitespaces added

* usage added in commented section

* get all documents,create document methods added

* spell mistake corrected
2017-10-05 23:26:43 -04:00
Daniel Olivares
363b41e075 fix(BLE): make readRSSI() not static (#2011) 2017-10-05 23:24:07 -04:00
Dmitry Smolyakov
2179699622 feat(regula-document-reader): separate initialization and scanning, add android (#2013) 2017-10-05 23:23:51 -04:00
Quentin Ligier
e65406cc2f refactor(photo-viewer): improve options documentation (#2014) 2017-10-05 23:23:09 -04:00
Thomas S
ddb6d43ffa docs(geolocation): update install command (#2016)
Hello guys,

I make this pull request to add the installation variable `GEOLOCATION_USAGE_DESCRIPTION` needed on iOS, since version 10.

Without this variable, using `getCurrentPosition` do nothing on iOS because phone wait user authorization. But that authorization is not display because there is no message defined.

This variable make this part of code in `info.plist` : 

```
<key>NSLocationWhenInUseUsageDescription</key>
<string>To allow locate you</string>
``` 

Source : https://github.com/apache/cordova-plugin-geolocation#ios-quirks

Have a good coding day :)
2017-10-05 23:22:43 -04:00
Kamil Piskorski
30ed33a046 fix(onesignal): fix property name (#2019) 2017-10-05 23:22:03 -04:00
Rene Escobar
3d0a12d40d refactor(): update return value in hasPermission() (#2023) 2017-10-05 23:21:34 -04:00
Masashi Katsumata
6ca5beaf0b fix(google-maps): various fixed introduced in previous release (#2024)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class

* Bug fix: Can not create an instance of BaseArrayClass

* Bug fix: the icons property of MarkerClusterOptions

* Bug fix: the zoom option is missing

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1712

* Update index.ts

* fix: need to convert instance type from the JS class to the wrapper class

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1706

* remove test file

* fix: Error: Illegal use of "@private" tag.

* fix: The Environment, Encode, and Spherical  are static class

* fix:  convert JS instance to the ionic instance
add: BaseClass.destroy()
add: getId() method for all instance classes

* Documentation Error https://github.com/ionic-team/ionic-native/issues/1994

* Need to create another way to convert the instance for marker cluster

* save

* Remove the instance of wrapper class if the JS instance is removed.
2017-10-05 23:20:40 -04:00
Ibby Hadeed
536a906366 chore(): update changelog 2017-09-27 18:06:52 -04:00
Ibby Hadeed
7fcafaae81 4.3.0 2017-09-27 18:06:43 -04:00
Ibby Hadeed
1a7a0e7cc0 Merge branch 'master' of github.com:ionic-team/ionic-native 2017-09-27 17:58:55 -04:00
Euler Menezes Junior
34bf136703 feat(push): update PushOptions interfaces to match new version (#1908)
BREAKING CHANGE: this wrapper will work only with `phonegap-plugin-push@2.0.0`
2017-09-27 17:56:43 -04:00
Ibby Hadeed
bb798340c5 Merge branch 'master' of github.com:ionic-team/ionic-native 2017-09-27 17:48:54 -04:00
Iván Pérez
1b04ebb5e2 Zerconf: Action can also be resolved (#1924) 2017-09-27 17:48:45 -04:00
mflynnKVD
a150d4d522 fix(launch-navigator): fix navigate method (#1940) 2017-09-27 17:48:23 -04:00
Josh Armstrong
4246d47a6c feat(android-full-screen): add support for setSystemUiVisiblity (#1942) 2017-09-27 17:47:51 -04:00
Jan Piotrowski
024099a772 add note about limitation (#1953) 2017-09-27 17:47:15 -04:00
Buddy Reno
fff99694ba feat(music-controls): add support for next/prev track and skip forward/backward in control center (#1927) 2017-09-27 17:47:05 -04:00
Ibby Hadeed
429529a5ee Merge branch 'master' of github.com:ionic-team/ionic-native 2017-09-27 17:45:49 -04:00
Gordeev Artem
e2419a26b2 feat(uid): add UID plugin (#1946) 2017-09-27 17:45:44 -04:00
Inconspicuously
10eb3eeeeb feat(qr-scanner): added destroy method (#1916) (#1971)
fix(qr-scanner): added destroy method (#1916)
2017-09-27 17:44:38 -04:00
Ibby Hadeed
533cc4efc9 docs(): update docs 2017-09-27 17:44:06 -04:00
Ibby Hadeed
6b433b5373 Refactor 2017-09-27 17:42:40 -04:00
Niklas Merz
e684db479e feat(index-app-content) add Index-App-Content plugin (#1954) 2017-09-27 17:42:01 -04:00
Everett
81c576c28e docs(firebase-dynamic-links): update docs (#1964)
Variable REVERSED_CLIENT_ID can be found in your GoogleService-Info.plist under the same key name.
Variable PHOTO_LIBRARY_USAGE_DESCRIPTION specifies required value for NSPhotoLibraryUsageDescription on iOS.

See: https://github.com/chemerisuk/cordova-plugin-firebase-dynamiclinks
2017-09-27 17:39:05 -04:00
excelulous
e2f3702d0b fix(zeroconf): extend the ZeroconfResult.action definition (#1985)
This now includes the value 'resolved', as it is a valid action passed by the service browser on iOS (at least) when IP addresses for the chosen service have been resolved.
2017-09-27 17:36:32 -04:00
Daniel Ehrhardt
806766e33e feat(extended-device-information): add Extended Device Info plugin (#1980)
* Added Cordova Device Information Wrapper

* Updated Usage Description

* Removed unsued line

* Added Total Storage
2017-09-27 17:36:00 -04:00
Sandip Gadekar
432c0e901d docs(couchbase-lite): add usage (#1988)
* adding detailed usage for couchbase lite

* added get url method

* create database method added

* delete database method added

* get all database method added

* space added in comments

* comments added unwanted import removed

* whitespaces added

* usage added in commented section
2017-09-27 17:03:10 -04:00
Ibby Hadeed
fb70a24c61 refactor(regula-document-reader): rename plugin 2017-09-27 17:01:12 -04:00
Ibby Hadeed
202c680643 refactor(document-reader): add beta and paid tags 2017-09-27 16:59:06 -04:00
Dmitry Smolyakov
7b94d4fccf feat(document-reader): add cordova-plugin-documentreader (#1996) 2017-09-27 16:58:31 -04:00
Akshay Dwivedi
5b15bb9f46 fix(stripe): fix stripe create card token (#2002)
fix stripe create card token promise
2017-09-27 16:56:25 -04:00
Ibby Hadeed
c3930c814a refactor(google-maps): use es6 syntax 2017-09-27 16:52:06 -04:00
Masashi Katsumata
57af5c5e73 fix(google-maps): convert JS classes to Ionic Native (#1956)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class

* Bug fix: Can not create an instance of BaseArrayClass

* Bug fix: the icons property of MarkerClusterOptions

* Bug fix: the zoom option is missing

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1712

* Update index.ts

* fix: need to convert instance type from the JS class to the wrapper class

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1706

* remove test file

* fix: Error: Illegal use of "@private" tag.

* fix: The Environment, Encode, and Spherical  are static class

* fix:  convert JS instance to the ionic instance
add: BaseClass.destroy()
add: getId() method for all instance classes
2017-09-27 15:56:30 -04:00
Ibby Hadeed
29604d6d3d Update README.md 2017-09-11 09:56:07 -04:00
AniketPant02
76effe98f8 docs(): fix typo
Typo
2017-09-11 04:12:23 -04:00
Ibby Hadeed
0783520723 chore(): bump core dependency to 4.2.0 2017-09-06 02:36:48 -04:00
Masashi Katsumata
ef898efcc6 fix(google-maps): the zoom option is missing in the GoogleMapOptions class (#1948)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class

* Bug fix: Can not create an instance of BaseArrayClass

* Bug fix: the icons property of MarkerClusterOptions

* Bug fix: the zoom option is missing

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1712

* Update index.ts
2017-09-06 02:34:18 -04:00
fredroo
fdd12b58b3 fix(twitter-connect (#1903)
* Update index.ts

* Update index.ts

* Update index.ts

* Update index.ts
2017-09-01 23:24:28 -04:00
Masashi Katsumata
80047907ea fix(google-maps): fix icons property of MarkerClusterOptions (#1937)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class

* Bug fix: Can not create an instance of BaseArrayClass

* Bug fix: the icons property of MarkerClusterOptions
2017-09-01 21:38:26 -04:00
Raman Rasliuk
3a1034eab0 fix(http): fix plugin ref (#1934) 2017-08-30 15:06:32 -04:00
Ibby Hadeed
c8586927c3 chore(): update changelog 2017-08-29 19:44:23 -04:00
Ibby Hadeed
f22c603c30 4.2.1 2017-08-29 19:44:15 -04:00
Masashi Katsumata
957396b5e5 fix(google-maps): fix issue when creating new instance of BaseArrayClass (#1931)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class

* Bug fix: Can not create an instance of BaseArrayClass
2017-08-29 18:58:44 -04:00
Perry Govier
d891c3eea0 Merge pull request #1867 from janpio/patch-10
docs(navigation): add trailing slash to navigation items
2017-08-28 10:59:19 -05:00
Ibby Hadeed
37aa9a82fe chore(): update changelog 2017-08-26 04:04:12 -04:00
Ibby Hadeed
392b11bd05 4.2.0 2017-08-26 04:03:34 -04:00
Ibby Hadeed
d4fe051d56 update 2017-08-26 04:03:29 -04:00
Raman Rasliuk
a2d33963b1 feat(http): use a different plugin source with better features (#1921) 2017-08-26 03:57:23 -04:00
Leonardo Ruhland
332f9aefe5 docs(safariview): usage fix (#1923)
The show method returns a Observable, not a Promise.
2017-08-26 03:55:06 -04:00
Heather Lemieux
4942b88873 docs(google-maps): update docs (#1833)
Since the new googlemaps plugin uses the native code, you need to wait for the platform to be ready before loading the map.
2017-08-26 03:53:57 -04:00
frank10gm
39ec5158a0 fix(google-maps): add missing debug option (#1832)
added debug option to TileOverlayOptions.
2017-08-26 03:51:39 -04:00
Masashi Katsumata
c11aec33a7 feat(google-maps): update plugin and fix a few issues (#1834)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class
2017-08-26 03:37:40 -04:00
Keepertje
21045ea535 fix(ms-adal): make userId optional (#1894)
The docs say User Identifier is optional but the method does not reflect it.
2017-08-23 19:55:46 -04:00
Rohin Mohanadas
955c450483 docs(): update supported platforms (#1879)
Removing browser from the list of supported platforms.
2017-08-23 19:55:05 -04:00
Ibby Hadeed
00c0707dad fix(geofence): remove duplicate onTransitionReceived method 2017-08-23 19:54:11 -04:00
Ibby Hadeed
79f88d6a02 Merge branch 'master' of github.com:ionic-team/ionic-native 2017-08-23 19:47:05 -04:00
Yasin Simsek
ce5966bf10 feat(local-notifications): add un method to unsubscribe from events (#1871) 2017-08-23 19:46:58 -04:00
Ibby Hadeed
fb8dbe5fc0 Merge branch 'master' of github.com:ionic-team/ionic-native 2017-08-23 19:42:51 -04:00
martinhanke
cde87e2113 feat(paypal): add payeeEmail for third party merchants (#1864) 2017-08-23 19:42:47 -04:00
Fatih Kızmaz
262e18f409 fix(native-spinner): update pluginRef (#1859)
Wrong pluginRef causes errors:
Native: tried calling SpinnerDialog.show, but the SpinnerDialog plugin is not installed.
Install the SpinnerDialog plugin: 'ionic cordova plugin add cordova-plugin-native-spinner'

Fix pluginRef to work properly.
2017-08-23 19:41:03 -04:00
Davor Peic
39ef066875 docs(cardio): update docs (#1858)
Added iOS10 permission message and corrected requireCVV use
2017-08-23 19:40:14 -04:00
Chris
35d317f7f3 docs(): add missing import (#1853)
BackgroundGeolocationResponse was not declared in classes to import from @ionic-native/background-geolocation
2017-08-23 19:39:29 -04:00
Tom Sundstrom
5505e5f064 docs(): adjust log messages in photo library example callbacks (#1851)
* Move error message to the error callback

* Log a debug message in complete callback
2017-08-23 19:39:04 -04:00
Ibby Hadeed
e6b0250d97 refactor 2017-08-23 19:38:30 -04:00
Mario Mol
aa4c3b3787 feat(push): add Browser Push notification support (#1848)
* Browser Push interface with options to use push notification with browsers , as a proxy to phonegap-plush-plugin

* making both properties optional
2017-08-23 19:38:04 -04:00
foysal
57bbcdebfb docs(nfc): update usage doc of the nfc plugin (#1846)
* docs(nfc): update usage doc of the nfc plugin

show an example of how the event listeners work with observable subscription and implement an nfc share within the event listener.

* docs(AndroidPermissions): requestPermissions->requestPermission
2017-08-23 19:37:31 -04:00
Josh McRae
85825c7b91 fix(fingerprint-aio): add missing FingerprintOptions properties (#1845)
* docs(fingerprint-aio): add missing FingerprintOptions properties

* fix(fingerprint-aio): fix circle lint error
2017-08-23 19:37:04 -04:00
Josh Miles
1acade4883 fix(serial): add missing options for the open method (#1844) 2017-08-23 19:36:41 -04:00
Sebastian Baar
7c1b409542 fix(native-geocoder): update NativeGeocoderReverse result (#1840)
* feat(nativegeocoder): add NativeGeocoder plugin

* add district

* update NativeGeocoderReverseResult & refactor code

* delete plugins

* delete index.ts
2017-08-23 19:35:51 -04:00
Ibby Hadeed
fe02c84fd9 clean up 2017-08-23 19:34:55 -04:00
Moamen Mostafa
a2cc1870b4 feat(keychain-touch-id): add KeychainTouchId plugin (#1837) 2017-08-23 19:33:12 -04:00
Ibby Hadeed
1c6a3a3bc5 update package-lock 2017-08-23 19:31:23 -04:00
Robert Coie
0c097ba2be fix(sqlite): add optional key parameter to SQLiteDatabaseConfig to support sqlcipher-adapter (#1917) 2017-08-23 19:21:57 -04:00
Animesh Kumar
0dd507ff03 docs(): fix typo (#1914)
corrected `to` to `two` on line number 14
2017-08-23 19:21:25 -04:00
Jan Piotrowski
4e0673c8e9 only add trailing slash on plugin pages
fixes that the trailing slash would have been added to the root and browser-usage.html as well
2017-08-05 17:37:16 +02:00
Jan Piotrowski
0cecf4e43f add trailing slash to navigation items
fixes the problem that each navigation item first has to redirected to the version with trailing slash

closes https://github.com/ionic-team/ionic-site/issues/1223
2017-08-05 17:27:02 +02:00
Ibby Hadeed
9ab458bba2 chore(): update changelog 2017-07-21 01:16:05 -04:00
Ibby Hadeed
7e900dae22 4.1.0 2017-07-21 01:15:59 -04:00
Ibby Hadeed
0fa82e5c56 feat(open-native-settings): add Open Native Settings plugin
closes #1821
2017-07-21 01:15:51 -04:00
Ibby Hadeed
4af3d5bcc1 fix(media): add setRate method
closes #1825
2017-07-21 01:07:38 -04:00
Masashi Katsumata
976401a4e9 feat(google-maps): add missing features and fix wrong definitions (#1815)
* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.
2017-07-20 17:06:37 -07:00
Hayato OKUMOTO
6230958585 feat(firebase): add unregister method (#1823) 2017-07-18 22:12:59 -07:00
Daniel Olivares
47fa44c932 feat(hyper-track): add HyperTrack plugin (#1816)
* feat(HyperTrack): add base implementation for HyperTrack

* feat(HyperTrack): fix getOrCreateUser()

* docs(HyperTrack): add note about publishable key

* feat(HyperTrack): add requestPermissions

* feat(HyperTrack): add startTracking

* docs(HyperTrack): add usage for calls

* feat(HyperTrack): add stopTracking

* docs(HyperTrack): add stopTracking note

* feat(HyperTrack): add setUserId

* feat(HyperTrack): add getCurrentLocation

* style(HyperTrack): reorder functions

* feat(HyperTrack): add createAndAssignAction

* feat(HyperTrack): add completeAction

* feat(HyperTrack): add completeActionWithLookupId

* feat(HyperTrack): add checkLocationPermission

* docs(HyperTrack): add usage for requestPermissions

* docs(HyperTrack): add android note

* feat(HyperTrack): add checkLocationServices

* feat(HyperTrack): add requestLocationServices

* feat(HyperTrack): add base implementation for HyperTrack

* feat(HyperTrack): fix getOrCreateUser()

* docs(HyperTrack): add note about publishable key

* feat(HyperTrack): add requestPermissions

* feat(HyperTrack): add startTracking

* docs(HyperTrack): add usage for calls

* feat(HyperTrack): add stopTracking

* docs(HyperTrack): add stopTracking note

* feat(HyperTrack): add setUserId

* feat(HyperTrack): add getCurrentLocation

* style(HyperTrack): reorder functions

* feat(HyperTrack): add createAndAssignAction

* feat(HyperTrack): add completeAction

* feat(HyperTrack): add completeActionWithLookupId

* feat(HyperTrack): add checkLocationPermission

* docs(HyperTrack): add usage for requestPermissions

* docs(HyperTrack): add android note

* feat(HyperTrack): add checkLocationServices

* feat(HyperTrack): add requestLocationServices

* docs(HyperTrack): Fix plugin usage

* fix(HyperTrack): helloWorld param and docs

* docs(HyperTrack): document all functions

* docs(HyperTrack): move all usage documentation up

* docs(HyperTrack): fix documentation

* Add beta tag
2017-07-17 21:50:08 -04:00
Corentin H
f1dd8d61f5 docs(): improve docs (#1813)
* Improve method description grammar

* Fix some doc typos (#1)

* Fix doc
2017-07-17 18:53:47 -04:00
!Cogentx
3d387798b6 docs(local-notifications): fix package name (#1817)
$ ionic cordova plugin add phonegap-local-notifications -- should be -- 
$ ionic cordova plugin add phonegap-plugin-local-notification -- in Docs --
2017-07-17 18:51:35 -04:00
Serge S. Gulin
247efa656a Use RxJS 5.4.2 to fix generics checking in TS 2.4.1 2017-07-13 11:42:17 +04:00
85 changed files with 8329 additions and 2470 deletions

View File

@@ -1,7 +1,7 @@
**I'm submitting a ...** (check one with "x")
[ ] bug report
[ ] feature request
<!-- Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/ -->
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/
**Current behavior:**
<!-- Describe how the bug manifests. -->
@@ -21,8 +21,8 @@ insert any relevant code here
**Other information:**
<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->
**package.json info:**
**Ionic info:** (run `ionic info` from a terminal/cmd prompt and paste output below):
```json
insert the content here
```
insert the output from ionic info here
```

2
.gitignore vendored
View File

@@ -3,5 +3,5 @@ node_modules/
.idea
.tmp
aot/
dist/
scripts/ionic-native-bower
dist/

View File

@@ -1,3 +1,199 @@
<a name="4.5.0"></a>
# [4.5.0](https://github.com/ionic-team/ionic-native/compare/v4.4.2...v4.5.0) (2017-12-08)
### Bug Fixes
* **alipay:** add 'string' as an alternative type for 'pay()' input parameter; ([#2172](https://github.com/ionic-team/ionic-native/issues/2172)) ([d43fe72](https://github.com/ionic-team/ionic-native/commit/d43fe72))
* **app-rate:** add simpleMode ([#2155](https://github.com/ionic-team/ionic-native/issues/2155)) ([9844274](https://github.com/ionic-team/ionic-native/commit/9844274))
* **app-rate:** change openStoreInApp to inAppReview ([#2097](https://github.com/ionic-team/ionic-native/issues/2097)) ([d95ae68](https://github.com/ionic-team/ionic-native/commit/d95ae68))
* **camera-preview:** add missing `tapToFocus` camera option ([#2046](https://github.com/ionic-team/ionic-native/issues/2046)) ([b9b781d](https://github.com/ionic-team/ionic-native/commit/b9b781d))
* **deeplinks:** add options parameter([#1601](https://github.com/ionic-team/ionic-native/issues/1601)) ([#2141](https://github.com/ionic-team/ionic-native/issues/2141)) ([bb2291c](https://github.com/ionic-team/ionic-native/commit/bb2291c))
* **ftp:** return observable (not promise) for upload and download method ([#2174](https://github.com/ionic-team/ionic-native/issues/2174)) ([5159367](https://github.com/ionic-team/ionic-native/commit/5159367))
* **indexappcontent:** Return observable for onItemPressed ([#2006](https://github.com/ionic-team/ionic-native/issues/2006)) ([9a52110](https://github.com/ionic-team/ionic-native/commit/9a52110))
* **mobile-accessibility:** change signature references to the correct names ([#2139](https://github.com/ionic-team/ionic-native/issues/2139)) ([b2c873c](https://github.com/ionic-team/ionic-native/commit/b2c873c))
* **ms-adal:** add userInfo in the AuthenticationResult ([#2160](https://github.com/ionic-team/ionic-native/issues/2160)) ([c038c63](https://github.com/ionic-team/ionic-native/commit/c038c63))
* **music-controls:** various fixes ([#2094](https://github.com/ionic-team/ionic-native/issues/2094)) ([afca876](https://github.com/ionic-team/ionic-native/commit/afca876))
* **push:** add senderID to AndroidPushOptions ([#2060](https://github.com/ionic-team/ionic-native/issues/2060)) ([4694c42](https://github.com/ionic-team/ionic-native/commit/4694c42))
* **web-intent:** fix false negative of plugin installation ([#2062](https://github.com/ionic-team/ionic-native/issues/2062)) ([ae94c71](https://github.com/ionic-team/ionic-native/commit/ae94c71))
### Features
* **android exoplayer:** add cordova-plugin-exoplayer ([#2180](https://github.com/ionic-team/ionic-native/issues/2180)) ([d06fa48](https://github.com/ionic-team/ionic-native/commit/d06fa48))
* **android-fingerprint:** add getSigningCertificateFingerprint() method ([#2076](https://github.com/ionic-team/ionic-native/issues/2076)) ([bd5bcdc](https://github.com/ionic-team/ionic-native/commit/bd5bcdc))
* **apple-pay:** add cordova-plugin-applepay ([#2081](https://github.com/ionic-team/ionic-native/issues/2081)) ([784f948](https://github.com/ionic-team/ionic-native/commit/784f948))
* **apple-pay:** update for version 3 of the Apple Pay plugin. ([#2177](https://github.com/ionic-team/ionic-native/issues/2177)) ([bf41506](https://github.com/ionic-team/ionic-native/commit/bf41506))
* **ble:** support startStateNotifications & stopStateNotifications ([#2085](https://github.com/ionic-team/ionic-native/issues/2085)) ([2a4bcee](https://github.com/ionic-team/ionic-native/commit/2a4bcee))
* **braintree:** add support for cordova-plugin-braintree to [@ionic-native](https://github.com/ionic-native) ([#2073](https://github.com/ionic-team/ionic-native/issues/2073)) ([091ac7a](https://github.com/ionic-team/ionic-native/commit/091ac7a))
* **call-number:** add isCallSupported method ([#2051](https://github.com/ionic-team/ionic-native/issues/2051)) ([6053296](https://github.com/ionic-team/ionic-native/commit/6053296))
* **dns:** add cordova-plugin-dns plugin ([#2083](https://github.com/ionic-team/ionic-native/issues/2083)) ([212bd63](https://github.com/ionic-team/ionic-native/commit/212bd63))
* **firebase:** add new Firebase phone verification methods ([#2157](https://github.com/ionic-team/ionic-native/issues/2157)) ([86181af](https://github.com/ionic-team/ionic-native/commit/86181af))
* **GooglePlayGamesServices:** add plugin ([#1904](https://github.com/ionic-team/ionic-native/issues/1904)) ([03f5789](https://github.com/ionic-team/ionic-native/commit/03f5789))
* **network-interface:** add plugin support ([#2063](https://github.com/ionic-team/ionic-native/issues/2063)) ([86b2a2c](https://github.com/ionic-team/ionic-native/commit/86b2a2c))
* **nfc:** add interfaces and missing references to UriHelper and TextHelper ([#2104](https://github.com/ionic-team/ionic-native/issues/2104)) ([8b78644](https://github.com/ionic-team/ionic-native/commit/8b78644))
* **nfc:** add support for iOS ([#2050](https://github.com/ionic-team/ionic-native/issues/2050)) ([9f72592](https://github.com/ionic-team/ionic-native/commit/9f72592))
* **push:** add support for version 2.1.0 ([#2064](https://github.com/ionic-team/ionic-native/issues/2064)) ([c1ce5da](https://github.com/ionic-team/ionic-native/commit/c1ce5da))
* **zeroconf:** add reInit() method ([#2144](https://github.com/ionic-team/ionic-native/issues/2144)) ([7255795](https://github.com/ionic-team/ionic-native/commit/7255795))
<a name="4.4.2"></a>
## [4.4.2](https://github.com/ionic-team/ionic-native/compare/v4.4.1...v4.4.2) (2017-11-15)
<a name="4.4.1"></a>
## [4.4.1](https://github.com/ionic-team/ionic-native/compare/v4.4.0...v4.4.1) (2017-11-13)
<a name="4.4.0"></a>
# [4.4.0](https://github.com/ionic-team/ionic-native/compare/v4.3.3...v4.4.0) (2017-11-09)
### Features
* **google-maps:** accept own properties for `addMarker()` and others ([#2093](https://github.com/ionic-team/ionic-native/issues/2093)) ([196be02](https://github.com/ionic-team/ionic-native/commit/196be02))
* **http:** add support for new methods ([#2054](https://github.com/ionic-team/ionic-native/issues/2054)) ([d96d3ee](https://github.com/ionic-team/ionic-native/commit/d96d3ee))
<a name="4.3.3"></a>
## [4.3.3](https://github.com/ionic-team/ionic-native/compare/v4.3.2...v4.3.3) (2017-11-01)
### Bug Fixes
* **google-maps:** HtmlInfoWindow should extend BaseClass [#2034](https://github.com/ionic-team/ionic-native/issues/2034) ([#2035](https://github.com/ionic-team/ionic-native/issues/2035)) ([ce6e412](https://github.com/ionic-team/ionic-native/commit/ce6e412))
<a name="4.3.2"></a>
## [4.3.2](https://github.com/ionic-team/ionic-native/compare/4.3.2...v4.3.2) (2017-10-18)
<a name="4.3.2"></a>
## [4.3.2](https://github.com/ionic-team/ionic-native/compare/4.3.1...4.3.2) (2017-10-17)
### Bug Fixes
* **google-maps:** remove type from GoogleMapsEvent constant ([4639bf9](https://github.com/ionic-team/ionic-native/commit/4639bf9))
### Features
* **pro:** support corova-plugin-ionic v2.0.0 ([975f08b](https://github.com/ionic-team/ionic-native/commit/975f08b))
<a name="4.3.1"></a>
## [4.3.1](https://github.com/ionic-team/ionic-native/compare/v4.3.0...4.3.1) (2017-10-06)
### Bug Fixes
* **BLE:** make readRSSI() not static ([#2011](https://github.com/ionic-team/ionic-native/issues/2011)) ([363b41e](https://github.com/ionic-team/ionic-native/commit/363b41e))
* **google-maps:** various fixed introduced in previous release ([#2024](https://github.com/ionic-team/ionic-native/issues/2024)) ([6ca5bea](https://github.com/ionic-team/ionic-native/commit/6ca5bea))
* **onesignal:** fix property name ([#2019](https://github.com/ionic-team/ionic-native/issues/2019)) ([30ed33a](https://github.com/ionic-team/ionic-native/commit/30ed33a))
### Features
* **pro:** Add support for Ionic Pro by incorporating cordova-plugin-ionic ([465d551](https://github.com/ionic-team/ionic-native/commit/465d551))
* **regula-document-reader:** separate initialization and scanning, add android ([#2013](https://github.com/ionic-team/ionic-native/issues/2013)) ([2179699](https://github.com/ionic-team/ionic-native/commit/2179699))
<a name="4.3.0"></a>
# [4.3.0](https://github.com/ionic-team/ionic-native/compare/v4.2.1...v4.3.0) (2017-09-27)
### Bug Fixes
* **google-maps:** convert JS classes to Ionic Native ([#1956](https://github.com/ionic-team/ionic-native/issues/1956)) ([57af5c5](https://github.com/ionic-team/ionic-native/commit/57af5c5))
* **google-maps:** fix icons property of MarkerClusterOptions ([#1937](https://github.com/ionic-team/ionic-native/issues/1937)) ([8004790](https://github.com/ionic-team/ionic-native/commit/8004790))
* **google-maps:** the zoom option is missing in the GoogleMapOptions class ([#1948](https://github.com/ionic-team/ionic-native/issues/1948)) ([ef898ef](https://github.com/ionic-team/ionic-native/commit/ef898ef))
* **http:** fix plugin ref ([#1934](https://github.com/ionic-team/ionic-native/issues/1934)) ([3a1034e](https://github.com/ionic-team/ionic-native/commit/3a1034e))
* **launch-navigator:** fix navigate method ([#1940](https://github.com/ionic-team/ionic-native/issues/1940)) ([a150d4d](https://github.com/ionic-team/ionic-native/commit/a150d4d))
* **stripe:** fix stripe create card token ([#2002](https://github.com/ionic-team/ionic-native/issues/2002)) ([5b15bb9](https://github.com/ionic-team/ionic-native/commit/5b15bb9))
* **zeroconf:** extend the ZeroconfResult.action definition ([#1985](https://github.com/ionic-team/ionic-native/issues/1985)) ([e2f3702](https://github.com/ionic-team/ionic-native/commit/e2f3702))
### Features
* **android-full-screen:** add support for setSystemUiVisiblity ([#1942](https://github.com/ionic-team/ionic-native/issues/1942)) ([4246d47](https://github.com/ionic-team/ionic-native/commit/4246d47))
* **document-reader:** add cordova-plugin-documentreader ([#1996](https://github.com/ionic-team/ionic-native/issues/1996)) ([7b94d4f](https://github.com/ionic-team/ionic-native/commit/7b94d4f))
* **extended-device-information:** add Extended Device Info plugin ([#1980](https://github.com/ionic-team/ionic-native/issues/1980)) ([806766e](https://github.com/ionic-team/ionic-native/commit/806766e))
* **music-controls:** add support for next/prev track and skip forward/backward in control center ([#1927](https://github.com/ionic-team/ionic-native/issues/1927)) ([fff9969](https://github.com/ionic-team/ionic-native/commit/fff9969))
* **push:** update PushOptions interfaces to match new version ([#1908](https://github.com/ionic-team/ionic-native/issues/1908)) ([34bf136](https://github.com/ionic-team/ionic-native/commit/34bf136))
* **qr-scanner:** added destroy method ([#1916](https://github.com/ionic-team/ionic-native/issues/1916)) ([#1971](https://github.com/ionic-team/ionic-native/issues/1971)) ([10eb3ee](https://github.com/ionic-team/ionic-native/commit/10eb3ee))
* **uid:** add UID plugin ([#1946](https://github.com/ionic-team/ionic-native/issues/1946)) ([e2419a2](https://github.com/ionic-team/ionic-native/commit/e2419a2))
### BREAKING CHANGES
* **push:** this wrapper will work only with `phonegap-plugin-push@2.0.0`
<a name="4.2.1"></a>
## [4.2.1](https://github.com/ionic-team/ionic-native/compare/v4.2.0...v4.2.1) (2017-08-29)
### Bug Fixes
* **google-maps:** fix issue when creating new instance of BaseArrayClass ([#1931](https://github.com/ionic-team/ionic-native/issues/1931)) ([957396b](https://github.com/ionic-team/ionic-native/commit/957396b))
<a name="4.2.0"></a>
# [4.2.0](https://github.com/ionic-team/ionic-native/compare/v4.1.0...v4.2.0) (2017-08-26)
### Bug Fixes
* **fingerprint-aio:** add missing FingerprintOptions properties ([#1845](https://github.com/ionic-team/ionic-native/issues/1845)) ([85825c7](https://github.com/ionic-team/ionic-native/commit/85825c7))
* **geofence:** remove duplicate onTransitionReceived method ([00c0707](https://github.com/ionic-team/ionic-native/commit/00c0707))
* **google-maps:** add missing debug option ([#1832](https://github.com/ionic-team/ionic-native/issues/1832)) ([39ec515](https://github.com/ionic-team/ionic-native/commit/39ec515))
* **ms-adal:** make userId optional ([#1894](https://github.com/ionic-team/ionic-native/issues/1894)) ([21045ea](https://github.com/ionic-team/ionic-native/commit/21045ea))
* **native-geocoder:** update NativeGeocoderReverse result ([#1840](https://github.com/ionic-team/ionic-native/issues/1840)) ([7c1b409](https://github.com/ionic-team/ionic-native/commit/7c1b409))
* **native-spinner:** update pluginRef ([#1859](https://github.com/ionic-team/ionic-native/issues/1859)) ([262e18f](https://github.com/ionic-team/ionic-native/commit/262e18f))
* **serial:** add missing options for the open method ([#1844](https://github.com/ionic-team/ionic-native/issues/1844)) ([1acade4](https://github.com/ionic-team/ionic-native/commit/1acade4))
* **sqlite:** add optional key parameter to SQLiteDatabaseConfig to support sqlcipher-adapter ([#1917](https://github.com/ionic-team/ionic-native/issues/1917)) ([0c097ba](https://github.com/ionic-team/ionic-native/commit/0c097ba))
### Features
* **google-maps:** update plugin and fix a few issues ([#1834](https://github.com/ionic-team/ionic-native/issues/1834)) ([c11aec3](https://github.com/ionic-team/ionic-native/commit/c11aec3))
* **http:** use a different plugin source with better features ([#1921](https://github.com/ionic-team/ionic-native/issues/1921)) ([a2d3396](https://github.com/ionic-team/ionic-native/commit/a2d3396))
* **keychain-touch-id:** add KeychainTouchId plugin ([#1837](https://github.com/ionic-team/ionic-native/issues/1837)) ([a2cc187](https://github.com/ionic-team/ionic-native/commit/a2cc187))
* **local-notifications:** add `un` method to unsubscribe from events ([#1871](https://github.com/ionic-team/ionic-native/issues/1871)) ([ce5966b](https://github.com/ionic-team/ionic-native/commit/ce5966b))
* **paypal:** add payeeEmail for third party merchants ([#1864](https://github.com/ionic-team/ionic-native/issues/1864)) ([cde87e2](https://github.com/ionic-team/ionic-native/commit/cde87e2))
* **push:** add Browser Push notification support ([#1848](https://github.com/ionic-team/ionic-native/issues/1848)) ([aa4c3b3](https://github.com/ionic-team/ionic-native/commit/aa4c3b3))
<a name="4.1.0"></a>
# [4.1.0](https://github.com/ionic-team/ionic-native/compare/v4.0.1...v4.1.0) (2017-07-21)
### Bug Fixes
* **media:** add setRate method ([4af3d5b](https://github.com/ionic-team/ionic-native/commit/4af3d5b)), closes [#1825](https://github.com/ionic-team/ionic-native/issues/1825)
### Features
* **firebase:** add unregister method ([#1823](https://github.com/ionic-team/ionic-native/issues/1823)) ([6230958](https://github.com/ionic-team/ionic-native/commit/6230958))
* **google-maps:** add missing features and fix wrong definitions ([#1815](https://github.com/ionic-team/ionic-native/issues/1815)) ([976401a](https://github.com/ionic-team/ionic-native/commit/976401a))
* **hyper-track:** add HyperTrack plugin ([#1816](https://github.com/ionic-team/ionic-native/issues/1816)) ([47fa44c](https://github.com/ionic-team/ionic-native/commit/47fa44c))
* **open-native-settings:** add Open Native Settings plugin ([0fa82e5](https://github.com/ionic-team/ionic-native/commit/0fa82e5)), closes [#1821](https://github.com/ionic-team/ionic-native/issues/1821)
<a name="4.0.1"></a>
## [4.0.1](https://github.com/ionic-team/ionic-native/compare/v4.0.0...v4.0.1) (2017-07-15)
@@ -1702,13 +1898,13 @@ The whole implementation has changed now. You must update your code.
* **geolocation:** call correct clearFunction ([9e86a40](https://github.com/ionic-team/ionic-native/commit/9e86a40))
* **plugin:** return originalMethod return value ([240f0f8](https://github.com/ionic-team/ionic-native/commit/240f0f8))
* **plugin:** use call for id based clearFunction ([c2fdf39](https://github.com/ionic-team/ionic-native/commit/c2fdf39))
* datepicker plugin, pluginref, and [@Cordova](https://github.com/Cordova) wrapper ([499ead3](https://github.com/ionic-team/ionic-native/commit/499ead3))
* datepicker plugin, pluginref, and @Cordova wrapper ([499ead3](https://github.com/ionic-team/ionic-native/commit/499ead3))
### Features
* **DatePicker:** Added DatePicker ([5afa58f](https://github.com/ionic-team/ionic-native/commit/5afa58f))
* **plugin:** add sync option to [@Cordova](https://github.com/Cordova) for sync functions ([17e3827](https://github.com/ionic-team/ionic-native/commit/17e3827))
* **plugin:** add sync option to @Cordova for sync functions ([17e3827](https://github.com/ionic-team/ionic-native/commit/17e3827))
* **plugin:** call clearFunction with original fn args ([8f27fc9](https://github.com/ionic-team/ionic-native/commit/8f27fc9))
* add app version plugin ([20cb01f](https://github.com/ionic-team/ionic-native/commit/20cb01f))
* add app version plugin ([8b78521](https://github.com/ionic-team/ionic-native/commit/8b78521))

View File

@@ -209,4 +209,13 @@ Example:
someMethod(): Promise<any> {
// anything here will only run if the plugin is available
}
```
#### CordovaFunctionOverride
Wrap a stub function in a call to a Cordova plugin, checking if both Cordova and the required plugin are installed.
Example:
```ts
@CordovaFunctionOverride()
someMethod(): Observable<any> { return; }
```

View File

@@ -52,38 +52,28 @@ import { NgZone } from '@angular/core';
@Component({ ... })
export class MyComponent {
constructor(private geolocation: Geolocation, private platform: Platform, private ngZone: NgZone) {
constructor(private geolocation: Geolocation, private platform: Platform) {
platform.ready().then(() => {
// get position
geolocation.getCurrentPosition().then(pos => {
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
});
// watch position
const watch = geolocation.watchPosition().subscribe(pos => {
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
// Currently, observables from Ionic Native plugins
// need to run inside of zone to trigger change detection
ngZone.run(() => {
this.position = pos;
})
this.position = pos;
});
// to stop watching
watch.unsubscribe();
});
}
}
```

4890
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,21 @@
{
"name": "ionic-native",
"version": "4.0.1",
"version": "4.5.0",
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
"homepage": "https://ionicframework.com/",
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
"license": "MIT",
"devDependencies": {
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/compiler": "4.4.4",
"@angular/compiler-cli": "4.4.4",
"@angular/core": "4.4.4",
"@types/cordova": "0.0.34",
"@types/jasmine": "^2.5.51",
"@types/node": "^7.0.27",
"@types/jasmine": "^2.6.3",
"@types/node": "^8.0.50",
"canonical-path": "0.0.2",
"child-process-promise": "2.2.1",
"conventional-changelog-cli": "1.3.1",
"cpr": "2.0.2",
"conventional-changelog-cli": "1.3.4",
"cpr": "2.0.0",
"cz-conventional-changelog": "2.0.0",
"decamelize": "1.2.0",
"dgeni": "0.4.7",
@@ -39,12 +39,12 @@
"q": "1.5.0",
"queue": "4.2.1",
"rimraf": "2.6.1",
"rxjs": "5.4.0",
"rxjs": "5.5.2",
"semver": "5.3.0",
"tslint": "3.15.1",
"tslint-ionic-rules": "0.0.8",
"typescript": "2.3.3",
"zone.js": "0.8.12"
"typescript": "~2.4.2",
"zone.js": "0.8.18"
},
"scripts": {
"start": "npm run test:watch",

View File

@@ -19,7 +19,7 @@ const ROOT = path.resolve(path.join(__dirname, '../../')), // root ionic-native
// dependency versions
const ANGULAR_VERSION = '*',
RXJS_VERSION = '^5.0.1',
MIN_CORE_VERSION = '^3.6.0 || >=4.0.0',
MIN_CORE_VERSION = '^4.2.0',
IONIC_NATIVE_VERSION = require(path.resolve(ROOT, 'package.json')).version;
// package dependencies

View File

@@ -41,7 +41,7 @@ module.exports = currentVersion => {
docTypes: ['class'],
getOutputPath: doc => doc.originalModule.replace(config.pluginDir + '/', '')
.replace('/plugins', '')
.replace('/index', '/README.md')
.replace(/\/index$/, '/README.md')
}];
})

View File

@@ -22,6 +22,10 @@ module.exports = function jekyll(renderDocsProcessor) {
doc.URL = doc.outputPath.replace('docs//', 'docs/')
.replace('/index.md', '')
.replace('content/', '');
// add trailing slash to plugin pages
if(!doc.URL.endsWith("/") && !doc.URL.endsWith(".html")) {
doc.URL = doc.URL+'/';
}
});
const betaDocs = [];

View File

@@ -1,9 +1,23 @@
import { Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* This is a template for new plugin wrappers
*
* TODO:
* - Add/Change information below
* - Document usage (importing, executing main functionality)
* - Remove any imports that you are not using
* - Add this file to /src/index.ts (follow style of other plugins)
* - Remove all the comments included in this template, EXCEPT the @Plugin wrapper docs and any other docs you added
* - Remove this note
*
*/
import { Injectable } from '@angular/core';
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* @name {{ Plugin_Name }}
* @description
* This plugin does something
*
* @usage
* ```typescript
@@ -15,16 +29,33 @@ import { Injectable } from '@angular/core';
* ...
*
*
* this.{{ pluginName }}.functionName('Hello', 123)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: '{{ PluginName }}',
plugin: '',
pluginRef: '',
repo: '',
platforms: []
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
install: '', // OPTIONAL install command, in case the plugin requires variables
installVariables: [], // OPTIONAL the plugin requires variables
platforms: [] // Array of platforms supported, example: ['Android', 'iOS']
})
@Injectable()
export class {{ PluginName }} extends IonicNativePlugin {
/**
* This function does something
* @param arg1 {string} Some param to configure something
* @param arg2 {number} Another param to configure something
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
functionName(arg1: string, arg2: number): Promise<any> {
return; // We add return; here to avoid any IDE / Compiler errors
}
}

View File

@@ -40,8 +40,9 @@ import { Observable } from 'rxjs/Observable';
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
platforms: [], // Array of platforms supported, example: ['Android', 'iOS']
install: '', // OPTIONAL install command, in case the plugin requires variables
installVariables: [], // OPTIONAL the plugin requires variables
platforms: [] // Array of platforms supported, example: ['Android', 'iOS']
})
@Injectable()
export class {{ PluginName }} extends IonicNativePlugin {

View File

@@ -2,6 +2,7 @@ import 'core-js';
import { Plugin, Cordova, CordovaProperty, CordovaCheck, CordovaInstance, InstanceProperty } from './decorators';
import { IonicNativePlugin } from './ionic-native-plugin';
import { ERR_CORDOVA_NOT_AVAILABLE, ERR_PLUGIN_NOT_INSTALLED } from './plugin';
import { Observable } from 'rxjs/Observable';
declare const window: any;
@@ -47,6 +48,17 @@ class TestPlugin extends IonicNativePlugin {
return new TestObject(TestPlugin.getPlugin().create());
}
@Cordova({
destruct: true
})
destructPromise(): Promise<any> { return; }
@Cordova({
destruct: true,
observable: true
})
destructObservable(): Observable<any> { return; }
}
function definePlugin() {
@@ -59,7 +71,9 @@ function definePlugin() {
this.ping = (success: Function, error: Function) => success('pong');
this.name = 'John Smith';
return this;
}
},
destructPromise: (success: Function) => success('hello', 'world'),
destructObservable: (success: Function) => success('hello', 'world')
};
}
@@ -177,6 +191,30 @@ describe('Regular Decorators', () => {
});
describe('CordovaOptions', () => {
describe('destruct', () => {
it('should destruct values returned by a Promise', (done) => {
plugin.destructPromise()
.then((args: any[]) => {
expect(args).toEqual(['hello', 'world']);
done();
});
});
it('should destruct values returned by an Observable', (done) => {
plugin.destructObservable()
.subscribe((args: any[]) => {
expect(args).toEqual(['hello', 'world']);
done();
});
});
});
});
});
describe('Instance Decorators', () => {

View File

@@ -37,6 +37,7 @@ export interface PluginConfig {
}
export interface CordovaOptions {
destruct?: boolean;
/**
* Set to true if the wrapped method is a sync function
*/
@@ -104,17 +105,6 @@ export interface CordovaCheckOptions {
observable?: boolean;
}
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
*/
@@ -166,7 +156,6 @@ export function CordovaCheck(opts: CordovaCheckOptions = {}) {
};
}
/**
* @private
*
@@ -252,7 +241,7 @@ export function Cordova(opts: CordovaOptions = {}) {
*
* Wrap an instance method
*/
export function CordovaInstance(opts: any = {}) {
export function CordovaInstance(opts: CordovaOptions = {}) {
return (target: Object, methodName: string) => {
return {
value: function(...args: any[]) {
@@ -322,39 +311,3 @@ export function CordovaFunctionOverride(opts: 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();
};
});
},
enumerable: true
};
};
}

View File

@@ -136,7 +136,11 @@ function callCordovaPlugin(pluginObj: any, methodName: string, args: any[], opts
function wrapPromise(pluginObj: any, methodName: string, args: any[], opts: any = {}) {
let pluginResult: any, rej: Function;
const p = getPromise((resolve: Function, reject: Function) => {
pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, resolve, reject);
if (opts.destruct) {
pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, (...args: any[]) => resolve(args), (...args: any[]) => reject(args));
} else {
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
@@ -166,7 +170,14 @@ function wrapOtherPromise(pluginObj: any, methodName: string, args: any[], opts:
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));
let pluginResult;
if (opts.destruct) {
pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, (...args: any[]) => observer.next(args), (...args: any[]) => observer.error(args));
} else {
pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer));
}
if (pluginResult && pluginResult.error) {
observer.error(pluginResult.error);
observer.complete();
@@ -266,7 +277,14 @@ export function wrapInstance(pluginObj: any, methodName: string, opts: any = {})
} else if (opts.observable) {
return new Observable(observer => {
let pluginResult = callInstance(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer));
let pluginResult;
if (opts.destruct) {
pluginResult = callInstance(pluginObj, methodName, args, opts, (...args: any[]) => observer.next(args), (...args: any[]) => observer.error(args));
} else {
pluginResult = callInstance(pluginObj, methodName, args, opts, observer.next.bind(observer), observer.error.bind(observer));
}
if (pluginResult && pluginResult.error) {
observer.error(pluginResult.error);
@@ -287,9 +305,13 @@ export function wrapInstance(pluginObj: any, methodName: string, opts: any = {})
});
} else if (opts.otherPromise) {
return getPromise((resolve: Function, reject: Function) => {
let result = callInstance(pluginObj, methodName, args, opts, resolve, reject);
let result;
if (opts.destruct) {
result = callInstance(pluginObj, methodName, args, opts, (...args: any[]) => resolve(args), (...args: any[]) => reject(args));
} else {
result = callInstance(pluginObj, methodName, args, opts, resolve, reject);
}
if (result && !!result.then) {
result.then(resolve, reject);
} else {
@@ -298,8 +320,24 @@ export function wrapInstance(pluginObj: any, methodName: string, opts: any = {})
});
} else {
let pluginResult: any, rej: Function;
const p = getPromise((resolve: Function, reject: Function) => {
if (opts.destruct) {
pluginResult = callInstance(pluginObj, methodName, args, opts, (...args: any[]) => resolve(args), (...args: any[]) => reject(args));
} else {
pluginResult = callInstance(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(() => { });
typeof rej === 'function' && rej(pluginResult.error);
}
return p;
return getPromise((resolve: Function, reject: Function) => callInstance(pluginObj, methodName, args, opts, resolve, reject));
}
};

View File

@@ -101,17 +101,17 @@ export interface AlipayOrder {
plugin: 'cordova-alipay-base',
pluginRef: 'Alipay.Base',
repo: 'https://github.com/xueron/cordova-alipay-base',
install: 'ionic cordova plugin add cordova-alipay-base --variable APP_ID=your_app_id',
installVariables: ['APP_ID'],
install: 'ionic cordova plugin add cordova-alipay-base --variable ALI_PID=your_app_id',
installVariables: ['ALI_PID'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Alipay extends IonicNativePlugin {
/**
* Open Alipay to perform App pay
* @param order { AlipayOrder } alipay options
* @param order { AlipayOrder | string } 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; }
pay(order: AlipayOrder | string): Promise<any> { return; }
}

View File

@@ -0,0 +1,273 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export type AndroidExoPlayerAspectRatio = 'FILL_SCREEN' | 'FIT_SCREEN';
export interface AndroidExoPlayerParams {
/**
* Url of the video to play.
*/
url: string;
/**
* Set the user agent. Default is `ExoPlayerPlugin`
*/
userAgent?: string;
/**
* Set the player aspect ratio.
*/
aspectRatio?: AndroidExoPlayerAspectRatio;
/**
* Hide controls after this many milliseconds, default is `5000`.
*/
hideTimeout?: number;
/**
* When set to false stream will not automatically start.
*/
autoPlay?: boolean;
/**
* Start playback at this many milliseconds into video, default is `0`.
*/
seekTo?: number;
/**
* Amount of time in milliseconds to use when skipping forward, default is `1000`.
*/
forwardTime?: number;
/**
* Amount of time in milliseconds to use when skipping backward, default is `1000`.
*/
rewindTime?: number;
/**
* Only play audio in the backgroud, default is `false`.
* If you pass in `audioOnly: true`, make sure to manually close the player on some event (like escape button) since the plugin won't be detecting keypresses when playing audio in the background.
*/
audioOnly?: true;
/**
* Optional subtitle url to display over the video.
* We currently support .srt and .vtt subtitle formats. Subtitles are not supported on all stream types, as ExoPlayer has requirement that both video and subtitle "must have the same number of periods, and must not have any dynamic windows", which means for simple mp4s it should work, but on more complex HLS/Dash setups it might not.
*/
subtitleUrl?: string;
/**
* okhttp connect timeout in milliseconds (default is `0`)
*/
connectTimeout?: number;
/**
* okhttp read timeout in milliseconds (default is `0`)
*/
readTimeout?: number;
/**
* okhttp write timeout in milliseconds (default is `0`)
*/
writeTimeout?: number;
/**
* okhttp socket ping interval in milliseconds (default is `0` or disabled)
*/
pingInterval?: number;
/**
* Number of times datasource will retry the stream before giving up (default is `3`)
*/
retryCount?: number;
/**
* If this object is not present controller will not be visible.
*/
controller?: AndroidExoPlayerControllerConfig;
}
export interface AndroidExoplayerState {
[s: string]: string;
}
export interface AndroidExoPlayerControllerConfig {
/**
* Image in the controller.
*/
streamImage: string;
/**
*
*/
streamTitle: string;
/**
*
*/
streamDescription: string;
/**
* Hide entire progress bar.
*/
hideProgress?: true;
/**
* If progress bar is visible hide current position from it
*/
hidePosition: false;
/**
* If progress bar is visible Hide stream duration from it
*/
hideDuration: false;
/**
* Override the player control button icons.
*/
controlIcons?: {
/**
* Rewind button icon.
*/
exo_rew: string;
/**
* Play button icon.
*/
exo_play: string;
/**
* Payse button icon.
*/
exo_pause: string;
/**
* Fast forward button icon.
*/
exo_ffwd: string;
};
}
/**
* @name Android ExoPlayer
* @description
* Cordova media player plugin using Google's ExoPlayer framework.
*
* https://github.com/google/ExoPlayer
*
* @usage
* ```typescript
* import { AndroidExoPlayer } from '@ionic-native/android-exoplayer';
*
* constructor(private androidExoPlayer: AndroidExoPlayer) { }
*
* ...
*
* this.androidExoPlayer.show({url: 'http://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube'});
*
* ```
*
* @interfaces
* AndroidExoPlayerParams
* AndroidExoplayerState
* AndroidExoPlayerControllerConfig
*/
@Plugin({
pluginName: 'AndroidExoPlayer',
plugin: 'cordova-plugin-exoplayer',
pluginRef: 'ExoPlayer',
repo: 'https://github.com/frontyard/cordova-plugin-exoplayer',
platforms: ['Android']
})
@Injectable()
export class AndroidExoplayer extends IonicNativePlugin {
/**
* Show the player.
* @param parameters {AndroidExoPlayerParams} Parameters
* @return {Observable<AndroidExoplayerState>}
*/
@Cordova({
observable: true,
clearFunction: 'close',
clearWithArgs: false,
successIndex: 1,
errorIndex: 2
})
show(parameters: AndroidExoPlayerParams): Observable<AndroidExoplayerState> { return; }
/**
* Switch stream without disposing of the player.
* @param url {string} The url of the new stream.
* @param controller {AndroidExoPlayerControllerConfig} Configuration of the controller.
* @return {Promise<void>}
*/
@Cordova()
setStream(url: string, controller: AndroidExoPlayerControllerConfig): Promise<void> { return; }
/**
* Will pause if playing and play if paused
* @return {Promise<void>}
*/
@Cordova()
playPause(): Promise<void> { return; }
/**
* Stop playing.
* @return {Promise<void>}
*/
@Cordova()
stop(): Promise<void> { return; }
/**
* Jump to a particular position.
* @param milliseconds {number} Position in stream in milliseconds
* @return {Promise<void>}
*/
@Cordova()
seekTo(milliseconds: number): Promise<void> { return; }
/**
* Jump to a particular time relative to the current position.
* @param milliseconds {number} Time in milliseconds
* @return {Promise<void>}
*/
@Cordova()
seekBy(milliseconds: number): Promise<void> { return; }
/**
* Get the current player state.
* @return {Promise<AndroidExoplayerState>}
*/
@Cordova()
getState(): Promise<AndroidExoplayerState> { return; }
/**
* Show the controller.
* @return {Promise<void>}
*/
@Cordova()
showController(): Promise<void> { return; }
/**
* Hide the controller.
* @return {Promise<void>}
*/
@Cordova()
hideController(): Promise<void> { return; }
/**
* Update the controller configuration.
* @param controller {AndroidExoPlayerControllerConfig} Configuration of the controller.
* @return {Promise<void>}
*/
@Cordova()
setController(controller: AndroidExoPlayerControllerConfig): Promise<void> { return; }
/**
* Close and dispose of player, call before destroy.
* @return {Promise<void>}
*/
@Cordova()
close(): Promise<void> { return; }
}

View File

@@ -1,6 +1,35 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* Bit flag values for setSystemUiVisibility()
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
*/
export enum AndroidSystemUiFlags {
/** View has requested the system UI (status bar) to be visible (the default). SYSTEM_UI_FLAG_VISIBLE */
Visible = 0,
/** View has requested the system UI to enter an unobtrusive "low profile" mode. SYSTEM_UI_FLAG_LOW_PROFILE */
LowProfile = 1,
/** View has requested that the system navigation be temporarily hidden. SYSTEM_UI_FLAG_HIDE_NAVIGATION */
HideNavigation = 2,
/** View has requested to go into the normal fullscreen mode so that its content can take over the screen while still allowing the user to interact with the application. SYSTEM_UI_FLAG_FULLSCREEN */
Fullscreen = 4,
/** Requests the navigation bar to draw in a mode that is compatible with light navigation bar backgrounds. SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR */
LightNavigationBar = 16,
/** When using other layout flags, we would like a stable view of the content insets given to fitSystemWindows(Rect). SYSTEM_UI_FLAG_LAYOUT_STABLE */
LayoutStable = 256,
/** View would like its window to be laid out as if it has requested SYSTEM_UI_FLAG_HIDE_NAVIGATION, even if it currently hasn't. SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION */
LayoutHideNavigation = 512,
/** View would like its window to be laid out as if it has requested SYSTEM_UI_FLAG_FULLSCREEN, even if it currently hasn't. SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN */
LayoutFullscreen = 1024,
/** View would like to remain interactive when hiding the navigation bar with SYSTEM_UI_FLAG_HIDE_NAVIGATION. SYSTEM_UI_FLAG_IMMERSIVE */
Immersive = 2048,
/** View would like to remain interactive when hiding the status bar with SYSTEM_UI_FLAG_FULLSCREEN and/or hiding the navigation bar with SYSTEM_UI_FLAG_HIDE_NAVIGATION. SYSTEM_UI_FLAG_IMMERSIVE_STICKY */
ImmersiveSticky = 4096,
/** Requests the status bar to draw in a mode that is compatible with light status bar backgrounds. SYSTEM_UI_FLAG_LIGHT_STATUS_BAR */
LightStatusBar = 8192
}
/**
* @name Android Full Screen
* @description
@@ -92,4 +121,13 @@ export class AndroidFullScreen extends IonicNativePlugin {
*/
@Cordova()
immersiveMode(): Promise<void> { return; }
/**
* Manually set the the system UI to a custom mode. This mirrors the Android method of the same name. (Android 4.4+ only).
* @see https://developer.android.com/reference/android/view/View.html#setSystemUiVisibility(int)
* @param {AndroidSystemUiFlags} visibility Bitwise-OR of flags in AndroidSystemUiFlags
* @return {Promise<void>}
*/
@Cordova()
setSystemUiVisibility(visibility: AndroidSystemUiFlags): Promise<void> { return; }
}

View File

@@ -18,13 +18,15 @@ import { Injectable } from '@angular/core';
* ...
*
* this.androidPermissions.checkPermission(this.androidPermissions.PERMISSION.CAMERA).then(
* success => console.log('Permission granted'),
* err => this.androidPermissions.requestPermissions(this.androidPermissions.PERMISSION.CAMERA)
* result => console.log('Has permission?',result.hasPermission),
* err => this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.CAMERA)
* );
*
* this.androidPermissions.requestPermissions([this.androidPermissions.PERMISSION.CAMERA, this.androidPermissions.PERMISSION.GET_ACCOUNTS]);
*
* ```
*
* Android 26 and above: due to Android 26's changes to permissions handling (permissions are requested at time of use rather than at runtime,) if your app does not include any functions (eg. other Ionic Native plugins) that utilize a particular permission, then `requestPermission()` and `requestPermissions()` will resolve immediately with no prompt shown to the user. Thus, you must include a function utilizing the feature you would like to use before requesting permission for it.
*/
@Plugin({
pluginName: 'AndroidPermissions',

View File

@@ -23,10 +23,15 @@ export interface AppRatePreferences {
*/
usesUntilPrompt?: number;
/**
* Simple Mode to display the rate dialog directly and bypass negative feedback filtering flow
*/
simpleMode?: boolean;
/**
* leave app or no when application page opened in app store (now supported only for iOS). Defaults to `false`
*/
openStoreInApp?: boolean;
inAppReview?: boolean;
/**
* use custom view for rate dialog. Defaults to `false`

View File

@@ -0,0 +1,327 @@
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {
Plugin,
Cordova,
IonicNativePlugin
} from '@ionic-native/core';
export type IMakePayments = 'This device can make payments and has a supported card' | 'This device cannot make payments.' | 'This device can make payments but has no supported cards';
export type IShippingType = 'shipping' | 'delivery' | 'store' | 'service';
export type IBillingRequirement = 'none' | 'all' | 'postcode' | 'name' | 'email' | 'phone';
export type ITransactionStatus = 'success' | 'failure' | 'invalid-billing-address' | 'invalid-shipping-address' | 'invalid-shipping-contact' | 'require-pin' | 'incorrect-pin' | 'locked-pin';
export type ICompleteTransaction = 'Payment status applied.';
export type IUpdateItemsAndShippingStatus = 'Updated List Info' | 'Did you make a payment request?';
export interface IPaymentResponse {
billingNameFirst?: string;
billingNameMiddle?: string;
billingNameLast?: string;
billingEmailAddress?: string;
billingSupplementarySubLocality?: string;
billingAddressStreet?: string;
billingAddressCity?: string;
billingAddressState?: string;
billingPostalCode?: string;
billingCountry?: string;
billingISOCountryCode?: string;
shippingNameFirst?: string;
shippingNameMiddle?: string;
shippingNameLast?: string;
shippingEmailAddress?: string;
shippingPhoneNumber?: string;
shippingSupplementarySubLocality?: string;
shippingAddressStreet?: string;
shippingAddressCity?: string;
shippingAddressState?: string;
shippingPostalCode?: string;
shippingCountry?: string;
shippingISOCountryCode?: string;
paymentData: string;
transactionIdentifier: string;
paymentMethodDisplayName?: string;
paymentMethodNetwork?: string;
paymentMethodTypeCard?: string;
}
export interface IOrderItem {
label: string;
amount: number;
}
export interface IShippingMethod {
identifier: string;
label: string;
detail: string;
amount: number;
}
export interface IOrderItemsAndShippingMethods {
items: IOrderItem[];
shippingMethods?: IShippingMethod[];
}
export interface IOrder extends IOrderItemsAndShippingMethods {
merchantIdentifier: string;
currencyCode: string;
countryCode: string;
billingAddressRequirement?: IBillingRequirement | IBillingRequirement[];
shippingAddressRequirement?: IBillingRequirement | IBillingRequirement[];
shippingType?: IShippingType;
}
export interface ISelectedShippingContact {
shippingAddressCity: string;
shippingAddressState: string;
shippingPostalCode: string;
shippingISOCountryCode: string;
}
/**
* @name Apple Pay
* @description
* A dependency free Cordova plugin to provide Apple Pay functionality.
*
* @usage
* ```typescript
* import { ApplePay } from '@ionic-native/apple-pay';
*
*
* constructor(private applePay: ApplePay) { }
*
* ...
* async applePay() {
* // This block is optional -- only if you need to update order items/shipping
* // methods in response to shipping method selections
* this.applePay.startListeningForShippingContactSelection()
* .subscribe(async selection => {
* try {
* await this.applePay.updateItemsAndShippingMethods({
* items: getFromSelection(selection),
* shippingMethods: getFromSelection(selection),
* });
* }
* catch {
* // handle update items error
* }
* });
*
* try {
* const applePayTransaction = await this.applePay.makePaymentRequest({
* items,
* shippingMethods,
* merchantIdentifier,
* currencyCode,
* countryCode,
* billingAddressRequirement: ['name', 'email', 'phone'],
* shippingAddressRequirement: 'none',
* shippingType: 'shipping'
* });
*
* const transactionStatus = await completeTransactionWithMerchant(applePayTransaction);
* await this.applePay.completeLastTransaction(transactionStatus);
* } catch {
* // handle payment request error
* // Can also handle stop complete transaction but these should normally not occur
* }
*
* // only if you started listening before
* await this.applePay.stopListeningForShippingContactSelection();
* }
* ```
*/
@Plugin({
pluginName: 'ApplePay',
plugin: 'cordova-plugin-applepay',
pluginRef: 'ApplePay',
repo: 'https://github.com/samkelleher/cordova-plugin-applepay',
platforms: ['iOS'],
})
@Injectable()
export class ApplePay extends IonicNativePlugin {
/**
* Detects if the current device supports Apple Pay and has any capable cards registered.
* @return {Promise<IMakePayments>} Returns a promise
*
* @usage
* try {
* const message = await this.applePay.canMakePayments();
* // Apple Pay is enabled and a supported card is setup. Expect:
* // 'This device can make payments and has a supported card'
* } catch (message) {
* // There is an issue, examine the message to see the details, will be:
* // 'This device cannot make payments.''
* // 'This device can make payments but has no supported cards'
* }
*/
@Cordova({
otherPromise: true
})
canMakePayments(): Promise<IMakePayments> {
return;
}
/**
* Starts listening for shipping contact selection changes
* Any time the user selects shipping contact, this callback will fire.
* You *must* call `updateItemsAndShippingMethods` in response or else the
* user will not be able to process payment.
* @return {Observable<ISelectedShippingContact>} emits with shipping contact information on
* shipping contact selection changes
*/
@Cordova({
observable: true,
clearFunction: 'stopListeningForShippingContactSelection'
})
startListeningForShippingContactSelection(): Observable<ISelectedShippingContact> {
return;
}
/**
* Stops listening for shipping contact selection changes
* @return {Promise} whether stop listening was successful. This should
* really only fail if this is called without starting listening
*/
@Cordova({
otherPromise: true
})
stopListeningForShippingContactSelection(): Promise<boolean> {
return;
}
/**
* Update the list of pay sheet items and shipping methods in response to
* a shipping contact selection event. This *must* be called in response to
* any shipping contact selection event or else the user will not be able
* to complete a transaction on the pay sheet. Do not call without
* subscribing to shipping contact selection events first
* @returns {Promise}
*
* @param {Object} including `items` and `shippingMethods` properties.
*
* @usage
* this.applePay.startListeningForShippingContactSelection().pluck('shippingAddressState').subscribe(shippingAddressState => {
* let shippingMethods;
* if ('AK' === shippingAddressState) {
* shippingMethods = [{
* identifier: 'Alaska',
* label: 'Alaska',
* detail: 'For shipping to Alaska',
* amount: 9.99
* },];
* } else {
* shippingMethods = [{
* identifier: 'Continental',
* label: 'Continental',
* detail: 'For shipping Continentally',
* amount: 5.99
* }];
* }
* this.paySheetItems.shippingCost = {
* label: 'Shipping Cost',
* amount: shippingMethod[0].amount
* };
* this.applePay.updateItemsAndShippingMethods(this.paySheetItems, shippingMethods);
* });
*/
@Cordova({
otherPromise: true
})
updateItemsAndShippingMethods(list: IOrderItemsAndShippingMethods): Promise<IUpdateItemsAndShippingStatus> {
return;
}
/**
* Request a payment with Apple Pay
* @return {Promise<IPaymentResponse>} Returns a promise that resolves when something happens
*
* @param order {IOrder}
*
* @usage
* try {
* const paymentResponse = this.applePay.makePaymentRequest({
* items: [
* {
* label: '3 x Basket Items',
* amount: 49.99
* },
* {
* label: 'Next Day Delivery',
* amount: 3.99
* },
* {
* label: 'My Fashion Company',
* amount: 53.98
* }
* ],
* shippingMethods: [
* {
* identifier: 'NextDay',
* label: 'NextDay',
* detail: 'Arrives tomorrow by 5pm.',
* amount: 3.99
* },
* {
* identifier: 'Standard',
* label: 'Standard',
* detail: 'Arrive by Friday.',
* amount: 4.99
* },
* {
* identifier: 'SaturdayDelivery',
* label: 'Saturday',
* detail: 'Arrive by 5pm this Saturday.',
* amount: 6.99
* }
* ],
* merchantIdentifier: 'merchant.apple.test',
* currencyCode: 'GBP',
* countryCode: 'GB',
* billingAddressRequirement: 'none',
* shippingAddressRequirement: 'none',
* shippingType: 'shipping',
* });
*
* // The user has authorized the payment.
*
* // Handle the token, asynchronously, i.e. pass to your merchant bank to
* // action the payment, then once finished, depending on the outcome:
*
* // Here is an example implementation:
*
* const captureStatus = await MyPaymentProvider.authorizeApplePayToken(paymentResponse.paymentData);
* await this.applePay.completeLastTransaction('success');
* }
* catch (err) {
* if (isPaymentAuthError(err)) {
* this.completeLastTransaction('failure');
* }
* else {
* // Failed to open pay sheet or user canceled payment
* }
* }
*/
@Cordova({
otherPromise: true
})
makePaymentRequest(order: IOrder): Promise<IPaymentResponse> {
return;
}
/**
* Once the makePaymentRequest has been resolved successfully, the device will be waiting for a completion event.
* This means, that the application must proceed with the token authorisation and return a success, failure,
* or other validation error. Once this has been passed back, the Apple Pay sheet will be dismissed via an animation.
* @return {Promise<ICompleteTransaction>} Returns a promise that resolves after confirmation of payment authorization completion
*
* @param complete {ITransactionStatus}
*
*/
@Cordova({
otherPromise: true
})
completeLastTransaction(complete: ITransactionStatus): Promise<ICompleteTransaction> {
return;
}
}

View File

@@ -264,7 +264,7 @@ export interface BackgroundGeolocationConfig {
* 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';
* import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation';
*
* constructor(private backgroundGeolocation: BackgroundGeolocation) { }
*

View File

@@ -19,14 +19,14 @@ export interface BackgroundModeConfiguration {
text?: String;
/**
* This will look for <icon name>.png in platforms/android/res/drawable|mipmap
* This will look for `<icon name>.png` in platforms/android/res/drawable|mipmap
*/
icon?: string;
color?: string;
/**
* By default the app will come to foreground when taping on the notification. If false, plugin wont come to foreground when tapped.
* By default the app will come to foreground when taping on the notification. If false, plugin won't come to foreground when tapped.
*/
resume?: boolean;
@@ -50,7 +50,7 @@ export interface BackgroundModeConfiguration {
* @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
* Requires Cordova plugin: cordova-plugin-background-mode. For more info about plugin, visit: https://github.com/katzer/cordova-plugin-background-mode
*@usage
* ```typescript
* import { BackgroundMode } from '@ionic-native/background-mode';
@@ -179,7 +179,7 @@ export class BackgroundMode extends IonicNativePlugin {
overrideBackButton(): void { }
/**
* Exclude the app from the recent task list works on Android 5.0+.
* Exclude the app from the recent task list. Works on Android 5.0+.
*/
@Cordova({
platforms: ['Android'],

View File

@@ -417,6 +417,33 @@ export class BLE extends IonicNativePlugin {
@Cordova()
isEnabled(): Promise<void> { return; }
/**
* Register to be notified when Bluetooth state changes on the device.
*
* @usage
* ```
* BLE.startStateNotifications().subscribe(state => {
* console.log("Bluetooth is " + state);
* });
* ```
*
* @return Returns an Observable that notifies when the Bluetooth is enabled or disabled on the device.
*/
@Cordova({
observable: true,
clearFunction: 'stopStateNotifications',
clearWithArgs: false
})
startStateNotifications(): Observable<any> { return; }
/**
* Stop state notifications.
*
* @returns {Promise<any>}
*/
@Cordova()
stopStateNotifications(): Promise<any> { return; }
/**
* Open System Bluetooth settings (Android only).
*
@@ -441,7 +468,7 @@ export class BLE extends IonicNativePlugin {
*@returns {Promise<any>}
*/
@Cordova()
static readRSSI(
readRSSI(
deviceId: string,
): Promise<any> { return; }
}

View File

@@ -4,7 +4,7 @@ import { Observable } from 'rxjs/Observable';
/**
* @name Bluetooth Serial
* @description This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino.
* @description This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino (not Android to Android or iOS to iOS).
* @usage
* ```typescript
* import { BluetoothSerial } from '@ionic-native/bluetooth-serial';

View File

@@ -0,0 +1,250 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* Options for the setupApplePay method.
*/
export interface ApplePayOptions {
/**
* Apple Merchant ID - can be obtained from the Apple Developer Portal.
*/
merchantId: string;
/**
* The currency in which to receive payment.
* This is a 3 letter currency code (ISO-4217) - e.g. "GBP", "USD", "MXN", etc.
*/
currency: string;
/**
* The locale in which payment is accepted.
* This is a 2 letter country code (ISO-3166-1) - e.g. "GB", "US", "MX"
*/
country: string;
}
/**
* Options for the presentDropInPaymentUI method.
*/
export interface PaymentUIOptions {
/**
* The amount of the transaction to show in the drop-in UI on the
* summary row as well as the call-to-action button, as a string.
* If not provided, this value will default to "0.00", e.g. free.
* Unless you are simply capturing authorizations, you probably
* want to fill this value in!
*/
amount?: string;
/**
* The description of the transaction to show in the drop-in UI on the summary row.
* Defaults to empty string.
*/
primaryDescription?: string;
}
/**
* Successful callback result for the presentDropInPaymentUI method.
*/
export interface PaymentUIResult {
/**
* Indicates if the user used the cancel button to close the dialog without
* completing the payment.
*/
userCancelled: boolean;
/**
* The nonce returned for the payment transaction (if a payment was completed).
*/
nonce: string;
/**
* The payment type (if a payment was completed) (credit card, check, paypal, etc).
*/
type: string;
/**
* A description of the payment method (if a payment was completed).
*/
localizedDescription: string;
/**
* Information about the credit card used to complete a payment (if a credit card was used).
*/
card: {
/**
* The last two digits of the credit card used.
*/
lastTwo: string;
/**
* An enumerated value used to indicate the type of credit card used.
*
* Can be one of the following values:
*
* BTCardNetworkUnknown
* BTCardNetworkAMEX
* BTCardNetworkDinersClub
* BTCardNetworkDiscover
* BTCardNetworkMasterCard
* BTCardNetworkVisa
* BTCardNetworkJCB
* BTCardNetworkLaser
* BTCardNetworkMaestro
* BTCardNetworkUnionPay
* BTCardNetworkSolo
* BTCardNetworkSwitch
* BTCardNetworkUKMaestro
*/
network: string;
};
/**
* Information about the PayPal account used to complete a payment (if a PayPal account was used).
*/
payPalAccount: {
email: string;
firstName: string;
lastName: string;
phone: string;
billingAddress: string;
shippingAddress: string;
clientMetadataId: string;
payerId: string;
};
/**
* Information about the Apple Pay card used to complete a payment (if Apple Pay was used).
*/
applePaycard: {
};
/**
* Information about 3D Secure card used to complete a payment (if 3D Secure was used).
*/
threeDSecureCard: {
liabilityShifted: boolean;
liabilityShiftPossible: boolean;
};
/**
* Information about Venmo account used to complete a payment (if a Venmo account was used).
*/
venmoAccount: {
username: string;
};
}
/**
* @name Braintree
* @description
* This plugin enables the use of the Braintree Drop-In Payments UI in your Ionic applications on Android and iOS, using the native Drop-In UI for each platform (not the Javascript SDK).
*
* Ionic Native utilizes [a maintaned fork](https://github.com/taracque/cordova-plugin-braintree) of the original `cordova-plugin-braintree`
*
* For information on how to use Apple Pay with this plugin, please refer to the [plugin documentation](https://github.com/Taracque/cordova-plugin-braintree#apple-pay-ios-only)
*
* **NOTE**: This is not a complete payments solution. All of the Braintree client-side UIs simply generate a payment nonce that must then be processed by your server to complete the payment.
* See the [Braintree Node server documentation](https://developers.braintreepayments.com/start/hello-server/node) for details and a [sample Express server](https://github.com/braintree/braintree_express_example) that implements the required functionality.
*
* @usage
* ```typescript
* import { Braintree, ApplePayOptions, PaymentUIOptions } from '@ionic-native/braintree';
*
* constructor(private braintree: Braintree) { }
*
* ...
*
* // Your Braintree `Tokenization Key` from the Braintree dashboard.
* // Alternatively you can also generate this token server-side
* // using a client ID in order to allow users to use stored payment methods.
* // See the [Braintree Client Token documentation](https://developers.braintreepayments.com/reference/request/client-token/generate/node#customer_id) for details.
* const BRAINTREE_TOKEN = '<YOUR_BRAINTREE_TOKEN>';
*
* // NOTE: Do not provide this unless you have configured your Apple Developer account
* // as well as your Braintree merchant account, otherwise the Braintree module will fail.
* const appleOptions: ApplePayOptions = {
* merchantId: '<YOUR MERCHANT ID>',
* currency: 'USD',
* country: 'US'
* };
*
* const paymentOptions: PaymentUIOptions = {
* amount: '14.99',
* primaryDescription: 'Your product or service (per /item, /month, /week, etc)',
* };
*
* this.braintree.initialize(BRAINTREE_TOKEN)
* .then(() => this.braintree.setupApplePay(appleOptions))
* .then(() => this.braintree.presentDropInPaymentUI(paymentOptions))
* .then((result: PaymentUIResult) => {
* if (result.userCancelled) {
* console.log("User cancelled payment dialog.");
* } else {
* console.log("User successfully completed payment!");
* console.log("Payment Nonce: " + result.nonce);
* console.log("Payment Result.", result);
* }
* })
* .catch((error: string) => console.error(error));
*
* ```
*
* @interfaces
* ApplePayOptions
* PaymentUIOptions
* PaymentUIResult
*/
@Plugin({
pluginName: 'Braintree',
plugin: 'cordova-plugin-braintree',
pluginRef: 'BraintreePlugin',
repo: 'https://github.com/taracque/cordova-plugin-braintree',
platforms: ['Android', 'iOS'],
install: 'ionic cordova plugin add https://github.com/taracque/cordova-plugin-braintree',
installVariables: [],
})
@Injectable()
export class Braintree extends IonicNativePlugin {
/**
* Used to initialize the Braintree client. This function must be called before other methods can be used.
* As the initialize code is async, be sure you call all Braintree related methods after the initialize promise has resolved.
*
* @param token {string} The client token or tokenization key to use with the Braintree client.
* @return {Promise<undefined | string>} Returns a promise that resolves with undefined on successful initialization, or rejects with a string message describing the failure.
*/
@Cordova({
platforms: ['Android', 'iOS'],
})
initialize(token: string): Promise<undefined | string> { return; }
/**
* Used to configure Apple Pay on iOS.
* In order for Apple Pay payments to appear on the Drop-In Payments UI, you must initialize the Apple Pay framework before using the Drop-In Payments UI.
*
* Do not turn on Apple Pay in Braintree if you don't have Apple Pay entitlements - the Braintree module will reject the attempt to set up Apple Pay.
* Please refer to the [Braintree Merchant Documentation](https://developers.braintreepayments.com/guides/apple-pay/configuration/ios/v4#apple-pay-certificate-request-and-provisioning) to set up a Merchant Account.
*
* Calling this function on Android is a `noop` so you can call it without having to check which cordova platform you are on! :D
*
* @param options {ApplePayOptions} The options used to configure Apple Pay.
* @return {Promise<undefined | string>} Returns a promise that resolves with undefined on successful initialization, or rejects with a string message describing the failure.
*/
@Cordova({
platforms: ['iOS'],
})
setupApplePay(options: ApplePayOptions): Promise<undefined | string> { return; }
/**
* Shows Braintree's Drop-In Payments UI.
* Apple Pay is only shown in the Drop In UI if you have previously called `setupApplePay`.
*
* @param options {PaymentUIOptions} An optional argument used to configure the payment UI; see type definition for parameters. If not provided, the UI will show "0.00" as the price and an empty description.
* @return {Promise<PaymentUIResult | string>} Returns a promise that resolves with a PaymentUIResult object on successful payment (or the user cancels), or rejects with a string message describing the failure.
*/
@Cordova({
platforms: ['Android', 'iOS'],
})
presentDropInPaymentUI(options?: PaymentUIOptions): Promise<PaymentUIResult | string> { return; }
}

View File

@@ -44,4 +44,14 @@ export class CallNumber extends IonicNativePlugin {
return;
}
/**
* Check if call feature is available
* @return {Promise<any>}
*/
@Cordova({
callbackOrder: 'reverse'
})
isCallSupported(): Promise<any> {
return;
}
}

View File

@@ -36,6 +36,9 @@ export interface CameraPreviewOptions {
/** Alpha channel of the preview box, float, [0,1], default 1 */
alpha?: number;
/** Tap to set specific focus point. Note, this assumes the camera is full-screen. default false */
tapToFocus?: boolean;
}
export interface CameraPreviewPictureOptions {

View File

@@ -133,6 +133,11 @@ export interface CardIOResponse {
* @name Card IO
* @description
* @usage
* Note: For use with iOS 10 + When building your app with the iOS 10 SDK +, you have to add some info to the info.plist file. This is due to increased security in iOS 10. Go to your app directory and search for the <your app name>Info.plist file. Add the following lines in the main <dict> element.
* ```xml
*<key>NSCameraUsageDescription</key>
*<string>To scan credit cards.</string>
*```
* ```typescript
* import { CardIO } from '@ionic-native/card-io';
*
@@ -147,7 +152,7 @@ export interface CardIOResponse {
* if(res){
* let options = {
* requireExpiry: true,
* requireCCV: false,
* requireCVV: false,
* requirePostalCode: false
* };
* CardIO.scan(options);

View File

@@ -32,7 +32,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-clipboard',
pluginRef: 'cordova.plugins.clipboard',
repo: 'https://github.com/ihadeed/cordova-clipboard',
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
platforms: ['Android', 'iOS', 'Windows Phone 8']
})
@Injectable()
export class Clipboard extends IonicNativePlugin {

View File

@@ -10,14 +10,105 @@ import { Injectable } from '@angular/core';
* @usage
* ```typescript
* import { CouchbaseLite } from '@ionic-native/couchbase-lite';
*
* constructor(private couchbase: CouchbaseLite) {
*
* couchbase.getURL()
* .then(url => console.log(url))
* .catch(error => console.error(error));
*
* import { Http } from '@angular/http';
* import { Observable } from 'rxjs/Observable'
* constructor(private couchbase: CouchbaseLite, private platform:Platform,private _http:Http) {
* this.initMethod();
* }
* url:string;
* initMethod() {
* this.couchbase.getURL().then((url)=> {
* this.url = url;
* })
* }
* getUrl() {
* return this.url;
* }
* // DATABASES //
* createDatabase(database_name:string) {
* let url = this.getUrl();
* url = url+database_name;
* return this._http
* .put(url)
* .map(data => { this.results = data['results'] })
* .catch((error:any) => {
* return Observable.throw(error.json() || 'Couchbase Lite error');
* })
* }
* deleteDatabase(database_name:string) {
* let url = this.getUrl();
* url = url+database_name;
* return this._http
* .delete(url)
* .map(data => { this.results = data['results'] })
* .catch((error:any) => {
* return Observable.throw(error.json() || 'Couchbase Lite error');
* })
* }
* getAllDbs() {
* let url = this.getUrl();
* url = url+'_all_dbs';
* return this._http
* .get(url)
* .map(data => { this.results = data['results'] })
* .catch((error:any) => {
* return Observable.throw(error.json() || 'Couchbase Lite error');
* })
* }
* // DOCUMENTS //
* getAllDocuments(database_name:string){
* let url = this.getUrl();
* // include_docs=true will include a doc inside response, it is false by default
* url = url + database_name + '/_all_docs?include_docs=true';
* return this._http
* .get(url)
* .map(data => { this.results = data['results'] })
* .catch((error:any) => {
* return Observable.throw(error.json() || 'Couchbase Lite error');
* }) .
* }
* createDocument(database_name:string,document){
* let url = this.getUrl();
* url = url + database_name;
* return this._http
* .post(url,document)
* .map(data => { this.results = data['results'] })
* .catch((error:any) => {
* return Observable.throw(error.json() || 'Couchbase Lite error');
* }) .
* }
* let document = {
* _id:'You can either specify the document ID (must be string) else couchbase generates one for your doc',
* data:{name:'sandman',age:25,city:pune}
* }
* createDocument('justbe', document);
* // successful response
* { "id": "string","rev": "string","ok": true }
* updateDocument(database_name:string,document){
* let url = this.getUrl();
* url = url + database_name + '/' + document._id;
* return this._http
* .put(url,document)
* .map(data => { this.results = data['results'] })
* .catch((error:any) => {
* return Observable.throw(error.json() || 'Couchbase Lite error');
* }) .
* }
* // for updation of document your document must contain most recent rev(revision) id.
* // for each updation of document new rev id is get generated
* // successful response
* { "id": "string","rev": "string(new revision id)","ok": true }
* deleteDocument(database_name:string,document){
* let url = this.getUrl();
* url = url + database_name + '/' + document._id +'?rev='+doc._rev;
* return this._http
* .delete(url)
* .map(data => { this.results = data['results'] })
* .catch((error:any) => {
* return Observable.throw(error.json() || 'Couchbase Lite error');
* }) .
* }
*
*
* ```
*/

View File

@@ -23,6 +23,13 @@ export interface DeeplinkMatch {
}
export interface DeeplinkOptions {
/**
* Set the matched route as root page using `navCtrl.setRoot()` method.
*/
root: boolean;
}
/**
* @name Deeplinks
* @description This plugin handles deeplinks on iOS and Android for both custom URL scheme links
@@ -116,6 +123,8 @@ export class Deeplinks extends IonicNativePlugin {
* promise result which you can then use to navigate in the app as you see fit.
*
* @param {Object} paths
*
* @param {DeeplinkOptions} options
*
* @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.
@@ -123,6 +132,6 @@ export class Deeplinks extends IonicNativePlugin {
@Cordova({
observable: true
})
routeWithNavController(navController: any, paths: any): Observable<DeeplinkMatch> { return; }
routeWithNavController(navController: any, paths: any, options?: DeeplinkOptions): Observable<DeeplinkMatch> { return; }
}

View File

@@ -125,6 +125,16 @@ export class Diagnostic extends IonicNativePlugin {
POWERING_OFF: string;
};
@CordovaProperty
motionStatus: {
NOT_REQUESTED: string;
GRANTED: string;
DENIED: string;
RESTRICTED: string;
NOT_AVAILABLE: string;
NOT_DETERMINED: string;
UNKNOWN: string;
};
/**
* Checks if app is able to access device location.
@@ -162,7 +172,7 @@ export class Diagnostic extends IonicNativePlugin {
/**
* Displays the device location settings to allow user to enable location services/change location mode.
*/
@Cordova({ sync: true, platforms: ['Android', 'Windows 10'] })
@Cordova({ sync: true, platforms: ['Android', 'Windows 10', 'iOS'] })
switchToLocationSettings(): void { }
/**
@@ -609,7 +619,26 @@ export class Diagnostic extends IonicNativePlugin {
})
registerNFCStateChangeHandler(handler: Function): void { }
/**
* Checks if the device data roaming setting is enabled.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isDataRoamingEnabled(): Promise<boolean> { return; }
/**
* Checks if the device setting for ADB(debug) is switched on.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isADBModeEnabled(): Promise<boolean> { return; }
/**
* Checks if the device is rooted.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['Android'] })
isDeviceRooted(): Promise<boolean> { return; }
// IOS ONLY
@@ -640,7 +669,7 @@ export class Diagnostic extends IonicNativePlugin {
* Checks if remote (push) notifications are enabled.
* @returns {Promise<boolean>}
*/
@Cordova({ platforms: ['iOS'] })
@Cordova({ platforms: ['iOS', 'Android'] })
isRemoteNotificationsEnabled(): Promise<boolean> { return; }
/**
@@ -650,6 +679,14 @@ export class Diagnostic extends IonicNativePlugin {
@Cordova({ platforms: ['iOS'] })
isRegisteredForRemoteNotifications(): Promise<boolean> { return; }
/**
* Returns the authorization status for the application to use Remote Notifications.
* Note: Works on iOS 10+ only (iOS 9 and below will invoke the error callback).
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
getRemoteNotificationsAuthorizationStatus(): Promise<string> { 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.
@@ -720,13 +757,23 @@ export class Diagnostic extends IonicNativePlugin {
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.
* Requests motion tracking authorization for the application.
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestandcheckmotionauthorization)
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#requestmotionauthorization)
*
* @return {Promise<any>}
* @return {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
requestAndCheckMotionAuthorization(): Promise<any> { return; }
requestMotionAuthorization(): Promise<string> { return; }
/**
* Checks motion authorization status for the application.
*
* Learn more about this method [here](https://github.com/dpa99c/cordova-diagnostic-plugin#getmotionauthorizationstatus)
*
* @return {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
getMotionAuthorizationStatus(): Promise<string> { return; }
}

View File

@@ -0,0 +1,40 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @name DNS
* @description A plugin for Apache Cordova that enables applications to manually resolve hostnames into an underlying network address. This is mostly useful for determining whether there is a problem with the device's DNS server configuration.
*
* @usage
* ```typescript
* import { DNS } from '@ionic-native/dns';
*
*
* constructor(private dns: DNS) { }
*
* ...
* this.dns.resolve(hostname)
* .then(
* address => console.log('Resolved ' + hostname + ' to ' + address),
* error => console.log('Failed to resolve ' + hostname + ': ' + error)
* );
*
* ```
*/
@Plugin({
pluginName: 'DNS',
plugin: 'cordova-plugin-dns',
pluginRef: 'cordova.plugins.dns',
repo: 'https://bitbucket.org/zegeba/cordova-plugin-dns',
platforms: ['Android']
})
@Injectable()
export class DNS extends IonicNativePlugin {
/**
* Resolve hostnames into an underlying network address.
* @param hostname
* @returns {Promise<string>} Returns a promise that resolves with the resolution.
*/
@Cordova()
resolve(hostname: string): Promise<string> { return; }
}

View File

@@ -0,0 +1,49 @@
import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Extended Device Information
* @description
* Retrieves additional device information that is not provided by other plugins
*
* @usage
* ```typescript
* import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information';
*
*
* constructor(private extendedDeviceInformation: ExtendedDeviceInformation) { }
*
* ...
*
* console.log('The Memory is: ' + this.extendedDeviceInformation.memory);
* ```
*/
@Plugin({
pluginName: 'ExtendedDeviceInformation',
plugin: 'cordova-plugin-extended-device-information',
pluginRef: 'extended-device-information',
repo: 'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
platforms: ['Android']
})
@Injectable()
export class ExtendedDeviceInformation extends IonicNativePlugin {
/**
* Get the device's memory size
*/
@CordovaProperty
memory: number;
/**
* Get the device's CPU mhz
*/
@CordovaProperty
cpumhz: string;
/**
* Get the total storage
*/
@CordovaProperty
totalstorage: string;
}

View File

@@ -17,6 +17,16 @@ export interface FingerprintOptions {
* Disable 'use backup' option. Only for android (optional)
*/
disableBackup?: boolean;
/**
* Title of fallback button. Only for iOS
*/
localizedFallbackTitle?: string;
/**
* Description in authentication dialogue. Only for iOS
*/
localizedReason?: string;
}
/**
@@ -36,7 +46,9 @@ export interface FingerprintOptions {
* this.faio.show({
* clientId: 'Fingerprint-Demo',
* clientSecret: 'password', //Only necessary for Android
* disableBackup:true //Only for Android(optional)
* disableBackup:true, //Only for Android(optional)
* localizedFallbackTitle: 'Use Pin', //Only for iOS
* localizedReason: 'Please authenticate' //Only for iOS
* })
* .then((result: any) => console.log(result))
* .catch((error: any) => console.log(error));

View File

@@ -7,7 +7,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
* @description
* Cordova plugin for Firebase Analytics
*
* Go yo firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
* Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
*
* NOTE: on iOS in order to collect demographic, age, gender data etc. you should additionally include AdSupport.framework into your project.
*

View File

@@ -15,7 +15,8 @@ export interface DynamicLinksOptions {
* Cordova plugin for Firebase Invites and Firebase Dynamic Links
*
* Variables APP_DOMAIN and APP_PATH specify web URL where your app will start an activity to handle the link. They also used to setup support for App Indexing.
*
* Variable REVERSED_CLIENT_ID can be found in your GoogleService-Info.plist under the same key name.
* Variable PHOTO_LIBRARY_USAGE_DESCRIPTION specifies required value for NSPhotoLibraryUsageDescription on iOS.
* Go to firebase console and export google-services.json and GoogleService-Info.plist. Put those files into the root of your cordova app folder.
*
* Preferences:

View File

@@ -30,17 +30,18 @@ import { Observable } from 'rxjs/Observable';
plugin: 'cordova-plugin-firebase',
pluginRef: 'FirebasePlugin',
repo: 'https://github.com/arnesson/cordova-plugin-firebase',
platforms: ['Android', 'iOS']
platforms: ['Android', 'iOS'],
})
@Injectable()
export class Firebase extends IonicNativePlugin {
/**
* Get the device token
* @return {Promise<any>}
*/
@Cordova()
getToken(): Promise<any> { return; }
getToken(): Promise<any> {
return;
}
/**
* Get notified when a token is refreshed
@@ -49,7 +50,9 @@ export class Firebase extends IonicNativePlugin {
@Cordova({
observable: true
})
onTokenRefresh(): Observable<any> { return; }
onTokenRefresh(): Observable<any> {
return;
}
/**
* Get notified when the user opens a notification
@@ -58,7 +61,9 @@ export class Firebase extends IonicNativePlugin {
@Cordova({
observable: true
})
onNotificationOpen(): Observable<any> { return; }
onNotificationOpen(): Observable<any> {
return;
}
/**
* Grant permission to receive push notifications
@@ -67,14 +72,18 @@ export class Firebase extends IonicNativePlugin {
@Cordova({
platforms: ['iOS']
})
grantPermission(): Promise<any> { return; }
grantPermission(): Promise<any> {
return;
}
/**
* Check permission to receive push notifications
* @return {Promise<any>}
*/
* Check permission to receive push notifications
* @return {Promise<{isEnabled: boolean}>}
*/
@Cordova()
hasPermission(): Promise<any> { return; }
hasPermission(): Promise<{ isEnabled: boolean }> {
return;
}
/**
* Set icon badge number. Set to 0 to clear the badge.
@@ -82,14 +91,18 @@ export class Firebase extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
setBadgeNumber(badgeNumber: number): Promise<any> { return; }
setBadgeNumber(badgeNumber: number): Promise<any> {
return;
}
/**
* Get icon badge number
* @return {Promise<any>}
*/
@Cordova()
getBadgeNumber(): Promise<any> { return; }
getBadgeNumber(): Promise<any> {
return;
}
/**
* Subscribe to a topic
@@ -97,7 +110,9 @@ export class Firebase extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
subscribe(topic: string): Promise<any> { return; }
subscribe(topic: string): Promise<any> {
return;
}
/**
* Unsubscribe from a topic
@@ -105,7 +120,18 @@ export class Firebase extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
unsubscribe(topic: string): Promise<any> { return; }
unsubscribe(topic: string): Promise<any> {
return;
}
/**
* Unregister from firebase, used to stop receiving push notifications.
* Call this when you logout user from your app.
*/
@Cordova()
unregister(): Promise<any> {
return;
}
/**
* Log an event using Analytics
@@ -114,7 +140,9 @@ export class Firebase extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
logEvent(type: string, data: any): Promise<any> { return; }
logEvent(type: string, data: any): Promise<any> {
return;
}
/**
* Log an Error using FirebaseCrash
@@ -122,7 +150,9 @@ export class Firebase extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
logError(message: string): Promise<any> { return; }
logError(message: string): Promise<any> {
return;
}
/**
* Set the name of the current screen in Analytics
@@ -130,7 +160,9 @@ export class Firebase extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
setScreenName(name: string): Promise<any> { return; }
setScreenName(name: string): Promise<any> {
return;
}
/**
* Set a user id for use in Analytics
@@ -138,7 +170,9 @@ export class Firebase extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
setUserId(userId: string): Promise<any> { return; }
setUserId(userId: string): Promise<any> {
return;
}
/**
* Set a user property for use in Analytics
@@ -147,7 +181,9 @@ export class Firebase extends IonicNativePlugin {
* @return {Promise<any>}
*/
@Cordova()
setUserProperty(name: string, value: string): Promise<any> { return; }
setUserProperty(name: string, value: string): Promise<any> {
return;
}
/**
* Fetch Remote Config parameter values for your app
@@ -158,14 +194,18 @@ export class Firebase extends IonicNativePlugin {
successIndex: 1,
errorIndex: 2
})
fetch(cacheExpirationSeconds?: number): Promise<any> { return; }
fetch(cacheExpirationSeconds?: number): Promise<any> {
return;
}
/**
* Activate the Remote Config fetched config
* @return {Promise<any>}
*/
@Cordova()
activateFetched(): Promise<any> { return; }
activateFetched(): Promise<any> {
return;
}
/**
* Retrieve a Remote Config value
@@ -177,7 +217,9 @@ export class Firebase extends IonicNativePlugin {
successIndex: 2,
errorIndex: 3
})
getValue(key: string, namespace?: string): Promise<any> { return; }
getValue(key: string, namespace?: string): Promise<any> {
return;
}
/**
* Retrieve a Remote Config byte array
@@ -190,7 +232,9 @@ export class Firebase extends IonicNativePlugin {
successIndex: 2,
errorIndex: 3
})
getByteArray(key: string, namespace?: string): Promise<any> { return; }
getByteArray(key: string, namespace?: string): Promise<any> {
return;
}
/**
* Get the current state of the FirebaseRemoteConfig singleton object
@@ -199,7 +243,9 @@ export class Firebase extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
getInfo(): Promise<any> { return; }
getInfo(): Promise<any> {
return;
}
/**
* Change the settings for the FirebaseRemoteConfig object's operations
@@ -209,7 +255,9 @@ export class Firebase extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
setConfigSettings(settings: any): Promise<any> { return; }
setConfigSettings(settings: any): Promise<any> {
return;
}
/**
* Set defaults in the Remote Config
@@ -222,6 +270,34 @@ export class Firebase extends IonicNativePlugin {
successIndex: 2,
errorIndex: 3
})
setDefaults(defaults: any, namespace: string): Promise<any> { return; }
setDefaults(defaults: any, namespace: string): Promise<any> {
return;
}
/**
* Sends an SMS to the user with the SMS verification code and returns the Verification ID required to sign in using phone authentication
* @param phoneNumber {string}
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['iOS']
})
getVerificationID(phoneNumber: string): Promise<any> {
return;
}
/**
* Sends an SMS to the user with the SMS verification code and returns the Verification ID required to sign in using phone authentication
* @param phoneNumber {string} the phone number, including '+' and country code
* @param timeoutDuration {number} the timeout in sec - no more SMS will be sent to this number until this timeout expires
* @returns {Promise<any>}
*/
@Cordova({
platforms: ['Android'],
successIndex: 2,
errorIndex: 3
})
verifyPhoneNumber(phoneNumber: string, timeoutDuration: number): Promise<any> {
return;
}
}

View File

@@ -182,7 +182,7 @@ export class FlurryAnalyticsObject {
*
* @usage
* ```typescript
* import { FlurryAnalytics, FlurryAnalyticsObject, FlurryAnalyticsOptions } from 'ionic-native/flurry-analytics';
* import { FlurryAnalytics, FlurryAnalyticsObject, FlurryAnalyticsOptions } from '@ionic-native/flurry-analytics';
*
* constructor(private flurryAnalytics: FlurryAnalytics) { }
*

View File

@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
/**
* @name FTP
@@ -95,24 +96,28 @@ export class FTP extends IonicNativePlugin {
*
* @param localFile {string} The file (with full path) you want to upload. e.g. "/local/path/to/localFile".
* @param remoteFile {string} The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile".
* @return {Promise<any>} Returns a promise.
* @return {Observable<any>} Returns an observable.
* It will be triggered many times according the file's size.
* The arg `0`, `0.1xx`, `0.2xx` ... `1` means the upload percent. When it reach `1`, means success.
*/
@Cordova()
upload(localFile: string, remoteFile: string): Promise<any> { return; }
@Cordova({
observable: true
})
upload(localFile: string, remoteFile: string): Observable<any> { return; }
/**
* Download one remote file on the ftp server to local path.
*
* @param localFile {string} The file (with full path) you want to upload. e.g. "/local/path/to/localFile".
* @param remoteFile {string} The file (with full path) you want to located on the ftp server. e.g. "/adf/123/newDir/remoteFile".
* @return {Promise<any>} Returns a promise.
* @return {Observable<any>} Returns an observable.
* It will be triggered many times according the file's size.
* The arg `0`, `0.1xx`, `0.2xx` ... `1` means the upload percent. When it reach `1`, means success.
*/
@Cordova()
download(localFile: string, remoteFile: string): Promise<any> { return; }
@Cordova({
observable: true
})
download(localFile: string, remoteFile: string): Observable<any> { return; }
/**
* Cancel all requests. Always success.

View File

@@ -85,7 +85,7 @@ declare const window: any;
@Injectable()
export class Geofence extends IonicNativePlugin {
public TransitionType = {
TransitionType = {
ENTER: 1,
EXIT: 2,
BOTH: 3
@@ -96,7 +96,7 @@ export class Geofence extends IonicNativePlugin {
* @return {Observable<any>}
*/
@CordovaFunctionOverride()
onTrasitionReceived(): Observable<any> { return; };
onTransitionReceived(): Observable<any> { return; };
/**
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
@@ -139,20 +139,6 @@ export class Geofence extends IonicNativePlugin {
@Cordova()
getWatched(): Promise<string> { return; };
/**
* Called when a geofence is crossed in the direction specified by `TransitType`.
*
* @returns {Observable<any>}
*/
onTransitionReceived(): Observable<any> {
return new Observable<any>((observer) => {
window && window.geofence && (window.geofence.onTransitionReceived = observer.next.bind(observer));
return () => window.geofence.onTransitionReceived = () => { };
});
}
/**
* Called when the user clicks a geofence notification. iOS and Android only.
*

View File

@@ -153,6 +153,8 @@ export interface GeolocationOptions {
plugin: 'cordova-plugin-geolocation',
pluginRef: 'navigator.geolocation',
repo: 'https://github.com/apache/cordova-plugin-geolocation',
install: 'ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"',
installVariables: ['GEOLOCATION_USAGE_DESCRIPTION'],
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,264 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
export interface ScoreData {
/**
* The score to submit.
*/
score: number;
/**
* The leaderboard ID from Google Play Developer console.
*/
leaderboardId: string;
}
export interface LeaderboardData {
/**
* The leaderboard ID from Goole Play Developer console.
*/
leaderboardId: string;
}
export interface AchievementData {
/**
* The achievement ID from Google Play Developer console.
*/
achievementId: string;
}
export interface IncrementableAchievementData extends AchievementData {
/**
* The amount to increment the achievement by.
*/
numSteps: number;
}
export interface SignedInResponse {
/**
* True or false is the use is signed in.
*/
isSignedIn: boolean;
}
export interface Player {
/**
* The players display name.
*/
displayName: string;
/**
* The ID given to the player by Play Games Services.
*/
playerId: string;
/**
* The title of the player based on their gameplay activity. Not
* all players have this and it may change over time.
*/
title: string|null;
/**
* Retrieves the URI for loading this player's icon-size profile image.
* Returns null if the player has no profile image.
*/
iconImageUrl: string;
/**
* Retrieves the URI for loading this player's hi-res profile image. Returns
* null if the player has no profile image.
*/
hiResIconImageUrl: string;
}
/**
* @name Google Play Games Services
* @description
* A Cordova plugin that let's you interact with Google Play Games Services.
*
* @usage
* ```typescript
* import { GooglePlayGamesServices } from '@ionic-native/google-play-games-services';
*
*
* constructor(private googlePlayGamesServices: GooglePlayGamesServices) { }
*
* ...
*
* // Authenticate with Play Games Services
* this.googlePlayGamesServices.auth()
* .then(() => console.log('Logged in to Play Games Services'))
* .catch(e) => console.log('Error logging in Play Games Services', e);
*
* // Sign out of Play Games Services.
* this.googlePlayGamesServices.signOut()
* .then(() => console.log('Logged out of Play Games Services'))
* .catch(e => console.log('Error logging out of Play Games Services', e);
*
* // Check auth status.
* this.googlePlayGamesServices.isSignedIn()
* .then((signedIn: SignedInResponse) => {
* if (signedIn.isSignedIn) {
* hideLoginButton();
* }
* });
*
* // Fetch currently authenticated user's data.
* this.googlePlayGamesServices.showPlayer().then((data: Player) => {
* console.log('Player data', data);
* });
*
* // Submit a score.
* this.googlePlayGamesServices.submitScore({
* score: 100,
* leaderboardId: 'SomeLeaderboardId'
* });
*
* // Show the native leaderboards window.
* this.googlePlayGamesServices.showAllLeaderboards()
* .then(() => console.log('The leaderboard window is visible.'));
*
* // Show a signle native leaderboard window.
* this.googlePlayGamesServices.showLeaderboard({
* leaderboardId: 'SomeLeaderBoardId'
* }).then(() => console.log('The leaderboard window is visible.'));
*
* // Unlock an achievement.
* this.googlePlayGamesServices.unlockAchievement({
* achievementId: 'SomeAchievementId'
* }).then(() => console.log('Achievement unlocked'));
*
* // Incremement an achievement.
* this.googlePlayGamesServices.incrementAchievement({
* step: 1,
* achievementId: 'SomeAchievementId'
* }).then(() => console.log('Achievement incremented'));
*
* // Show the native achievements window.
* this.googlePlayGamesServices.showAchivements()
* .then(() => console.log('The achievements window is visible.'));
*
* ```
*/
@Plugin({
pluginName: 'GooglePlayGamesServices',
plugin: 'cordova-plugin-play-games-service',
pluginRef: 'plugins.playGamesServices',
repo: 'https://github.com/artberri/cordova-plugin-play-games-services',
platforms: ['Android'],
install: 'ionic cordova plugin add cordova-plugin-play-games-service --variable APP_ID="YOUR_APP_ID',
})
@Injectable()
export class GooglePlayGamesServices extends IonicNativePlugin {
/**
* Initialise native Play Games Service login procedure.
*
* @return {Promise<any>} Returns a promise that resolves when the player
* is authenticated with Play Games Services.
*/
@Cordova()
auth(): Promise<any> { return; }
/**
* Sign out of Google Play Games Services.
*
* @return {Promise<any>} Returns a promise that resolve when the player
* successfully signs out.
*/
@Cordova()
signOut(): Promise<any> { return; }
/**
* Check if the user is signed in.
*
* @return {Promise<SignedInResponse>} Returns a promise that resolves with
* the signed in response.
*/
@Cordova()
isSignedIn(): Promise<SignedInResponse> { return; }
/**
* Show the currently authenticated player.
*
* @return {Promise<Player>} Returns a promise that resolves when Play
* Games Services returns the authenticated player.
*/
@Cordova()
showPlayer(): Promise<Player> { return; }
/**
* Submit a score to a leaderboard. You should ensure that you have a
* successful return from auth() before submitting a score.
*
* @param data {ScoreData} The score data you want to submit.
* @return {Promise<any>} Returns a promise that resolves when the
* score is submitted.
*/
@Cordova()
submitScore(data: ScoreData): Promise<string> { return; }
/**
* Launches the native Play Games leaderboard view controller to show all the
* leaderboards.
*
* @return {Promise<any>} Returns a promise that resolves when the native
* leaderboards window opens.
*/
@Cordova()
showAllLeaderboards(): Promise<any> { return; }
/**
* Launches the native Play Games leaderboard view controll to show the
* specified leaderboard.
*
* @param data {LeaderboardData} The leaderboard you want to show.
* @return {Promise<any>} Returns a promise that resolves when the native
* leaderboard window opens.
*/
@Cordova()
showLeaderboard(data: LeaderboardData): Promise<any> { return; }
/**
* Unlock an achievement.
*
* @param data {AchievementData}
* @return {Promise<any>} Returns a promise that resolves when the
* achievement is unlocked.
*/
@Cordova()
unlockAchievement(data: AchievementData): Promise<string> { return; }
/**
* Increment an achievement.
*
* @param data {IncrementableAchievementData}
* @return {Promise<any>} Returns a promise that resolves when the
* achievement is incremented.
*/
@Cordova()
incrementAchievement(data: IncrementableAchievementData): Promise<string> { return; }
/**
* Lauches the native Play Games achievements view controller to show
* achievements.
*
* @return {Promise<any>} Returns a promise that resolves when the
* achievement window opens.
*/
@Cordova()
showAchievements(): Promise<any> { return; }
}

View File

@@ -63,4 +63,11 @@ export class GooglePlus extends IonicNativePlugin {
@Cordova()
disconnect(): Promise<any> { return; }
/**
* This will retrieve the Android signing certificate fingerprint which is required in the Google Developer Console.
* @returns {Promise<any>}
*/
@Cordova()
getSigningCertificateFingerprint(): Promise<any> { return; }
}

View File

@@ -59,9 +59,9 @@ export interface HTTPResponse {
*/
@Plugin({
pluginName: 'HTTP',
plugin: 'cordova-plugin-http',
pluginRef: 'cordovaHTTP',
repo: 'https://github.com/wymsee/cordova-HTTP',
plugin: 'cordova-plugin-advanced-http',
pluginRef: 'cordova.plugin.http',
repo: 'https://github.com/silkimen/cordova-plugin-advanced-http',
platforms: ['Android', 'iOS']
})
@Injectable()
@@ -92,6 +92,41 @@ export class HTTP extends IonicNativePlugin {
@Cordova({ sync: true })
setHeader(header: string, value: string): void { }
/**
* Set the data serializer which will be used for all future POST and PUT requests. Takes a string representing the name of the serializer.
* @param serializer {string} The name of the serializer. Can be urlencoded or json
*/
@Cordova({ sync: true })
setDataSerializer(serializer: string): void { }
/**
* Clear all cookies
*/
@Cordova({ sync: true })
clearCookies(): void { }
/**
* Remove cookies
* @param url {string}
* @param cb
*/
@Cordova({ sync: true })
removeCookies(url: string, cb: () => void): void { }
/**
* Disable following redirects automatically
* @param disable {boolean} Set to true to disable following redirects automatically
*/
@Cordova({ sync: true })
disableRedirect(disable: boolean): void { }
/**
* Set request timeout
* @param timeout {number} The timeout in seconds. Default 60
*/
@Cordova({ sync: true })
setRequestTimeout(timeout: number): void { }
/**
* Enable or disable SSL Pinning. This defaults to false.
*
@@ -112,14 +147,6 @@ export class HTTP extends IonicNativePlugin {
@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
@@ -131,7 +158,7 @@ export class HTTP extends IonicNativePlugin {
post(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
/**
*
* Make a GET request
* @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
@@ -140,6 +167,46 @@ export class HTTP extends IonicNativePlugin {
@Cordova()
get(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
/**
* Make a PUT 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()
put(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
/**
* Make a PATCH 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()
patch(url: string, body: any, headers: any): Promise<HTTPResponse> { return; }
/**
* Make a DELETE request
* @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()
delete(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
/**
* Make a HEAD request
* @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()
head(url: string, parameters: any, headers: any): Promise<HTTPResponse> { return; }
/**
*
* @param url {string} The url to send the request to

View File

@@ -0,0 +1,180 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* @beta
* @name HyperTrack
* @description
* HyperTrack cordova plugin wrapper for Ionic Native. Location-based services provider.
* Make sure to include your publishable key at config.xml (see [HyperTrack Cordova Setup](https://docs.hypertrack.com/sdks/cordova/setup.html#step-2-configure-the-sdk)).
*
* @usage
* ```typescript
* import { HyperTrack } from '@ionic-native/hyper-track';
*
* constructor(private hyperTrack: HyperTrack) { }
*
* // Check if app has location permissions enabled
* this.hyperTrack.checkLocationPermission().then(response => {
* // response (String) can be "true" or "false"
* if (response != "true") {
* // Ask for permissions
* this.hyperTrack.requestPermissions().then(response => {}, error => {});
* }
* }, error => {});
*
* // Check if app has location services enabled
* this.hyperTrack.checkLocationServices().then(response => {
* // response (String) can be "true" or "false"
* if (response != "true") {
* // Request services to be enabled
* this.hyperTrack.requestLocationServices().then(response => {}, error => {});
* }
* }, error => {});
*
* // First set the current user. This can be done via getOrCreateUser() or setUserId()
* this.hyperTrack.setUserId("xxx").then(user => {
* // user (String) is a String representation of a User's JSON
*
* this.hyperTrack.startTracking().then(userId => {}, trackingError => {});
*
* this.hyperTrack.createAndAssignAction('visit', 'lookupId','address', 20.12, -100.3).then(action => {
* // Handle action. It's a String representation of the Action's JSON. For example:
* // '{"eta":"Jul 17, 2017 12:50:03 PM","assigned_at":"Jul 17, 2017 12:34:38 PM",,"distance":"0.0",...}'
* }, error => {});
*
* // You can complete an action with completeAction() or completeActionWithLookupId()
* this.hyperTrack.completeAction('action-id').then(response => {
* // Handle response (String). Should be "OK".
* }, error => {});
*
* this.hyperTrack.getCurrentLocation().then(location => {
* // Handle location. It's a String representation of a Location's JSON.For example:
* // '{"mAccuracy":22.601,,"mLatitude":23.123456, "mLongitude":-100.1234567, ...}'
* }, error => {});
*
* this.hyperTrack.stopTracking().then(success => {
* // Handle success (String). Should be "OK".
* }, error => {});
*
* }, error => {});*
* ```
*/
@Plugin({
pluginName: 'HyperTrack',
plugin: 'cordova-plugin-hypertrack',
pluginRef: 'cordova.plugins.HyperTrack',
repo: 'https://github.com/hypertrack/hypertrack-cordova',
platforms: ['Android']
})
@Injectable()
export class HyperTrack extends IonicNativePlugin {
/**
* Returns given text. For testing purposes.
* @param {String} text Given text to print
* @returns {Promise<any>} Returns a Promise that resolves with the result text (which is the same as the given text) if successful, or it gets rejected if an error ocurred.
*/
@Cordova()
helloWorld(text: String): Promise<String> { return; }
/**
* Create a new user to identify the current device or get a user from a lookup id.
* @param {String} name User's name
* @param {String} phone User's phone
* @param {String} photo User's photo as URL or a Base64 converted string
* @param {String} lookupId User's lookupId, which is used to check if a new user is to be created (in this case you could set it to an internal reference for the user that you can use later to identify it), or if one with an existing lookupId is to be used.
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the User's JSON, or it gets rejected if an error ocurred.
*/
@Cordova()
getOrCreateUser(name: String, phone: String, photo: String, lookupId: String): Promise<any> { return; }
/**
* Set UserId for the SDK created using HyperTrack APIs. This is useful if you already have a user previously created.
* @param {String} userId User's ID
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred. An "OK" response doesn't necessarily mean that the userId was found. It just means that it was set correctly.
*/
@Cordova()
setUserId(userId: String): Promise<any> { return; }
/**
* Enable the SDK and start tracking. This will fail if there is no user set.
* @returns {Promise<any>} Returns a Promise that resolves with the userId (String) of the User being tracked if successful, or it gets rejected if an error ocurred. One example of an error is not setting a User with getOrCreateUser() or setUserId() before calling this function.
*/
@Cordova()
startTracking(): Promise<any> { return; }
/**
* Create and assign an action to the current user using specified parameters
* @param {String} type The action type. Can be one from "pickup", "delivery", "dropoff", "visit", "stopover" or "task"
* @param {String} lookupId The Action's desired lookupId
* @param {String} expectedPlaceAddress The address of the Action
* @param {Number} expectedPlaceLatitude The latitude of the Action
* @param {Number} expectedPlaceLongitude The longitude of the Action
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the Action's JSON, or it gets rejected if an error ocurred.
*/
@Cordova()
createAndAssignAction(type: String, lookupId: String, expectedPlaceAddress: String, expectedPlaceLatitude: Number, expectedPlaceLongitude: Number): Promise<any> { return; }
/**
* Complete an action from the SDK by its ID
* @param {String} actionId ID of the Action that will be marked as completed
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred.
*/
@Cordova()
completeAction(actionId: String): Promise<any> { return; }
/**
* Complete an action from the SDK using Action's lookupId as parameter
* @param {String} lookupId Lookup ID of the Action that will be marked as completed
* @returns {Promise<any>} Returns a Promise that resolves with an "OK" string if successful, or it gets rejected if an error ocurred.
*/
@Cordova()
completeActionWithLookupId(lookupId: String): Promise<any> { return; }
/**
* Disable the SDK and stop tracking.
* Needs user setting (via getOrCreateUser() or setUserId()) first.
* @returns {Promise<any>} Returns a Promise that resolves with the an "OK" string if successful, or it gets rejected if an error ocurred. One example of an error is not setting a User with getOrCreateUser() or setUserId() before calling this function.
*/
@Cordova()
stopTracking(): Promise<any> { return; }
/**
* Get user's current location from the SDK
* @returns {Promise<any>} Returns a Promise that resolves with a string representation of the Location's JSON, or it gets rejected if an error ocurred.
*/
@Cordova()
getCurrentLocation(): Promise<any> { return; }
/**
* Check if Location permission has been granted to the app (for Android).
* Returns "true" or "false" in success method accordingly.
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if location permission was granted, or it gets rejected if an error ocurred.
*/
@Cordova()
checkLocationPermission(): Promise<any> { return; }
/**
* Request user to grant Location access to the app (for Anrdoid).
* For Android Marshmallow and above. In other platforms, the Promise is never resolved.
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if Location access was given to the app, or it gets rejected if an error ocurred.
*/
@Cordova()
requestPermissions(): Promise<any> { return; }
/**
* Check if Location services are enabled on the device (for Android).
* Returns "true" or "false" in success method accordingly.
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if location services are enabled, or it gets rejected if an error ocurred.
*/
@Cordova()
checkLocationServices(): Promise<any> { return; }
/**
* Request user to enable Location services on the device.
* For Android Marshmallow and above. In other platforms, the Promise is never resolved.
* @returns {Promise<any>} Returns a Promise that resolves with the a string that can be "true" or "false", depending if Location services were enabled, or it gets rejected if an error ocurred.
*/
@Cordova()
requestLocationServices(): Promise<any> { return; }
}

View File

@@ -248,12 +248,12 @@ export interface IBeaconDelegate {
* delegate.didRangeBeaconsInRegion()
* .subscribe(
* data => console.log('didRangeBeaconsInRegion: ', data),
* error => console.error();
* error => console.error()
* );
* delegate.didStartMonitoringForRegion()
* .subscribe(
* data => console.log('didStartMonitoringForRegion: ', data),
* error => console.error();
* error => console.error()
* );
* delegate.didEnterRegion()
* .subscribe(

View File

@@ -0,0 +1,136 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, CordovaFunctionOverride, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface IndexItem {
domain: string;
identifier: string;
title: string;
description: string;
/**
* Url to image
*/
url: string;
/**
* Item keywords
*/
keywords?: Array<string>;
/**
* Lifetime in minutes
*/
lifetime?: number;
}
/**
* @name Index App Content
* @description
* This plugin gives you a Javascript API to interact with Core Spotlight on iOS (=> iOS 9).
* You can add, update and delete items to the spotlight search index.
* Spotlight Search will include these items in the result list. You can deep-link the search results with your app.
*
* @usage
* ```typescript
* import { IndexAppContent } from '@ionic-native/index-app-content';
*
*
* constructor(private indexAppContent: IndexAppContent) { }
*
* ...
*
* var items = [
* {
* domain: 'com.my.domain',
* identifier: '88asdf7dsf',
* title: 'Foo',
* description: 'Bar',
* url: 'http://location/of/my/image.jpg',
* },
* {
* domain: 'com.other.domain',
* identifier: '9asd67g6a',
* title: 'Baz',
* description: 'Woot',
* url: 'http://location/of/my/image2.jpg',
* }
* ];
*
* this.indexAppContent.setItems(items)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'IndexAppContent',
plugin: 'cordova-plugin-indexappcontent',
pluginRef: 'window.plugins.indexAppContent',
repo: 'https://github.com/johanblomgren/cordova-plugin-indexappcontent',
platforms: ['iOS']
})
@Injectable()
export class IndexAppContent extends IonicNativePlugin {
/**
* The option to index app content might not be available at all due to device limitations or user settings.
* Therefore it's highly recommended to check upfront if indexing is possible.
* @return {Promise<boolean>} Returns a promise that resolves with true if indexing is available, false if not
*/
@Cordova()
isIndexingAvailable(): Promise<boolean> {
return;
}
/**
* Add or change items to spotlight index
* @param {Array<IndexItem>} Array of items to index
* @return {Promise<any>} Returns if index set was successfull
*/
@Cordova()
setItems(items: Array<IndexItem>): Promise<any> {
return;
}
/**
* If user taps on a search result in spotlight then the app will be launched.
* You can register a Javascript handler to get informed when this happens.
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
*/
@CordovaFunctionOverride()
onItemPressed(): Observable<any> {
return;
}
/**
* Clear all items stored for a given array of domains
* @param {Array<string>} Array of domains to clear
* @return {Promise<any>} Resolve if successfull
*/
@Cordova()
clearItemsForDomains(domains: Array<string>): Promise<any> {
return;
}
/**
* Clear all items stored for a given array of identifiers
* @param {Array<string>} Array of identifiers to clear
* @return {Promise<any>} Resolve if successfull
*/
@Cordova()
clearItemsForIdentifiers(identifiers: Array<string>): Promise<any> {
return;
}
/**
* You might want to avoid to update spotlight index too frequently.
* Without calling this function a subsequent call to manipulate the index is only possible after 1440 minutes (= 24 hours)!
* @param {number} Numeric value => 0
*/
@Cordova()
setIndexingInterval(intervalMinutes: number) {
return;
}
}

View File

@@ -31,10 +31,10 @@ declare const cordova: any;
* ```
*/
@Plugin({
pluginName: 'Jins Meme',
plugin: 'JinsMemeSDK-Plugin-Cordova',
pluginRef: 'cordova.plugins.JinsMemePlugin',
repo: 'https://github.com/jins-meme/JinsMemeSDK-Plugin-Cordova',
pluginName: 'JINS MEME ES',
plugin: 'cordova-plugin-jins-meme-es',
pluginRef: 'com.jins_jp.meme.plugin',
repo: 'https://github.com/BlyncSync/cordova-plugin-jins-meme-es',
platforms: ['Android', 'iOS']
})
@Injectable()

View File

@@ -0,0 +1,88 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Keychain Touch Id
* @description
* A cordova plugin adding the iOS TouchID / Android fingerprint to your
* app and allowing you to store a password securely in the device keychain.
*
* @usage
* ```typescript
* import { KeychainTouchId } from '@ionic-native/keychain-touch-id';
*
*
* constructor(private keychainTouchId: KeychainTouchId) { }
*
* ...
*
*
* this.keychainTouchId.isAvailable()
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'KeychainTouchId',
plugin: 'cordova-plugin-keychain-touch-id',
pluginRef: 'plugins.touchid',
repo: 'https://github.com/sjhoeksma/cordova-plugin-keychain-touch-id',
platforms: ['Android', 'iOS']
})
@Injectable()
export class KeychainTouchId extends IonicNativePlugin {
/**
* Check if Touch ID / Fingerprint is supported by the device
* @return {Promise<any>} Returns a promise that resolves when there is hardware support
*/
@Cordova()
isAvailable(): Promise<any> {
return;
}
/**
* Encrypts and Saves a password under the key in the device keychain, which can be retrieved after
* successful authentication using fingerprint
* @param key {string} the key you want to store
* @param password {string} the password you want to encrypt and store
* @return {Promise<any>} Returns a promise that resolves when there is a result
*/
@Cordova()
save(key: string, password: string): Promise<any> { return; }
/**
* Opens the fingerprint dialog, for the given key, showing an additional message. Promise will resolve
* with the password stored in keychain or will resolve an error code, where -1 indicated not available.
* @param key {string} the key you want to retrieve from keychain
* @param message {string} a message to the user
* @return {Promise<any>} Returns a promise that resolves when the key value is successfully retrieved or an error
*/
@Cordova()
verify(key: string, message: string): Promise<any> { return; }
/**
* Checks if there is a password stored within the keychain for the given key.
* @param key {string} the key you want to check from keychain
* @return {Promise<any>} Returns a promise that resolves with success if the key is available or failure if key is not.
*/
@Cordova()
has(key: string): Promise<any> { return; }
/**
* Deletes the password stored under given key from the keychain.
* @param key {string} the key you want to delete from keychain
* @return {Promise<any>} Returns a promise that resolves with success if the key is deleted or failure if key is not
*/
@Cordova()
delete(key: string): Promise<any> { return; }
/**
* Sets the language of the fingerprint dialog
* @param locale {string} locale subtag from [this list](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
*/
@Cordova()
setLocale(locale: string): void {}
}

View File

@@ -313,8 +313,8 @@ export class LaunchNavigator extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
successIndex: 2,
errorIndex: 3
})
navigate(destination: string | number[], options?: LaunchNavigatorOptions): Promise<any> { return; }

View File

@@ -5,9 +5,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
* @name Launch Review
* @description
*
* This launches the native store app in order for the user to leave a review.
* On Android, the plugin opens the the app's storepage in the Play Store where the user can leave a review by pressing the stars to give a rating.
* On iOS, the plugin opens the app's storepage in the App Store and focuses the Review tab, where the user can leave a review by pressing "Write a review".
* Assists in leaving user reviews/ratings in the App Stores.
* - Launches the platform's App Store page for the current app in order for the user to leave a review.
* - On iOS (10.3 and above) invokes the native in-app rating dialog which allows a user to rate your app without needing to open the App Store.
*
* @usage
* ```typescript
@@ -17,9 +17,13 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*
* ...
*
* const appId: string = 'yourAppId';
* this.launchReview.launch(appId)
* this.launchReview.launch()
* .then(() => console.log('Successfully launched store app');
*
* if(this.launchReview.isRatingSupported()){
* this.launchReview.rating()
* .then(() => console.log('Successfully launched rating dialog');
* }
* ```
*/
@Plugin({
@@ -33,10 +37,34 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
export class LaunchReview extends IonicNativePlugin {
/**
* Launch store app using given app ID
* Launches App Store on current platform in order to leave a review for given app.
* @param appId {string} - (optional) the platform-specific app ID to use to open the page in the store app.
* If not specified, the plugin will use the app ID for the app in which the plugin is contained.
* On Android this is the full package name of the app. For example, for Google Maps: `com.google.android.apps.maps`
* On iOS this is the Apple ID of the app. For example, for Google Maps: `585027354`
* @returns {Promise<void>}
*/
@Cordova()
launch(appId: string): Promise<void> { return; }
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
launch(appId?: string): Promise<void> { return; }
/**
* Invokes the native in-app rating dialog which allows a user to rate your app without needing to open the App Store.
* Requires iOS 10.3 and above: Calling this on any platform/version other than iOS 10.3+ will result in the error callback.
* Success callback will be called up to 3 times:
* - First: after `LaunchReview.rating()` is called and the request to show the dialog is successful. Will be passed the value `requested`.
* - Second: if and when the Rating dialog is actually displayed. Will be passed the value `shown`.
* - Third: if and when the Rating dialog is dismissed. Will be passed the value `dismissed`.
* @returns {Promise<string>}
*/
@Cordova({ platforms: ['iOS'] })
rating(): Promise<string> { return; }
/**
* Indicates if the current platform/version supports in-app ratings dialog, i.e. calling LaunchReview.rating().
* Will return true if current platform is iOS 10.3 or above.
* @returns {boolean}
*/
@Cordova({ platforms: ['Android', 'iOS'], sync: true })
isRatingSupported(): boolean { return; }
}

View File

@@ -147,7 +147,7 @@ export interface ILocalNotification {
*/
@Plugin({
pluginName: 'LocalNotifications',
plugin: 'de.appplant.cordova.plugin.local-notification',
plugin: 'cordova-plugin-local-notification',
pluginRef: 'cordova.plugins.notification.local',
repo: 'https://github.com/katzer/cordova-plugin-local-notifications',
platforms: ['Android', 'iOS', 'Windows']
@@ -324,5 +324,15 @@ export class LocalNotifications extends IonicNativePlugin {
})
on(eventName: string, callback: any): void { }
/**
* Removes a callback of a specific event
* @param eventName The name of the event. Available events: schedule, trigger, click, update, clear, clearall, cancel, cancelall
* @param callback Call back function. All events return notification and state parameter. clear and clearall return state parameter only.
*/
@Cordova({
sync: true
})
un(eventName: string, callback: any): void { }
}

View File

@@ -114,6 +114,9 @@ export class MediaObject {
@CordovaInstance({ sync: true })
setVolume(volume: number): void { }
@CordovaInstance({ sync: true })
setRate(speedRate: number): void {}
/**
* Starts recording an audio file.
*/

View File

@@ -63,14 +63,14 @@ export class MobileAccessibility extends IonicNativePlugin {
* @returns {Promise<boolean>} A result method to receive the boolean result asynchronously from the native MobileAccessibility plugin.
*/
@Cordova({ platforms: ['iOS'] })
isVoiceOverRunningCallback(): Promise<boolean> { return; }
isVoiceOverRunning(): Promise<boolean> { return; }
/**
* An Android/Amazon Fire OS-specific proxy for the MobileAccessibility.isScreenReaderRunning method.
* @returns {Promise<boolean>} A result method to receive the boolean result asynchronously from the native MobileAccessibility plugin.
*/
@Cordova({ platforms: ['Amazon Fire OS', 'Android'] })
isTalkBackRunningCallback(): Promise<boolean> { return; }
isTalkBackRunning(): Promise<boolean> { return; }
/**
* On Android, this method returns true if ChromeVox is active and properly initialized with access to the text to speech API in the WebView.
@@ -85,98 +85,98 @@ export class MobileAccessibility extends IonicNativePlugin {
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isBoldTextEnabledCallback(): Promise<boolean> { return; }
isBoldTextEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova()
isClosedCaptioningEnabledCallback(): Promise<boolean> { return; }
isClosedCaptioningEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isDarkerSystemColorsEnabledCallback(): Promise<boolean> { return; }
isDarkerSystemColorsEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isGrayscaleEnabledCallback(): Promise<boolean> { return; }
isGrayscaleEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isGuidedAccessEnabledCallback(): Promise<boolean> { return; }
isGuidedAccessEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isInvertColorsEnabledCallback(): Promise<boolean> { return; }
isInvertColorsEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isMonoAudioEnabledCallback(): Promise<boolean> { return; }
isMonoAudioEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isReduceMotionEnabledCallback(): Promise<boolean> { return; }
isReduceMotionEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isReduceTransparencyEnabledCallback(): Promise<boolean> { return; }
isReduceTransparencyEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isSpeakScreenEnabledCallback(): Promise<boolean> { return; }
isSpeakScreenEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isSpeakSelectionEnabledCallback(): Promise<boolean> { return; }
isSpeakSelectionEnabled(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['iOS'] })
isSwitchControlRunningCallback(): Promise<boolean> { return; }
isSwitchControlRunning(): Promise<boolean> { return; }
/**
*
* @returns {Promise<boolean>} Returns the result
*/
@Cordova({ platforms: ['Amazon Fire OS', 'Android'] })
isTouchExplorationEnabledCallback(): Promise<boolean> { return; }
isTouchExplorationEnabled(): Promise<boolean> { return; }
/**
*
* * @returns {Promise<number>} Returns the result
*/
@Cordova()
getTextZoomCallback(): Promise<number> { return; }
getTextZoom(): Promise<number> { return; }
/**
* @param textZoom {number} A percentage value by which text in the WebView should be scaled.

View File

@@ -11,6 +11,7 @@ export interface AuthenticationResult {
status: string;
statusCode: number;
tenantId: string;
userInfo: UserInfo;
/**
* Creates authorization header for web requests.
@@ -137,7 +138,7 @@ export class AuthenticationContext {
@CordovaInstance({
otherPromise: true
})
acquireTokenAsync(resourceUrl: string, clientId: string, redirectUrl: string, userId: string, extraQueryParameters?: any): Promise<AuthenticationResult> { return; }
acquireTokenAsync(resourceUrl: string, clientId: string, redirectUrl: string, userId?: string, extraQueryParameters?: any): Promise<AuthenticationResult> { return; }
/**
* Acquires token WITHOUT using interactive flow. It checks the cache to return existing result
@@ -152,6 +153,6 @@ export class AuthenticationContext {
@CordovaInstance({
otherPromise: true
})
acquireTokenSilentAsync(resourceUrl: string, clientId: string, userId: string): Promise<AuthenticationResult> { return; }
acquireTokenSilentAsync(resourceUrl: string, clientId: string, userId?: string): Promise<AuthenticationResult> { return; }
}

View File

@@ -3,18 +3,23 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface MusicControlsOptions {
track: string;
artist: string;
cover: string;
isPlaying: boolean;
dismissable: boolean;
hasPrev: boolean;
hasNext: boolean;
hasClose: boolean;
album: string;
duration: number;
elapsed: number;
ticker: string;
track?: string;
artist?: string;
cover?: string;
isPlaying?: boolean;
dismissable?: boolean;
hasPrev?: boolean;
hasNext?: boolean;
hasSkipForward?: boolean;
hasSkipBackward?: boolean;
skipForwardInterval?: number;
skipBackwardInterval?: number;
hasScrubbing?: boolean;
hasClose?: boolean;
album?: string;
duration?: number;
elapsed?: number;
ticker?: string;
}
/**
@@ -47,12 +52,17 @@ export interface MusicControlsOptions {
* hasClose : true, // show close button, optional, default: false
*
* // iOS only, optional
* album : 'Absolution' // optional, default: ''
* album : 'Absolution', // optional, default: ''
* duration : 60, // optional, default: 0
* elapsed : 10, // optional, default: 0
* hasSkipForward : true, // show skip forward button, optional, default: false
* hasSkipBackward : true, // show skip backward button, optional, default: false
* skipForwardInterval: 15, // display number for skip forward, optional, default: 0
* skipBackwardInterval: 15, // display number for skip backward, optional, default: 0
* hasScrubbing: false, // enable scrubbing from control center and lockscreen progress bar, optional
*
* // Android only, optional
* // text displayed in the status bar when the notification (and the ticker) are updated
* // text displayed in the status bar when the notification (and the ticker) are updated, optional
* ticker : 'Now playing "Time is Running Out"'
* });
*
@@ -83,12 +93,18 @@ export interface MusicControlsOptions {
* break;
* case 'music-controls-seek-to':
* const seekToInSeconds = JSON.parse(action).position;
* MusicControls.updateElapsed({
* this.musicControls.updateElapsed({
* elapsed: seekToInSeconds,
* isPlaying: true
* });
* // Do something
* break;
* case 'music-controls-skip-forward':
* // Do something
* break;
* case 'music-controls-skip-backward':
* // Do something
* break;
*
* // Headset events (Android only)
* // All media button events are listed below
@@ -164,7 +180,7 @@ export class MusicControls extends IonicNativePlugin {
/**
* Update elapsed time, optionally toggle play/pause:
* @param args {Object}
* @param args {Object}
*/
@Cordova({
platforms: ['iOS']

View File

@@ -15,7 +15,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
* ...
*
* this.nativeGeocoder.reverseGeocode(52.5072095, 13.1452818)
* .then((result: NativeGeocoderReverseResult) => console.log('The address is ' + result.street + ' in ' + result.countryCode))
* .then((result: NativeGeocoderReverseResult) => console.log(JSON.stringify(result)))
* .catch((error: any) => console.log(error));
*
* this.nativeGeocoder.forwardGeocode('Berlin')
@@ -40,7 +40,7 @@ export class NativeGeocoder extends IonicNativePlugin {
* Reverse geocode a given latitude and longitude to find location address
* @param latitude {number} The latitude
* @param longitude {number} The longitude
* @return {Promise<any>}
* @return {Promise<NativeGeocoderReverseResult>}
*/
@Cordova({
callbackOrder: 'reverse'
@@ -50,48 +50,59 @@ export class NativeGeocoder extends IonicNativePlugin {
/**
* Forward geocode a given address to find coordinates
* @param addressString {string} The address to be geocoded
* @return {Promise<any>}
* @return {Promise<NativeGeocoderForwardResult>}
*/
@Cordova({
callbackOrder: 'reverse'
})
forwardGeocode(addressString: string): Promise<NativeGeocoderForwardResult> { return; }
}
/**
* Encapsulates format information about a reverse geocoding result.
* more Info:
* - https://developer.apple.com/documentation/corelocation/clplacemark
* - https://developer.android.com/reference/android/location/Address.html
*/
export interface NativeGeocoderReverseResult {
/**
* The street.
* The country code.
*/
street: string;
/**
* The house number.
*/
houseNumber: string;
/**
* The postal code.
*/
postalCode: string;
/**
* The city.
*/
city: string;
/**
* The district.
*/
district: string;
countryCode: string;
/**
* The country name.
*/
countryName: string;
/**
* The country code.
* The postal code.
*/
countryCode: string;
postalCode: string;
/**
* The administrativeArea.
*/
administrativeArea: string;
/**
* The subAdministrativeArea.
*/
subAdministrativeArea: string;
/**
* The locality.
*/
locality: string;
/**
* The subLocality.
*/
subLocality: string;
/**
* The thoroughfare.
*/
thoroughfare: string;
/**
* The subThoroughfare.
*/
subThoroughfare: string;
}
/**
* Encapsulates format information about a forward geocoding result.
*/

View File

@@ -0,0 +1,58 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Network Interface
* @description
* Network interface information plugin for Cordova/PhoneGap that supports Android, Blackberry 10, Browser, iOS, and Windows Phone 8.
*
* @usage
* ```typescript
* import { NetworkInterface } from '@ionic-native/network-interface';
*
*
* constructor(private networkInterface: NetworkInterface) { }
*
* ...
*
* this.networkInterface.getWiFiIPAddress(function (ip) { alert(ip); });
* this.networkInterface.getCarrierIPAddress(function (ip) { alert(ip); });
*
*
* ```
*/
@Plugin({
pluginName: 'NetworkInterface',
plugin: 'cordova-plugin-networkinterface',
pluginRef: 'networkinterface',
repo: 'https://github.com/salbahra/cordova-plugin-networkinterface',
platforms: ['Android', 'BlackBerry 10', 'Browser', 'iOS', 'Windows', 'Windows Phone'],
})
@Injectable()
export class NetworkInterface extends IonicNativePlugin {
@Cordova()
getIPAddress(): Promise<string> {
return;
}
/**
* Gets the WiFi IP address
* @param success {Function} Callback used when successful
* @param error {Function} Callback used when failure
*/
@Cordova()
getWiFiIPAddress(): Promise<string> {
return;
}
/**
* Gets the wireless carrier IP address
* @param success {Function} Callback used when successful
* @param error {Function} Callback used when failure
*/
@Cordova()
getCarrierIPAddress(): Promise<string> {
return;
}
}

View File

@@ -1,7 +1,29 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Plugin, Cordova, IonicNativePlugin, CordovaProperty } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare let window: any;
export interface NdefEvent {
tag: NdefTag;
}
export interface NdefRecord {
id: any[];
payload: number[];
tnf: number;
type: number[];
}
export interface NdefTag {
canMakeReadOnly: boolean;
id: number[];
isWriteable: boolean;
maxSize: number;
ndefMessage: NdefRecord[];
techTypes: string[];
type: string;
}
/**
* @name NFC
* @description
@@ -23,8 +45,17 @@ declare let window: any;
*
* ...
*
* let message = this.ndef.textRecord('Hello world');
* this.nfc.share([message]).then(onSuccess).catch(onError);
* this.nfc.addNdefListener(() => {
* console.log('successfully attached ndef listener');
* }, (err) => {
* console.log('error attaching ndef listener', err);
* }).subscribe((event) => {
* console.log('received ndef message. the tag contains: ', event.tag);
* console.log('decoded tag id', this.nfc.bytesToHexString(event.tag.id));
*
* let message = this.ndef.textRecord('Hello world');
* this.nfc.share([message]).then(onSuccess).catch(onError);
* });
*
* ```
*/
@@ -40,6 +71,21 @@ declare let window: any;
*/
@Injectable()
export class NFC extends IonicNativePlugin {
/**
* Starts the NFCNDEFReaderSession allowing iOS to scan NFC tags.
* @param onSuccess
* @param onFailure
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
successIndex: 0,
errorIndex: 3,
clearFunction: 'invalidateSession',
clearWithArgs: true
})
beginSession(onSuccess?: Function, onFailure?: Function): Observable<any> { return; }
/**
* Registers an event listener for any NDEF tag.
* @param onSuccess
@@ -53,7 +99,7 @@ export class NFC extends IonicNativePlugin {
clearFunction: 'removeNdefListener',
clearWithArgs: true
})
addNdefListener(onSuccess?: Function, onFailure?: Function): Observable<any> { return; }
addNdefListener(onSuccess?: Function, onFailure?: Function): Observable<NdefEvent> { return; }
/**
* Registers an event listener for tags matching any tag type.
@@ -209,15 +255,120 @@ export class NFC extends IonicNativePlugin {
@Injectable()
export class Ndef extends IonicNativePlugin {
@Cordova({ sync: true })
uriRecord(uri: string): any { return; }
@CordovaProperty
TNF_EMPTY: number;
@CordovaProperty
TNF_WELL_KNOWN: number;
@CordovaProperty
TNF_MIME_MEDIA: number;
@CordovaProperty
TNF_ABSOLUTE_URI: number;
@CordovaProperty
TNF_EXTERNAL_TYPE: number;
@CordovaProperty
TNF_UNKNOWN: number;
@CordovaProperty
TNF_UNCHANGED: number;
@CordovaProperty
TNF_RESERVED: number;
@CordovaProperty
RTD_TEXT: number[];
@CordovaProperty
RTD_URI: number[];
@CordovaProperty
RTD_SMART_POSTER: number[];
@CordovaProperty
RTD_ALTERNATIVE_CARRIER: number[];
@CordovaProperty
RTD_HANDOVER_CARRIER: number[];
@CordovaProperty
RTD_HANDOVER_REQUEST: number[];
@CordovaProperty
RTD_HANDOVER_SELECT: number[];
@Cordova({ sync: true })
textRecord(text: string): any { return; }
record(tnf: number, type: number[] | string, id: number[] | string, payload: number[] | string): NdefRecord { return; }
@Cordova({ sync: true })
mimeMediaRecord(mimeType: string, payload: string): any { return; }
textRecord(text: string, languageCode: string, id: number[] | string): NdefRecord { return; }
@Cordova({ sync: true })
androidApplicationRecord(packageName: string): any { return; }
uriRecord(uri: string, id: number[] | string): NdefRecord { return; }
@Cordova({ sync: true })
absoluteUriRecord(uri: string, payload: number[] | string, id: number[] | string): NdefRecord { return; }
@Cordova({ sync: true })
mimeMediaRecord(mimeType: string, payload: string): NdefRecord { return; }
@Cordova({ sync: true })
smartPoster(ndefRecords: any[], id?: number[] | string ): NdefRecord { return; }
@Cordova({ sync: true })
emptyRecord(): NdefRecord { return; }
@Cordova({ sync: true })
androidApplicationRecord(packageName: string): NdefRecord { return; }
@Cordova({ sync: true })
encodeMessage(ndefRecords: any): any { return; }
@Cordova({ sync: true })
decodeMessage(bytes: any): any { return; }
@Cordova({ sync: true })
docodeTnf(tnf_byte: any): any { return; }
@Cordova({ sync: true })
encodeTnf(mb: any, me: any, cf: any, sr: any, il: any, tnf: any): any { return; }
@Cordova({ sync: true })
tnfToString(tnf: any): string { return; }
@CordovaProperty
textHelper: TextHelper;
@CordovaProperty
uriHelper: UriHelper;
}
/**
* @hidden
*/
@Plugin({
pluginName: 'NFC',
plugin: 'phonegap-nfc',
pluginRef: 'util'
})
@Injectable()
export class NfcUtil extends IonicNativePlugin {
@Cordova({ sync: true })
toHex(i: number): string { return; }
@Cordova({ sync: true })
toPrintable(i: number): string { return; }
@Cordova({ sync: true })
bytesToString(i: number[]): string { return; }
@Cordova({ sync: true })
stringToBytes(s: string): number[] { return; }
@Cordova({ sync: true })
bytesToHexString(bytes: number[]): string { return; }
@Cordova({ sync: true })
isType(record: NdefRecord, tnf: number, type: number[]|string): boolean { return; }
}
export class TextHelper extends IonicNativePlugin {
decodePayload(data: number[]): string { return; }
encodePayload(text: string, lang: string): number[] { return; }
}
export class UriHelper extends IonicNativePlugin {
decodePayload(data: number[]): string { return; }
encodePayload(uri: string): number[] { return; }
}

View File

@@ -165,7 +165,7 @@ export interface OSNotificationPayload {
/**
* URL to open when opening the notification.
*/
launchUrl?: string;
launchURL?: string;
/**
* Sound resource to play when the notification is shown.
*/
@@ -301,7 +301,8 @@ export enum OSActionType {
* The OneSignal plugin is an client implementation for using the [OneSignal](https://onesignal.com/) Service.
* OneSignal is a simple implementation for delivering push notifications.
*
* Requires Cordova plugin: `onesignal-cordova-plugin`. For more info, please see the [OneSignal Cordova Docs](https://documentation.onesignal.com/docs/phonegap-sdk-installation).
* Please view the official [OneSignal Ionic SDK Installation](https://documentation.onesignal.com/docs/ionic-sdk-setup) guide
* for more information.
*
* #### Icons
* If you want to use generated icons with command `ionic cordova resources`:

View File

@@ -0,0 +1,111 @@
import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core';
import { Injectable } from '@angular/core';
/**
* @name Open Native Settings
* @description
* Plugin to open native screens of iOS/android settings
* @usage
* You can open any of these settings:
* ```
* "about", // ios
"accessibility", // ios, android
"account", // ios, android
"airplane_mode", // ios, android
"apn", // android
"application_details", // ios, android
"application_development", // android
"application", // android
"autolock", // ios
"battery_optimization", // android
"bluetooth", // ios, android
"castle", // ios
"captioning", // android
"cast", // android
"cellular_usage", // ios
"configuration_list", // ios
"data_roaming", // android
"date", // ios, android
"display", // ios, android
"dream", // android
"facetime", // ios
"home", // android
"keyboard", // ios, android
"keyboard_subtype", // android
"locale", // ios, android
"location", // ios, android
"locations", // ios
"manage_all_applications", // android
"manage_applications", // android
"memory_card", // android
"music", // ios
"music_equalizer", // ios
"music_volume", // ios
"network", // ios, android
"nike_ipod", // ios
"nfcsharing", // android
"nfc_payment", // android
"nfc_settings", // android
"notes", // ios
"notification_id", // ios
"passbook", // ios
"phone", // ios
"photos", // ios
"print", // android
"privacy", // android
"quick_launch", // android
"reset", // ios
"ringtone", // ios
"browser", // ios
"search", // ios, android
"security", // android
"settings", // ios, android
"show_regulatory_info",
"sound", // ios, android
"software_update", // ios
"storage", // ios, android
"store", // ios, android
"sync", // android
"tethering", // ios
"twitter", // ios
"touch", // ios
"usage", // ios, android
"user_dictionary", // android
"video", // ios
"voice_input", // android
"vpn", // ios
"wallpaper", // ios
"wifi_ip", // android
"wifi", // ios, android
"wireless" // android
```
* ```typescript
* import { OpenNativeSettings } from '@ionic-native/open-native-settings';
*
*
* constructor(private openNativeSettings: OpenNativeSettings) { }
*
* ...
*
*
* ```
*/
@Plugin({
pluginName: 'OpenNativeSettings',
plugin: 'cordova-open-native-settings',
pluginRef: 'cordova.plugins.settings',
repo: 'https://github.com/guyromb/Cordova-open-native-settings',
platforms: ['Android', 'iOS']
})
@Injectable()
export class OpenNativeSettings extends IonicNativePlugin {
/**
* Opens a setting dialog
* @param setting {string} setting name
* @return {Promise<any>}
*/
@Cordova()
open(setting: string): Promise<any> { return; }
}

View File

@@ -204,6 +204,12 @@ export class PayPalPayment {
*/
items: Array<PayPalItem>;
/**
* Optional payee email, if your app is paying a third-party merchant.
* The payee's email. It must be a valid PayPal email address.
*/
payeeEmail: string;
/**
* Optional customer shipping address, if your app wishes to provide this to the SDK.
*/

View File

@@ -61,7 +61,7 @@ export interface LocalNotificationOptions {
* import { PhonegapLocalNotification } from '@ionic-native/phonegap-local-notification';
*
*
* constructor(private localNotification: PhonegapLocalNotifications) { }
* constructor(private localNotification: PhonegapLocalNotification) { }
*
* ...
*
@@ -87,7 +87,7 @@ export interface LocalNotificationOptions {
*/
@Plugin({
pluginName: 'Phonegap Local Notifications',
plugin: 'phonegap-local-notifications',
plugin: 'phonegap-plugin-local-notification',
pluginRef: 'Notification',
repo: 'https://github.com/phonegap/phonegap-plugin-local-notification',
platforms: ['Android', 'Browser', 'iOS', 'Windows']

View File

@@ -1,7 +1,54 @@
import { Plugin, Cordova, CordovaFiniteObservable, IonicNativePlugin } from '@ionic-native/core';
import { Plugin, Cordova, IonicNativePlugin, CordovaOptions, wrap } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observer } from 'rxjs/Observer';
import { Injectable } from '@angular/core';
/**
* @hidden
*/
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?: string;
/**
* Function that gets called after resultFinalPredicate, and removes service data that indicates end of stream from the result.
*/
resultTransform?: string;
}
/**
* @hidden
*
* Wraps method that returns an observable that can be completed. Provided opts.resultFinalPredicate dictates when the observable completes.
*/
export function CordovaFiniteObservable(opts: CordovaFiniteObservableOptions = {}) {
opts.observable = true;
return (target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>) => {
return {
value: function(...args: any[]) {
const wrappedObservable: Observable<any> = wrap(this, methodName, opts).apply(this, args);
return new Observable<any>((observer: Observer<any>) => {
const wrappedSubscription = wrappedObservable.subscribe({
next: (x: any) => {
observer.next(opts.resultTransform ? x[opts.resultTransform] : x);
if (opts.resultFinalPredicate && x[opts.resultFinalPredicate]) {
observer.complete();
}
},
error: (err: any) => { observer.error(err); },
complete: () => { observer.complete(); }
});
return () => {
wrappedSubscription.unsubscribe();
};
});
},
enumerable: true
};
};
}
/**
* @name Photo Library
* @description
@@ -31,8 +78,8 @@ import { Injectable } from '@angular/core';
* console.log(libraryItem.albumIds); // array of ids of appropriate AlbumItem, only of includeAlbumsData was used
* });
* },
* error: err => {},
* complete: () => { console.log('could not get photos'); }
* error: err => { console.log('could not get photos'); },
* complete: () => { console.log('done getting photos'); }
* });
* })
* .catch(err => console.log('permissions weren\'t granted'));
@@ -58,8 +105,8 @@ export class PhotoLibrary extends IonicNativePlugin {
*/
@CordovaFiniteObservable({
callbackOrder: 'reverse',
resultFinalPredicate: (result: { isLastChunk: boolean }) => { return result.isLastChunk; },
resultTransform: (result: { library: LibraryItem[] }) => { return result.library; },
resultFinalPredicate: 'isLastChunk',
resultTransform: 'library'
})
getLibrary(options?: GetLibraryOptions): Observable<LibraryItem[]> { return; }
@@ -69,7 +116,7 @@ export class PhotoLibrary extends IonicNativePlugin {
* @return { Promise<void>} Returns a promise that resolves when permissions are granted, and fails when not.
*/
@Cordova({
callbackOrder: 'reverse',
callbackOrder: 'reverse'
})
requestAuthorization(options?: RequestAuthorizationOptions): Promise<void> { return; }
@@ -78,7 +125,7 @@ export class PhotoLibrary extends IonicNativePlugin {
* @return {Promise<AlbumItem[]>} Resolves to list of albums.
*/
@Cordova({
callbackOrder: 'reverse',
callbackOrder: 'reverse'
})
getAlbums(): Promise<AlbumItem[]> { return; }

View File

@@ -1,5 +1,13 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
export interface PhotoViewerOptions {
/**
* Set to false to disable the share button (Android only). Default: true
*/
share?: boolean;
}
/**
* @name Photo Viewer
* @description This plugin can display your image in full screen with the ability to pan, zoom, and share the image.
@@ -29,8 +37,8 @@ export class PhotoViewer extends IonicNativePlugin {
* Shows an image in full screen
* @param url {string} URL or path to image
* @param title {string}
* @param options {any}
* @param options {PhotoViewerOptions}
*/
@Cordova({sync: true})
show(url: string, title?: string, options?: {share?: boolean}): void { }
show(url: string, title?: string, options?: PhotoViewerOptions): void { }
}

View File

@@ -0,0 +1,173 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, CordovaInstance, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* Information about the currently running app
*/
export interface AppInfo {
platform: string;
platformVersion: string;
version: string;
bundleName: string;
bundleVersion: string;
}
/**
* Information about the current live update
*/
export interface DeployInfo {
deploy_uuid: string;
channel: string;
binary_version: string;
}
/**
* Object for manually configuring deploy
*/
export interface DeployConfig {
appId?: string;
host?: string;
channel?: string;
}
/**
* @hidden
*/
export class ProDeploy {
constructor(private _objectInstance: any) { }
/**
* Re-initialize Deploy plugin with a new App ID and host. Not used in most cases.
* @param config A valid Deploy config object
*/
@CordovaInstance()
init(config: DeployConfig): Promise<any> { return; }
/**
* Check a channel for an available update
* @return {Promise<string>} Resolves with 'true' or 'false', or rejects with an error.
*/
@CordovaInstance({
observable: true
})
check(): Promise<string> { return; }
/**
* Download an available version
* @return {Observable<any>} Updates with percent completion, or errors with a message.
*/
@CordovaInstance({
observable: true
})
download(): Observable<any> { return; }
/**
* Unzip the latest downloaded version
* @return {Observable<any>} Updates with percent completion, or errors with a message.
*/
@CordovaInstance()
extract(): Observable<any> { return; }
/**
* Reload app with the deployed version
*/
@CordovaInstance()
redirect(): Promise<any> { return; }
/**
* Get info about the version running on the device
* @return {Promise<DeployInfo>} Information about the current version running on the app.
*/
@CordovaInstance()
info(): Promise<DeployInfo> { return; }
/**
* List versions stored on the device
*/
@CordovaInstance()
getVersions(): Promise<any> { return; }
/**
* Delete a version stored on the device by UUID
* @param version A version UUID
*/
@CordovaInstance()
deleteVersion(version: string): Promise<any> { return; }
}
/**
* @name Pro
* @description
* This plugin enables Ionic Pro services like live updates and error monitoring
*
* @usage
* ```typescript
* import { Pro, AppInfo, DeployInfo } from '@ionic-native/pro';
*
*
* constructor(private pro: Pro) { }
*
* // Get app info
* this.pro.getAppInfo().then((res: AppInfo) => {
* console.log(res)
* })
*
* // Get live update info
* this.pro.deploy.info().then((res: DeployInfo) => {
* console.log(res)
* })
* ```
*/
@Plugin({
pluginName: 'Pro',
plugin: 'cordova-plugin-ionic',
pluginRef: 'IonicCordova',
repo: 'https://github.com/ionic-team/cordova-plugin-ionic',
platforms: ['Android', 'iOS'],
install: 'ionic cordova plugin add cordova-plugin-ionic --save --variable APP_ID="XXXXXXXX" --variable CHANNEL_NAME="Channel"'
})
@Injectable()
export class Pro extends IonicNativePlugin {
/**
* Ionic Pro Deploy .js API.
*/
deploy: ProDeploy = new ProDeploy(Pro.getPlugin().deploy);
/**
* Not yet implemented
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
enableCrashLogging(): Promise<any> { return; }
/**
* Not yet implemented
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
checkForPendingCrash(): Promise<any> { return; }
/**
* Not yet implemented
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
loadPendingCrash(): Promise<any> { return; }
/**
* Not yet implemented
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
forceCrash(): Promise<any> { return; }
/**
* Get information about the currently running app
* @return {Promise<any>} Returns a promise that resolves with current app info
*/
@Cordova()
getAppInfo(): Promise<AppInfo> { return; }
}

View File

@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { Cordova, Plugin, CordovaInstance, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare var window: any;
declare const window: any;
export type EventResponse = RegistrationEventResponse & NotificationEventResponse & Error;
@@ -62,16 +62,10 @@ export interface NotificationEventAdditionalData {
}
export interface IOSPushOptions {
/**
* Maps to the project number in the Google Developer Console. Setting this
* uses GCM for notifications instead of native.
*/
senderID?: string;
/**
* Whether to use prod or sandbox GCM setting.
*/
gcmSandbox?: boolean | string;
fcmSandbox?: boolean | string;
/**
* If true the device shows an alert on receipt of notification.
@@ -186,15 +180,48 @@ export interface AndroidPushOptions {
* subscribe to a GcmPubSub topic.
*/
topics?: string[];
/**
* The key to search for text of notification.
*/
messageKey?: string;
/**
* The key to search for title of notification.
*/
titleKey?: string;
}
export interface BrowserPushOptions {
/**
* Optional. Your GCM API key if you are using VAPID keys.
*/
applicationServerKey?: string;
/**
* URL for the push server you want to use.
* Default: http://push.api.phonegap.com/v1/push Optional.
*/
pushServiceURL?: string;
}
export interface PushOptions {
ios?: IOSPushOptions;
android?: AndroidPushOptions;
windows?: any;
browser?: BrowserPushOptions;
}
export type PushEvent = 'registration' | 'error' | 'notification';
export type Priority = 1 | 2 | 3 | 4 | 5;
export interface Channel {
id: string;
description: string;
importance: Priority;
}
export type PushEvent = string;
/**
* @name Push
@@ -226,22 +253,38 @@ export type PushEvent = 'registration' | 'error' | 'notification';
*
* });
*
* // Create a channel (Android O and above). You'll need to provide the id, description and importance properties.
* this.push.createChannel({
* id: "testchannel1",
* description: "My first test channel",
* // The importance property goes from 1 = Lowest, 2 = Low, 3 = Normal, 4 = High and 5 = Highest.
* importance: 3
* }).then(() => console.log('Channel created'));
*
* // Delete a channel (Android O and above)
* this.push.deleteChannel('testchannel1').then(() => console.log('Channel deleted'));
*
* // Return a list of currently configured channels
* this.push.listChannels().then((channels) => console.log('List of channels', channels))
*
* // to initialize push notifications
*
* const options: PushOptions = {
* android: {
* senderID: '12345679'
* },
* android: {},
* ios: {
* alert: 'true',
* badge: true,
* sound: 'false'
* },
* windows: {}
* windows: {},
* browser: {
* pushServiceURL: 'http://push.api.phonegap.com/v1/push'
* }
* };
*
* const pushObject: PushObject = this.push.init(options);
*
*
* pushObject.on('notification').subscribe((notification: any) => console.log('Received a notification', notification));
*
* pushObject.on('registration').subscribe((registration: any) => console.log('Device registered', registration));
@@ -257,6 +300,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
* NotificationEventAdditionalData
* IOSPushOptions
* AndroidPushOptions
* BrowserPushOptions
* PushOptions
*/
@Plugin({
@@ -264,8 +308,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
plugin: 'phonegap-plugin-push',
pluginRef: 'PushNotification',
repo: 'https://github.com/phonegap/phonegap-plugin-push',
install: 'ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID=XXXXXXXXX',
installVariables: ['SENDER_ID'],
install: 'ionic cordova plugin add phonegap-plugin-push',
platforms: ['Android', 'Browser', 'iOS', 'Windows']
})
@Injectable()
@@ -287,6 +330,27 @@ export class Push extends IonicNativePlugin {
@Cordova()
hasPermission(): Promise<{ isEnabled: boolean }> { return; }
/**
* Create a new notification channel for Android O and above.
* @param channel {Channel}
*/
@Cordova()
createChannel(channel: Channel): Promise<any> { return; }
/**
* Delete a notification channel for Android O and above.
* @param id
*/
@Cordova()
deleteChannel(id: string): Promise<any> { return; }
/**
* Returns a list of currently configured channels.
* @return {Promise<Channel[]>}
*/
@Cordova()
listChannels(): Promise<Channel[]> { return; }
}
/**
@@ -350,9 +414,10 @@ export class PushObject {
* iOS only
* Tells the OS that you are done processing a background push notification.
* successHandler gets called when background push processing is successfully completed.
* @param id
*/
@CordovaInstance()
finish(): Promise<any> { return; }
finish(id?: string): Promise<any> { return; }
/**
* Tells the OS to clear all notifications from the Notification Center

View File

@@ -159,6 +159,13 @@ export class QRScanner extends IonicNativePlugin {
})
enableLight(): Promise<QRScannerStatus> { return; }
/**
* Destroy the scanner instance.
* @returns {Promise<QRScannerStatus>}
*/
@Cordova()
destroy(): Promise<QRScannerStatus> { return; }
/**
* Disable the device's light.
* @return {Promise<QRScannerStatus>}

View File

@@ -0,0 +1,46 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
/**
* @paid
* @beta
* @name Regula Document Reader
* @description
* Plugin for reading and validation of identification documents.
*
* @usage
* ```typescript
* import { RegulaDocumentReader } from '@ionic-native/regula-document-reader';
*
* let license; // read regula.license file
* RegulaDocumentReader.initReader(license); // initialize reader
* RegulaDocumentReader.scanDocument().then((result) => {
* // read result
* })
* ```
*/
@Plugin({
pluginName: 'Regula Document Reader',
plugin: 'cordova-plugin-documentreader',
pluginRef: 'DocumentReader',
repo: 'https://github.com/regulaforensics/cordova-plugin-documentreader.git',
platforms: ['iOS', 'Android'],
install: 'ionic plugin add cordova-plugin-documentreader --variable CAMERA_USAGE_DESCRIPTION="To take photo"',
})
@Injectable()
export class RegulaDocumentReader extends IonicNativePlugin {
/**
* Initialize the scanner
* @param license {any} License data
*/
@Cordova()
initReader(license: any): void {}
/**
* Run the scanner
* @return {Promise<string[]>} Returns a promise that resolves when results was got, and fails when not
*/
@Cordova()
scanDocument(): Promise<string[]> { return; }
}

View File

@@ -38,7 +38,7 @@ export interface SafariViewControllerOptions {
* enterReaderModeIfAvailable: true,
* tintColor: '#ff0000'
* })
* .then((result: any) => {
* .subscribe((result: any) => {
* if(result.event === 'opened') console.log('Opened');
* else if(result.event === 'loaded') console.log('Loaded');
* else if(result.event === 'closed') console.log('Closed');

View File

@@ -12,6 +12,12 @@ export interface SerialPermissionOptions {
export interface SerialOpenOptions {
baudRate: number;
dataBits: number;
stopBits: number;
parity: number;
dtr: boolean;
rts: boolean;
sleepOnPause: boolean;
}
/**
@@ -29,7 +35,13 @@ export interface SerialOpenOptions {
*
* this.serial.requestPermission().then(() => {
* this.serial.open({
* baudRate: 9800
* baudRate: 9800,
* dataBits: 4,
* stopBits: 1,
* parity: 0,
* dtr: true,
* rts: true,
* sleepOnPause: false
* }).then(() => {
* console.log('Serial connection opened');
* });

View File

@@ -29,7 +29,7 @@ export interface SmsOptionsAndroid {
* @name SMS
* @description
*
* Requires Cordova plugin: cordova-plugin-sms. For more info, please see the [SMS plugin docs](https://github.com/cordova-sms/cordova-sms-plugin).
* Requires Cordova plugin: cordova-sms-plugin. For more info, please see the [SMS plugin docs](https://github.com/cordova-sms/cordova-sms-plugin).
*
* @usage
* ```typescript

View File

@@ -29,7 +29,7 @@ export interface SpinnerDialogIOSOptions {
@Plugin({
pluginName: 'SpinnerDialog',
plugin: 'cordova-plugin-native-spinner',
pluginRef: 'window.plugins.spinnerDialog',
pluginRef: 'SpinnerDialog',
repo: 'https://github.com/greybax/cordova-plugin-native-spinner',
platforms: ['Android', 'iOS', 'Windows Phone 8', 'Windows']
})

View File

@@ -20,6 +20,10 @@ export interface SQLiteDatabaseConfig {
* support opening pre-filled databases with https://github.com/litehelpers/cordova-sqlite-ext
*/
createFromLocation?: number;
/**
* support encrypted databases with https://github.com/litehelpers/Cordova-sqlcipher-adapter
*/
key?: string;
}
/**

View File

@@ -79,6 +79,31 @@ export interface StripeBankAccountParams {
account_holder_type?: string;
}
export interface StripeCardTokenRes {
/**
* Card Object.
*/
card: {
brand: string,
exp_month: number,
exp_year: number,
funding: string,
last4: string
};
/**
* Token Request Date Time.
*/
created: string;
/**
* Card Token.
*/
id: string;
/**
* Source Type (card or account).
*/
type: string;
}
/**
* @name Stripe
* @description
@@ -102,7 +127,7 @@ export interface StripeBankAccountParams {
* };
*
* this.stripe.createCardToken(card)
* .then(token => console.log(token))
* .then(token => console.log(token.id))
* .catch(error => console.error(error));
*
* ```
@@ -131,10 +156,10 @@ export class Stripe extends IonicNativePlugin {
/**
* Create Credit Card Token
* @param params {StripeCardTokenParams} Credit card information
* @return {Promise<string>} returns a promise that resolves with the token, or rejects with an error
* @return {Promise<StripeCardTokenRes>} returns a promise that resolves with the token object, or rejects with an error
*/
@Cordova()
createCardToken(params: StripeCardTokenParams): Promise<string> { return; }
createCardToken(params: StripeCardTokenParams): Promise<StripeCardTokenRes> { return; }
/**
* Create a bank account token

View File

@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core';
/**
* @name Taptic Engine
* @description
* An Ionic plugin to use Taptic Engine API on iPHone 7, 7 Plus or newer.
* An Ionic plugin to use Taptic Engine API on iPhone 7, 7 Plus or newer.
*
* @usage
* ```typescript

View File

@@ -1,10 +1,7 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, CordovaFunctionOverride, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
declare var window: any;
export interface ThreeDeeTouchQuickAction {
/**
@@ -165,16 +162,8 @@ export class ThreeDeeTouch extends IonicNativePlugin {
* When a home icon is pressed, your app launches and this JS callback is invoked.
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
*/
onHomeIconPressed(): Observable<any> {
return new Observable(observer => {
if (window.ThreeDeeTouch) {
window.ThreeDeeTouch.onHomeIconPressed = observer.next.bind(observer);
} else {
observer.error('3dTouch plugin is not available.');
observer.complete();
}
});
}
@CordovaFunctionOverride()
onHomeIconPressed(): Observable<any> { return; }
/**
* Enable Link Preview.

View File

@@ -55,9 +55,9 @@ export interface TwitterConnectResponse {
pluginName: 'TwitterConnect',
plugin: 'twitter-connect-plugin',
pluginRef: 'TwitterConnect',
repo: 'https://github.com/ManifestWebDesign/twitter-connect-plugin',
install: 'ionic cordova plugin add twitter-connect-plugin --variable FABRIC_KEY=fabric_API_key',
installVariables: ['FABRIC_KEY'],
repo: 'https://github.com/chroa/twitter-connect-plugin',
install: 'ionic cordova plugin add https://github.com/chroa/twitter-connect-plugin --variable FABRIC_KEY=<Fabric API Key> --variable TWITTER_KEY=<Twitter Consumer Key> --variable TWITTER_SECRET=<Twitter Consumer Secret>',
installVariables: ['FABRIC_KEY', 'TWITTER_KEY', 'TWITTER_SECRET'],
platforms: ['Android', 'iOS']
})
@Injectable()

View File

@@ -0,0 +1,69 @@
import { Injectable } from '@angular/core';
import { Plugin, CordovaProperty, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Uid
* @description
* Get unique identifiers: UUID, IMEI, IMSI, ICCID and MAC.
*
* @usage
* ```typescript
* import { Uid } from '@ionic-native/uid';
* import { AndroidPermissions } from '@ionic-native/android-permissions';
*
* constructor(private uid: Uid, private androidPermissions: AndroidPermissions) { }
*
*
* async getImei() {
* const { hasPermission } = await this.androidPermissions.checkPermission(
* this.androidPermissions.PERMISSION.READ_PHONE_STATE
* );
*
* if (!hasPermission) {
* const result = await this.androidPermissions.requestPermission(
* this.androidPermissions.PERMISSION.READ_PHONE_STATE
* );
*
* if (!result.hasPermission) {
* throw new Error('Permissions required');
* }
*
* // ok, a user gave us permission, we can get him identifiers after restart app
* return;
* }
*
* return this.uid.IMEI
* }
* ```
*/
@Plugin({
pluginName: 'Uid',
plugin: 'https://github.com/hygieiasoft/cordova-plugin-uid',
pluginRef: 'cordova.plugins.uid',
repo: 'https://github.com/hygieiasoft/cordova-plugin-uid',
platforms: ['Android']
})
@Injectable()
export class Uid extends IonicNativePlugin {
/** Get the device Universally Unique Identifier (UUID). */
@CordovaProperty
UUID: string;
/** Get the device International Mobile Station Equipment Identity (IMEI). */
@CordovaProperty
IMEI: string;
/** Get the device International mobile Subscriber Identity (IMSI). */
@CordovaProperty
IMSI: string;
/** Get the sim Integrated Circuit Card Identifier (ICCID). */
@CordovaProperty
ICCID: string;
/** Get the Media Access Control address (MAC). */
@CordovaProperty
MAC: string;
}

View File

@@ -11,7 +11,7 @@ export interface VideoOptions {
*/
volume?: number;
/**
* There are to options for the scaling mode. SCALE_TO_FIT which is default and SCALE_TO_FIT_WITH_CROPPING.
* There are two options for the scaling mode. SCALE_TO_FIT which is default and SCALE_TO_FIT_WITH_CROPPING.
* These strings are the only ones which can be passed as option.
*/
scalingMode?: number;

View File

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

View File

@@ -14,7 +14,7 @@ export interface ZeroconfService {
}
export interface ZeroconfResult {
action: 'registered' | 'added' | 'removed';
action: 'registered' | 'added' | 'removed' | 'resolved';
service: ZeroconfService;
}
@@ -124,4 +124,11 @@ export class Zeroconf extends IonicNativePlugin {
*/
@Cordova()
close(): Promise<void> { return; }
/**
* Re-initializes the plugin to clean service & browser state.
* @return {Promise<void>}
*/
@Cordova()
reInit(): Promise<void> { return; }
}