Compare commits

..

81 Commits

Author SHA1 Message Date
Ibby Hadeed
9d70ec025d chore(): update changelog 2017-12-11 19:30:24 -05:00
Ibby Hadeed
8d4406ae82 4.5.1 2017-12-11 19:30:16 -05:00
Ibby Hadeed
ca922761b6 Update 2017-12-11 19:30:07 -05:00
Ibby Hadeed
3bb669b6ba 4.6.0 2017-12-11 19:27:22 -05:00
Ibby Hadeed
6cd97ca0ee fix(core): fix issue with CordovaFunctionOverride decorator
Decorator should not check if the method exists, only if the plugin exists
2017-12-11 19:26:41 -05:00
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
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
50 changed files with 6098 additions and 3919 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
```

View File

@@ -1,5 +1,106 @@
<a name="4.5.1"></a>
## [4.5.1](https://github.com/ionic-team/ionic-native/compare/v4.5.0...v4.5.1) (2017-12-12)
### Bug Fixes
* **core:** fix issue with CordovaFunctionOverride decorator ([6cd97ca](https://github.com/ionic-team/ionic-native/commit/6cd97ca))
<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.2](https://github.com/ionic-team/ionic-native/compare/v4.3.0...v4.3.2) (2017-10-06)
## [4.3.1](https://github.com/ionic-team/ionic-native/compare/v4.3.0...4.3.1) (2017-10-06)
### Bug Fixes
@@ -24,7 +125,6 @@
* **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:** 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))
* **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))
@@ -49,6 +149,16 @@
<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)

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; }
```

6856
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.3.1",
"version": "4.5.1",
"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

@@ -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

@@ -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

@@ -105,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
*/
@@ -167,7 +156,6 @@ export function CordovaCheck(opts: CordovaCheckOptions = {}) {
};
}
/**
* @private
*
@@ -323,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

@@ -230,7 +230,7 @@ export function wrapEventObservable(event: string, element: any = window): Obser
export function overrideFunction(pluginObj: any, methodName: string, args: any[], opts: any = {}): Observable<any> {
return new Observable(observer => {
const availabilityCheck = checkAvailability(pluginObj, methodName);
const availabilityCheck = checkAvailability(pluginObj, null, pluginObj.constructor.getPluginName());
if (availabilityCheck === true) {
const pluginInstance = getPlugin(pluginObj.constructor.getPluginRef());

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

@@ -18,13 +18,15 @@ import { Injectable } from '@angular/core';
* ...
*
* this.androidPermissions.checkPermission(this.androidPermissions.PERMISSION.CAMERA).then(
* success => console.log('Permission granted'),
* 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

@@ -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).
*

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

@@ -45,7 +45,6 @@ import { Injectable } from '@angular/core';
* return Observable.throw(error.json() || 'Couchbase Lite error');
* })
* }
*
* getAllDbs() {
* let url = this.getUrl();
* url = url+'_all_dbs';
@@ -56,6 +55,59 @@ import { Injectable } from '@angular/core';
* 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

@@ -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<{isEnabled: boolean}>}
*/
* Check permission to receive push notifications
* @return {Promise<{isEnabled: boolean}>}
*/
@Cordova()
hasPermission(): Promise<{isEnabled: boolean}> { 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,14 +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; }
unregister(): Promise<any> {
return;
}
/**
* Log an event using Analytics
@@ -121,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
@@ -129,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
@@ -137,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
@@ -145,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
@@ -154,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
@@ -165,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
@@ -184,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
@@ -197,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
@@ -206,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
@@ -216,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
@@ -229,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.

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

@@ -113,6 +113,13 @@ export class HTTP extends IonicNativePlugin {
@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
@@ -140,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
@@ -178,6 +177,16 @@ export class HTTP extends IonicNativePlugin {
@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

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

@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Plugin, Cordova, CordovaFunctionOverride, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
export interface IndexItem {
domain: string;
@@ -95,11 +96,10 @@ export class IndexAppContent extends IonicNativePlugin {
/**
* 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.
* @param {IndexItem} Clicked Item
* @return {Promise<any>} Returns promise
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
*/
@Cordova()
onItemPressed(payload: IndexItem) {
@CordovaFunctionOverride()
onItemPressed(): Observable<any> {
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

@@ -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']

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.

View File

@@ -3,22 +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;
hasSkipForward: boolean;
hasSkipBackward: boolean;
skipForwardInterval: number;
skipBackwardInterval: number;
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;
}
/**
@@ -51,16 +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"'
* });
*
@@ -91,7 +93,7 @@ export interface MusicControlsOptions {
* break;
* case 'music-controls-seek-to':
* const seekToInSeconds = JSON.parse(action).position;
* MusicControls.updateElapsed({
* this.musicControls.updateElapsed({
* elapsed: seekToInSeconds,
* isPlaying: true
* });

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
@@ -49,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
@@ -62,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.
@@ -218,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

@@ -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

@@ -61,7 +61,7 @@ export interface LocalNotificationOptions {
* import { PhonegapLocalNotification } from '@ionic-native/phonegap-local-notification';
*
*
* constructor(private localNotification: PhonegapLocalNotifications) { }
* constructor(private localNotification: PhonegapLocalNotification) { }
*
* ...
*

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
@@ -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,6 @@
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
@@ -21,6 +22,15 @@ export interface DeployInfo {
binary_version: string;
}
/**
* Object for manually configuring deploy
*/
export interface DeployConfig {
appId?: string;
host?: string;
channel?: string;
}
/**
* @hidden
*/
@@ -30,68 +40,61 @@ export class ProDeploy {
/**
* Re-initialize Deploy plugin with a new App ID and host. Not used in most cases.
* @param appId An Ionic Pro app ID
* @param host An Ionic Pro live update API
* @param config A valid Deploy config object
*/
@CordovaInstance()
init(appId: string, host: string): Promise<any> { return; }
@CordovaInstance()
debug(): Promise<any> { return; }
@CordovaInstance()
clearDebug(): Promise<any> { return; }
init(config: DeployConfig): Promise<any> { return; }
/**
* Check a channel for an available update
* @param appId An Ionic Pro app ID
* @param channelName An Ionic Pro channel name
* @return {Promise<string>} Resolves with 'true' or 'false', or rejects with an error.
*/
@CordovaInstance()
check(appId: string, channelName: string): Promise<any> { return; }
@CordovaInstance({
observable: true
})
check(): Promise<string> { return; }
/**
* Download an available version
* @param appId An Ionic Pro app ID
* @return {Observable<any>} Updates with percent completion, or errors with a message.
*/
@CordovaInstance()
download(appId: string): Promise<any> { return; }
@CordovaInstance({
observable: true
})
download(): Observable<any> { return; }
/**
* Unzip the latest downloaded version
* @param appId An Ionic Pro app ID
* @return {Observable<any>} Updates with percent completion, or errors with a message.
*/
@CordovaInstance()
extract(appId: string): Promise<any> { return; }
extract(): Observable<any> { return; }
/**
* Reload app with the deployed version
* @param appId An Ionic Pro app ID
*/
@CordovaInstance()
redirect(appId: string): Promise<any> { return; }
redirect(): Promise<any> { return; }
/**
* Get info about the version running on the device
* @param appId An Ionic Pro app ID
* @return {Promise<DeployInfo>} Information about the current version running on the app.
*/
@CordovaInstance()
info(appId: string): Promise<DeployInfo> { return; }
info(): Promise<DeployInfo> { return; }
/**
* List versions stored on the device
* @param appId An Ionic Pro app ID
*/
@CordovaInstance()
getVersions(appId: string): Promise<any> { return; }
getVersions(): Promise<any> { return; }
/**
* Delete a version stored on the device by UUID
* @param appId An Ionic Pro app ID
* @param version A version UUID
*/
@CordovaInstance()
deleteVersion(appId: string, version: string): Promise<any> { return; }
deleteVersion(version: string): Promise<any> { return; }
}
/**

View File

@@ -131,6 +131,11 @@ export interface CategoryActionData {
}
export interface AndroidPushOptions {
/**
* Maps to the project number in the Google Developer Console.
*/
senderID: string;
/**
* The name of a drawable resource to use as the small-icon. The name should
* not include the extension.
@@ -208,7 +213,15 @@ export interface PushOptions {
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
@@ -240,6 +253,20 @@ 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 = {
@@ -257,6 +284,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
*
* 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));
@@ -302,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; }
}
/**
@@ -365,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

@@ -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

@@ -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

@@ -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

@@ -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; }
}