Compare commits

..
Author SHA1 Message Date
Daniel f223ed4fa1 chore(): update changelog 2018-09-18 16:25:35 +02:00
Daniel 7160953683 5.0.0-beta.19 2018-09-18 16:25:26 +02:00
Daniel 4c55212b8d chore(pacakge): bump deps 2018-09-18 16:24:57 +02:00
Daniel 38a1dd1187 Merge branch 'master' into v5 2018-09-18 16:24:05 +02:00
Daniel 7cff234c26 chore(): update changelog 2018-09-17 18:27:54 +02:00
Daniel 039c6d40af Merge branch 'master' into v5 2018-09-17 18:23:18 +02:00
Daniel 46b1a7385c docs: add @beta tag to docs until v5 release 2018-09-17 17:24:17 +02:00
Daniel SoglandGitHub 737ad518c8 Update tslint.json 2018-09-17 16:36:18 +02:00
Daniel 89ed51cc49 refactor: follow callable-types lint rule 2018-09-17 16:18:31 +02:00
Daniel 26a8df9b7c refactor: follow no-angle-bracket-type-assertion lint rule 2018-09-17 16:14:23 +02:00
Daniel 84db491ead refactor(code-push): follow member-access lint rule 2018-09-17 16:09:15 +02:00
Daniel d5011fb105 refactor: follow space-before-function-paren lint rule 2018-09-17 16:07:44 +02:00
Daniel c9d41ebd8a refactor: follow array-type lint rule 2018-09-17 16:05:37 +02:00
Daniel 60a7190eda refactor(in-app-review): ignore no-irregular-whitespace rule 2018-09-17 15:52:39 +02:00
Daniel 261106131e fix(index-app-content): fix lint 2018-09-17 15:48:57 +02:00
Daniel 4803912350 fix(ms-adal): remove duplicate imports 2018-09-17 15:48:37 +02:00
Daniel 9feefe8454 fix(web-intent): fix lint 2018-09-17 15:43:27 +02:00
Daniel 81df665189 chore(package): bump jest and ts-node 2018-09-17 15:41:59 +02:00
Daniel f2c8edecc4 chore(package): update ionic-lint-rules 2018-09-17 15:37:05 +02:00
Daniel 6c18a8bc4f chore(package): remove more unused packages 2018-09-17 15:25:40 +02:00
Daniel ca7f872a3c chore(package): remove babelify 2018-09-17 15:22:15 +02:00
Daniel 2c04ae5985 chore(scripts): remove fs-extra-promise 2018-09-17 15:18:29 +02:00
Daniel 2e47de2ee3 chore(): update changelog 2018-09-15 11:53:31 +02:00
Daniel 384d1ea71e 5.0.0-beta.18 2018-09-15 11:53:21 +02:00
Daniel f7e76c5f83 chore(package): bump deps 2018-09-15 11:48:44 +02:00
Daniel d2d1f4889e Merge branch 'master' into v5 2018-09-15 11:46:46 +02:00
Daniel 8f8aeb6e6a 5.0.0-beta.17 2018-08-31 20:31:56 +02:00
Daniel f75243e10b chore(): update changelog 2018-08-31 19:34:07 +02:00
Daniel 0f5ae4726d 5.0.0-beta.16 2018-08-31 19:34:01 +02:00
Daniel 5462a2358c chore(package): bump deps 2018-08-31 19:30:57 +02:00
Daniel 9c75e53702 Merge branch 'master' into v5 2018-08-31 19:29:20 +02:00
Max LynchandGitHub 2213673055 Merge pull request #2679 from perrygovier/v5
fix(contacts): fixing builds
2018-08-30 14:41:13 -05:00
perry c8d25a1fc5 fix(camera): fixing builds 2018-08-30 14:16:38 -05:00
Nicolas HENRYandIbby Hadeed bd345818f8 fix(core): wrapEventObservable (#2660)
* fix wrapEventObservable

* fix lint
2018-08-26 19:38:22 -04:00
Daniel 110fb7e8e1 chore(): update changelog 2018-08-25 12:11:37 +02:00
Daniel c0d776cdd2 5.0.0-beta.15 2018-08-25 12:11:21 +02:00
Daniel 89140c1502 docs(bluetooth-le): fix jsdoc 2018-08-25 12:08:48 +02:00
Daniel 8f19719d2a chore(package): bump deps 2018-08-25 12:06:40 +02:00
Daniel 999aca1b8d Merge branch 'master' into v5 2018-08-25 12:05:57 +02:00
Paxton HareandDaniel Sogl 1ad4cc1375 fix(contacts): remove double import of checkAvailability (#2659) 2018-08-25 11:59:19 +02:00
Ibby Hadeed 38b6501612 chore(): handle identifiers in v5 build process
Closes #2652
2018-08-23 10:15:28 -04:00
Paxton HareandIbby Hadeed fe87b68ccc chore(): fix CordovaInstanceProperty decorator (#2655)
This manifests in many plugins just not quite working right.
2018-08-23 09:40:00 -04:00
Paxton HareandIbby Hadeed 9e923fa8da chore(): fix path related issues with v5 build (#2654) 2018-08-23 09:37:10 -04:00
Daniel 5e9c92a773 fix(extended-device-information): fix wrong decorator 2018-08-21 21:12:43 +02:00
Daniel 5ac940d2bf chore(package): bump deps 2018-08-21 20:51:02 +02:00
Daniel e47a3e1522 fix(clevertap): fix jsdoc 2018-08-16 22:46:34 +02:00
Daniel 1a1c665b18 chore(package): bump deps 2018-08-16 22:46:19 +02:00
Daniel f2728f26fe merge master into v5 2018-08-16 22:43:50 +02:00
Daniel SoglandGitHub 2f560d619a docs(contacts): mark as deprecated 2018-07-27 21:39:22 +02:00
Daniel 342b9dace5 chore(): update changelog 2018-07-18 22:21:56 +02:00
Daniel 07557e95ec chore(): update changelog 2018-07-18 22:20:12 +02:00
Daniel b7be1bf9dd 5.0.0-beta.14 2018-07-18 22:19:46 +02:00
Daniel b01c2ee1fb docs(build): fix lint 2018-07-18 22:17:37 +02:00
Daniel bea5eaea1a Merge branch 'master' into v5 2018-07-18 22:12:44 +02:00
Daniel 0f84249b13 chore: update changelog 2018-07-18 21:53:13 +02:00
Daniel 80adfe0891 chore(): update changelog 2018-07-18 21:52:41 +02:00
Daniel 0550a4fcc1 4.10.0 2018-07-18 21:52:19 +02:00
Etienne BLANC-COQUANDandDaniel Sogl e50ef18e10 docs(network-interface): update example (#2602)
Don't need {
2018-07-18 21:50:30 +02:00
MosheandDaniel Sogl b581a5b2b6 feat(ccm): replace plugin source (#2601) 2018-07-18 21:50:16 +02:00
jing-zhouandDaniel Sogl e640983340 feat(alipay): replace plugin (#2591)
BREAKING CHANGE: Replaced plugin with maintained Cordova plugin
2018-07-18 21:49:32 +02:00
Sebastian BaarandDaniel Sogl a6c8045593 feat(classkit): add ClassKit plugin (#2590)
* add classkit plugin

* refactor
2018-07-18 21:48:07 +02:00
Carsten SchindlerandDaniel Sogl ecc698ee7a feat(abbyy-rtr): add ABBYY Real-Time Recognition plugin (#2580)
* feat(abbyy-rtr): add ABBYY Real-Time Recognition plugin

* refactor(abbyy-rtr) add CordovaCheck
2018-07-18 21:47:44 +02:00
Daniel 97b80b533b chore(package): bump deps 2018-07-18 21:46:58 +02:00
Daniel b66d27b794 chore(): update changelog 2018-07-13 17:12:51 +02:00
Daniel c3a9296a36 4.9.2 2018-07-13 17:12:38 +02:00
Gustav BylundandDaniel Sogl 565c766813 fix(sqlite): mark optional arguments for executeSql (#2592) 2018-07-13 17:06:51 +02:00
jasvindersingh-evonandDaniel Sogl 1684202629 docs(document-picker): fix example (#2593) 2018-07-13 17:06:37 +02:00
Don ColemanandDaniel Sogl d95a359719 fix(ble): change signature for autoConnect (#2594)
* fix(ble): change signature for autoConnect (#2573)

* fix(ble): update usage for autoConnect (#2573)
2018-07-13 17:06:17 +02:00
Daniel 12ddf96705 chore(): update changelog 2018-07-09 19:51:19 +02:00
Daniel fead657fbd 4.9.1 2018-07-09 19:50:51 +02:00
Daniel f1d8d3b255 Revert "chore(package): bump deps"
This reverts commit 6af01d2dc1.
2018-07-09 19:48:52 +02:00
Daniel 6af01d2dc1 chore(package): bump deps 2018-07-09 19:45:23 +02:00
Shubham PandeyandDaniel Sogl 006ba4425f docs(linkedin): fix example (#2588)
* added missing `)` in login code
2018-07-08 18:43:54 +02:00
Judson NeerandDaniel Sogl 4f415892b1 feat(network-interface): match latest plugin release (#2587) 2018-07-08 18:43:44 +02:00
MattandDaniel Sogl 713efd7206 docs(sqlite): Add interface for transaction callback function argument (#2586)
The transaction callback function argument is currently typed as `any`, however this isn't very  helpful so I have added a base interface which contains only the `executeSql` function. This function is all that is available on the object returned by WebSQL, but is also available on the full SQLite implementation.
2018-07-08 18:43:31 +02:00
Sebastián RamírezandDaniel Sogl 3f9311090d docs(app-version): explain results (#2582)
* fix(app-version): fix getVersionCode to return number

as is in the actual implementation. Also update and clarify the method docs

* fix(app-version): fix getVersionCode for compatibility
with Android and iOS at the same time
2018-07-04 13:43:46 +02:00
Daniel SoglandGitHub 28a1b83d1d docs(readme): update examples 2018-07-02 10:59:40 +02:00
Cosmic Web ServicesandDaniel Sogl 956e644fa4 fix(health-kit): add missing checkAuthStatus param (#2544)
* Fix checkAuthStatus

* Update index.ts

* Update index.ts
2018-07-02 10:51:10 +02:00
Timothy ShamilovandDaniel Sogl f62a123a34 feat(streaming-media): add new parameters & docs (#2576) 2018-07-02 10:47:28 +02:00
Daniel 8e1ca359ab refactor(build): remove decamelize 2018-07-01 13:16:55 +02:00
Daniel 6ea43ef5e4 refactor(scripts): fix typo 2018-07-01 13:12:27 +02:00
Daniel f9c49dcd3f chore(package): bump deps 2018-07-01 12:55:00 +02:00
filippoandDaniel Sogl 61714ff7ca fix(barcode-scanner): wrong barcode format identifier PDF417 -> PDF_417 (#2574) 2018-06-29 21:38:46 +02:00
CharlesandDaniel Sogl 9f9a3461f7 feat(ble): add missing functions (#2572) 2018-06-29 21:30:13 +02:00
Renjith VKandDaniel Sogl 22ffb4914f docs(deeplinks): update example (#2570)
If it has only one argument, then no need function brackets. It would decrease the readability of the source code snippets.
2018-06-28 14:40:37 +02:00
Daniel SoglandGitHub db70bbd765 Update CHANGELOG.md 2018-06-28 14:37:43 +02:00
Daniel 81287c9edf chore(): update changelog 2018-06-28 14:37:02 +02:00
Daniel 6398dcf479 set version 2018-06-28 14:22:47 +02:00
Daniel 0a758f85e6 Merge branch 'master' into v5 2018-06-28 14:20:20 +02:00
Daniel 3ed896960e chore(): update changelog 2018-06-28 14:12:07 +02:00
Daniel 249d62d4ba set version 2018-06-28 14:04:42 +02:00
Daniel 1d71bdc284 chore(build): test against node 8 2018-06-28 13:51:35 +02:00
Daniel 189d66cc47 fix(index-app-content): fix imports 2018-06-28 13:49:30 +02:00
Daniel fe5b7ce0af docs(index-app-content): fix spelling and lint errors 2018-06-28 13:47:09 +02:00
Daniel 23e0977954 Merge remote-tracking branch 'origin/master' into v5 2018-06-28 13:37:10 +02:00
Daniel 95c8566d76 chore(package): bump deps 2018-06-28 13:25:37 +02:00
Perry GovierandMike Hartington 7d5e7aaa7d fix(appodeal): removed bad imports 2018-06-25 15:57:26 -04:00
Adrian SavinandDaniel Sogl 98d44e6294 fix(healt): add correct return type for query function (#2565)
* update query return type

query is always returning an array

* refactor
2018-06-25 20:09:46 +02:00
Daniel SoglandGitHub 8d571989d4 fix(index-app-content): add missing function 2018-06-25 20:08:28 +02:00
Simpler1andDaniel Sogl e61d574849 feat(plugin): add Sensors plugin (#2268)
* feat(sensors): New plugin for sensors

* refactor

* refactor
2018-06-25 14:35:37 +02:00
Pandiarajan NagarajanandDaniel Sogl fdd63153e0 feat(aes-256): AES256 encryption and decryption plugin added (#2562)
* feat(aes-256): AES256 encryption and decryption plugin added

* refactor
2018-06-25 14:28:15 +02:00
Nicolas HENRYandDaniel Sogl 406ad12232 fix(file-tramsfer): fix v5 imports for file-transfer plugin (#2537) 2018-06-23 17:20:00 +02:00
Florian GouyandDaniel Sogl 9dd4ecde9c docs(camera): Update docs to advise against DATA_URL (#2474)
DATA_URL can be very memory intensive and cause app crashes or out of memory errors.
Use FILE_URI or NATIVE_URI if possible
2018-06-23 17:18:34 +02:00
RobandDaniel Sogl dd9ba0ad3f feat(image-picker): add DATA_URL as an option to ImagePicker (#2325)
As documented in the image picker plugin, it also supports a data url, just like the camera does. However, this option is not documented in Ionic Native currently. I've added this documentation, and have also added an enum with a naming pattern that matches the DestinationType in Camera.

Docs from the image picker plugin:
```
    ...
    // output type, defaults to FILE_URIs.
    // available options are 
    // window.imagePicker.OutputType.FILE_URI (0) or 
    // window.imagePicker.OutputType.BASE64_STRING (1)
    outputType: int
};
```
2018-06-23 17:14:55 +02:00
Sebastian BaarandDaniel Sogl 9f662b6a04 feat(nativegeocoder): change return type to array and add options param (#2319)
* feat(nativegeocoder): add NativeGeocoder plugin

* add district

* update NativeGeocoderReverseResult & refactor code

* delete plugins

* delete index.ts

* type(feat): change return type to array and add options param

* Add 'defaultLocale' to options Object

* let options be optional
2018-06-23 17:14:14 +02:00
Gustav BylundandDaniel Sogl 1dc48e943c docs(pro): add types for return values in deploy (#2292) 2018-06-23 17:14:03 +02:00
Daniel 15a334d87a Merge remote-tracking branch 'origin/master' 2018-06-22 17:54:46 +02:00
Daniel 4d742438b4 chore(): update changelog 2018-06-22 17:54:19 +02:00
Daniel 1013a7d38a 4.8.0 2018-06-22 17:38:17 +02:00
Daniel c574428e0e chore(package): bump deps 2018-06-22 17:36:50 +02:00
MosheandDaniel Sogl ce3591200e docs(card-io): fix example (#2560)
Property 'scan' does not exist on type 'typeof CardIO'
2018-06-21 07:45:44 +02:00
Jonathan FernandezandDaniel Sogl fc088f8431 fix(onesignal): update OSPermissionState interface (#2561)
fix(onesignal): update OSPermissionState interface
2018-06-21 07:45:02 +02:00
Cristian Rivas GómezandDaniel Sogl 392bc5c80a docs(hotspot): add plugin description (#2555) 2018-06-16 11:36:36 +02:00
devdaddyandDaniel Sogl 31fc892b70 feat(photo-library): add maxItems to limit items-iOS (#2554) 2018-06-15 18:14:39 +02:00
Cristian Rivas GómezandDaniel Sogl 5794d249c4 docs(spinner-dialog): add plugin description (#2553) 2018-06-15 17:45:01 +02:00
Frank KönigsteinandDaniel Sogl 3f8a6f2425 fix(background-geolocation): watchLocationMode returns observable (#2547)
* fix(background-geolocation): watchLocationMode returns observable

* fix(package): rm version change
2018-06-14 11:36:02 +02:00
Cristian Rivas GómezandDaniel Sogl dd769b0226 docs(safari-view-controller): add plugin description (#2552) 2018-06-14 07:58:38 +02:00
GabrielTKandDaniel Sogl 8460e6838a feat(hce): add hce plugin wrapper (#2534)
feat(hce): add hce plugin wrapper
2018-06-13 20:06:37 +02:00
DomvelandDaniel Sogl 03e6afbad4 feat(ble): update wrapper to match latest plugin release (#2548)
feat(ble): update wrapper to match latest plugin release
2018-06-13 20:05:05 +02:00
Gaetan WczandDaniel Sogl be370a4f99 fix(healths): add missing attribute on HealthQueryOptionsAggregated (#2550) 2018-06-13 20:04:32 +02:00
Cristian Rivas GómezandDaniel Sogl bb9c581f42 docs(qr-scanner): add plugin description (#2546) 2018-06-11 17:47:24 +02:00
Cristian Rivas GómezandDaniel Sogl d988e12353 docs(pin-dialog): add plugin description (#2545) 2018-06-10 10:54:00 +02:00
Bart WesselinkandDaniel Sogl df254de88b feat(SiriShortcuts): implement Siri Shortcuts plugin in Ionic (#2542)
* feat(SiriShortcuts): implement Siri Shortcuts plugin in Ionic

* refactor
2018-06-09 09:26:15 +02:00
Cristian Rivas GómezandDaniel Sogl 5803c069a3 Add Media Capture plugin description to documentation (#2539) 2018-06-07 08:47:38 +02:00
Cristian Rivas GómezandDaniel Sogl dfbbfc7bd5 docs(card-io): add plugin description (#2530)
* Add description to AdMob Free plugin documentation

* Add description to Card IO plugin documentation
2018-06-06 17:00:27 +02:00
Cristian Rivas GómezandDaniel Sogl 16980f1b6a docs(keyboard): add plugin description (#2533)
* Add description to AdMob Free plugin documentation

* Add plugin description to Keyboard plugin documentation
2018-06-06 13:46:12 +02:00
Cristian Rivas GómezandDaniel Sogl 3311d73730 docs(admob-free): add plugin description (#2529) 2018-06-04 11:29:55 +02:00
hiepxanhandDaniel Sogl a4cc7f7ae1 fix(themeable-browser): allow hidden and clear cache
it wrong from boolean to string, after 1 year i update it
2018-06-03 15:42:17 +02:00
Cristian Rivas GómezandDaniel Sogl e6b02b1875 docs(three-dee-touch): add plugin description (#2524) 2018-06-03 15:41:07 +02:00
Adam DurenandDaniel Sogl c03b73f69c feat(firebase-messaging): add firebase-messaging (#2518)
* feat(firebase-messaging): add firebase-messaging

* refactor
2018-06-03 15:33:18 +02:00
Adam DurenandDaniel Sogl 05423ce299 feat(firebase-config): add firebase-config wrapper (#2517)
* feat(firebase-config): add firebase-config wrapper

* refactor

* refactor
2018-06-03 15:32:04 +02:00
Wouter Klein HeerenbrinkandDaniel Sogl 34aeb19628 feat(send-result): add sendResult method for WebIntent plugin (#2495) 2018-05-27 19:01:36 +02:00
Geoff TripoliandDaniel Sogl d6a9ed134e fix(stripe): fixed casing of postal code param (#2520) 2018-05-22 22:12:13 +02:00
Behrooz ShafieeandIbby Hadeed a0183811f6 fix(in-app-purchase-2): fix ready method signature (#2043) 2018-05-20 13:21:21 -04:00
Cristian Rivas GómezandDaniel Sogl e6d4b41e7e docs(navigation-bar): fix typo
A small misspelling detected here 🙂
2018-05-19 16:56:04 +02:00
Dave AldenandDaniel Sogl 400dbcb1fb feat(cloud-settings): add support for cordova-plugin-cloud-settings (#2494)
* feat(cloud-settings): add support for cordova-plugin-cloud-settings

* refactor
2018-05-19 12:16:14 +02:00
mino922andDaniel Sogl ae6e28de88 feat(local-notifications): added support for foreground option in version 0.9.0-beta.3 of cordova-plugin-local-notifications (#2506) 2018-05-19 12:15:22 +02:00
Geoff TripoliandDaniel Sogl 58615f1cab feat(star-prnt): Added support for connected to devices with barcode readers (#2509) 2018-05-19 12:14:30 +02:00
Kheva MannandDaniel Sogl 7c355350fe feat(onesignal): Added notification stacking (#2512)
* Added collapse_id

Added collapse_id to allow for notification stacking

* Update index.ts
2018-05-19 12:14:12 +02:00
Szymon StasikandIbby Hadeed defb276b22 fix(native-geocoder): set response type to an array (#2505) 2018-05-16 19:16:39 -04:00
Kheva MannandIbby Hadeed e6db28123d fix(onesignal): make params optional (#2507)
Made all properties in OSNotification optional because when you create a push notification the type is OSNotification but it does not have all the same properties required as the OSNotification as a response from a received notification. For example, you don't pass in isAppInFocus when you create a notification but it was causing issues when trying to post a notification because it was showing as required because OSNotification as a response will always have isAppInFocus.
2018-05-16 19:14:27 -04:00
Marty AlcalaandIbby Hadeed 714114d1e0 fix(android-fingerprint-auth): ensure ERRORS array is defined (#2508) 2018-05-16 19:13:24 -04:00
AndyandDaniel Sogl 37ef2fc93f docs(file): fix example
docs(file): fix example
2018-05-09 18:11:55 +02:00
Eran ShmilovichandDaniel Sogl 41a4a43c0c fix(docs) replace android platform with ios (#2500) 2018-05-09 18:11:26 +02:00
Craig RouseandDaniel Sogl 5f41ef1cbc feat(tealium): add tealium ionic wrappers (#2414) 2018-05-03 12:42:47 +02:00
Daniel Imhoff cea1dc14d3 fix(site): no prepended slash 2018-05-02 11:28:40 -05:00
infoxicatorandDaniel Sogl 49ad2118a3 feat(star-prnt) add Encoding and CodePageType enum (#2488)
feat(star-prnt) add Encoding and CodePageType enum
2018-05-01 14:42:17 +02:00
Omar Ben brahimandDaniel Sogl bfe5ae9cf2 feat(InAppReview): add InAppReview plugin (#2483) 2018-05-01 14:41:57 +02:00
DarrynandDaniel Sogl 47f739777e fix(web-intent): registerBroadcastReceiver as Observable (#2491)
* Correcting format of registerBroadcastReceiver, current implementation provides no way to receive the registered broadcasts.
Usage is as follows:
webintent.registerBroadcastReceiver({
      filterActions: [
        'com.example.ACTION'
      ],
      filterCategories: [
        'android.intent.category.DEFAULT'
      ]
    }).subscribe((intent) => {console.log('Received Intent: ' + JSON.stringify(intent.extras));});

* Resolving linting errors

* Resolving additional linting error
2018-05-01 14:41:09 +02:00
Perry GovierandGitHub a1c54f36b4 Merge pull request #2490 from ionic-team/google-maps-docs
docs(google-maps): add menu entry for google maps plugin
2018-04-30 10:17:00 -05:00
Daniel Imhoff 22d5d92dd3 docs(google-maps): add menu entry for google maps plugin 2018-04-30 10:09:23 -05:00
Rida AmiriniandDaniel Sogl 3fa2eff580 docs(android-full-screen): edit example 2018-04-29 18:35:00 +02:00
Brian SoumakianandDaniel Sogl 567f525837 feat(firebase): add verifyPhoneNumber support for iOS
feat(firebase): verifyPhoneNumber now supports iOS
2018-04-26 08:14:14 +02:00
Silviu Bogdan StroeandDaniel Sogl 24cd0a91c4 docs(uptime): remove unnecessary line (#2479)
* docs(uptime): add cordova installation

* feat(uptime): add deep sleep parameter

* Update index.ts

* docs(Uptime): remove unnecessary line
2018-04-24 14:15:07 +02:00
Niklas MerzandDaniel Sogl 50c8c154e3 docs(calldirectory): fix typo (#2478)
I have spotted some typos and added an example for reload.
2018-04-24 11:38:02 +02:00
Niklas MerzandDaniel Sogl 1bfe82959b feat(calldirectory): add call directory plugin (#2473)
* feat(calldirectory): add call directory plugin

* feat(calldirectory): fix parameters and description

* fix typos
2018-04-23 19:36:33 +02:00
Niklas MerzandDaniel Sogl 35e5cfe102 chore(plugin-generator): remove notice of /src/index.ts (#2459) 2018-04-23 18:33:37 +02:00
infoxicatorandDaniel Sogl a1e6befbc0 feat(star-prnt): add StarPRNT plugin
* feat(star-prnt): create StarPRNT base class

* refactor(): refactor code

* refactor(): change JSDOC style
2018-04-23 18:30:58 +02:00
Daniel 234b6ffd44 chore(build): fix build 2018-04-21 15:39:43 +02:00
Daniel 5387bc985a refactor(network): fix rxjs imports 2018-04-21 15:30:41 +02:00
Daniel 8b1bb3ba17 refactor(ftp): fix rxjs import 2018-04-21 15:29:59 +02:00
Daniel a6450c6d07 refactor(appodeal): fix rxjs import 2018-04-21 15:29:47 +02:00
Daniel d68a0373e8 refactor(admob-free): fix rxjs import 2018-04-21 15:29:34 +02:00
Daniel 8cd2da1c5b chore(package): bump rxjs and zone.js 2018-04-21 15:23:29 +02:00
David Dal BuscoandDaniel Sogl 633e9d8e9a refactor(facebook): remove deprecated function appInvite 2018-04-21 13:04:08 +02:00
Angel CareagaandIbby Hadeed 30f5b71f4a Added ability to clean clipboard (#2468)
-  Added the possibility to clean the clipboard on Android, iOS and Windows.
2018-04-20 22:58:39 -04:00
Daniel SoglandGitHub 5dede9b536 docs(google-nearby): rename plugin docs name 2018-04-15 15:07:04 +02:00
142 changed files with 8390 additions and 4886 deletions
+1
View File
@@ -8,3 +8,4 @@ dist/
src/@ionic-native/plugins/**/ngx
*.d.ts
injectable-classes.json
+135 -14
View File
@@ -1,28 +1,149 @@
<a name="5.0.0-beta.12"></a>
# [5.0.0-beta.12](https://github.com/ionic-team/ionic-native/compare/v4.7.0...v5.0.0-beta.12) (2018-06-23)
<a name="5.0.0-beta.19"></a>
# [5.0.0-beta.19](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.18...v5.0.0-beta.19) (2018-09-18)
### Bug Fixes
* **call-number:** fix isCallSupported function ([f49d2a9](https://github.com/ionic-team/ionic-native/commit/f49d2a9)), closes [#2428](https://github.com/ionic-team/ionic-native/issues/2428)
* build errors ([f70eaea](https://github.com/ionic-team/ionic-native/commit/f70eaea))
* **calendar:** Fixes createCalendar parameter typing ([84e0aa1](https://github.com/ionic-team/ionic-native/commit/84e0aa1))
* **ibeacon:** correct Type {Region} in some params ([#2453](https://github.com/ionic-team/ionic-native/issues/2453)) ([300db62](https://github.com/ionic-team/ionic-native/commit/300db62))
* fix lint ([b36a1f9](https://github.com/ionic-team/ionic-native/commit/b36a1f9))
* **linting:** Fixing misc linting errors that typedoc complains about ([#2476](https://github.com/ionic-team/ionic-native/issues/2476)) ([d3c2859](https://github.com/ionic-team/ionic-native/commit/d3c2859))
* **str-prnt:** rxjs 6 import ([48714d7](https://github.com/ionic-team/ionic-native/commit/48714d7))
* **v5-builder:** stop transforming "declare" classes ([#2503](https://github.com/ionic-team/ionic-native/issues/2503)) ([6662234](https://github.com/ionic-team/ionic-native/commit/6662234))
* **web-intent:** fix options param ([#2450](https://github.com/ionic-team/ionic-native/issues/2450)) ([23b760b](https://github.com/ionic-team/ionic-native/commit/23b760b))
* fix more lint errors ([0b3d299](https://github.com/ionic-team/ionic-native/commit/0b3d299))
* fix rxjs 6 imports ([e0b0687](https://github.com/ionic-team/ionic-native/commit/e0b0687))
* fix tealium jsdoc ([f34b6e6](https://github.com/ionic-team/ionic-native/commit/f34b6e6))
* **index-app-content:** fix lint ([2611061](https://github.com/ionic-team/ionic-native/commit/2611061))
* **ms-adal:** remove duplicate imports ([4803912](https://github.com/ionic-team/ionic-native/commit/4803912))
* **web-intent:** fix lint ([9feefe8](https://github.com/ionic-team/ionic-native/commit/9feefe8))
<a name="5.0.0-beta.18"></a>
# [5.0.0-beta.18](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.14...v5.0.0-beta.18) (2018-09-15)
### Bug Fixes
* **camera:** fixing builds ([c8d25a1](https://github.com/ionic-team/ionic-native/commit/c8d25a1))
* **clevertap:** fix jsdoc ([e47a3e1](https://github.com/ionic-team/ionic-native/commit/e47a3e1))
* **contacts:** remove double import of checkAvailability ([#2659](https://github.com/ionic-team/ionic-native/issues/2659)) ([1ad4cc1](https://github.com/ionic-team/ionic-native/commit/1ad4cc1))
* **core:** wrapEventObservable ([#2660](https://github.com/ionic-team/ionic-native/issues/2660)) ([bd34581](https://github.com/ionic-team/ionic-native/commit/bd34581))
* **extended-device-information:** fix wrong decorator ([5e9c92a](https://github.com/ionic-team/ionic-native/commit/5e9c92a))
<a name="5.0.0-beta.14"></a>
# [5.0.0-beta.14](https://github.com/ionic-team/ionic-native/compare/v4.10.0...v5.0.0-beta.14) (2018-07-18)
### Features
* **abbyy-rtr:** add ABBYY Real-Time Recognition plugin ([#2580](https://github.com/ionic-team/ionic-native/issues/2580)) ([ecc698e](https://github.com/ionic-team/ionic-native/commit/ecc698e))
* **alipay:** replace plugin ([#2591](https://github.com/ionic-team/ionic-native/issues/2591)) ([e640983](https://github.com/ionic-team/ionic-native/commit/e640983))
* **ccm:** replace plugin source ([#2601](https://github.com/ionic-team/ionic-native/issues/2601)) ([b581a5b](https://github.com/ionic-team/ionic-native/commit/b581a5b))
* **classkit:** add ClassKit plugin ([#2590](https://github.com/ionic-team/ionic-native/issues/2590)) ([a6c8045](https://github.com/ionic-team/ionic-native/commit/a6c8045))
### BREAKING CHANGES
* **alipay:** Replaced plugin with maintained Cordova plugin
<a name="4.9.2"></a>
## [4.9.2](https://github.com/ionic-team/ionic-native/compare/v4.9.1...v4.9.2) (2018-07-13)
### Bug Fixes
* **ble:** change signature for autoConnect ([#2594](https://github.com/ionic-team/ionic-native/issues/2594)) ([d95a359](https://github.com/ionic-team/ionic-native/commit/d95a359)), closes [#2573](https://github.com/ionic-team/ionic-native/issues/2573) [#2573](https://github.com/ionic-team/ionic-native/issues/2573)
* **sqlite:** mark optional arguments for executeSql ([#2592](https://github.com/ionic-team/ionic-native/issues/2592)) ([565c766](https://github.com/ionic-team/ionic-native/commit/565c766))
<a name="4.9.1"></a>
## [4.9.1](https://github.com/ionic-team/ionic-native/compare/v5.0.0-beta.13...v4.9.1) (2018-07-09)
### Bug Fixes
* **barcode-scanner:** wrong barcode format identifier PDF417 -> PDF_417 ([#2574](https://github.com/ionic-team/ionic-native/issues/2574)) ([61714ff](https://github.com/ionic-team/ionic-native/commit/61714ff))
* **health-kit:** add missing checkAuthStatus param ([#2544](https://github.com/ionic-team/ionic-native/issues/2544)) ([956e644](https://github.com/ionic-team/ionic-native/commit/956e644))
### Features
* **ble:** add missing functions ([#2572](https://github.com/ionic-team/ionic-native/issues/2572)) ([9f9a346](https://github.com/ionic-team/ionic-native/commit/9f9a346))
* **network-interface:** match latest plugin release ([#2587](https://github.com/ionic-team/ionic-native/issues/2587)) ([4f41589](https://github.com/ionic-team/ionic-native/commit/4f41589))
* **streaming-media:** add new parameters & docs ([#2576](https://github.com/ionic-team/ionic-native/issues/2576)) ([f62a123](https://github.com/ionic-team/ionic-native/commit/f62a123))
<a name="5.0.0-beta.13"></a>
# [5.0.0-beta.13](https://github.com/ionic-team/ionic-native/compare/v4.9.0...v5.0.0-beta.13) (2018-06-28)
### Bug Fixes
* **appodeal:** removed bad imports ([7d5e7aa](https://github.com/ionic-team/ionic-native/commit/7d5e7aa))
* **file-tramsfer:** fix v5 imports for file-transfer plugin ([#2537](https://github.com/ionic-team/ionic-native/issues/2537)) ([406ad12](https://github.com/ionic-team/ionic-native/commit/406ad12))
* **healt:** add correct return type for query function ([#2565](https://github.com/ionic-team/ionic-native/issues/2565)) ([98d44e6](https://github.com/ionic-team/ionic-native/commit/98d44e6))
* **index-app-content:** add missing function ([8d57198](https://github.com/ionic-team/ionic-native/commit/8d57198))
* **index-app-content:** fix imports ([189d66c](https://github.com/ionic-team/ionic-native/commit/189d66c))
### Features
* **aes-256:** AES256 encryption and decryption plugin added ([#2562](https://github.com/ionic-team/ionic-native/issues/2562)) ([fdd6315](https://github.com/ionic-team/ionic-native/commit/fdd6315))
* **image-picker:** add DATA_URL as an option to ImagePicker ([#2325](https://github.com/ionic-team/ionic-native/issues/2325)) ([dd9ba0a](https://github.com/ionic-team/ionic-native/commit/dd9ba0a))
* **plugin:** add Sensors plugin ([#2268](https://github.com/ionic-team/ionic-native/issues/2268)) ([e61d574](https://github.com/ionic-team/ionic-native/commit/e61d574))
<a name="5.0.0-beta.12"></a>
# [5.0.0-beta.12](https://github.com/ionic-team/ionic-native/compare/v4.8.0...v5.0.0-beta.12) (2018-06-23)
### Bug Fixes
* build errors ([f70eaea](https://github.com/ionic-team/ionic-native/commit/f70eaea))
* fix lint ([b36a1f9](https://github.com/ionic-team/ionic-native/commit/b36a1f9))
* fix more lint errors ([0b3d299](https://github.com/ionic-team/ionic-native/commit/0b3d299))
* fix rxjs 6 imports ([e0b0687](https://github.com/ionic-team/ionic-native/commit/e0b0687))
* **android-fingerprint-auth:** ensure ERRORS array is defined ([#2508](https://github.com/ionic-team/ionic-native/issues/2508)) ([714114d](https://github.com/ionic-team/ionic-native/commit/714114d))
* **background-geolocation:** watchLocationMode returns observable ([#2547](https://github.com/ionic-team/ionic-native/issues/2547)) ([3f8a6f2](https://github.com/ionic-team/ionic-native/commit/3f8a6f2))
* **calendar:** Fixes createCalendar parameter typing ([84e0aa1](https://github.com/ionic-team/ionic-native/commit/84e0aa1))
* **call-number:** fix isCallSupported function ([f49d2a9](https://github.com/ionic-team/ionic-native/commit/f49d2a9)), closes [#2428](https://github.com/ionic-team/ionic-native/issues/2428)
* **healths:** add missing attribute on HealthQueryOptionsAggregated ([#2550](https://github.com/ionic-team/ionic-native/issues/2550)) ([be370a4](https://github.com/ionic-team/ionic-native/commit/be370a4))
* **ibeacon:** correct Type {Region} in some params ([#2453](https://github.com/ionic-team/ionic-native/issues/2453)) ([300db62](https://github.com/ionic-team/ionic-native/commit/300db62))
* **in-app-purchase-2:** fix ready method signature ([#2043](https://github.com/ionic-team/ionic-native/issues/2043)) ([a018381](https://github.com/ionic-team/ionic-native/commit/a018381))
* **linting:** Fixing misc linting errors that typedoc complains about ([#2476](https://github.com/ionic-team/ionic-native/issues/2476)) ([d3c2859](https://github.com/ionic-team/ionic-native/commit/d3c2859))
* fix tealium jsdoc ([f34b6e6](https://github.com/ionic-team/ionic-native/commit/f34b6e6))
* **native-geocoder:** set response type to an array ([#2505](https://github.com/ionic-team/ionic-native/issues/2505)) ([defb276](https://github.com/ionic-team/ionic-native/commit/defb276))
* **onesignal:** make params optional ([#2507](https://github.com/ionic-team/ionic-native/issues/2507)) ([e6db281](https://github.com/ionic-team/ionic-native/commit/e6db281))
* **onesignal:** update OSPermissionState interface ([#2561](https://github.com/ionic-team/ionic-native/issues/2561)) ([fc088f8](https://github.com/ionic-team/ionic-native/commit/fc088f8))
* **site:** no prepended slash ([cea1dc1](https://github.com/ionic-team/ionic-native/commit/cea1dc1))
* **str-prnt:** rxjs 6 import ([48714d7](https://github.com/ionic-team/ionic-native/commit/48714d7))
* **stripe:** fixed casing of postal code param ([#2520](https://github.com/ionic-team/ionic-native/issues/2520)) ([d6a9ed1](https://github.com/ionic-team/ionic-native/commit/d6a9ed1))
* **themeable-browser:** allow hidden and clear cache ([a4cc7f7](https://github.com/ionic-team/ionic-native/commit/a4cc7f7))
* **v5-builder:** stop transforming "declare" classes ([#2503](https://github.com/ionic-team/ionic-native/issues/2503)) ([6662234](https://github.com/ionic-team/ionic-native/commit/6662234))
* **web-intent:** fix options param ([#2450](https://github.com/ionic-team/ionic-native/issues/2450)) ([23b760b](https://github.com/ionic-team/ionic-native/commit/23b760b))
* **web-intent:** registerBroadcastReceiver as Observable ([#2491](https://github.com/ionic-team/ionic-native/issues/2491)) ([47f7397](https://github.com/ionic-team/ionic-native/commit/47f7397))
### Features
* **ble:** update wrapper to match latest plugin release ([#2548](https://github.com/ionic-team/ionic-native/issues/2548)) ([03e6afb](https://github.com/ionic-team/ionic-native/commit/03e6afb))
* **calldirectory:** add call directory plugin ([#2473](https://github.com/ionic-team/ionic-native/issues/2473)) ([1bfe829](https://github.com/ionic-team/ionic-native/commit/1bfe829))
* **cloud-settings:** add support for cordova-plugin-cloud-settings ([#2494](https://github.com/ionic-team/ionic-native/issues/2494)) ([400dbcb](https://github.com/ionic-team/ionic-native/commit/400dbcb))
* **file-picker:** add missing options ([1d9c449](https://github.com/ionic-team/ionic-native/commit/1d9c449))
* **firebase:** add new functions ([36450e1](https://github.com/ionic-team/ionic-native/commit/36450e1))
* **firebase:** add verifyPhoneNumber support for iOS ([567f525](https://github.com/ionic-team/ionic-native/commit/567f525))
* **firebase-config:** add firebase-config wrapper ([#2517](https://github.com/ionic-team/ionic-native/issues/2517)) ([05423ce](https://github.com/ionic-team/ionic-native/commit/05423ce))
* **firebase-messaging:** add firebase-messaging ([#2518](https://github.com/ionic-team/ionic-native/issues/2518)) ([c03b73f](https://github.com/ionic-team/ionic-native/commit/c03b73f))
* **hce:** add hce plugin wrapper ([#2534](https://github.com/ionic-team/ionic-native/issues/2534)) ([8460e68](https://github.com/ionic-team/ionic-native/commit/8460e68))
* **InAppReview:** add InAppReview plugin ([#2483](https://github.com/ionic-team/ionic-native/issues/2483)) ([bfe5ae9](https://github.com/ionic-team/ionic-native/commit/bfe5ae9))
* **ionic-webview:** plugin for cordova-plugin-ionic-webview 2.0 ([8beb177](https://github.com/ionic-team/ionic-native/commit/8beb177))
* **local-notifications:** added support for foreground option in version 0.9.0-beta.3 of cordova-plugin-local-notifications ([#2506](https://github.com/ionic-team/ionic-native/issues/2506)) ([ae6e28d](https://github.com/ionic-team/ionic-native/commit/ae6e28d))
* **onesignal:** Added notification stacking ([#2512](https://github.com/ionic-team/ionic-native/issues/2512)) ([7c35535](https://github.com/ionic-team/ionic-native/commit/7c35535))
* **photo-library:** add maxItems to limit items-iOS ([#2554](https://github.com/ionic-team/ionic-native/issues/2554)) ([31fc892](https://github.com/ionic-team/ionic-native/commit/31fc892))
* **send-result:** add sendResult method for WebIntent plugin ([#2495](https://github.com/ionic-team/ionic-native/issues/2495)) ([34aeb19](https://github.com/ionic-team/ionic-native/commit/34aeb19))
* **SiriShortcuts:** implement Siri Shortcuts plugin in Ionic ([#2542](https://github.com/ionic-team/ionic-native/issues/2542)) ([df254de](https://github.com/ionic-team/ionic-native/commit/df254de))
* **star-prnt:** add StarPRNT plugin ([a1e6bef](https://github.com/ionic-team/ionic-native/commit/a1e6bef))
* **star-prnt:** Added support for connected to devices with barcode readers ([#2509](https://github.com/ionic-team/ionic-native/issues/2509)) ([58615f1](https://github.com/ionic-team/ionic-native/commit/58615f1))
* **tealium:** add tealium ionic wrappers ([#2414](https://github.com/ionic-team/ionic-native/issues/2414)) ([5f41ef1](https://github.com/ionic-team/ionic-native/commit/5f41ef1))
* **uptime:** add deep sleep parameter ([#2456](https://github.com/ionic-team/ionic-native/issues/2456)) ([91d22c5](https://github.com/ionic-team/ionic-native/commit/91d22c5))
+1 -1
View File
@@ -194,7 +194,7 @@ Checks if the plugin and property exist before getting/setting the property's va
Example:
```ts
@CordovaProperty
@CordovaProperty()
someProperty: string;
```
+20 -28
View File
@@ -1,6 +1,5 @@
[![Circle CI](https://circleci.com/gh/ionic-team/ionic-native.svg?style=shield)](https://circleci.com/gh/ionic-team/ionic-native) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) ![](https://img.shields.io/npm/v/@ionic-native/core.svg)
# Ionic Native
Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your [Ionic](https://ionicframework.com/) mobile app easy.
@@ -10,6 +9,7 @@ Ionic Native wraps plugin callbacks in a Promise or Observable, providing a comm
## Installation
Run following command to install Ionic Native in your project.
```bash
npm install @ionic-native/core@beta --save
```
@@ -56,10 +56,10 @@ export class MyComponent {
constructor(private geolocation: Geolocation, private platform: Platform) {
platform.ready().then(() => {
this.platform.ready().then(() => {
// get position
geolocation.getCurrentPosition().then(pos => {
this.geolocation.getCurrentPosition().then(pos => {
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
});
@@ -67,15 +67,14 @@ export class MyComponent {
// watch position
const watch = geolocation.watchPosition().subscribe(pos => {
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
this.position = pos;
});
// to stop watching
watch.unsubscribe();
});
}
}
```
@@ -152,8 +151,8 @@ Then create a new class that extends the `Camera` class with a mock implementati
class CameraMock extends Camera {
getPicture(options) {
return new Promise((resolve, reject) => {
resolve("BASE_64_ENCODED_DATA_GOES_HERE");
})
resolve('BASE_64_ENCODED_DATA_GOES_HERE');
});
}
}
```
@@ -161,15 +160,13 @@ class CameraMock extends Camera {
Finally, override the previous `Camera` class in your `providers` for this module:
```typescript
providers: [
{ provide: Camera, useClass: CameraMock }
]
providers: [{ provide: Camera, useClass: CameraMock }];
```
Here's the full example:
```typescript
import { NgModule, ErrorHandler } from '@angular/core';
import { ErrorHandler, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
@@ -177,28 +174,22 @@ import { HomePage } from '../pages/home/home';
import { Camera } from '@ionic-native/camera/ngx';
import { HomePage } from '../pages/home/home';
import { MyApp } from './app.component';
class CameraMock extends Camera {
getPicture(options) {
return new Promise((resolve, reject) => {
resolve("BASE_64_ENCODED_DATA_GOES_HERE");
})
resolve('BASE_64_ENCODED_DATA_GOES_HERE');
});
}
}
@NgModule({
declarations: [
MyApp,
HomePage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp)
],
declarations: [MyApp, HomePage],
imports: [BrowserModule, IonicModule.forRoot(MyApp)],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage
],
entryComponents: [MyApp, HomePage],
providers: [
{ provide: ErrorHandler, useClass: IonicErrorHandler },
{ provide: Camera, useClass: CameraMock }
@@ -207,15 +198,14 @@ class CameraMock extends Camera {
export class AppModule {}
```
### Runtime Diagnostics
Spent way too long diagnosing an issue only to realize a plugin wasn't firing or installed? Ionic Native lets you know what the issue is and how you can resolve it.
![img](https://ionic-io-assets.s3.amazonaws.com/ionic-native-console.png)
## Plugin Missing?
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/ionic-team/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
@@ -223,6 +213,8 @@ Let us know or submit a PR! Take a look at [the Developer Guide](https://github.
Ibby Hadeed - [@ihadeed](https://github.com/ihadeed)
Daniel Sogl - [@sogldaniel](https://twitter.com/sogldaniel)
Tim Lancina - [@timlancina](https://twitter.com/timlancina)
Mike Hartington - [@mhartington](https://twitter.com/mhartington)
+18 -16
View File
@@ -1,51 +1,53 @@
"use strict";
'use strict';
const gulp = require('gulp'),
minimist = require('minimist'),
rename = require("gulp-rename"),
rename = require('gulp-rename'),
tslint = require('gulp-tslint'),
decamelize = require('decamelize'),
replace = require('gulp-replace'),
_ = require('lodash');
const flagConfig = {
string: ['port', 'version', 'ngVersion', 'animations'],
boolean: ['dry-run'],
alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
alias: { p: 'port', v: 'version', a: 'ngVersion' },
default: { port: 8000 }
},
flags = minimist(process.argv.slice(2), flagConfig);
/* Docs tasks */
require('./scripts/docs/gulp-tasks')(gulp, flags);
gulp.task('lint', () => {
return gulp.src('src/**/*.ts')
.pipe(tslint({
formatter: "verbose",
configuration: 'tslint.json'
}))
return gulp
.src('src/**/*.ts')
.pipe(
tslint({
formatter: 'verbose',
configuration: 'tslint.json'
})
)
.pipe(tslint.report());
});
gulp.task('plugin:create', () => {
if (flags.n && flags.n !== ''){
const src = flags.m ? './scripts/templates/wrap-min.tmpl':'./scripts/templates/wrap.tmpl',
if (flags.n && flags.n !== '') {
const src = flags.m
? './scripts/templates/wrap-min.tmpl'
: './scripts/templates/wrap.tmpl',
pluginName = flags.n,
spaced = pluginName.replace(/(?!^)([A-Z])/g, ' $1'),
kebabCase = _.kebabCase(pluginName);
return gulp.src(src)
return gulp
.src(src)
.pipe(replace('{{ PluginName }}', pluginName))
.pipe(replace('{{ Plugin_Name }}', spaced))
.pipe(replace('{{ pluginName }}', _.lowerFirst(pluginName)))
.pipe(replace('{{ plugin-name }}', kebabCase))
.pipe(rename('index.ts'))
.pipe(gulp.dest('./src/@ionic-native/plugins/' + kebabCase));
} else {
console.log("Usage is: gulp plugin:create -n PluginName");
console.log('Usage is: gulp plugin:create -n PluginName');
}
});
+2703 -3611
View File
File diff suppressed because it is too large Load Diff
+28 -34
View File
@@ -1,6 +1,6 @@
{
"name": "ionic-native",
"version": "5.0.0-beta.12",
"version": "5.0.0-beta.19",
"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)",
@@ -22,57 +22,51 @@
"shipit": "npm run build && npm run readmes && npm run npmpub"
},
"devDependencies": {
"@angular/common": "^6.0.6",
"@angular/compiler": "^6.0.6",
"@angular/compiler-cli": "^6.0.6",
"@angular/core": "^6.0.6",
"@angular/common": "^6.1.7",
"@angular/compiler": "^6.1.7",
"@angular/compiler-cli": "^6.1.7",
"@angular/core": "^6.1.7",
"@types/cordova": "0.0.34",
"@types/fs-extra": "^5.0.3",
"@types/jest": "^23.1.1",
"@types/lodash": "^4.14.110",
"@types/node": "^9.6.22",
"@types/fs-extra": "^5.0.4",
"@types/jest": "^23.3.2",
"@types/lodash": "^4.14.116",
"@types/node": "^9.6.31",
"@types/rimraf": "^2.0.2",
"@types/webpack": "^4.4.2",
"@types/webpack": "^4.4.11",
"async-promise-queue": "^1.0.4",
"babel-core": "^6.26.3",
"babel-preset-env": "^1.7.0",
"babelify": "^8.0.0",
"browserify": "^16.2.2",
"canonical-path": "0.0.2",
"conventional-changelog-cli": "^2.0.1",
"conventional-changelog-cli": "^2.0.5",
"cpr": "^3.0.1",
"cz-conventional-changelog": "^2.1.0",
"decamelize": "^2.0.0",
"dgeni": "^0.4.9",
"dgeni": "^0.4.10",
"dgeni-packages": "0.16.10",
"fs-extra": "^6.0.1",
"fs-extra-promise": "^1.0.1",
"fs-extra": "^7.0.0",
"gulp": "3.9.1",
"gulp-rename": "^1.3.0",
"gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0",
"gulp-tslint": "^8.1.3",
"jest": "^23.1.0",
"lodash": "^4.17.10",
"jest": "^23.6.0",
"lodash": "^4.17.11",
"minimist": "1.2.0",
"nodemon": "^1.17.5",
"nodemon": "^1.18.4",
"rimraf": "^2.6.2",
"rxjs": "^6.2.1",
"rxjs-tslint-rules": "^4.4.2",
"rxjs": "^6.3.2",
"rxjs-tslint-rules": "^4.8.0",
"string-replace-webpack-plugin": "^0.1.3",
"ts-jest": "^22.4.6",
"ts-node": "^6.1.2",
"tslint": "^5.10.0",
"tslint-ionic-rules": "0.0.14",
"typescript": "~2.7.2",
"uglifyjs-webpack-plugin": "^1.2.6",
"ts-jest": "^23.1.4",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
"tslint-ionic-rules": "0.0.19",
"typescript": "2.9.2",
"uglifyjs-webpack-plugin": "^2.0.1",
"unminified-webpack-plugin": "^2.0.0",
"webpack": "^4.12.0",
"winston": "^3.0.0",
"webpack": "^4.19.1",
"winston": "^3.1.0",
"zone.js": "latest"
},
"jest": {
"transform": {
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(js?|ts?)$",
"moduleFileExtensions": [
+4 -3
View File
@@ -12,8 +12,9 @@ export const PLUGINS_ROOT = path.join(ROOT, 'src/@ionic-native/plugins/');
export const PLUGIN_PATHS = fs.readdirSync(PLUGINS_ROOT).map(d => path.join(PLUGINS_ROOT, d, 'index.ts'));
export function getDecorator(node: ts.Node, index = 0): ts.Decorator {
if (node.decorators && node.decorators[index])
if (node.decorators && node.decorators[index]) {
return node.decorators[index];
}
}
export function hasDecorator(decoratorName: string, node: ts.Node): boolean {
@@ -38,12 +39,12 @@ export function getDecoratorArgs(decorator: any) {
switch (prop.initializer.kind) {
case ts.SyntaxKind.StringLiteral:
case ts.SyntaxKind.Identifier:
val = prop.initializer.text;
// args[prop.name.escapedText] = val;
break;
case ts.SyntaxKind.ArrayLiteralExpression:
val = prop.initializer.elements.map(e => e.text);
val = prop.initializer.elements.map((e: any) => e.text);
break;
case ts.SyntaxKind.TrueKeyword:
+1 -1
View File
@@ -57,7 +57,7 @@ export function generateDeclarationFiles() {
// remove reference to @ionic-native/core decorators
export function modifyMetadata() {
PLUGIN_PATHS.map(p => p.replace('src', 'dist').replace('index.ts', 'ngx/index.metadata.json'))
PLUGIN_PATHS.map(p => p.replace(path.join(ROOT, 'src'), path.join(ROOT, 'dist')).replace('index.ts', 'ngx/index.metadata.json'))
.forEach(p => {
const content = fs.readJSONSync(p);
let _prop;
+1 -1
View File
@@ -21,7 +21,7 @@ function transformImports(file: ts.SourceFile, ctx: ts.TransformationContext, ng
const ignored: string [] = ['Plugin', 'Component', 'Injectable'];
const keep: string [] = ['getPromise'];
const keep: string [] = ['getPromise', 'checkAvailability'];
let m;
@@ -187,7 +187,7 @@ docType: "<$ doc.docType $>"
<ol class="installation">
<li>Install the Cordova and Ionic Native plugins:<br>
<pre><code class="nohighlight">$ <@ if prop.install @><$ prop.install | replace('<', '&lt;').replace('>', '&gt;') $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
$ npm install --save @ionic-native/<$ doc.npmId $>
$ npm install @ionic-native/<$ doc.npmId $>@beta
</code></pre>
</li>
<li><a href="https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module">Add this plugin to your app's module</a></li>
@@ -17,7 +17,7 @@
```
$ <@ if prop.install @><$ prop.install $><@ else @>ionic cordova plugin add <$ prop.plugin $><@ endif @>
$ npm install --save @ionic-native/<$ doc.npmId $>
$ npm install @ionic-native/<$ doc.npmId $>@beta
```
## [Usage Documentation](https://ionicframework.com/docs/native/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/')|replace('index.ts','')|replace('src/@ionic-native/plugins/','') $>)
+18 -15
View File
@@ -1,39 +1,42 @@
"use strict";
'use strict';
const config = require('./config.json'),
projectPackage = require('../../package.json'),
path = require('path'),
fs = require('fs-extra-promise').useFs(require('fs-extra')),
fs = require('fs-extra'),
Dgeni = require('dgeni');
module.exports = gulp => {
gulp.task('docs', [], () => {
try {
const ionicPackage = require('./dgeni/dgeni-config')(projectPackage.version),
const ionicPackage = require('./dgeni/dgeni-config')(
projectPackage.version
),
dgeni = new Dgeni([ionicPackage]);
return dgeni.generate().then(docs => console.log(docs.length + ' docs generated'));
return dgeni
.generate()
.then(docs => console.log(docs.length + ' docs generated'));
} catch (err) {
console.log(err.stack);
}
});
gulp.task('readmes', [], function() {
fs.copySync(path.resolve(__dirname, '..', '..', 'README.md'), path.resolve(__dirname, '..', '..', config.pluginDir, 'core', 'README.md'));
fs.copySync(
path.resolve(__dirname, '..', '..', 'README.md'),
path.resolve(__dirname, '..', '..', config.pluginDir, 'core', 'README.md')
);
try {
const ionicPackage = require('./dgeni/dgeni-readmes-config')(projectPackage.version),
const ionicPackage = require('./dgeni/dgeni-readmes-config')(
projectPackage.version
),
dgeni = new Dgeni([ionicPackage]);
return dgeni.generate().then(docs => console.log(docs.length + ' README files generated'));
return dgeni
.generate()
.then(docs => console.log(docs.length + ' README files generated'));
} catch (err) {
console.log(err.stack);
}
});
};
+2 -2
View File
@@ -1,7 +1,7 @@
import * as fs from 'fs-extra';
import * as path from 'path';
import { PLUGIN_PATHS } from '../build/helpers';
import { PLUGIN_PATHS, ROOT } from '../build/helpers';
import { EMIT_PATH } from '../build/transformers/extract-injectables';
import { generateDeclarations, transpile } from '../build/transpile';
@@ -9,7 +9,7 @@ generateDeclarations();
transpile();
const outDirs = PLUGIN_PATHS.map(p =>
p.replace('src', 'dist').replace(/[\\/]index.ts/, '')
p.replace(path.join(ROOT, 'src'), path.join(ROOT, 'dist')).replace(/[\\/]index.ts/, '')
);
const injectableClasses = fs.readJSONSync(EMIT_PATH);
+3 -4
View File
@@ -29,12 +29,11 @@ const DIST = path.resolve(ROOT, 'dist/@ionic-native');
const PACKAGES = [];
const RXJS_VEERSION = '*';
const CORE_VERSION = '^5.0.0';
const RXJS_VERSION = '*';
const PLUGIN_PEER_DEPENDENCIES = {
'@ionic-native/core': VERSION, // TODO change this in production
rxjs: RXJS_VEERSION
rxjs: RXJS_VERSION
};
function getPackageJsonContent(name, peerDependencies = {}, dependencies = {}) {
@@ -55,7 +54,7 @@ function writePackageJson(data: any, dir: string) {
function prepare() {
// write @ionic-native/core package.json
writePackageJson(
getPackageJsonContent('core', { rxjs: RXJS_VEERSION }, { '@types/cordova': 'latest' }),
getPackageJsonContent('core', { rxjs: RXJS_VERSION }, { '@types/cordova': 'latest' }),
path.resolve(DIST, 'core')
);
+3 -7
View File
@@ -167,11 +167,7 @@ function wrapObservable(
* @returns {Observable}
*/
function wrapEventObservable(event: string, element: any): Observable<any> {
if (element) {
get(window, element);
} else {
element = window;
}
element = element ? get(window, element) : window;
return fromEvent(element, event);
}
@@ -419,11 +415,11 @@ export function cordovaWarn(pluginName: string, method?: string): void {
/**
* @private
*/
export const wrap = function(
export const wrap = (
pluginObj: any,
methodName: string,
opts: CordovaOptions = {}
): Function {
) => {
return (...args: any[]) => {
if (opts.sync) {
// Sync doesn't wrap the plugin with a promise or observable, it returns the result as-is
@@ -19,7 +19,7 @@ function overrideFunction(pluginObj: any, methodName: string): Observable<any> {
export function cordovaFunctionOverride(
pluginObj: any,
methodName: string,
args: IArguments | Array<any> = []
args: IArguments | any[] = []
) {
return overrideFunction(pluginObj, methodName);
}
@@ -1,7 +1,7 @@
import { wrapInstance } from './common';
import { CordovaOptions } from './interfaces';
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | Array<any>) {
export function cordovaInstance(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
args = Array.from(args);
return wrapInstance(pluginObj, methodName, config).apply(this, args);
}
+1 -1
View File
@@ -1,6 +1,6 @@
import { wrap } from './common';
import { CordovaOptions } from './interfaces';
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | Array<any>) {
export function cordova(pluginObj: any, methodName: string, config: CordovaOptions, args: IArguments | any[]) {
return wrap(pluginObj, methodName, config).apply(this, args);
}
@@ -6,7 +6,7 @@ export function instancePropertyGet(pluginObj: any, key: string) {
}
export function instancePropertySet(pluginObj: any, key: string, value: any) {
if (pluginObj._objectInstance && pluginObj._objectInstance[key]) {
if (pluginObj._objectInstance) {
pluginObj._objectInstance[key] = value;
}
}
+8 -6
View File
@@ -13,12 +13,14 @@ export function initAngular1(plugins: any) {
const serviceName = '$cordova' + name;
const cls = plugins[name];
(function (serviceName, cls, name) {
ngModule.service(serviceName, [function () {
const funcs = window.angular.copy(cls);
funcs.__proto__['name'] = name;
return funcs;
}]);
((serviceName, cls, name) => {
ngModule.service(serviceName, [
() => {
const funcs = window.angular.copy(cls);
funcs.__proto__['name'] = name;
return funcs;
}
]);
})(serviceName, cls, name);
}
}
@@ -0,0 +1,336 @@
import { Injectable } from '@angular/core';
import { CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
declare const AbbyyRtrSdk: any;
/**
* JSON object that you can pass as the options argument to change text
* capture settings. All keys are optional. Omitting a key means that a
* default setting will be used.
*/
export interface TextCaptureOptions {
/**
* The name of the license file. This file must be located in the
* www/rtr_assets/ directory in your project.
*/
licenseFileName?: string;
/**
* Recognition languages which can be selected by the user,
* for example: ["English", "French", "German"]. Empty array
* disables language selection.
*/
selectableRecognitionLanguages?: string[];
/**
* Recognition language selected by default.
*/
recognitionLanguages?: string[];
/**
* Width and height of the recognition area, separated by a
* whitespace for example: "0.8 0.3". The area of interest is
* centered in the preview frame, its width and height are
* relative to the preview frame size and should be in the [0.0, 1.0] range.
*/
areaOfInterest?: string;
/**
* Whether to stop the plugin as soon as the result status is
* "Stable" (see Result status). When enabled (true), the
* recognition process can be stopped automatically. When
* disabled (false), recognition can be stopped only manually
* by user.
*/
stopWhenStable?: boolean;
/**
* Show (true) or hide (false) the flashlight button in the text
* capture dialog.
*/
isFlashlightVisible?: boolean;
/**
* Show (true) or hide (false) the stop button in the text
* capture dialog. When the user taps stop, RTR SDK returns
* the latest recognition result.
*/
isStopButtonVisible?: boolean;
}
/**
* JSON object that represents text recognition results.
* The callback you implement should parse this object and show results to user.
*/
export interface TextCaptureResult {
/**
* An array of objects representing recognized lines of text.
* These objects have the following keys:
* · text (string): the recognized text.
* · quadrangle (string): vertex coordinates of the bounding quadrangle,
* a string of 8 integers separated with whitespaces ("x1 y1 ... x4 y4"),
* goes clockwise starting from the bottom left.
* · rect (string): position and size of the bounding rectangle,
* a string of 4 integers separated with whitespaces ("x y width height").
*/
textLines: { text: string, quadrangle: string, rect?: string }[];
/**
* Additional information. This object has the following keys:
* · stabilityStatus (string): result stability status.
* See Result status for details.
* · userAction (string): the user's action which stopped the plugin,
* if any. Can be "Manually Stopped" if the stop button has been used,
* and "Canceled" if the user canceled processing. If the plugin has
* stopped automatically, the userAction key is not present in resultInfo.
* · frameSize (string): full size of the preview frame, a string
* with 2 integers separated with a whitespace ("720 1280").
* · recognitionLanguages (string array): languages used for recognition,
* the array contains language identifiers (["English", "French", "German"]).
*/
resultInfo: {
stabilityStatus: string,
userAction: string,
frameSize: string,
recognitionLanguages: string[]
};
/**
* Error details. This key is present only if an error occurs.
* The value is an object which has a single key:
* · description (string): human-readable error description.
*/
error?: {
description: string;
};
}
/**
* JSON object that you can pass as the options argument to change data
* capture settings. All keys are optional. Omitting a key means that a default
* setting will be used, except the profile and customDataCaptureScenario
* keys: you must specify either one of them, but not both at the same time.
*/
export interface DataCaptureOptions {
/**
* The predefined data capture profile to use, for example: "MRZ".
* Note: For the list of supported documents, see Specifications Data
* Capture Profiles in the ABBYY Real-Time Recognition SDK 1 Developer's Guide.
*/
profile?: string;
/**
* Custom data capture settings. This object has the following keys:
* · name (string): the name of your custom data capture scenario, required.
* · description (string): a more detailed description. This key is optional;
* if not given, it will be assigned the same value as name.
* · recognitionLanguages (string array): recognition languages to use.
* Default is ["English"].
* · fields (object array): describes data fields to capture. Each object
* in this array has a single regEx key; its value is a string containing
* the regular expression that should be matched when capturing a field.
*/
customDataCaptureScenario?: {
name: string,
description: string,
recognitionLanguages: string[],
fields: { regEx: string }[]
};
/**
* The name of the license file. This file must be located in the
* www/rtr_assets/ directory in your project.
*/
licenseFileName?: string;
/**
* Width and height of the recognition area, separated by a
* whitespace for example: "0.8 0.3". The area of interest is
* centered in the preview frame, its width and height are
* relative to the preview frame size and should be in the [0.0, 1.0] range.
*/
areaOfInterest?: string;
/**
* Whether to stop the plugin as soon as the result status is
* "Stable" (see Result status). When enabled (true), the
* recognition process can be stopped automatically. When
* disabled (false), recognition can be stopped only manually
* by user.
*/
stopWhenStable?: boolean;
/**
* Show (true) or hide (false) the flashlight button in the text
* capture dialog.
*/
isFlashlightVisible?: boolean;
/**
* Show (true) or hide (false) the stop button in the text
* capture dialog. When the user taps stop, RTR SDK returns
* the latest recognition result.
*/
isStopButtonVisible?: boolean;
}
/**
* JSON object that represents data recognition results. The callback you
* implement should parse this object and show results to user.
*/
export interface DataCaptureResult {
/**
* The data scheme which was applied during data capture.
* The value is an object which has two keys:
* · id (string): the internal scheme identifier.
* · name (string): the scheme name.
* If you had defined a custom data capture scenario in options, both the
* id and name will be the same as the scenario name you specified. If
* you selected a predefined profile, the id and name are specified by the
* profile. If an error occurs during processing, the dataScheme key is not
* present in the result.
*/
dataScheme?: {
id: string,
name: string
};
/**
* Recognized data fields. Each object in the array represents a separate
* data field. The data field objects have the following keys:
* · id (string): the internal identifier of the field.
* · name (string): the field name.
* Similarly to dataScheme, in custom scenarios both id and name are the same
* as the scenario name you specified (currently custom scenarios allow
* only 1 recognized field).
* · text (string): full text of the field.
* · quadrangle (string): vertex coordinates of the bounding quadrangle, a
* string of 8 integers separated with whitespaces ("x1 y1 ... x4 y4"),
* goes clockwise starting from the bottom left.
* · components (object array): an array of objects representing field
* components, that is, the text fragments found on the image, which
* constitute the field.
* In the components array each element is an object with the following keys:
* · text (string): text of this fragment.
* · quadrangle (string): vertex coordinates of the bounding quadrangle of
* this fragment, similar to the field's quadrangle.
* · rect (string): position and size of the bounding rectangle, a string
* of 4 integers separated with whitespaces ("x y width height").
*/
dataFields: {
id: string,
name: string,
text: string,
quadrangle: string,
components: {
text: string,
quadrangle: string,
rect: string
}
};
/**
* Additional information. This object has the following keys:
* · stabilityStatus (string): result stability status.
* See Result status for details.
* · userAction (string): the user's action which stopped the plugin,
* if any. Can be "Manually Stopped" if the stop button has been used,
* and "Canceled" if the user canceled processing. If the plugin has
* stopped automatically, the userAction key is not present in resultInfo.
* · frameSize (string): full size of the preview frame, a string
* with 2 integers separated with a whitespace ("720 1280").
*/
resultInfo: {
stabilityStatus: string,
userAction: string,
frameSize: string
};
/**
* Error details. This key is present only if an error occurs.
* The value is an object which has a single key:
* · description (string): human-readable error description.
*/
error?: {
description: string;
};
}
/**
* @name ABBYY Real-Time Recognition
* @description
* This plugin allows to use the Text Capture and Data Capture features of
* ABBYY Real-Time Recognition SDK (RTR SDK) in apps.
*
* @usage
* ```typescript
* import { AbbyyRTR } from '@ionic-native/abbyy-rtr';
*
*
* constructor(private abbyyRTR: AbbyyRTR) { }
*
* ...
*
*
* this.abbyyRTR.startTextCapture(options)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
*
* this.abbyyRTR.startDataCapture(options)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'AbbyyRTR',
plugin: 'cordova-plugin-abbyy-rtr-sdk',
pluginRef: 'AbbyyRtrSdk',
repo: 'https://github.com/abbyysdk/RTR-SDK.Cordova',
install: 'ionic cordova plugin add cordova-plugin-abbyy-rtr-sdk',
platforms: ['Android', 'iOS']
})
@Injectable()
export class AbbyyRTR extends IonicNativePlugin {
/**
* Opens a modal dialog with controls for the Text Capture scenario.
* @param {TextCaptureOptions} options
* @return {Promise<TextCaptureResult>}
*/
@CordovaCheck()
startTextCapture(options: TextCaptureOptions): Promise<TextCaptureResult> {
return new Promise<any>((resolve, reject) => {
AbbyyRtrSdk.startTextCapture((result: DataCaptureResult) => {
if (result.error) {
reject(result);
} else {
resolve(result);
}
}, options);
});
}
/**
* Opens a modal dialog with controls for the Data Capture scenario.
* @param {DataCaptureOptions} options
* @return {Promise<DataCaptureResult>}
*/
@CordovaCheck()
startDataCapture(options: DataCaptureOptions): Promise<DataCaptureResult> {
return new Promise<any>((resolve, reject) => {
AbbyyRtrSdk.startDataCapture((result: DataCaptureResult) => {
if (result.error) {
reject(result);
} else {
resolve(result);
}
}, options);
});
}
}
+108 -1
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { fromEvent, Observable } from 'rxjs';
import { Observable, fromEvent } from 'rxjs';
export interface AdMobFreeBannerConfig {
/**
@@ -63,6 +63,113 @@ export interface AdMobFreeRewardVideoConfig {
autoShow?: boolean;
}
/**
* @name AdMob Free
* @description
* A free, no ad-sharing version of Google AdMob plugin for Cordova.
*
* Requires Cordova plugin: `cordova-plugin-admob-free`. For more info, please see the [AdMob Free plugin docs](https://github.com/ratson/cordova-plugin-admob-free).
*
* @usage
* ```typescript
* import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free';
*
*
* constructor(private admobFree: AdMobFree) { }
*
*
* ...
*
*
* const bannerConfig: AdMobFreeBannerConfig = {
* // add your config here
* // for the sake of this example we will just use the test config
* isTesting: true,
* autoShow: true
* };
* this.admobFree.banner.config(bannerConfig);
*
* this.admobFree.banner.prepare()
* .then(() => {
* // banner Ad is ready
* // if we set autoShow to false, then we will need to call the show method here
* })
* .catch(e => console.log(e));
*
*
* ```
* @interfaces
* AdMobFreeBannerConfig
* AdMobFreeInterstitialConfig
* AdMobFreeRewardVideoConfig
* @classes
* AdMobFreeBanner
* AdMobFreeInterstitial
* AdMobFreeRewardVideo
*/
@Plugin({
pluginName: 'AdMobFree',
plugin: 'cordova-plugin-admob-free',
pluginRef: 'admob',
repo: 'https://github.com/ratson/cordova-plugin-admob-free',
platforms: ['Android', 'iOS']
})
@Injectable()
export class AdMobFree extends IonicNativePlugin {
/**
* Convenience object to get event names
* @type {Object}
*/
events = {
BANNER_LOAD: 'admob.banner.events.LOAD',
BANNER_LOAD_FAIL: 'admob.banner.events.LOAD_FAIL',
BANNER_OPEN: 'admob.banner.events.OPEN',
BANNER_CLOSE: 'admob.banner.events.CLOSE',
BANNER_EXIT_APP: 'admob.banner.events.EXIT_APP',
INTERSTITIAL_LOAD: 'admob.interstitial.events.LOAD',
INTERSTITIAL_LOAD_FAIL: 'admob.interstitial.events.LOAD_FAIL',
INTERSTITIAL_OPEN: 'admob.interstitial.events.OPEN',
INTERSTITIAL_CLOSE: 'admob.interstitial.events.CLOSE',
INTERSTITIAL_EXIT_APP: 'admob.interstitial.events.EXIT_APP',
REWARD_VIDEO_LOAD: 'admob.rewardvideo.events.LOAD',
REWARD_VIDEO_LOAD_FAIL: 'admob.rewardvideo.events.LOAD_FAIL',
REWARD_VIDEO_OPEN: 'admob.rewardvideo.events.OPEN',
REWARD_VIDEO_CLOSE: 'admob.rewardvideo.events.CLOSE',
REWARD_VIDEO_EXIT_APP: 'admob.rewardvideo.events.EXIT_APP',
REWARD_VIDEO_START: 'admob.rewardvideo.events.START',
REWARD_VIDEO_REWARD: 'admob.rewardvideo.events.REWARD'
};
/**
* Watch an event
* @param event {string} event name
* @return {Observable<any>}
*/
on(event: string): Observable<any> {
return fromEvent(document, event);
}
/**
* Returns the AdMobFreeBanner object
* @type {AdMobFreeBanner}
*/
banner: AdMobFreeBanner = new AdMobFreeBanner();
/**
* Returns the AdMobFreeInterstitial object
* @type {AdMobFreeInterstitial}
*/
interstitial: AdMobFreeInterstitial = new AdMobFreeInterstitial();
/**
* Returns the AdMobFreeRewardVideo object
* @type {AdMobFreeRewardVideo}
*/
rewardVideo: AdMobFreeRewardVideo = new AdMobFreeRewardVideo();
}
/**
* @hidden
*/
+105
View File
@@ -0,0 +1,105 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name AES256
* @description
* This cordova ionic plugin allows you to perform AES 256 encryption and decryption on the plain text.
* It's a cross-platform plugin which supports both Android and iOS.
* The encryption and decryption are performed on the device native layer so that the performance is much faster.
*
* @usage
* ```typescript
* import { AES256 } from '@ionic-native/aes-256';
*
* private secureKey: string;
* private secureIV: string;
*
* constructor(private aes256: AES256) {
* this.generateSecureKeyAndIV(); // To generate the random secureKey and secureIV
* }
*
* ...
*
* async generateSecureKeyAndIV() {
* this.secureKey = await this.aes256.generateSecureKey('random password 12345'); // Returns a 32 bytes string
* this.secureIV = await this.aes256.generateSecureIV('random password 12345'); // Returns a 16 bytes string
* }
*
* this.aes256.encrypt(this.secureKey, this.secureIV, 'testdata')
* .then(res => console.log('Encrypted Data: ',res))
* .catch((error: any) => console.error(error));
*
* this.aes256.decrypt(this.secureKey, this.secureIV, 'encryptedData')
* .then(res => console.log('Decrypted Data : ',res))
* .catch((error: any) => console.error(error));
*
*
* * this.aes256.generateSecureKey('random password 12345')
* .then(res => console.log('Secure Key : ',res))
* .catch((error: any) => console.error(error));
*
*
* * this.aes256.generateSecureIV('random password 12345')
* .then(res => console.log('Secure IV : ',res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'AES256',
plugin: 'cordova-plugin-aes256-encryption',
pluginRef: 'cordova.plugins.AES256',
repo: 'https://github.com/Ideas2IT/cordova-aes256',
platforms: ['Android', 'iOS'],
install: 'ionic cordova plugin add cordova-plugin-aes256-encryption'
})
@Injectable()
export class AES256 extends IonicNativePlugin {
/**
* This function used to perform the aes256 encryption
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 encryption.
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 encryption.
* @param {string} data A string which will be encrypted
* @return {Promise<string>} Returns a promise that resolves when encryption happens. The success response will returns encrypted data.
*/
@Cordova()
encrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
return;
}
/**
* This function used to perform the aes256 decryption
* @param {string} secureKey A 32 bytes string, which will used as input key for AES256 decryption.
* @param {string} secureIV A 16 bytes string, which will used as initial vector for AES256 decryption.
* @param {string} data An AES256 encrypted data which will be decrypted.
* @return {Promise<string>} Returns a promise that resolves when decryption happens. The success response will returns decrypted data.
*/
@Cordova()
decrypt(secureKey: string, secureIV: string, data: string): Promise<string> {
return;
}
/**
* This function used to generate a secure key based on an password. Perfect if you want to delegate the key generation for encryption to the plugin.
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
* @param {string} password A random string, which will be used as input for a PBKDF2 function
* @return {Promise<string>} Returns a promise that resolves when key is generated.
*/
@Cordova()
generateSecureKey(password: string): Promise<string> {
return;
}
/**
* This function used to generate a secure IV based on an password. Perfect if you want to delegate the IV generation for encryption to the plugin.
* Make sure to save the return value of this function somewhere so your encrypted data can be decrypted in the future.
* @param {string} password A random string, which will be used as input for a PBKDF2 function
* @return {Promise<string>} Returns a promise that resolves when IV is generated.
*/
@Cordova()
generateSecureIV(password: string): Promise<string> {
return;
}
}
+11 -79
View File
@@ -1,83 +1,20 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface AlipayOrder {
/**
* appId assigned by Alipay
*/
app_id: string;
/**
* Api name.
* Should be: alipay.trade.app.pay
*/
method: string;
/**
* Data format
* Default: "JSON"
*/
format?: string;
/**
* Charset
* Possible values: "UTF-8", "GBK"
* Default: "UTF-8"
*/
charset: string;
/**
* Sign method
* Default: 'RSA'
*/
sign_type: string;
/**
* Sign value. Should be got from server side.
* Default: 'RSA'
*/
sign: string;
/**
* Timestamp, formated like "yyyy-MM-dd HH:mm:ss", e.g. 2014-07-24 03:07:50
*/
timestamp: string;
/**
* Api version. Fixed value '1.0'
*/
version: string;
/**
* Notify url.
*/
notify_url: string;
/**
* biz content. formated in json. see alipay doc for detail.
*/
biz_content: string;
}
/**
* @name Alipay
* @description
* This plugin is used for Alipay APP support. Integrated with the latest SDK.
* This plugin facilitates the usage of Alipay in an Ionic apps with the integrated AlipaySDK dated on 20180601.
*
* Requires Cordova plugin: `cordova-alipay-base`. For more info, please see the [Alipay plugin docs](https://github.com/xueron/cordova-alipay-base).
* Requires Cordova plugin: `cordova-plugin-gubnoi-alipay`. For more info, please see https://github.com/jing-zhou/cordova-plugin-alipay .
*
* @usage
* ```typescript
* import { Alipay, AlipayOrder } from '@ionic-native/alipay';
* import { Alipay } from '@ionic-native/alipay';
*
* constructor(private alipay: Alipay) {
*
* // Should get from server side with sign.
* const alipayOrder: AlipayOrder = {
* ...
* }
*
*
* //alipayOrder is a string that has been generated and signed by the server side.
* this.alipay.pay(alipayOrder)
* .then(result => {
* console.log(result); // Success
@@ -88,31 +25,26 @@ export interface AlipayOrder {
*
* }
*
*
* ```
*
* @interfaces
* AlipayOrder
*/
@Plugin({
pluginName: 'Alipay',
plugin: 'cordova-alipay-base',
pluginRef: 'Alipay.Base',
repo: 'https://github.com/xueron/cordova-alipay-base',
install:
'ionic cordova plugin add cordova-alipay-base --variable ALI_PID=your_app_id',
installVariables: ['ALI_PID'],
plugin: 'cordova-plugin-gubnoi-alipay',
pluginRef: 'Alipay',
repo: 'https://github.com/jing-zhou/cordova-plugin-alipay',
install: 'ionic cordova plugin add cordova-plugin-gubnoi-alipay --variable APP_ID=your_app_id',
installVariables: ['APP_ID'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Alipay extends IonicNativePlugin {
/**
* Open Alipay to perform App pay
* @param { AlipayOrder | string } order alipay options
* @param {string} order alipay order string
* @returns {Promise<any>} Returns a Promise that resolves with the success return, or rejects with an error.
*/
@Cordova()
pay(order: AlipayOrder | string): Promise<any> {
pay(order: string): Promise<any> {
return;
}
}
@@ -223,7 +223,7 @@ export class AndroidPermissions extends IonicNativePlugin {
/**
* Request permissions
* @param {Array<string>} permissions An array with permissions
* @param {string[]} permissions An array with permissions
* @return {Promise<any>} Returns a promise
*/
@Cordova()
+1 -1
View File
@@ -75,7 +75,7 @@ export interface AppRateCustomLocale {
/** No button label */
noButtonLabel?: string;
/** App rate promt title */
/** App rate prompt title */
appRatePromptTitle?: string;
/** Feedback prompt title */
@@ -36,28 +36,30 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export class AppVersion extends IonicNativePlugin {
/**
* Returns the name of the app
* Returns the name of the app, e.g.: "My Awesome App"
* @returns {Promise<string>}
*/
@Cordova()
getAppName(): Promise<string> { return; }
/**
* Returns the package name of the app
* Returns the package name of the app, e.g.: "com.example.myawesomeapp"
* @returns {Promise<string>}
*/
@Cordova()
getPackageName(): Promise<string> { return; }
/**
* Returns the build identifier of the app
* @returns {Promise<string>}
* Returns the build identifier of the app.
* In iOS a string with the build version like "1.6095"
* In Android a number generated from the version string, like 10203 for version "1.2.3"
* @returns {Promise<string | number>}
*/
@Cordova()
getVersionCode(): Promise<string> { return; }
getVersionCode(): Promise<string | number> { return; }
/**
* Returns the version of the app
* Returns the version of the app, e.g.: "1.2.3"
* @returns {Promise<string>}
*/
@Cordova()
+1 -1
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
export type IMakePayments =
| 'This device can make payments and has a supported card'
+1 -3
View File
@@ -1,8 +1,6 @@
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name Appodeal
@@ -0,0 +1,188 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface AppsflyerOptions {
/**
* Appsflyer Dev key
*/
devKey: string;
/**
* Apple Application ID(for iOS only)
*/
appId?: string;
/**
* debug mode
*/
isDebug?: boolean;
/**
* optout of collection of IMEI
*/
collectIMEI?: boolean;
/**
* optout of collection of collectAndroidID
*/
collectAndroidID?: boolean;
/**
* default false Accessing AppsFlyer Attribution / Conversion Data from the SDK (Deferred Deeplinking). Read more: Android, iOS. AppsFlyer plugin will return attribution data in onSuccess callback.
*/
onInstallConversionDataListener?: boolean;
}
export interface AppsflyerEvent {
[x: string]: any;
}
export interface AppsflyerInviteOptions {
channel?: string;
campaign?: string;
userParams?: {
[x: string]: any;
};
}
/**
* @name Appsflyer
* @description
* Appsflyer Cordova SDK support for Attribution
*
* @usage
* ```typescript
* import { Appsflyer } from '@ionic-native/appsflyer';
*
*
* constructor(private appsflyer: Appsflyer) { }
*
* ...
*
*
* this.appsflyer.initSdk(options);
*
* ```
*
* @interfaces
* AppsflyerOptions
* AppsflyerEvent
* AppsflyerInviteOptions
*/
@Plugin({
pluginName: 'Appsflyer',
plugin: 'cordova-plugin-appsflyer-sdk',
pluginRef: 'window.plugins.appsFlyer',
repo: 'https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk',
platforms: ['iOS', 'Android'],
install: 'Add to config.xml like stated on github and then start'
})
@Injectable()
export class Appsflyer extends IonicNativePlugin {
/**
* initialize the SDK
* @param {AppsflyerOptions} options
* @returns {Promise<any>}
*/
@Cordova()
initSdk(options: AppsflyerOptions): Promise<any> {
return;
}
/**
* These in-app events help you track how loyal users discover your app, and attribute them to specific campaigns/media-sources. Please take the time define the event/s you want to measure to allow you to track ROI (Return on Investment) and LTV (Lifetime Value).
* @param {string} eventName custom event name, is presented in your dashboard
* @param {AppsflyerEvent} eventValues event details
*/
@Cordova({ sync: true })
trackEvent(eventName: string, eventValues: AppsflyerEvent): void {}
/**
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyers user ID and the other devices IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
* @param {string} customerUserId user id
*/
@Cordova({ sync: true })
setAppUserId(customerUserId: string): void {}
/**
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyers user ID and the other devices IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
* @param {boolean} customerUserId In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning.
*/
@Cordova({ sync: true })
stopTracking(isStopTracking: boolean): void {}
/**
* Get the data from Attribution
* @returns {Promise<any>}
*/
@Cordova()
registerOnAppOpenAttribution(): Promise<any> {
return;
}
/**
* Enables app uninstall tracking
* @param {string} token GCM/FCM ProjectNumber
* @returns {Promise<any>}
*/
@Cordova()
enableUninstallTracking(token: string): Promise<any> {
return;
}
/**
* Allows to pass GCM/FCM Tokens that where collected by third party plugins to the AppsFlyer server. Can be used for Uninstall Tracking.
* @param {string} token GCM/FCM ProjectNumber
*/
@Cordova({ sync: true })
updateServerUninstallToken(token: string): void {}
/**
* Get AppsFlyers proprietary Device ID. The AppsFlyer Device ID is the main ID used by AppsFlyer in Reports and APIs.
*/
@Cordova()
getAppsFlyerUID(): Promise<any> {
return;
}
/**
* End User Opt-Out (Optional) AppsFlyer provides you a method to optout specific users from AppsFlyer analytics. This method complies with the latest privacy requirements and complies with Facebook data and privacy policies. Default is FALSE, meaning tracking is enabled by default.
* @param {boolean} disable Set to true to opt-out user from tracking
*/
@Cordova({ sync: true })
deviceTrackingDisabled(disable: boolean): void {}
/**
* Set AppsFlyers OneLink ID. Setting a valid OneLink ID will result in shortened User Invite links, when one is generated. The OneLink ID can be obtained on the AppsFlyer Dashboard.
* @param {string} oneLinkId OneLink ID
*/
@Cordova({ sync: true })
setAppInviteOneLinkID(oneLinkId: string): void {}
/**
* Allowing your existing users to invite their friends and contacts as new users to your app can be a key growth factor for your app. AppsFlyer allows you to track and attribute new installs originating from user invites within your app.
* @param {AppsflyerInviteOptions} options Parameters for Invite link
* @returns {Promise<any>}
*/
@Cordova()
generateInviteLink(options: AppsflyerInviteOptions): Promise<any> {
return;
}
/**
* Use this call to track an impression use the following API call. Make sure to use the promoted App ID as it appears within the AppsFlyer dashboard.
* @param {string} appId Promoted Application ID
* @param {string} campaign Promoted Campaign
*/
@Cordova({ sync: true })
trackCrossPromotionImpression(appId: string, campaign: string): void {}
/**
* Use this call to track the click and launch the app store's app page (via Browser)
* @param {string} appId Promoted Application ID
* @param {string} campaign Promoted Campaign
* @param {Object} options Additional Parameters to track
*/
@Cordova({ sync: true })
trackAndOpenStore(appId: string, campaign: string, options: Object): void {}
}
+1 -1
View File
@@ -1,5 +1,5 @@
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Autostart
@@ -482,7 +482,9 @@ export class BackgroundGeolocation extends IonicNativePlugin {
platforms: ['Android'],
observable: true
})
watchLocationMode(): Observable<number> { return; }
watchLocationMode(): Observable<number> {
return;
}
/**
* Stop watching for location mode changes.
@@ -68,7 +68,7 @@ export interface BarcodeScanResult {
| 'ITF'
| 'RSS14'
| 'RSS_EXPANDED'
| 'PDF417'
| 'PDF_417'
| 'AZTEC'
| 'MSI';
cancelled: boolean;
+59 -14
View File
@@ -290,25 +290,34 @@ export class BLE extends IonicNativePlugin {
}
/**
* Establish an automatic connection to a peripheral.
* Establish an automatic connection to a peripheral. The phone will automatically connect to the Bluetooth peripheral
* whenever it is in range. The autoConnect function uses callbacks instead of observables because connect and
* disconnect can each be called many times as a devices connects and disconnects.
*
* On Android you can pass a MAC address directly to autoConnect. With iOS, you need to get a device id by scanning,
* calling ble.peripheralsWithIdentifiers, or calling ble.connectedPeripheralsWithServices.
*
* @usage
* ```
* BLE.autoConnect('12:34:56:78:9A:BC').subscribe(peripheralData => {
* console.log(peripheralData);
* },
* peripheralData => {
* console.log('disconnected');
* });
* someFunction() {
* this.ble.autoConnect(deviceId, onConnected.bind(this), onDisconnected.bind(this));
* }
*
* onConnected(peripheral) {
* console.log(`Connected to ${peripheral.id}`)l
* }
*
* onDisconnected(peripheral) {
* console.log(`Disconnected from ${peripheral.id}`)l
* }
*
* ```
* @param {string} deviceId UUID or MAC address of the peripheral
* @return {Observable<any>} Returns an Observable that notifies of connect/disconnect.
* @param {function} connectCallback function that is called with peripheral data when the devices connects
* @param {function} disconnectCallback function that is called with peripheral data when the devices disconnects
*/
@Cordova({
observable: true,
clearFunction: 'disconnect',
clearWithArgs: true
})
autoConnect(deviceId: string): Observable<any> {
@Cordova({ sync: true })
autoConnect(deviceId: string, connectCallback: any, disconnectCallback: any) {
return;
}
@@ -579,4 +588,40 @@ export class BLE extends IonicNativePlugin {
readRSSI(deviceId: string): Promise<any> {
return;
}
/**
* Retrieves a list of the peripherals (containing any of the specified services)
* currently connected to the system. The peripheral list is sent to the success callback.
* iOS only
*
* @param {string[]} services List of services to discover
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
*/
@Cordova()
connectedPeripheralsWithServices(services: string[]): Promise<any[]> {
return;
}
/**
* Find the connected peripherals offering the listed service UUIDs.
* iOS only
*
* @param {string[]} uuids List of peripheral UUIDs
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
*/
@Cordova()
peripheralsWithIdentifiers(uuids: string[]): Promise<any[]> {
return;
}
/**
* Find the bonded devices
* Android only
*
* @returns {Promise<any>} Returns a promise with a list of peripheral objects
*/
@Cordova()
bondedDevices(): Promise<any[]> {
return;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
import { Injectable } from '@angular/core';
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,235 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface BranchIoPromise {
$identity_id?: number;
$one_time_use?: boolean;
'+click_timestamp'?: number;
'+clicked_branch_link'?: boolean;
'+is_first_session'?: boolean;
'+match_guaranteed'?: boolean;
contentMetadata?: string;
source?: string;
'~campaign'?: string;
'~channel'?: string;
'~creation_source'?: string;
'~feature'?: string;
'~id'?: number;
'~referring_link:'?: string;
[x: string]: any;
}
export interface BranchIoAnalytics {
channel?: string;
feature?: string;
campaign?: string;
stage?: string;
tags?: string[];
[x: string]: any;
}
export interface BranchIoProperties {
contentMetadata?: {
[x: string]: any;
};
[x: string]: any;
}
export interface BranchUniversalObject {
generateShortUrl(
analytics: BranchIoAnalytics,
properties: BranchIoProperties
): Promise<any>;
registerView(): Promise<any>;
showShareSheet(
analytics: BranchIoAnalytics,
properties: BranchIoProperties,
shareText: string
): Promise<any>;
onShareSheetLaunched(callback: any): void;
onShareSheetDismissed(callback: any): void;
onLinkShareResponse(callback: any): void;
onChannelSelected(callback: any): void;
listOnSpotlight(): Promise<any>;
}
/**
* @name BranchIo
* @description
* Branch.io is an attribution service for deeplinking and invitation links
*
* @usage
* ```
* import { BranchIo } from '@ionic-native/branch-io';
*
*
* constructor(private branch: BranchIo) { }
*
* ```
*
* @interfaces
* BranchIoPromise
* BranchIoAnalytics
* BranchIoProperties
* BranchUniversalObject
*
*/
@Plugin({
pluginName: 'BranchIo',
plugin: 'branch-cordova-sdk',
pluginRef: 'Branch',
repo:
'https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking',
platforms: ['iOS', 'Android']
})
@Injectable()
export class BranchIo extends IonicNativePlugin {
/**
* for development and debugging only
* @param {boolean} enable Enable debug
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
setDebug(enable: boolean): Promise<any> {
return;
}
/**
* Disable tracking
* @param {boolean} disable disable tracking
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
disableTracking(disable: boolean): Promise<any> {
return;
}
/**
* Initializes Branch
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
initSession(): Promise<BranchIoPromise> {
return;
}
/**
* Set Request Metadata
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
setRequestMetadata(): Promise<any> {
return;
}
/**
* for better Android matching
* @param {string} linkDomain LinkDomain at branch
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
setCookieBasedMatching(linkDomain: string): Promise<any> {
return;
}
/**
* First data
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
getFirstReferringParams(): Promise<any> {
return;
}
/**
* Latest data
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
getLatestReferringParams(): Promise<any> {
return;
}
/**
* Set identy of user
* @param {string} userId
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
setIdentity(userId: string): Promise<any> {
return;
}
/**
* Logout user
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
logout(): Promise<any> {
return;
}
/**
* Registers a custom event
* @param {string} eventName
* @param {any} metaData
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
userCompletedAction(eventName: string, metaData: any): Promise<any> {
return;
}
/**
* Send Commerce Event
* @param {string} event
* @param {any} metaData
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
sendCommerceEvent(event: string, metaData: any): Promise<any> {
return;
}
/**
* create a branchUniversalObj variable to reference with other Branch methods
* @param {BranchIoProperties} properties
* @return {Promise<BranchUniversalObject>}
*/
@Cordova({ otherPromise: true })
createBranchUniversalObject(
properties: BranchIoProperties
): Promise<BranchUniversalObject> {
return;
}
/**
* Load credits
* @param {any} bucket
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
loadRewards(bucket: any): Promise<any> {
return;
}
/**
* Redeem Rewards
* @param {string} value
* @param {any} bucket
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
redeemRewards(value: string, bucket: any): Promise<any> {
return;
}
/**
* Show credit history
* @return {Promise<any>}
*/
@Cordova({ otherPromise: true })
creditHistory(): Promise<any> {
return;
}
}
@@ -6,6 +6,11 @@ export interface CallDirectoryItem {
number: string;
}
export interface CallDirectoryLog {
plugin: string[];
extension: string[];
}
/**
* @name Call Directory
* @description
@@ -29,6 +34,10 @@ export interface CallDirectoryItem {
* .then(res: string) => console.log(res))
* .catch((error: any) => console.error(error));
* ```
*
* @Interfaces
* CallDirectoryItem
* CallDirectoryLog
*/
@Plugin({
pluginName: 'CallDirectory',
@@ -53,21 +62,21 @@ export class CallDirectory extends IonicNativePlugin {
/**
* Add identification numbers
* @param {Array<CallDirectoryItem>} items Set of numbers with labels
* @param {CallDirectoryItem[]} items Set of numbers with labels
* @return {Promise<any>} Returns a promise that resolves when numbers are added
*/
@Cordova()
addIdentification(items: Array<CallDirectoryItem>): Promise<any> {
addIdentification(items: CallDirectoryItem[]): Promise<any> {
return;
}
/**
* Remove identification numbers
* @param {Array<CallDirectoryItem>} items Set of numbers with arbitrary label
* @param {CallDirectoryItem[]} items Set of numbers with arbitrary label
* @return {Promise<any>} Returns a promise that resolves when numbers are removed
*/
@Cordova()
removeIdentification(items: Array<CallDirectoryItem>): Promise<any> {
removeIdentification(items: CallDirectoryItem[]): Promise<any> {
return;
}
@@ -82,10 +91,10 @@ export class CallDirectory extends IonicNativePlugin {
/**
* Get all numbers and labels in call directory
* @return {Array<CallDirectoryItem>} Returns a promise that resolves with an array of all items
* @return {CallDirectoryItem[]} Returns a promise that resolves with an array of all items
*/
@Cordova()
getAllItems(): Promise<Array<CallDirectoryItem>> {
getAllItems(): Promise<CallDirectoryItem[]> {
return;
}
@@ -97,4 +106,13 @@ export class CallDirectory extends IonicNativePlugin {
reloadExtension(): Promise<string> {
return;
}
/**
* Get log from plugin and call directory extension
* @return {Promise<CallDirectoryLog>} Returns a promise with an object of log messages
*/
@Cordova()
getLog(): Promise<CallDirectoryLog> {
return;
}
}
+1 -1
View File
@@ -3,7 +3,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface CallLogObject {
name: string;
value: string | Array<string>;
value: string | string[];
operator: '==' | '!=' | '>' | '>=' | '<' | '<=' | 'like';
}
+3 -7
View File
@@ -7,7 +7,7 @@ export interface CameraOptions {
/**
* Choose the format of the return value.
* Defined in Camera.DestinationType. Default is FILE_URI.
* DATA_URL : 0, Return image as base64-encoded string,
* DATA_URL : 0, Return image as base64-encoded string (DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI or NATIVE_URI if possible),
* FILE_URI : 1, Return image file URI,
* NATIVE_URI : 2 Return image native URI
* (e.g., assets-library:// on iOS or content:// on Android)
@@ -139,14 +139,14 @@ export enum Direction {
*
* const options: CameraOptions = {
* quality: 100,
* destinationType: this.camera.DestinationType.DATA_URL,
* destinationType: this.camera.DestinationType.FILE_URI,
* encodingType: this.camera.EncodingType.JPEG,
* mediaType: this.camera.MediaType.PICTURE
* }
*
* this.camera.getPicture(options).then((imageData) => {
* // imageData is either a base64 encoded string or a file URI
* // If it's base64:
* // If it's base64 (DATA_URL):
* let base64Image = 'data:image/jpeg;base64,' + imageData;
* }, (err) => {
* // Handle error
@@ -165,7 +165,6 @@ export enum Direction {
})
@Injectable()
export class Camera extends IonicNativePlugin {
/**
* Constant for possible destination types
*/
@@ -200,7 +199,6 @@ export class Camera extends IonicNativePlugin {
ALLMEDIA: 2
};
/**
* Convenience constant
*/
@@ -213,7 +211,6 @@ export class Camera extends IonicNativePlugin {
SAVEDPHOTOALBUM: 2
};
/**
* Convenience constant
*/
@@ -258,5 +255,4 @@ export class Camera extends IonicNativePlugin {
cleanup(): Promise<any> {
return;
}
}
@@ -0,0 +1,67 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface ChooserResult {
data: Uint8Array;
dataURI: string;
mediaType: string;
name: string;
uri: string;
}
/**
* @name Chooser
* @description
* File chooser plugin for Cordova.
*
* The following must be added to config.xml to prevent crashing when selecting large files on Android:
* ```xml
* <platform name="android">
* <edit-config
* file="app/src/main/AndroidManifest.xml"
* mode="merge"
* target="/manifest/application">
* <application android:largeHeap="true" />
* </edit-config>
* </platform>
* ```
*
* @usage
* ```typescript
* import { Chooser } from '@ionic-native/chooser';
*
*
* constructor(private chooser: Chooser) { }
*
* ...
*
*
* this.chooser.getFile()
* .then(file => console.log(file ? file.name : 'canceled'))
* .catch((error: any) => console.error(error));
*
* ```
*
* @interfaces
* ChooserResult
*/
@Plugin({
pluginName: 'Chooser',
plugin: 'cordova-plugin-chooser',
pluginRef: 'chooser',
repo: 'https://github.com/cyph/cordova-plugin-chooser',
platforms: ['Android', 'iOS']
})
@Injectable()
export class Chooser extends IonicNativePlugin {
/**
* Displays native prompt for user to select a file.
* @param {string} [accept] Optional MIME type filter (e.g. 'image/gif,video/*').
* @return {Promise<any>} Promise containing selected file's raw binary data,
* base64-encoded data: URI, MIME type, display name, and original URI.
*/
@Cordova()
getFile(accept: string): Promise<ChooserResult | undefined> {
return;
}
}
@@ -0,0 +1,366 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface CCKContext {
/**
* Full identifier path from root, including the context identifier itself..
*/
identifierPath: string[];
/**
* Title of the context.
*/
title: string;
/**
* Optional. Type value for the context.
*/
type?: CCKContextType;
/**
* Optional. Topic value of the context.
*/
topic?: string;
/**
* Optional. Display order of the context.
*/
displayOrder?: number;
}
export enum CCKContextType {
none = 0,
app,
chapter,
section,
level,
page,
task,
challenge,
quiz,
exercise,
lesson,
book,
game,
document,
audio,
video
}
export enum CCKContextTopic {
math = 'math',
science = 'science',
literacyAndWriting = 'literacyAndWriting',
worldLanguage = 'worldLanguage',
socialScience = 'socialScience',
computerScienceAndEngineering = 'computerScienceAndEngineering',
artsAndMusic = 'artsAndMusic',
healthAndFitness = 'healthAndFitness'
}
export interface CCKBinaryItem {
/**
* A unique string identifier for the activity item.
*/
identifier: string;
/**
* A human readable name for the activity item.
*/
title: string;
/**
* A type value for the activity item.
*/
type: CCKBinaryType;
/**
* The value that the binary activity item takes.
*/
isCorrect: boolean;
/**
* Optional. Should the activity item be added as the primary activity item.
*/
isPrimaryActivityItem?: boolean;
}
export enum CCKBinaryType {
trueFalse = 0,
passFail,
yesNo
}
export interface CCKScoreItem {
/**
* A unique string identifier for the activity item.
*/
identifier: string;
/**
* A human readable name for the activity item.
*/
title: string;
/**
* The score earned during completion of a task.
*/
score: number;
/**
* The maximum possible score, against which the reported score should be judged.
*/
maxScore: number;
/**
* Optional. Should the activity item be added as the primary activity item.
*/
isPrimaryActivityItem?: boolean;
}
export interface CCKQuantityItem {
/**
* A unique string identifier for the activity item.
*/
identifier: string;
/**
* A human readable name for the activity item.
*/
title: string;
/**
* A quantity associated with the task.
*/
quantity: number;
/**
* Optional. Should the activity item be added as the primary activity item.
*/
isPrimaryActivityItem?: boolean;
}
/**
* @name Class Kit
* @description Plugin for using Apple's ClassKit framework.
*
*
* Prerequisites:
* Only works with Xcode 9.4 and iOS 11.4. Your Provisioning Profile must include the ClassKit capability. Read more about how to Request ClassKit Resources (https://developer.apple.com/contact/classkit/) in here: https://developer.apple.com/documentation/classkit/enabling_classkit_in_your_app.
* Also note that you cant test ClassKit behavior in Simulator because Schoolwork isnt available in that environment.
*
* @usage
* ```typescript
* import { ClassKit, CCKContext, CCKBinaryItem, CCKQuantityItem, CCKScoreItem, CCKContextTopic, CCKContextType, CCKBinaryType } from '@ionic-native/class-kit';
*
* // Init contexts defined in XML file 'CCK-contexts.xml'
* constructor( ..., private classKit: ClassKit) {
* platform.ready().then(() => {
* classKit.initContextsFromXml("classkitplugin://")
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
* });
* }
*
* ...
*
* // Init context with identifier path
* const context: CCKContext = {
* identifierPath: ["parent_title_one", "child_one", "child_one_correct_quiz"],
* title: "child one correct quiz",
* type: CCKContextType.exercise,
* topic: CCKContextTopic.science,
* displayOrder: 0
* };
*
* this.classKit.addContext("classkitplugin://", context)
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
*
* // Remove all contexts
* this.classKit.removeContexts()
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
*
* // Remove context with identifier path
* this.classKit.removeContext(["parent_title_one", "child_one", "child_one_correct_quiz"])
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
*
* // Begin a new activity or restart an activity for a given context
* this.classKit.beginActivity(["parent_title_one", "child_two", "child_two_quiz"], false)
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
*
* // Adds a progress range to the active given activity
* this.classKit.setProgressRange(0, 0.66)
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
*
* // Adds a progress to the active given activity
* this.classKit.setProgress(0.66)
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
*
* // Adds activity information that is true or false, pass or fail, yes or no
* const binaryItem: CCKBinaryItem = {
* identifier: "child_two_quiz_IDENTIFIER_1",
* title: "CHILD TWO QUIZ 1",
* type: CCKBinaryType.trueFalse,
* isCorrect: isCorrect,
* isPrimaryActivityItem: false
* };
*
* this.classKit.setBinaryItem(binaryItem)
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
*
* // Adds activity information that signifies a score out of a possible maximum
* const scoreItem: CCKScoreItem = {
* identifier: "total_score",
* title: "Total Score :-)",
* score: 0.66,
* maxScore: 1.0,
* isPrimaryActivityItem: true
* };
*
* this.classKit.setScoreItem(scoreItem)
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
*
* // Activity information that signifies a quantity
* const quantityItem: CCKQuantityItem = {
* identifier: "quantity_item_hints",
* title: "Hints",
* quantity: 12,
* isPrimaryActivityItem: false
* };
*
* this.classKit.setQuantityItem(quantityItem)
* .then(() => console.log("success"))
* .catch(e => console.log("error: ", e));
*
* ```
*
* @interfaces
* CCKContext
* CCKContextType
* CCKContextTopic
* CCKBinaryItem
* CCKBinaryType
* CCKScoreItem
* CCKQuantityItem
*/
@Plugin({
pluginName: 'ClassKit',
plugin: 'cordova-plugin-classkit',
pluginRef: 'CordovaClassKit',
repo: 'https://github.com/sebastianbaar/cordova-plugin-classkit.git',
platforms: ['iOS']
})
@Injectable()
export class ClassKit extends IonicNativePlugin {
/**
* Init contexts defined in XML file 'CCK-contexts.xml'
* @param {string} urlPrefix URL prefix to use for custom URLs to locate activities (deeplink).
* @return {Promise<any>}
*/
@Cordova()
initContextsFromXml(urlPrefix: string): Promise<any> {
return;
}
/**
* Init context with identifier path
* @param {string} urlPrefix URL prefix to use for custom URLs to locate activities (deeplink).
* @param {CCKContext} context Context to initialize.
* @return {Promise<any>}
*/
@Cordova()
addContext(urlPrefix: string, context: CCKContext): Promise<any> {
return;
}
/**
* Remove all contexts
* @return {Promise<any>}
*/
@Cordova()
removeContexts(): Promise<any> {
return;
}
/**
* Remove context with identifier path
* @param {string[]} identifierPath Full identifier path from root, including the context identifier itself.
* @return {Promise<any>}
*/
@Cordova()
removeContext(identifierPath: string[]): Promise<any> {
return;
}
/**
* Begin a new activity or restart an activity for a given context
* @param {string[]} identifierPath Full identifier path from root, including the context identifier itself.
* @param {boolean} asNew Should a new activity be created (or an old activity be restarted).
* @return {Promise<any>}
*/
@Cordova()
beginActivity(identifierPath: string[], asNew: boolean): Promise<any> {
return;
}
/**
* End the active activity
* @return {Promise<any>}
*/
@Cordova()
endActivity(): Promise<any> {
return;
}
/**
* Adds a progress range to the active given activity
* @param {number} fromStart The beginning of the new range to add. This should be fractional value between 0 and 1, inclusive.
* @param {number} toEnd The end of the new range to add. This should be larger than the start value and less than or equal to one.
* @return {Promise<any>}
*/
@Cordova()
setProgressRange(fromStart: number, toEnd: number): Promise<any> {
return;
}
/**
* Adds a progress to the active given activity
* @param {number} progress A measure of progress through the task, given as a fraction in the range [0, 1].
* @return {Promise<any>}
*/
@Cordova()
setProgress(progress: number): Promise<any> {
return;
}
/**
* Adds activity information that is true or false, pass or fail, yes or no
* @param {CCKBinaryItem} binaryItem The binary item to add to the activity.
* @return {Promise<any>}
*/
@Cordova()
setBinaryItem(binaryItem: CCKBinaryItem): Promise<any> {
return;
}
/**
* Adds activity information that signifies a score out of a possible maximum
* @param {CCKScoreItem} scoreItem The score item to add to the activity.
* @return {Promise<any>}
*/
@Cordova()
setScoreItem(scoreItem: CCKScoreItem): Promise<any> {
return;
}
/**
* Activity information that signifies a quantity.
* @param {CCKQuantityItem} quantityItem The quantity item to add to the activity.
* @return {Promise<any>}
*/
@Cordova()
setQuantityItem(quantityItem: CCKQuantityItem): Promise<any> {
return;
}
}
@@ -0,0 +1,592 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
declare var clevertap: any;
/**
* @name CleverTap
* @description
* Cordova Plugin that wraps CleverTap SDK for Android and iOS
*
* @usage
* ```typescript
* import { CleverTap } from '@ionic-native/clevertap';
*
* constructor(private clevertap: CleverTap) { }
*
* ```
*/
@Plugin({
pluginName: 'CleverTap',
plugin: 'clevertap-cordova',
pluginRef: 'CleverTap',
repo: 'https://github.com/CleverTap/clevertap-cordova',
platforms: ['Android', 'iOS']
})
@Injectable()
export class CleverTap extends IonicNativePlugin {
/**
* notify device ready
* NOTE: in iOS use to be notified of launch Push Notification or Deep Link
* in Android use only in android phonegap build projects
* @returns {Promise<any>}
*/
@Cordova()
notifyDeviceReady(): Promise<any> {
return;
}
/*******************
* Personalization
******************/
/**
* Personalization
* Enables the Personalization API
* @returns {Promise<any>}
*/
@Cordova()
enablePersonalization(): Promise<any> {
return;
}
/**
* Enables tracking opt out for the currently active user.
* @param optOut {boolean}
* @returns {Promise<any>}
*/
@Cordova()
setOptOut(optOut: boolean): Promise<any> {
return;
}
/**
* Enables the reporting of device network related information, including IP address. This reporting is disabled by default.
* @param enable {boolean}
* @returns {Promise<any>}
*/
@Cordova()
enableDeviceNetworkInfoReporting(enable: boolean): Promise<any> {
return;
}
/*******************
* Push
******************/
/**
* Registers for push notifications
* @returns {Promise<any>}
*/
@Cordova()
registerPush(): Promise<any> {
return;
}
/**
* Sets the device's push token
* @param token {string}
* @returns {Promise<any>}
*/
@Cordova()
setPushToken(token: string): Promise<any> {
return;
}
/**
* Create Notification Channel for Android O+
* @param channelID {string}
* @param channelName {string}
* @param channelDescription {string}
* @param importance {number}
* @param showBadge {boolean}
* @returns {Promise<any>}
*/
@Cordova()
createNotificationChannel(
channelID: string,
channelName: string,
channelDescription: string,
importance: number,
showBadge: boolean
): Promise<any> {
return;
}
/**
* Create Notification Channel for Android O+
* @param channelID {string}
* @param channelName {string}
* @param channelDescription {string}
* @param importance {number}
* @param showBadge {boolean}
* @param sound {string}
* @returns {Promise<any>}
*/
@Cordova()
createNotificationChannelWithSound(
channelID: string,
channelName: string,
channelDescription: string,
importance: number,
showBadge: boolean,
sound: string
): Promise<any> {
return;
}
/**
* Create Notification Channel with Group ID for Android O+
* @param channelID {string}
* @param channelName {string}
* @param channelDescription {string}
* @param importance {number}
* @param groupId {string}
* @param showBadge {boolean}
* @param sound {string}
* @returns {Promise<any>}
*/
@Cordova()
createNotificationChannelWithGroupId(
channelID: string,
channelName: string,
channelDescription: string,
importance: number,
groupId: string,
showBadge: boolean
): Promise<any> {
return;
}
/**
* Create Notification Channel with Group ID for Android O+
* @param channelID {string}
* @param channelName {string}
* @param channelDescription {string}
* @param importance {number}
* @param groupId {string}
* @param showBadge {boolean}
* @returns {Promise<any>}
*/
@Cordova()
createNotificationChannelWithGroupIdAndSound(
channelID: string,
channelName: string,
channelDescription: string,
importance: number,
groupId: string,
showBadge: boolean,
sound: string
): Promise<any> {
return;
}
/**
* Create Notification Channel Group for Android O+
* @param groupID {string}
* @param groupName {string}
* @returns {Promise<any>}
*/
@Cordova()
createNotificationChannelGroup(
groupID: string,
groupName: string
): Promise<any> {
return;
}
/**
* Delete Notification Channel for Android O+
* @param channelID {string}
* @returns {Promise<any>}
*/
@Cordova()
deleteNotificationChannel(channelID: string): Promise<any> {
return;
}
/**
* Delete Notification Group for Android O+
* @param groupID {string}
* @returns {Promise<any>}
*/
@Cordova()
deleteNotificationChannelGroup(groupID: string): Promise<any> {
return;
}
/*******************
* Events
******************/
/**
* Record Screen View
* @param screenName {string}
* @returns {Promise<any>}
*/
@Cordova()
recordScreenView(screenName: string): Promise<any> {
return;
}
/**
* Record Event with Name
* @param eventName {string}
* @returns {Promise<any>}
*/
@Cordova()
recordEventWithName(eventName: string): Promise<any> {
return;
}
/**
* Record Event with Name and Event properties
* @param eventName {string}
* @param eventProps {any}
* @returns {Promise<any>}
*/
@Cordova()
recordEventWithNameAndProps(
eventName: string,
eventProps: any
): Promise<any> {
return;
}
/**
* Record Charged Event with Details and Items
* @param details {any} object with transaction details
* @param items {any} array of items purchased
* @returns {Promise<any>}
*/
@Cordova()
recordChargedEventWithDetailsAndItems(
details: any,
items: any
): Promise<any> {
return;
}
/**
* Get Event First Time
* @param eventName {string}
* callback returns epoch seconds or -1
* @returns {Promise<any>}
*/
@Cordova()
eventGetFirstTime(eventName: string): Promise<any> {
return;
}
/**
* Get Event Last Time
* @param eventName {string}
* callback returns epoch seconds or -1
* @returns {Promise<any>}
*/
@Cordova()
eventGetLastTime(eventName: string): Promise<any> {
return;
}
/**
* Get Event Number of Occurrences
* @param eventName {string}
* calls back with int or -1
* @returns {Promise<any>}
*/
@Cordova()
eventGetOccurrences(eventName: string): Promise<any> {
return;
}
/**
* Get Event Details
* @param eventName {string}
* calls back with object {"eventName": <string>, "firstTime":<epoch seconds>, "lastTime": <epoch seconds>, "count": <int>} or empty object
* @returns {Promise<any>}
*/
@Cordova()
eventGetDetails(eventName: string): Promise<any> {
return;
}
/**
* Get Event History
* calls back with object {"eventName1":<event1 details object>, "eventName2":<event2 details object>}
* @returns {Promise<any>}
*/
@Cordova()
getEventHistory(): Promise<any> {
return;
}
/*******************
* Profiles
******************/
/**
* Get the device location if available.
* On iOS:
* Calling this will prompt the user location permissions dialog.
* Please be sure to include the NSLocationWhenInUseUsageDescription key in your Info.plist.
* Uses desired accuracy of kCLLocationAccuracyHundredMeters.
* If you need background location updates or finer accuracy please implement your own location handling.
* On Android:
* Requires Location Permission in AndroidManifest e.g. "android.permission.ACCESS_COARSE_LOCATION"
* You can use location to pass it to CleverTap via the setLocation API
* for, among other things, more fine-grained geo-targeting and segmentation purposes.
* Note: on iOS the call to CleverTapSDK must be made on the main thread due to LocationManager restrictions, but the CleverTapSDK method itself is non-blocking.
* calls back with {lat:lat, lon:lon} lat and lon are floats
* @returns {Promise<any>}
*/
@Cordova()
getLocation(): Promise<any> {
return;
}
/**
* Set location
* @param lat {number}
* @param lon {number}
* @returns {Promise<any>}
*/
@Cordova()
setLocation(lat: number, lon: number): Promise<any> {
return;
}
/**
* Creates a separate and distinct user profile identified by one or more of Identity, Email, FBID or GPID values,
* and populated with the key-values included in the profile dictionary.
* If your app is used by multiple users, you can use this method to assign them each a unique profile to track them separately.
* If instead you wish to assign multiple Identity, Email, FBID and/or GPID values to the same user profile,
* use profileSet rather than this method.
* If none of Identity, Email, FBID or GPID is included in the profile dictionary,
* all properties values will be associated with the current user profile.
* When initially installed on this device, your app is assigned an "anonymous" profile.
* The first time you identify a user on this device (whether via onUserLogin or profileSet),
* the "anonymous" history on the device will be associated with the newly identified user.
* Then, use this method to switch between subsequent separate identified users.
* Please note that switching from one identified user to another is a costly operation
* in that the current session for the previous user is automatically closed
* and data relating to the old user removed, and a new session is started
* for the new user and data for that user refreshed via a network call to CleverTap.
* In addition, any global frequency caps are reset as part of the switch.
* @param profile {any} object
* @returns {Promise<any>}
*/
@Cordova()
onUserLogin(profile: any): Promise<any> {
return;
}
/**
* Set profile attributes
* @param profile {any} object
* @returns {Promise<any>}
*/
@Cordova()
profileSet(profile: any): Promise<any> {
return;
}
/**
* Set profile attributes from facebook user
* @param profile {any} facebook graph user object
* @returns {Promise<any>}
*/
@Cordova()
profileSetGraphUser(profile: any): Promise<any> {
return;
}
/**
* Set profile attributes rom google plus user
* @param profile {any} google plus user object
* @returns {Promise<any>}
*/
@Cordova()
profileGooglePlusUser(profile: any): Promise<any> {
return;
}
/**
* Get User Profile Property
* @param propertyName {string}
* calls back with value of propertyName or false
* @returns {Promise<any>}
*/
@Cordova()
profileGetProperty(propertyName: string): Promise<any> {
return;
}
/**
* Get a unique CleverTap identifier suitable for use with install attribution providers.
* calls back with unique CleverTap attribution identifier
* @returns {Promise<any>}
*/
@Cordova()
profileGetCleverTapAttributionIdentifier(): Promise<any> {
return;
}
/**
* Get User Profile CleverTapID
* calls back with CleverTapID or false
* @returns {Promise<any>}
*/
@Cordova()
profileGetCleverTapID(): Promise<any> {
return;
}
/**
* Remove the property specified by key from the user profile
* @param key {string}
* @returns {Promise<any>}
*/
@Cordova()
profileRemoveValueForKey(key: string): Promise<any> {
return;
}
/**
* Method for setting a multi-value user profile property
* @param key {string}
* @param values {any} array of strings
* @returns {Promise<any>}
*/
@Cordova()
profileSetMultiValues(key: string, values: any): Promise<any> {
return;
}
/**
* Method for adding a value to a multi-value user profile property
* @param key {string}
* @param value {string}
* @returns {Promise<any>}
*/
@Cordova()
profileAddMultiValue(key: string, value: string): Promise<any> {
return;
}
/**
* Method for adding values to a multi-value user profile property
* @param key {string}
* @param values {any} array of strings
* @returns {Promise<any>}
*/
@Cordova()
profileAddMultiValues(key: string, values: any): Promise<any> {
return;
}
/**
* Method for removing a value from a multi-value user profile property
* @param key {string}
* @param value {string}
* @returns {Promise<any>}
*/
@Cordova()
profileRemoveMultiValue(key: string, value: string): Promise<any> {
return;
}
/**
* Method for removing a value from a multi-value user profile property
* @param key {string}
* @param values {any} array of strings
* @returns {Promise<any>}
*/
@Cordova()
profileRemoveMultiValues(key: string, values: any): Promise<any> {
return;
}
/*******************
* Session
******************/
/**
* Get Session Elapsed Time
* calls back with seconds
* @returns {Promise<any>}
*/
@Cordova()
sessionGetTimeElapsed(): Promise<any> {
return;
}
/**
* Get Session Total Visits
* calls back with with int or -1
* @returns {Promise<any>}
*/
@Cordova()
sessionGetTotalVisits(): Promise<any> {
return;
}
/**
* Get Session Screen Count
* calls back with with int
* @returns {Promise<any>}
*/
@Cordova()
sessionGetScreenCount(): Promise<any> {
return;
}
/**
* Get Session Previous Visit Time
* calls back with with epoch seconds or -1
* @returns {Promise<any>}
*/
@Cordova()
sessionGetPreviousVisitTime(): Promise<any> {
return;
}
/**
* Get Sesssion Referrer UTM details
* object {"source": <string>, "medium": <string>, "campaign": <string>} or empty object
* @returns {Promise<any>}
*/
@Cordova()
sessionGetUTMDetails(): Promise<any> {
return;
}
/**
* Call this to manually track the utm details for an incoming install referrer
* @param source {string}
* @param medium {string}
* @param campaign {string}
* @returns {Promise<any>}
*/
@Cordova()
pushInstallReferrer(
source: string,
medium: string,
campaign: string
): Promise<any> {
return;
}
/*******************
* Developer Options
******************/
/**
* 0 is off, 1 is info, 2 is debug, default is 1
* @param level {number}
* @returns {Promise<any>}
*/
@Cordova()
setDebugLevel(level: number): Promise<any> {
return;
}
}
+3 -3
View File
@@ -1,6 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Clipboard
* @description
@@ -63,6 +62,7 @@ export class Clipboard extends IonicNativePlugin {
* @returns {Promise<any>} Returns a promise after the text has been cleaned
*/
@Cordova()
clear(): Promise<any> { return; }
clear(): Promise<any> {
return;
}
}
+6 -20
View File
@@ -156,23 +156,9 @@ interface NativeUpdateNotification {
appVersion: string;
}
export interface Callback<T> {
(error: Error, parameter: T): void;
}
export interface SuccessCallback<T> {
(result?: T): void;
}
export interface ErrorCallback {
(error?: Error): void;
}
export interface SuccessCallback<T> {
(result?: T): void;
}
export interface ErrorCallback {
(error?: Error): void;
}
export type Callback<T> = (error: Error, parameter: T) => void;
export type SuccessCallback<T> = (result?: T) => void;
export type ErrorCallback = (error?: Error) => void;
interface Configuration {
appVersion: string;
@@ -189,18 +175,18 @@ declare class AcquisitionStatus {
declare class AcquisitionManager {
constructor(httpRequester: Http.Requester, configuration: Configuration);
public queryUpdateWithCurrentPackage(
queryUpdateWithCurrentPackage(
currentPackage: IPackage,
callback?: Callback<IRemotePackage | NativeUpdateNotification>
): void;
public reportStatusDeploy(
reportStatusDeploy(
pkg?: IPackage,
status?: string,
previousLabelOrAppVersion?: string,
previousDeploymentKey?: string,
callback?: Callback<void>
): void;
public reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
reportStatusDownload(pkg: IPackage, callback?: Callback<void>): void;
}
interface CodePushCordovaPlugin {
+4 -3
View File
@@ -1,12 +1,12 @@
import {
checkAvailability,
CordovaCheck,
CordovaInstance,
getPromise,
InstanceCheck,
InstanceProperty,
IonicNativePlugin,
Plugin
Plugin,
checkAvailability,
getPromise
} from '@ionic-native/core';
declare const window: any, navigator: any;
@@ -306,6 +306,7 @@ export class ContactFindOptions implements IContactFindOptions {
* @description
* Access and manage Contacts on the device.
*
* @deprecated
* @usage
*
* ```typescript
+4 -4
View File
@@ -43,12 +43,12 @@ export interface DeeplinkOptions {
* '/about-us': AboutPage,
* '/universal-links-test': AboutPage,
* '/products/:productId': ProductPage
* }).subscribe((match) => {
* }).subscribe(match => {
* // match.$route - the route we matched, which is the matched entry from the arguments to route()
* // match.$args - the args passed in the link
* // match.$link - the full link data
* console.log('Successfully matched route', match);
* }, (nomatch) => {
* }, nomatch => {
* // nomatch.$link - the full link data
* console.error('Got a deeplink that didn\'t match', nomatch);
* });
@@ -61,12 +61,12 @@ export interface DeeplinkOptions {
* this.deeplinks.routeWithNavController(this.navController, {
* '/about-us': AboutPage,
* '/products/:productId': ProductPage
* }).subscribe((match) => {
* }).subscribe(match => {
* // match.$route - the route we matched, which is the matched entry from the arguments to route()
* // match.$args - the args passed in the link
* // match.$link - the full link data
* console.log('Successfully matched route', match);
* }, (nomatch) => {
* }, nomatch => {
* // nomatch.$link - the full link data
* console.error('Got a deeplink that didn\'t match', nomatch);
* });
@@ -1,10 +1,5 @@
import { Injectable } from '@angular/core';
import {
Cordova,
CordovaProperty,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { Cordova, CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Diagnostic
+2 -2
View File
@@ -65,7 +65,7 @@ export class Dialogs extends IonicNativePlugin {
* Displays a customizable confirmation dialog box.
* @param {string} message Dialog message.
* @param {string} [title] Dialog title. (Optional, defaults to Confirm)
* @param {Array<string>} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to [OK,Cancel])
* @returns {Promise<number>} Returns a promise that resolves the button index that was clicked, or 0 if the user has dismissed the dialog by clicking outside the dialog box. Note that the index use one-based indexing.
*/
@Cordova({
@@ -84,7 +84,7 @@ export class Dialogs extends IonicNativePlugin {
* Displays a native dialog box that is more customizable than the browser's prompt function.
* @param {string} [message] Dialog message.
* @param {string} [title] Dialog title. (Optional, defaults to Prompt)
* @param {Array<string>} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
* @param {string[]} [buttonLabels] Array of strings specifying button labels. (Optional, defaults to ["OK","Cancel"])
* @param {string} [defaultText] Default text box input value. (Optional, Default: empty string)
* @returns {Promise<DialogsPromptCallback>} Returns a promise that resolves an object with the button index clicked and the text entered
*/
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name iOS DocumentPicker
@@ -10,9 +10,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { IOSDocumentPicker } from '@ionic-native/document-picker';
* import { DocumentPicker } from '@ionic-native/document-picker';
*
* constructor(private docPicker: IOSDocumentPicker) { }
* constructor(private docPicker: DocumentPicker) { }
*
* ...
*
@@ -78,7 +78,7 @@ export class DocumentViewer extends IonicNativePlugin {
*
* @param url {string} Url to the file
* @param contentType {string} Content type of the file
* @param options {Array<DocumentViewerOptions>} options
* @param options {DocumentViewerOptions} options
* @param [onPossible] {Function}
* @param [onMissingApp] {Function}
* @param [onImpossible] {Function}
@@ -2,9 +2,9 @@ import { Injectable } from '@angular/core';
import {
Cordova,
CordovaCheck,
getPromise,
IonicNativePlugin,
Plugin
Plugin,
getPromise
} from '@ionic-native/core';
export interface EmailComposerOptions {
@@ -16,17 +16,17 @@ export interface EmailComposerOptions {
/**
* Email address(es) for To field
*/
to?: string | Array<string>;
to?: string | string[];
/**
* Email address(es) for CC field
*/
cc?: string | Array<string>;
cc?: string | string[];
/**
* Email address(es) for BCC field
*/
bcc?: string | Array<string>;
bcc?: string | string[];
/**
* File paths or base64 data streams
@@ -118,6 +118,30 @@ export interface EmailComposerOptions {
})
@Injectable()
export class EmailComposer extends IonicNativePlugin {
/**
* Checks if the app has a permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
errorIndex: 2
})
hasPermission(): Promise<boolean> {
return;
}
/**
* Request permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
errorIndex: 2
})
requestPermission(): Promise<boolean> {
return;
}
/**
* Verifies if sending emails is supported on the device.
*
@@ -147,39 +171,6 @@ export class EmailComposer extends IonicNativePlugin {
});
}
/**
* Request permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
errorIndex: 2
})
requestPermission(): Promise<boolean> {
return;
}
/**
* Checks if the app has a permission to access email accounts information
* @return {Promise<boolean>} returns a promise that resolves with a boolean that indicates if the permission was granted
*/
@Cordova({
successIndex: 0,
errorIndex: 2
})
hasPermission(): Promise<boolean> {
return;
}
/**
* Adds a new mail app alias.
*
* @param {string} alias The alias name
* @param {string} packageName The package name
*/
@Cordova()
addAlias(alias: string, packageName: string): void {}
/**
* Displays the email composer pre-filled with data.
*
@@ -194,4 +185,13 @@ export class EmailComposer extends IonicNativePlugin {
open(options: EmailComposerOptions, scope?: any): Promise<any> {
return;
}
/**
* Adds a new mail app alias.
*
* @param {string} alias The alias name
* @param {string} packageName The package name
*/
@Cordova()
addAlias(alias: string, packageName: string): void {}
}
@@ -4,7 +4,11 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Extended Device Information
* @description
* Retrieves additional device information that is not provided by other plugins
* Retrieves additional device information from the Device Hardware
* - memory
* - cpumhz
* - totalstorage
* - freestorage
*
* @usage
* ```typescript
@@ -22,12 +26,12 @@ import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
pluginName: 'ExtendedDeviceInformation',
plugin: 'cordova-plugin-extended-device-information',
pluginRef: 'extended-device-information',
repo: 'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
repo:
'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
platforms: ['Android']
})
@Injectable()
export class ExtendedDeviceInformation extends IonicNativePlugin {
/**
* Get the device's memory size
*/
@@ -46,4 +50,9 @@ export class ExtendedDeviceInformation extends IonicNativePlugin {
@CordovaProperty()
totalstorage: string;
/**
* Get the total storage
*/
@CordovaProperty()
freestorage: number;
}
+425
View File
@@ -0,0 +1,425 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface Attributes {
[index: string]: String;
}
/**
* @name Crashlytics
* @description
* API for interacting with the Crashlytics kit.
*
* https://docs.fabric.io/crashlytics/index.html
*
* @usage
* ```typescript
* import { Crashlytics } from '@ionic-native/fabric';
*
*
* constructor(private crashlytics: Crashlytics) { }
*
* ...
*
* try {
* await this.loadData();
* } catch (e) {
* this.crashlytics.addLog("Error while loading data");
* this.crashlytics.sendNonFatalCrash(e.message || e);
* }
*
* ```
*/
@Plugin({
pluginName: 'Crashlytics',
plugin: 'cordova-fabric-plugin',
pluginRef: 'window.fabric.Crashlytics',
repo: 'https://www.npmjs.com/package/cordova-fabric-plugin',
install:
'ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx',
installVariables: ['FABRIC_API_KEY', 'FABRIC_API_SECRET'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Crashlytics extends IonicNativePlugin {
/**
* Add logging that will be sent with your crash data. This logging will not show up
* in the system.log and will only be visible in your Crashlytics dashboard.
* @param message {string}
*/
@Cordova({ sync: true })
addLog(message: string): void {
return;
}
/**
* Used to simulate a native platform crash (useful for testing Crashlytics logging).
*/
@Cordova({ sync: true })
sendCrash(): void {
return;
}
/**
* Used to log a non-fatal error message (Android only).
*/
@Cordova({ sync: true })
sendNonFatalCrash(message: string, stacktrace?: any): void {
return;
}
/**
* Used to record a non-fatal error message (iOS only).
*/
@Cordova({ sync: true })
recordError(message: string, code: number): void {
return;
}
/**
* Sets the user's identifier for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setUserIdentifier(userId: string): void {
return;
}
/**
* Sets the user's name for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setUserName(userName: string): void {
return;
}
/**
* Sets the user's email address for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setUserEmail(email: string): void {
return;
}
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setStringValueForKey(value: string, key: string): void {
return;
}
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setIntValueForKey(value: number, key: string): void {
return;
}
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setBoolValueForKey(value: boolean, key: string): void {
return;
}
/**
* Sets a custom key/value pair for logging to Crashlytics backend.
*/
@Cordova({ sync: true })
setFloatValueForKey(value: number, key: string): void {
return;
}
}
/**
* @name Answers
* @description
* API for interacting with the Answers kit.
*
* https://docs.fabric.io/crashlytics/index.html
*
* @usage
* ```typescript
* import { Answers } from '@ionic-native/fabric';
*
*
* constructor(private answers: Answers) { }
*
* ...
*
* this.answers.sendCustomEvent('SomeCustomEvent', { some: "attributes" })
*
* ```
*/
@Plugin({
pluginName: 'Answers',
plugin: 'cordova-fabric-plugin',
pluginRef: 'window.fabric.Answers',
repo: 'https://www.npmjs.com/package/cordova-fabric-plugin',
install:
'ionic cordova plugin add cordova-fabric-plugin --variable FABRIC_API_KEY=XXX --variable FABRIC_API_SECRET=xxx',
installVariables: ['FABRIC_API_KEY', 'FABRIC_API_SECRET'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class Answers extends IonicNativePlugin {
/**
* Sends the Purchase tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#purchase
*
* @param itemPrice The item's amount in the currency specified.
* @param currency The ISO4217 currency code.
* @param success Was the purchase completed succesfully?
* @param itemName The human-readable name for the item.
* @param itemType The category the item falls under.
* @param itemId A unique identifier used to track the item.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendPurchase(
itemPrice?: number,
currency?: string,
success?: boolean,
itemName?: string,
itemType?: string,
itemId?: string,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Add To Cart tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#add-to-cart
*
* @param itemPrice The item's amount in the currency specified.
* @param currency The ISO4217 currency code.
* @param itemName The human-readable name for the item.
* @param itemType The category the item falls under.
* @param itemId A unique identifier used to track the item.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendAddToCart(
itemPrice?: number,
currency?: string,
itemName?: string,
itemType?: string,
itemId?: string,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Start Checkout tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#start-checkout
*
* @param totalPrice The total price of all items in cart in the currency specified.
* @param currency The ISO4217 currency code.
* @param itemCount The count of items in cart.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendStartCheckout(
totalPrice?: number,
currency?: string,
itemCount?: number,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Search tracking event.
*
* https://docs.fabric.io/android/answers/answers-events.html#search
*
* @param query What the user is searching for.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendSearch(query: string, attributes?: Attributes): void {
return;
}
/**
* Sends the Share tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#share
*
* @param method The method used to share content.
* @param contentName The description of the content.
* @param contentType The type or genre of content.
* @param contentId A unique key identifying the content.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendShare(
method?: string,
contentName?: string,
contentType?: string,
contentId?: string,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Rated Content tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#rated-content
*
* @param rating An integer rating of the content.
* @param contentName The human-readable name of content.
* @param contentType The category your item falls under.
* @param contentId A unique identifier used to track the item.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendRatedContent(
rating?: number,
contentName?: string,
contentType?: string,
contentId?: string,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Sign Up tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#sign-up
*
* @param method An optional description of the sign up method (Twitter, Facebook, etc.); defaults to "Direct".
* @param success An optional flag that indicates sign up success; defaults to true.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendSignUp(
method?: string,
success?: boolean,
attributes?: Attributes
): void {
return;
}
/**
* Sends the Log In tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#log-in
*
* @param method An optional description of the sign in method (Twitter, Facebook, etc.); defaults to "Direct".
* @param success An optional flag that indicates sign in success; defaults to true.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendLogIn(method?: string, success?: boolean, attributes?: Attributes): void {
return;
}
/**
* Sends the Invite tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#invite
*
* @param method An optional description of the sign in method (Twitter, Facebook, etc.); defaults to "Direct".
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendInvite(method?: string, attributes?: Attributes): void {
return;
}
/**
* Sends the Level Start tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#level-start
*
* @param levelName String key describing the level.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendLevelStart(levelName?: string, attributes?: Attributes): void {
return;
}
/**
* Sends the Level End tracking event.
*
* All parameters are optional.
*
* https://docs.fabric.io/android/answers/answers-events.html#level-end
*
* @param levelName String key describing the level.
* @param score The score for this level.
* @param success Completed the level or failed trying.
* @param attributes Any additional user-defined attributes to be logged.
*/
@Cordova({ sync: true })
sendLevelEnd(
levelName?: string,
score?: number,
success?: boolean,
attributes?: Attributes
): void {
return;
}
/**
* Send the Content View tracking event.
*
* https://docs.fabric.io/android/answers/answers-events.html#content-view
*/
@Cordova({ sync: true })
sendContentView(
name: string,
type?: string,
id?: string,
attributes?: Attributes
): void {
return;
}
/**
* Shortcut for sendContentView(...) using type of "Screen".
*/
@Cordova({ sync: true })
sendScreenView(name: string, id: string, attributes?: Attributes): void {
return;
}
/**
* Send a custom tracking event with the given name.
*
* https://docs.fabric.io/android/answers/answers-events.html#custom-event
*/
@Cordova({ sync: true })
sendCustomEvent(name: string, attributes?: Attributes): void {
return;
}
}
+42 -38
View File
@@ -2,11 +2,9 @@ import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface FacebookLoginResponse {
status: string;
authResponse: {
session_key: boolean;
accessToken: string;
@@ -18,9 +16,7 @@ export interface FacebookLoginResponse {
secret: string;
userID: string;
};
}
/**
@@ -114,46 +110,46 @@ export interface FacebookLoginResponse {
plugin: 'cordova-plugin-facebook4',
pluginRef: 'facebookConnectPlugin',
repo: 'https://github.com/jeduan/cordova-plugin-facebook4',
install: 'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
install:
'ionic cordova plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"',
installVariables: ['APP_ID', 'APP_NAME'],
platforms: ['Android', 'iOS', 'Browser']
})
@Injectable()
export class Facebook extends IonicNativePlugin {
EVENTS: {
EVENT_NAME_ACTIVATED_APP: 'fb_mobile_activate_app',
EVENT_NAME_DEACTIVATED_APP: 'fb_mobile_deactivate_app',
EVENT_NAME_SESSION_INTERRUPTIONS: 'fb_mobile_app_interruptions',
EVENT_NAME_TIME_BETWEEN_SESSIONS: 'fb_mobile_time_between_sessions',
EVENT_NAME_COMPLETED_REGISTRATION: 'fb_mobile_complete_registration',
EVENT_NAME_VIEWED_CONTENT: 'fb_mobile_content_view',
EVENT_NAME_SEARCHED: 'fb_mobile_search',
EVENT_NAME_RATED: 'fb_mobile_rate',
EVENT_NAME_COMPLETED_TUTORIAL: 'fb_mobile_tutorial_completion',
EVENT_NAME_PUSH_TOKEN_OBTAINED: 'fb_mobile_obtain_push_token',
EVENT_NAME_ADDED_TO_CART: 'fb_mobile_add_to_cart',
EVENT_NAME_ADDED_TO_WISHLIST: 'fb_mobile_add_to_wishlist',
EVENT_NAME_INITIATED_CHECKOUT: 'fb_mobile_initiated_checkout',
EVENT_NAME_ADDED_PAYMENT_INFO: 'fb_mobile_add_payment_info',
EVENT_NAME_PURCHASED: 'fb_mobile_purchase',
EVENT_NAME_ACHIEVED_LEVEL: 'fb_mobile_level_achieved',
EVENT_NAME_UNLOCKED_ACHIEVEMENT: 'fb_mobile_achievement_unlocked',
EVENT_NAME_SPENT_CREDITS: 'fb_mobile_spent_credits',
EVENT_PARAM_CURRENCY: 'fb_currency',
EVENT_PARAM_REGISTRATION_METHOD: 'fb_registration_method',
EVENT_PARAM_CONTENT_TYPE: 'fb_content_type',
EVENT_PARAM_CONTENT_ID: 'fb_content_id',
EVENT_PARAM_SEARCH_STRING: 'fb_search_string',
EVENT_PARAM_SUCCESS: 'fb_success',
EVENT_PARAM_MAX_RATING_VALUE: 'fb_max_rating_value',
EVENT_PARAM_PAYMENT_INFO_AVAILABLE: 'fb_payment_info_available',
EVENT_PARAM_NUM_ITEMS: 'fb_num_items',
EVENT_PARAM_LEVEL: 'fb_level',
EVENT_PARAM_DESCRIPTION: 'fb_description',
EVENT_PARAM_SOURCE_APPLICATION: 'fb_mobile_launch_source',
EVENT_PARAM_VALUE_YES: '1',
EVENT_PARAM_VALUE_NO: '0'
EVENT_NAME_ACTIVATED_APP: 'fb_mobile_activate_app';
EVENT_NAME_DEACTIVATED_APP: 'fb_mobile_deactivate_app';
EVENT_NAME_SESSION_INTERRUPTIONS: 'fb_mobile_app_interruptions';
EVENT_NAME_TIME_BETWEEN_SESSIONS: 'fb_mobile_time_between_sessions';
EVENT_NAME_COMPLETED_REGISTRATION: 'fb_mobile_complete_registration';
EVENT_NAME_VIEWED_CONTENT: 'fb_mobile_content_view';
EVENT_NAME_SEARCHED: 'fb_mobile_search';
EVENT_NAME_RATED: 'fb_mobile_rate';
EVENT_NAME_COMPLETED_TUTORIAL: 'fb_mobile_tutorial_completion';
EVENT_NAME_PUSH_TOKEN_OBTAINED: 'fb_mobile_obtain_push_token';
EVENT_NAME_ADDED_TO_CART: 'fb_mobile_add_to_cart';
EVENT_NAME_ADDED_TO_WISHLIST: 'fb_mobile_add_to_wishlist';
EVENT_NAME_INITIATED_CHECKOUT: 'fb_mobile_initiated_checkout';
EVENT_NAME_ADDED_PAYMENT_INFO: 'fb_mobile_add_payment_info';
EVENT_NAME_PURCHASED: 'fb_mobile_purchase';
EVENT_NAME_ACHIEVED_LEVEL: 'fb_mobile_level_achieved';
EVENT_NAME_UNLOCKED_ACHIEVEMENT: 'fb_mobile_achievement_unlocked';
EVENT_NAME_SPENT_CREDITS: 'fb_mobile_spent_credits';
EVENT_PARAM_CURRENCY: 'fb_currency';
EVENT_PARAM_REGISTRATION_METHOD: 'fb_registration_method';
EVENT_PARAM_CONTENT_TYPE: 'fb_content_type';
EVENT_PARAM_CONTENT_ID: 'fb_content_id';
EVENT_PARAM_SEARCH_STRING: 'fb_search_string';
EVENT_PARAM_SUCCESS: 'fb_success';
EVENT_PARAM_MAX_RATING_VALUE: 'fb_max_rating_value';
EVENT_PARAM_PAYMENT_INFO_AVAILABLE: 'fb_payment_info_available';
EVENT_PARAM_NUM_ITEMS: 'fb_num_items';
EVENT_PARAM_LEVEL: 'fb_level';
EVENT_PARAM_DESCRIPTION: 'fb_description';
EVENT_PARAM_SOURCE_APPLICATION: 'fb_mobile_launch_source';
EVENT_PARAM_VALUE_YES: '1';
EVENT_PARAM_VALUE_NO: '0';
};
/**
@@ -302,4 +298,12 @@ export class Facebook extends IonicNativePlugin {
return;
}
/**
* Returns the deferred app link
* @returns {Promise<any>}
*/
@Cordova()
getDeferredApplink(): Promise<string> {
return;
}
}
+2 -2
View File
@@ -55,9 +55,9 @@ export interface NotificationData {
*/
@Plugin({
pluginName: 'FCM',
plugin: 'cordova-plugin-fcm',
plugin: 'cordova-plugin-fcm-with-dependecy-updated',
pluginRef: 'FCMPlugin',
repo: 'https://github.com/fechanique/cordova-plugin-fcm',
repo: 'https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated',
platforms: ['Android', 'iOS']
})
@Injectable()
@@ -1,10 +1,10 @@
import { Injectable } from '@angular/core';
import {
checkAvailability,
CordovaInstance,
InstanceCheck,
IonicNativePlugin,
Plugin
Plugin,
checkAvailability
} from '@ionic-native/core';
export interface FileUploadOptions {
+57 -47
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { CordovaCheck, CordovaProperty, getPromise, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { CordovaCheck, CordovaProperty, IonicNativePlugin, Plugin, getPromise } from '@ionic-native/core';
export interface IFile extends Blob {
/**
@@ -405,84 +405,52 @@ export interface FileEntry extends Entry {
/**
* When requestFileSystem() succeeds, the following callback is made.
*/
export interface FileSystemCallback {
/**
* @param filesystem The file systems to which the app is granted access.
*/
(filesystem: FileSystem): void;
}
export type FileSystemCallback = (filesystem: FileSystem) => void;
/**
* This export interface is the callback used to look up Entry objects.
*/
export interface EntryCallback {
/**
* @param entry
*/
(entry: Entry): void;
}
export type EntryCallback = (entry: Entry) => void;
/**
* This export interface is the callback used to look up FileEntry objects.
*/
export interface FileEntryCallback {
/**
* @param entry
*/
(entry: FileEntry): void;
}
export type FileEntryCallback = (entry: FileEntry) => void;
/**
* This export interface is the callback used to look up DirectoryEntry objects.
*/
export interface DirectoryEntryCallback {
/**
* @param entry
*/
(entry: DirectoryEntry): void;
}
export type DirectoryEntryCallback = (entry: DirectoryEntry) => void;
/**
* When readEntries() succeeds, the following callback is made.
*/
export interface EntriesCallback {
(entries: Entry[]): void;
}
export type EntriesCallback = (entries: Entry[]) => void;
/**
* This export interface is the callback used to look up file and directory metadata.
*/
export interface MetadataCallback {
(metadata: Metadata): void;
}
export type MetadataCallback = (metadata: Metadata) => void;
/**
* This export interface is the callback used to create a FileWriter.
*/
export interface FileWriterCallback {
(fileWriter: FileWriter): void;
}
export type FileWriterCallback = (fileWriter: FileWriter) => void;
/**
* This export interface is the callback used to obtain a File.
*/
export interface FileCallback {
(file: IFile): void;
}
export type FileCallback = (file: IFile) => void;
/**
* This export interface is the generic callback used to indicate success of an asynchronous method.
*/
export interface VoidCallback {
(): void;
}
export type VoidCallback = () => void;
/**
* When an error occurs, the following callback is made.
*/
export interface ErrorCallback {
(err: FileError): void;
}
export type ErrorCallback = (err: FileError) => void;
export interface RemoveResult {
success: boolean;
@@ -1118,8 +1086,8 @@ export class File extends IonicNativePlugin {
});
}
/* Write a new file to the desired location.
*
/**
* Write a new file to the desired location.
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} fileName path relative to base path
* @param {string | Blob | ArrayBuffer} text content, blob or ArrayBuffer to write
@@ -1154,6 +1122,7 @@ export class File extends IonicNativePlugin {
}
/**
* Write content to FileEntry.
* @hidden
* Write to an existing file.
* @param {FileEntry} fe file entry object
@@ -1213,6 +1182,7 @@ export class File extends IonicNativePlugin {
* Read file and return data as a base64 encoded data url.
* A data url is of the form:
* data: [<mediatype>][;base64],<data>
*
* @param {string} path Base FileSystem. Please refer to the iOS and Android filesystem above
* @param {string} file Name of file, relative to path.
* @returns {Promise<string>} Returns a Promise that resolves with the contents of the file as data URL or rejects
@@ -1247,6 +1217,46 @@ export class File extends IonicNativePlugin {
return this.readFile<ArrayBuffer>(path, file, 'ArrayBuffer');
}
private readFile<T>(
path: string,
file: string,
readAs: 'ArrayBuffer' | 'BinaryString' | 'DataURL' | 'Text'
): Promise<T> {
if (/^\//.test(file)) {
const err = new FileError(5);
err.message = 'file-name cannot start with /';
return Promise.reject<any>(err);
}
return this.resolveDirectoryUrl(path)
.then((directoryEntry: DirectoryEntry) => {
return this.getFile(directoryEntry, file, { create: false });
})
.then((fileEntry: FileEntry) => {
const reader = new FileReader();
return new Promise<T>((resolve, reject) => {
reader.onloadend = () => {
if (reader.result !== undefined || reader.result !== null) {
resolve((reader.result as any) as T);
} else if (reader.error !== undefined || reader.error !== null) {
reject(reader.error);
} else {
reject({ code: null, message: 'READER_ONLOADEND_ERR' });
}
};
fileEntry.file(
file => {
reader[`readAs${readAs}`].call(reader, file);
},
error => {
reject(error);
}
);
});
});
}
/**
* Move a file to a given path.
*
@@ -1361,7 +1371,7 @@ export class File extends IonicNativePlugin {
resolveDirectoryUrl(directoryUrl: string): Promise<DirectoryEntry> {
return this.resolveLocalFilesystemUrl(directoryUrl).then(de => {
if (de.isDirectory) {
return <DirectoryEntry>de;
return de as DirectoryEntry;
} else {
const err = new FileError(13);
err.message = 'input is not a directory';
@@ -1449,7 +1459,7 @@ export class File extends IonicNativePlugin {
return getPromise<T>((resolve, reject) => {
reader.onloadend = () => {
if (reader.result !== undefined || reader.result !== null) {
resolve(<T>(<any>reader.result));
resolve((reader.result as any) as T);
} else if (reader.error !== undefined || reader.error !== null) {
reject(reader.error);
} else {
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
export interface IDynamicLink {
@@ -38,10 +38,9 @@ export interface IDynamicLink {
* constructor(private firebaseDynamicLinks: FirebaseDynamicLinks) { }
*
* ...
*
* // Handle the logic here after opening the app with the Dynamic link
* this.firebaseDynamicLinks.onDynamicLink()
* .then((res: any) => console.log(res)) //Handle the logic here after opening the app with the Dynamic link
* .catch((error:any) => console.log(error));
* .subscribe((res: any) => console.log(res), (error:any) => console.log(error));
* ```
*
* @interfaces
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
export interface IFirebaseMessage {
aps: any;
+4 -1
View File
@@ -318,7 +318,10 @@ export class Firebase extends IonicNativePlugin {
successIndex: 2,
errorIndex: 3
})
verifyPhoneNumber(phoneNumber: string, timeoutDuration = 0): Promise<any> {
verifyPhoneNumber(
phoneNumber: string,
timeoutDuration = 0
): Promise<any> {
return;
}
}
@@ -1,9 +1,9 @@
import { Injectable } from '@angular/core';
import {
checkAvailability,
CordovaInstance,
IonicNativePlugin,
Plugin
Plugin,
checkAvailability
} from '@ionic-native/core';
export interface FlurryAnalyticsOptions {
+1 -1
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import { Observable } from 'rxjs';
/**
* @name FTP
+8 -25
View File
@@ -1,10 +1,5 @@
import { Injectable } from '@angular/core';
import {
Cordova,
CordovaFunctionOverride,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
declare const window: any;
@@ -100,9 +95,7 @@ export class Geofence extends IonicNativePlugin {
* @return {Observable<any>}
*/
@CordovaFunctionOverride()
onTransitionReceived(): Observable<any> {
return;
}
onTransitionReceived(): Observable<any> { return; }
/**
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
@@ -110,9 +103,7 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<void>}
*/
@Cordova()
initialize(): Promise<void> {
return;
}
initialize(): Promise<void> { return; }
/**
* Adds a new geofence or array of geofences. For geofence object, see above.
@@ -120,9 +111,7 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<void>}
*/
@Cordova()
addOrUpdate(geofences: Object | Array<Object>): Promise<void> {
return;
}
addOrUpdate(geofences: Object | Object[]): Promise<void> { return; }
/**
* Removes a geofence or array of geofences. `geofenceID` corresponds to one or more IDs specified when the
@@ -131,9 +120,7 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<void>}
*/
@Cordova()
remove(geofenceId: string | Array<string>): Promise<void> {
return;
}
remove(geofenceId: string | string[]): Promise<void> { return; }
/**
* Removes all geofences.
@@ -141,19 +128,15 @@ export class Geofence extends IonicNativePlugin {
* @returns {Promise<void>}
*/
@Cordova()
removeAll(): Promise<void> {
return;
}
removeAll(): Promise<void> { return; }
/**
* Returns an array of geofences currently being monitored.
*
* @returns {Promise<Array<string>>}
* @returns {Promise<string[]>}
*/
@Cordova()
getWatched(): Promise<string> {
return;
}
getWatched(): Promise<string> { return; }
/**
* Called when the user clicks a geofence notification. iOS and Android only.
@@ -126,7 +126,7 @@ export class Globalization extends IonicNativePlugin {
/**
* Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.
* @param options Object with type (narrow or wide) and item (month or days).
* @returns {Promise<{value: Array<string>}>} Returns a promise.
* @returns {Promise<{value: string[]}>} Returns a promise.
*/
@Cordova({
callbackOrder: 'reverse'
@@ -134,7 +134,7 @@ export class Globalization extends IonicNativePlugin {
getDateNames(options: {
type: string;
item: string;
}): Promise<{ value: Array<string> }> {
}): Promise<{ value: string[] }> {
return;
}
@@ -20,7 +20,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
* this.ga.startTrackerWithId('YOUR_TRACKER_ID')
* .then(() => {
* console.log('Google analytics is ready now');
* this.ga.trackView('test');
* this.ga.trackView('test');
* // Tracker is ready
* // You can now track pages or set additional information such as AppVersion or UserId
* })
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
/**
+6 -8
View File
@@ -88,14 +88,12 @@ export class Gyroscope extends IonicNativePlugin {
* @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
*/
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
return new Observable<GyroscopeOrientation>((observer: any) => {
const watchId = navigator.gyroscope.watch(
observer.next.bind(observer),
observer.next.bind(observer),
options
);
return () => navigator.gyroscope.clearWatch(watchId);
});
return new Observable<GyroscopeOrientation>(
(observer: any) => {
const watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
return () => navigator.gyroscope.clearWatch(watchId);
}
);
}
/**
+3 -7
View File
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name hce
@@ -77,9 +77,5 @@ export class HCE extends IonicNativePlugin {
}
}
export interface HCECommandEvent {
(command: Uint8Array): void;
}
export interface HCEDeactivatedEvent {
(command: number): void;
}
export type HCECommandEvent = (command: Uint8Array) => void;
export type HCEDeactivatedEvent = (command: number) => void;
+3 -49
View File
@@ -1,5 +1,5 @@
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface HealthKitOptions {
/**
@@ -13,9 +13,6 @@ export interface HealthKitOptions {
*/
aggregation?: string;
/**
*
*/
amount?: number;
/**
@@ -24,19 +21,10 @@ export interface HealthKitOptions {
*/
ascending?: boolean;
/**
*
*/
correlationType?: string;
/**
*
*/
date?: any;
/**
*
*/
distance?: number;
/**
@@ -49,14 +37,8 @@ export interface HealthKitOptions {
*/
duration?: number;
/**
*
*/
endDate?: any;
/**
*
*/
energy?: number;
/**
@@ -64,9 +46,6 @@ export interface HealthKitOptions {
*/
energyUnit?: string;
/**
*
*/
extraData?: any;
/**
@@ -74,39 +53,20 @@ export interface HealthKitOptions {
*/
limit?: number;
/**
*
*/
metadata?: any;
/**
*
*/
quantityType?: string;
/**
*
*/
type?: string;
readTypes?: any;
/**
*
*/
requestWritePermission?: boolean;
/**
*
*/
samples?: any;
/**
*
*/
sampleType?: string;
/**
*
*/
startDate?: any;
/**
@@ -114,14 +74,8 @@ export interface HealthKitOptions {
*/
unit?: string;
/**
*
*/
requestReadPermission?: boolean;
/**
*
*/
writeTypes?: any;
}
+11 -11
View File
@@ -207,7 +207,6 @@ export interface HealthData {
})
@Injectable()
export class Health extends IonicNativePlugin {
/**
* Tells if either Google Fit or HealthKit are available.
*
@@ -254,11 +253,11 @@ export class Health extends IonicNativePlugin {
* In Android 6 and over, this function will also ask for some dynamic permissions if needed
* (e.g. in the case of "distance", it will need access to ACCESS_FINE_LOCATION).
*
* @param {Array<string | HealthDataType>} datatypes a list of data types you want to be granted access to.
* @param {string[] | HealthDataType[]} datatypes a list of data types you want to be granted access to.
* @return {Promise<any>}
*/
@Cordova()
requestAuthorization(datatypes: Array<string | HealthDataType>): Promise<any> {
requestAuthorization(datatypes: (string | HealthDataType)[]): Promise<any> {
return;
}
@@ -270,11 +269,11 @@ export class Health extends IonicNativePlugin {
* In iOS, this function will only check authorization status for writeable data.
* Read-only data will always be considered as not authorized. This is an intended behaviour of HealthKit.
*
* @param {Array<string | HealthDataType>} datatypes a list of data types you want to check access of, same as in requestAuthorization
* @param {string[] | HealthDataType[]} datatypes a list of data types you want to check access of, same as in requestAuthorization
* @return {Promise<boolean>} Returns a promise that resolves with a boolean that indicates the authorization status
*/
@Cordova()
isAuthorized(datatypes: Array<string | HealthDataType>): Promise<boolean> {
isAuthorized(datatypes: (string | HealthDataType)[]): Promise<boolean> {
return;
}
@@ -306,11 +305,11 @@ export class Health extends IonicNativePlugin {
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
* Automatic conversion is not trivial and depends on the actual substance.
*
* @param queryOptions {HealthQueryOptions}
* @return {Promise<HealthData>}
* @param {HealthQueryOptions} queryOptions
* @return {Promise<HealthData[]>}
*/
@Cordova()
query(queryOptions: HealthQueryOptions): Promise<HealthData> {
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> {
return;
}
@@ -332,11 +331,13 @@ export class Health extends IonicNativePlugin {
* To be sure to get all the stored quantities, it's better to query single nutrients.
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
*
* @param queryOptionsAggregated {HealthQueryOptionsAggregated}
* @param {HealthQueryOptionsAggregated} queryOptionsAggregated
* @return {Promise<HealthData[]>}
*/
@Cordova()
queryAggregated(queryOptionsAggregated: HealthQueryOptionsAggregated): Promise<HealthData[]> {
queryAggregated(
queryOptionsAggregated: HealthQueryOptionsAggregated
): Promise<HealthData[]> {
return;
}
@@ -358,5 +359,4 @@ export class Health extends IonicNativePlugin {
store(storeOptions: HealthStoreOptions): Promise<any> {
return;
}
}
@@ -1,10 +1,5 @@
import { Injectable } from '@angular/core';
import {
Cordova,
Plugin,
IonicNativePlugin,
CordovaCheck
} from '@ionic-native/core';
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
declare var chcp: any;
+8 -16
View File
@@ -119,7 +119,7 @@ export interface HotspotDevice {
* ...
*
*
* this.hotspot.scanWifi().then((networks: Array<HotspotNetwork>) => {
* this.hotspot.scanWifi().then((networks: HotspotNetwork[]) => {
* console.log(networks);
* });
*
@@ -215,12 +215,10 @@ export class Hotspot extends IonicNativePlugin {
}
/**
* @returns {Promise<Array<HotspotDevice>>}
* @returns {Promise<HotspotDevice[]>}
*/
@Cordova()
getAllHotspotDevices(): Promise<Array<HotspotDevice>> {
return;
}
getAllHotspotDevices(): Promise<HotspotDevice[]> { return; }
/**
* Connect to a WiFi network
@@ -254,9 +252,7 @@ export class Hotspot extends IonicNativePlugin {
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
*/
@Cordova()
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> {
return;
}
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: string[]): Promise<void> { return; }
/**
* Add a WiFi network
@@ -331,20 +327,16 @@ export class Hotspot extends IonicNativePlugin {
}
/**
* @returns {Promise<Array<HotspotNetwork>>}
* @returns {Promise<HotspotNetwork[]>}
*/
@Cordova()
scanWifi(): Promise<Array<HotspotNetwork>> {
return;
}
scanWifi(): Promise<HotspotNetwork[]> { return; }
/**
* @returns {Promise<Array<HotspotNetwork>>}
* @returns {Promise<HotspotNetwork[]>}
*/
@Cordova()
scanWifiByLevel(): Promise<Array<HotspotNetwork>> {
return;
}
scanWifiByLevel(): Promise<HotspotNetwork[]> { return; }
/**
* @returns {Promise<any>}
+19 -26
View File
@@ -74,7 +74,7 @@ export class HTTP extends IonicNativePlugin {
* This returns an object representing a basic HTTP Authorization header of the form.
* @param username {string} Username
* @param password {string} Password
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'}
*/
@Cordova({ sync: true })
getBasicAuthHeader(
@@ -154,7 +154,9 @@ export class HTTP extends IonicNativePlugin {
* @param url {string}
*/
@Cordova({ sync: true })
getCookieString(url: string): string { return; }
getCookieString(url: string): string {
return;
}
/**
* Get global request timeout value in seconds.
@@ -173,26 +175,15 @@ export class HTTP extends IonicNativePlugin {
setRequestTimeout(timeout: number): void {}
/**
* Enable or disable SSL Pinning. This defaults to false.
*
* To use SSL pinning you must include at least one .cer SSL certificate in your app project. You can pin to your server certificate or to one of the issuing CA certificates. For ios include your certificate in the root level of your bundle (just add the .cer file to your project/target at the root level). For android include your certificate in your project's platforms/android/assets folder. In both cases all .cer files found will be loaded automatically. If you only have a .pem certificate see this [stackoverflow answer](https://stackoverflow.com/questions/16583428/how-to-convert-an-ssl-certificate-in-linux/16583429#16583429). You want to convert it to a DER encoded certificate with a .cer extension.
*
* As an alternative, you can store your .cer files in the www/certificates folder.
* @param enable {boolean} Set to true to enable
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
* Set SSL Cert handling mode, being one of the following values
* default: default SSL cert handling using system's CA certs
* nocheck: disable SSL cert checking, trusting all certs (meant to be used only for testing purposes)
* pinned: trust only provided certs
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setsslcertmode
* @param {'default' | 'nocheck' | 'pinned'} mode SSL Cert handling mode
*/
@Cordova()
enableSSLPinning(enable: boolean): Promise<void> {
return;
}
/**
* Accept all SSL certificates. Or disabled accepting all certificates. Defaults to false.
* @param accept {boolean} Set to true to accept
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
acceptAllCerts(accept: boolean): Promise<void> {
setSSLCertMode(mode: 'default' | 'nocheck' | 'pinned'): Promise<void> {
return;
}
@@ -202,7 +193,9 @@ export class HTTP extends IonicNativePlugin {
* @returns {Promise<void>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
disableRedirect(disable: boolean): Promise<void> { return; }
disableRedirect(disable: boolean): Promise<void> {
return;
}
/**
* Make a POST request
@@ -283,7 +276,7 @@ export class HTTP extends IonicNativePlugin {
* @param headers {Object} The headers to set for this request
* @param filePath {string} The local path of the file to upload
* @param name {string} The name of the parameter to pass the file along as
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
* @returns {Promise<any>} returns a FileEntry promise that resolve on success, and reject on failure
*/
@Cordova()
uploadFile(
@@ -292,7 +285,7 @@ export class HTTP extends IonicNativePlugin {
headers: any,
filePath: string,
name: string
): Promise<HTTPResponse> {
): Promise<any> {
return;
}
@@ -301,8 +294,8 @@ export class HTTP extends IonicNativePlugin {
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
* @param filePath {string} The path to donwload the file to, including the file name.
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
* @param filePath {string} The path to download the file to, including the file name.
* @returns {Promise<any>} returns a FileEntry promise that resolve on success, and reject on failure
*/
@Cordova()
downloadFile(
@@ -310,7 +303,7 @@ export class HTTP extends IonicNativePlugin {
body: any,
headers: any,
filePath: string
): Promise<HTTPResponse> {
): Promise<any> {
return;
}
}
+62 -61
View File
@@ -1,10 +1,5 @@
import { Injectable } from '@angular/core';
import {
Cordova,
CordovaCheck,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { Cordova, CordovaCheck, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
declare const cordova: any;
@@ -273,7 +268,7 @@ export interface IBeaconDelegate {
*
* this.ibeacon.startMonitoringForRegion(beaconRegion)
* .then(
* () => console.log('Native layer recieved the request to monitoring'),
* () => console.log('Native layer received the request to monitoring'),
* error => console.error('Native layer failed to begin monitoring: ', error)
* );
* ```
@@ -304,79 +299,85 @@ export class IBeacon extends IonicNativePlugin {
Delegate(): IBeaconDelegate {
const delegate = new cordova.plugins.locationManager.Delegate();
delegate.didChangeAuthorizationStatus = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didChangeAuthorizationStatus = cb);
});
delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didChangeAuthorizationStatus = cb;
}
);
};
delegate.didDetermineStateForRegion = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didDetermineStateForRegion = cb);
});
delegate.didDetermineStateForRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didDetermineStateForRegion = cb;
}
);
};
delegate.didEnterRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didEnterRegion = cb);
});
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didEnterRegion = cb;
}
);
};
delegate.didExitRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didExitRegion = cb);
});
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didExitRegion = cb;
}
);
};
delegate.didRangeBeaconsInRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didRangeBeaconsInRegion = cb);
});
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didRangeBeaconsInRegion = cb;
}
);
};
delegate.didStartMonitoringForRegion = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.didStartMonitoringForRegion = cb);
});
delegate.didStartMonitoringForRegion = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.didStartMonitoringForRegion = cb;
}
);
};
delegate.monitoringDidFailForRegionWithError = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.monitoringDidFailForRegionWithError = cb);
});
delegate.monitoringDidFailForRegionWithError = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.monitoringDidFailForRegionWithError = cb;
}
);
};
delegate.peripheralManagerDidStartAdvertising = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.peripheralManagerDidStartAdvertising = cb);
});
delegate.peripheralManagerDidStartAdvertising = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.peripheralManagerDidStartAdvertising = cb;
}
);
};
delegate.peripheralManagerDidUpdateState = (
pluginResult?: IBeaconPluginResult
) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return (delegate.peripheralManagerDidUpdateState = cb);
});
delegate.peripheralManagerDidUpdateState = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>(
(observer: any) => {
const cb = (data: IBeaconPluginResult) => observer.next(data);
return delegate.peripheralManagerDidUpdateState = cb;
}
);
};
cordova.plugins.locationManager.setDelegate(delegate);
@@ -23,11 +23,19 @@ export interface ImagePickerOptions {
quality?: number;
/**
* Output type, defaults to 0 (FILE_URI).
* Choose the format of the return value.
* Defined in ImagePicker.OutputType. Default is FILE_URI.
* FILE_URI : 0, Return image file URI,
* DATA_URL : 1, Return image as base64-encoded string
*/
outputType?: number;
}
export enum OutputType {
FILE_URL = 0,
DATA_URL
}
/**
* @name Image Picker
* @description
@@ -1,4 +1,3 @@
import { Observable, Observer } from 'rxjs';
import { Injectable } from '@angular/core';
import {
CordovaInstance,
@@ -6,46 +5,60 @@ import {
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { Observable, Observer } from 'rxjs';
declare const cordova: Cordova & { InAppBrowser: any };
export interface InAppBrowserOptions {
/** Set to yes or no to turn the InAppBrowser's location bar on or off. */
location?: 'yes' | 'no';
/**
* Set to yes to create the browser and load the page, but not show it. The loadstop event fires when loading is complete.
* Omit or set to no (default) to have the browser open and load normally.
*/
/* Set to yes to create the browser and load the page, but not show it. The loadstop event fires when loading is complete.
* Omit or set to no (default) to have the browser open and load normally. */
hidden?: 'yes' | 'no';
/** Set to yes to have the browser's cookie cache cleared before the new window is opened. */
clearcache?: 'yes';
/** Set to yes to have the session cookie cache cleared before the new window is opened. */
/* Set to yes to have the session cookie cache cleared before the new window is opened. */
clearsessioncache?: 'yes';
/** (Android Only) set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
/* (Android) Set to a string to use as the close button's caption instead of a X. Note that you need to localize this value yourself.
* (iOS) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
closebuttoncaption?: string;
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the close button color from default, regardless of being a text or default X. Only has effect if user has location set to yes.
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default Done button's color. Only applicable if toolbar is not disabled. */
closebuttoncolor?: string;
/** (Android Only) Set to yes to show Android browser's zoom controls, set to no to hide them. Default value is yes. */
zoom?: 'yes' | 'no';
/**
* Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
* If there is no previous page, the InAppBrowser will close. The default value is yes, so you must set it to no if you want the back button to simply close the InAppBrowser.
*/
/* (Android & Windows Phone Only) Set to yes to use the hardware back button to navigate backwards through the InAppBrowser's history.
* If there is no previous page, the InAppBrowser will close. The default value is yes, so you must set it to no if you want the back button to simply close the InAppBrowser. */
hardwareback?: 'yes' | 'no';
/** Set to yes to prevent HTML5 audio or video from autoplaying (defaults to no). */
/*
* Set to yes to prevent HTML5 audio or video from autoplaying (defaults to no). */
mediaPlaybackRequiresUserAction?: 'yes' | 'no';
/* (Android) Set to yes to hide the navigation buttons on the location toolbar, only has effect if user has location set to yes. The default value is no.
* (iOS) Set to yes or no to turn the toolbar navigation buttons on or off (defaults to no). Only applicable if toolbar is not disabled.*/
hidenavigationbuttons?: 'yes' | 'no';
/* (Android) Set to yes to hide the url bar on the location toolbar, only has effect if user has location set to yes. The default value is no.*/
hideurlbar?: 'yes' | 'no';
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color of both navigation buttons from default. Only has effect if user has location set to yes and not hidenavigationbuttons set to yes.
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color. Only applicable if navigation buttons are visible. */
navigationbuttoncolor?: string;
/* (Android) Set to a valid hex color string, for example: #00ff00, and it will change the color the toolbar from default. Only has effect if user has location set to yes.
* (iOS) Set as a valid hex color string, for example: #00ff00, to change from the default color of the toolbar. Only applicable if toolbar is not disabled.*/
toolbarcolor?: string;
/** (Android Only) Set to yes to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues) */
shouldPauseOnSuspend?: 'yes' | 'no';
/** (Android Only) Set to yes to show a close button in the footer similar to the iOS Done button. The close button will appear the same as for the header hence use closebuttoncaption and closebuttoncolor to set its properties */
footer?: 'yes' | 'no';
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb) , and it will change the footer color from default. Only has effect if user has footer set to yes */
/** (Android Only) Set to a valid hex color string, for example #00ff00 or #CC00ff00 (#aarrggbb), and it will change the footer color from default. Only has effect if user has footer set to yes */
footercolor?: string;
/** (iOS Only) Set to a string to use as the Done button's caption. Note that you need to localize this value yourself. */
closebuttoncaption?: string;
/** (iOS Only) Set to yes or no (default is no). Turns on/off the UIWebViewBounce property. */
disallowoverscroll?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to turn the toolbar on or off for the InAppBrowser (defaults to yes) */
toolbar?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to make the toolbar translucent(semi-transparent) (defaults to yes). Only applicable if toolbar is not disabled. */
toolbartranslucent?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to prevent viewport scaling through a meta tag (defaults to no). */
enableViewportScale?: 'yes' | 'no';
/*
* (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
/* (iOS Only) Set to yes or no to allow in-line HTML5 media playback, displaying within the browser window rather than a device-specific playback interface.
* The HTML's video element must also include the webkit-playsinline attribute (defaults to no) */
allowInlineMediaPlayback?: 'yes' | 'no';
/** (iOS Only) Set to yes or no to open the keyboard when form elements receive focus via JavaScript's focus() call (defaults to yes). */
@@ -62,12 +75,11 @@ export interface InAppBrowserOptions {
* (iOS Only) Set to yes or no to change the visibility of the loading indicator (defaults to no).
*/
hidespinner?: 'yes' | 'no';
/**
* (Windows only) Set to yes to create the browser control without a border around it.
* Please note that if location=no is also specified, there will be no control presented to user to close IAB window.
*/
/* (Windows only) Set to yes to create the browser control without a border around it.
* Please note that if location=no is also specified, there will be no control presented to user to close IAB window. */
fullscreen?: 'yes';
/** (Android Only) Sets whether the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport. When the value of the setting is no, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels. When the value is yes and the page contains the viewport meta tag, the value of the width specified in the tag is used. If the page does not contain the tag or does not provide a width, then a wide viewport will be used. (defaults to yes). */
useWideViewPort?: 'yes' | 'no';
/**
* @hidden
*/
@@ -109,7 +121,9 @@ export class InAppBrowserObject {
try {
if (options && typeof options !== 'string') {
options = Object.keys(options)
.map((key: string) => `${key}=${(<InAppBrowserOptions>options)[key]}`)
.map(
(key: string) => `${key}=${(options as InAppBrowserOptions)[key]}`
)
.join(',');
}
@@ -77,7 +77,7 @@ export interface IAPProductOptions {
type: string;
}
export type IAPProducts = Array<IAPProduct> & {
export type IAPProducts = IAPProduct[] & {
/**
* Get product by ID
*/
@@ -387,8 +387,7 @@ export class InAppPurchase2 extends IonicNativePlugin {
* @param product {IAPProductOptions}
*/
@Cordova({ sync: true })
register(product: IAPProductOptions): void {
}
register(product: IAPProductOptions): void {}
/**
*
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/* tslint:disable */
/**
* @name In App Review
* @description
@@ -25,6 +25,7 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*
* ```
*/
/* tslint:enable */
@Plugin({
pluginName: 'InAppReview',
plugin: 'com.omarben.inappreview',
@@ -34,7 +35,6 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
})
@Injectable()
export class InAppReview extends IonicNativePlugin {
/**
* Open the inApp review popup
* @return {Promise<any>} Returns a promise that resolves when something happens
@@ -43,5 +43,4 @@ export class InAppReview extends IonicNativePlugin {
requestReview(): Promise<any> {
return; // We add return; here to avoid any IDE / Compiler errors
}
}
@@ -1,5 +1,11 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import {
Cordova,
CordovaFunctionOverride,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { Observable } from 'rxjs';
export interface IndexItem {
domain: string;
@@ -15,7 +21,7 @@ export interface IndexItem {
/**
* Item keywords
*/
keywords?: Array<string>;
keywords?: string[];
/**
* Lifetime in minutes
@@ -83,38 +89,48 @@ export class IndexAppContent extends IonicNativePlugin {
/**
* Add or change items to spotlight index
* @param {Array<IndexItem>} Array of items to index
* @return {Promise<any>} Returns if index set was successfull
* @param {IndexItem[]} items Array of items to index
* @return {Promise<any>} Returns if index set was successfully
*/
@Cordova()
setItems(items: Array<IndexItem>): Promise<any> {
setItems(items: IndexItem[]): Promise<any> {
return;
}
/**
* Clear all items stored for a given array of domains
* @param {Array<string>} Array of domains to clear
* @return {Promise<any>} Resolve if successfull
* @param {string[]} domains Array of domains to clear
* @return {Promise<any>} Resolve if successfully
*/
@Cordova()
clearItemsForDomains(domains: Array<string>): Promise<any> {
clearItemsForDomains(domains: string[]): Promise<any> {
return;
}
/**
* Clear all items stored for a given array of identifiers
* @param {Array<string>} Array of identifiers to clear
* @return {Promise<any>} Resolve if successfull
* @param {string[]} identifiers Array of identifiers to clear
* @return {Promise<any>} Resolve if successfully
*/
@Cordova()
clearItemsForIdentifiers(identifiers: Array<string>): Promise<any> {
clearItemsForIdentifiers(identifiers: string[]): Promise<any> {
return;
}
/**
* If user taps on a search result in spotlight then the app will be launched.
* You can register a Javascript handler to get informed when this happens.
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
*/
@CordovaFunctionOverride()
onItemPressed(): Observable<any> {
return;
}
/**
* You might want to avoid to update spotlight index too frequently.
* Without calling this function a subsequent call to manipulate the index is only possible after 1440 minutes (= 24 hours)!
* @param {number} Numeric value => 0
* @param {number} intervalMinutes value => 0
*/
@Cordova()
setIndexingInterval(intervalMinutes: number) {
@@ -28,6 +28,67 @@ export interface IntelSecurityDataOptions {
webOwners?: String[];
}
/**
* @name Intel Security
* @description
* The App Security API enables the use of security properties and capabilities on the platform, using a new set of API defined for application developers. You are not required to be a security expert to make good use of the API. Key elements, such as encryption of data and establishments of capabilities, is abstracted and done by the API implementation, for you.
*
* For example:
* - Use the API to store (E.g. cache) data locally, using the device non-volatile storage. Data protection/encryption will be done for you by the API implementation
* - Establish a connection with remote server (E.g. XHR) using a protected channel. SSL/TLS establishment and usage will be done for you by the API implementation
*
* For more information please visit the [API documentation](https://software.intel.com/en-us/app-security-api/api).
*
* @usage
* ```typescript
* import { IntelSecurity } from '@ionic-native/intel-security';
* ...
* constructor(private intelSecurity: IntelSecurity) { }
* ...
*
* let storageID = 'id';
*
* this.intelSecurity.data.createFromData({ data: 'Sample Data' })
* .then((instanceID: Number) => this.intelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
* .catch((error: any) => console.log(error));
*
* this.intelSecurity.storage.read({id: storageID })
* .then((instanceID: number) => this.intelSecurity.data.getData(instanceID))
* .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
* .catch((error: any) => console.log(error));
*
* this.intelSecurity.storage.delete({ id: storageID })
* .then(() => console.log('Deleted Successfully'))
* .catch((error: any) => console.log(error));
* ```
* @classes
* IntelSecurityData
* IntelSecurityStorage
* @interfaces
* IntelSecurityDataOptions
*/
@Plugin({
pluginName: 'IntelSecurity',
plugin: 'com-intel-security-cordova-plugin',
pluginRef: 'intel.security',
repo: 'https://github.com/AppSecurityApi/com-intel-security-cordova-plugin',
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class IntelSecurity extends IonicNativePlugin {
/**
* returns an IntelSecurityStorage object
* @type {IntelSecurityStorage}
*/
storage: IntelSecurityStorage = new IntelSecurityStorage();
/**
* Returns an IntelSecurityData object
* @type {IntelSecurityData}
*/
data: IntelSecurityData = new IntelSecurityData();
}
/**
* @hidden
*/
@@ -37,7 +98,6 @@ export interface IntelSecurityDataOptions {
pluginRef: 'intel.security.secureData'
})
export class IntelSecurityData {
/**
* This creates a new instance of secure data using plain-text data.
* @param options {IntelSecurityDataOptions}
@@ -105,7 +165,7 @@ export class IntelSecurityData {
* @returns {Promise<Array>} Returns a promise that resolves to an array of owners' unique IDs, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getOwners(instanceID: any): Promise<Array<any>> {
getOwners(instanceID: any): Promise<any[]> {
return;
}
@@ -125,7 +185,7 @@ export class IntelSecurityData {
* @returns {Promise<Array>} Returns a promise that resolves to a list of web owners, or rejects with an error.
*/
@Cordova({ otherPromise: true })
getWebOwners(instanceID: any): Promise<Array<any>> {
getWebOwners(instanceID: any): Promise<any[]> {
return;
}
@@ -150,7 +210,6 @@ export class IntelSecurityData {
destroy(instanceID: any): Promise<any> {
return;
}
}
/**
@@ -162,7 +221,6 @@ export class IntelSecurityData {
pluginRef: 'intel.security.secureStorage'
})
export class IntelSecurityStorage {
/**
* This deletes a secure storage resource (indicated by id).
* @param options {Object}
@@ -171,10 +229,7 @@ export class IntelSecurityStorage {
* @returns {Promise<any>} Returns a Promise that resolves with no parameters, or rejects with an error.
*/
@Cordova({ otherPromise: true })
delete(options: {
id: string,
storageType?: Number
}): Promise<any> {
delete(options: { id: string; storageType?: Number }): Promise<any> {
return;
}
@@ -188,9 +243,9 @@ export class IntelSecurityStorage {
*/
@Cordova({ otherPromise: true })
read(options: {
id: string,
storageType?: Number,
extraKey?: Number
id: string;
storageType?: Number;
extraKey?: Number;
}): Promise<Number> {
return;
}
@@ -205,74 +260,10 @@ export class IntelSecurityStorage {
*/
@Cordova({ otherPromise: true })
write(options: {
id: String,
instanceID: Number,
storageType?: Number
id: String;
instanceID: Number;
storageType?: Number;
}): Promise<any> {
return;
}
}
/**
* @name Intel Security
* @description
* The App Security API enables the use of security properties and capabilities on the platform, using a new set of API defined for application developers. You are not required to be a security expert to make good use of the API. Key elements, such as encryption of data and establishments of capabilities, is abstracted and done by the API implementation, for you.
*
* For example:
* - Use the API to store (E.g. cache) data locally, using the device non-volatile storage. Data protection/encryption will be done for you by the API implementation
* - Establish a connection with remote server (E.g. XHR) using a protected channel. SSL/TLS establishment and usage will be done for you by the API implementation
*
* For more information please visit the [API documentation](https://software.intel.com/en-us/app-security-api/api).
*
* @usage
* ```typescript
* import { IntelSecurity } from '@ionic-native/intel-security';
* ...
* constructor(private intelSecurity: IntelSecurity) { }
* ...
*
* let storageID = 'id';
*
* this.intelSecurity.data.createFromData({ data: 'Sample Data' })
* .then((instanceID: Number) => this.intelSecurity.storage.write({ id: storageId, instanceID: instanceID }))
* .catch((error: any) => console.log(error));
*
* this.intelSecurity.storage.read({id: storageID })
* .then((instanceID: number) => this.intelSecurity.data.getData(instanceID))
* .then((data: string) => console.log(data)) // Resolves to 'Sample Data'
* .catch((error: any) => console.log(error));
*
* this.intelSecurity.storage.delete({ id: storageID })
* .then(() => console.log('Deleted Successfully'))
* .catch((error: any) => console.log(error));
* ```
* @classes
* IntelSecurityData
* IntelSecurityStorage
* @interfaces
* IntelSecurityDataOptions
*/
@Plugin({
pluginName: 'IntelSecurity',
plugin: 'com-intel-security-cordova-plugin',
pluginRef: 'intel.security',
repo: 'https://github.com/AppSecurityApi/com-intel-security-cordova-plugin',
platforms: ['Android', 'iOS', 'Windows', 'Windows Phone 8']
})
@Injectable()
export class IntelSecurity extends IonicNativePlugin {
/**
* returns an IntelSecurityStorage object
* @type {IntelSecurityStorage}
*/
storage: IntelSecurityStorage = new IntelSecurityStorage();
/**
* Returns an IntelSecurityData object
* @type {IntelSecurityData}
*/
data: IntelSecurityData = new IntelSecurityData();
}
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { CordovaProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Ionic Webview
@@ -0,0 +1,95 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name jAnalytics
* @description
* This plugin does something
*
* @usage
* ```typescript
* import { JAnalytics } from '@ionic-native/JAnalytics';
*
*
* constructor(private jAnalytics: JAnalytics) { }
*
* ...
*
*
* this.jAnalytics.functionName('Hello', 123)
* .then((res: any) => console.log(res))
* .catch((error: any) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'JAnalytics',
plugin: 'cordova-plugin-janalytics',
pluginRef: 'JAnalytics',
repo: 'https://github.com/jpush/cordova-plugin-janalytics',
install:
'ionic cordova plugin add cordova-plugin-janalytics --variable APP_KEY=YOUR_APP_KEY',
installVariables: ['APP_KEY'],
platforms: ['Android', 'iOS']
})
@Injectable()
export class JAnalytics extends IonicNativePlugin {
/**
* This function does something
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
init(): Promise<any> {
return;
}
@Cordova()
initCrashHandler(): Promise<any> {
return;
}
@Cordova()
stopCrashHandler(): Promise<any> {
return;
}
@Cordova()
onPageStart(params: any): Promise<any> {
return;
}
@Cordova()
onPageEnd(params: any): Promise<any> {
return;
}
@Cordova()
addCountEvent(params: any): Promise<any> {
return;
}
@Cordova()
addCalculateEvent(params: any): Promise<any> {
return;
}
@Cordova()
addLoginEvent(params: any): Promise<any> {
return;
}
@Cordova()
addRegisterEvent(params: any): Promise<any> {
return;
}
@Cordova()
addBrowseEvent(params: any): Promise<any> {
return;
}
@Cordova()
addPurchaseEvent(params: any): Promise<any> {
return;
}
}
@@ -57,7 +57,6 @@ export class JinsMeme extends IonicNativePlugin {
setAppClientID(appClientId: string, clientSecret: string): Promise<any> {
return;
}
/**
* Starts scanning for JINS MEME.
* @returns {Observable<any>}
@@ -70,7 +69,6 @@ export class JinsMeme extends IonicNativePlugin {
startScan(): Observable<any> {
return;
}
/**
* Stops scanning JINS MEME.
* @returns {Promise<any>}
@@ -79,7 +77,6 @@ export class JinsMeme extends IonicNativePlugin {
stopScan(): Promise<any> {
return;
}
/**
* Establishes connection to JINS MEME.
* @param {string} target
@@ -109,7 +106,6 @@ export class JinsMeme extends IonicNativePlugin {
setAutoConnect(flag: boolean): Promise<any> {
return;
}
/**
* Returns whether a connection to JINS MEME has been established.
* @returns {Promise<any>}
@@ -118,7 +114,6 @@ export class JinsMeme extends IonicNativePlugin {
isConnected(): Promise<any> {
return;
}
/**
* Disconnects from JINS MEME.
* @returns {Promise<any>}
@@ -127,7 +122,6 @@ export class JinsMeme extends IonicNativePlugin {
disconnect(): Promise<any> {
return;
}
/**
* Starts receiving realtime data.
* @returns {Observable<any>}
@@ -140,7 +134,6 @@ export class JinsMeme extends IonicNativePlugin {
startDataReport(): Observable<any> {
return;
}
/**
* Stops receiving data.
* @returns {Promise<any>}
@@ -149,7 +142,6 @@ export class JinsMeme extends IonicNativePlugin {
stopDataReport(): Promise<any> {
return;
}
/**
* Returns SDK version.
*
@@ -159,7 +151,6 @@ export class JinsMeme extends IonicNativePlugin {
getSDKVersion(): Promise<any> {
return;
}
/**
* Returns JINS MEME connected with other apps.
* @returns {Promise<any>}
@@ -168,7 +159,6 @@ export class JinsMeme extends IonicNativePlugin {
getConnectedByOthers(): Promise<any> {
return;
}
/**
* Returns calibration status
* @returns {Promise<any>}
@@ -177,7 +167,6 @@ export class JinsMeme extends IonicNativePlugin {
isCalibrated(): Promise<any> {
return;
}
/**
* Returns device type.
* @returns {Promise<any>}
@@ -186,7 +175,6 @@ export class JinsMeme extends IonicNativePlugin {
getConnectedDeviceType(): Promise<any> {
return;
}
/**
* Returns hardware version.
* @returns {Promise<any>}
@@ -195,7 +183,6 @@ export class JinsMeme extends IonicNativePlugin {
getConnectedDeviceSubType(): Promise<any> {
return;
}
/**
* Returns FW Version.
* @returns {Promise<any>}
@@ -204,7 +191,6 @@ export class JinsMeme extends IonicNativePlugin {
getFWVersion(): Promise<any> {
return;
}
/**
* Returns HW Version.
* @returns {Promise<any>}
@@ -213,7 +199,6 @@ export class JinsMeme extends IonicNativePlugin {
getHWVersion(): Promise<any> {
return;
}
/**
* Returns response about whether data was received or not.
* @returns {Promise<any>}
+1 -1
View File
@@ -24,7 +24,7 @@ export type LinkedInLoginScopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_comp
* // login
* const scopes = ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share'];
* this.linkedin.login(scopes, true)
* .then(() => console.log('Logged in!')
* .then(() => console.log('Logged in!'))
* .catch(e => console.log('Error logging in', e));
*
*
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs';
export enum ELocalNotificationTriggerUnit {
@@ -122,10 +122,15 @@ export interface ILocalNotificationAction {
title?: string;
/**
* Specifies whether the action causes the app to launch in the foreground
* Make this notification show when app in foreground.
*/
foreground?: boolean;
/**
* Specifies whether the action causes the app to launch in the foreground
*/
launch?: boolean;
/**
* If the value is 'decline' the action is displayed with special highlighting to indicate that it performs a destructive task
*/
@@ -143,6 +148,24 @@ export interface ILocalNotificationAction {
*/
icon?: string;
/**
* ANDROID ONLY
* An array of pre-defined choices for users input
*/
choices?: string[];
/**
* ANDROID ONLY
* Specifies whether the user can provide arbitrary text values
*/
editable?: boolean;
/**
* IOS ONLY
* The title of the text input button that is displayed to the user.
*/
submitTitle?: string;
/**
* The type of the action. If omitted 'button' is used.
*/
@@ -395,6 +418,11 @@ export interface ILocalNotification {
* Set the token for the media session
*/
mediaSession?: string;
/**
* Make this notification show when app in foreground.
*/
foreground?: boolean;
}
/**
@@ -455,14 +483,32 @@ export interface ILocalNotification {
})
@Injectable()
export class LocalNotifications extends IonicNativePlugin {
/**
* Informs if the app has the permission to show notifications.
* @returns {Promise<boolean>}
*/
@Cordova()
hasPermission(): Promise<boolean> {
return;
}
/**
* Request permission to show notifications if not already granted.
* @returns {Promise<boolean>}
*/
@Cordova()
requestPermission(): Promise<boolean> {
return;
}
/**
* Schedules a single or multiple notifications
* @param options {Notification | Array<ILocalNotification>} optional
* @param options {Notification | ILocalNotification[]} optional
*/
@Cordova({
sync: true
})
schedule(options?: ILocalNotification | Array<ILocalNotification>): void {}
schedule(options?: ILocalNotification | ILocalNotification[]): void {}
/**
* Updates a previously scheduled notification. Must include the id in the options parameter.
@@ -541,12 +587,41 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
/**
* Check if a notification has a given type.
* @param {number} id The ID of the notification.
* @param {string} type The type of the notification.
* @returns {Promise<boolean>}
*/
@Cordova()
hasType(id: number, type: string): Promise<boolean> {
return;
}
/**
* Get the type (triggered, scheduled) for the notification.
* @param {number} id The ID of the notification.
*/
@Cordova()
getType(id: number): Promise<boolean> {
return;
}
/**
* Get all the notification ids
* @returns {Promise<Array<number>>}
*/
@Cordova()
getIds(): Promise<Array<number>> {
getIds(): Promise<number[]> {
return;
}
/**
* Get the ids of scheduled notifications
* @returns {Promise<number[]>} Returns a promise
*/
@Cordova()
getScheduledIds(): Promise<number[]> {
return;
}
@@ -555,16 +630,7 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<Array<number>>}
*/
@Cordova()
getTriggeredIds(): Promise<Array<number>> {
return;
}
/**
* Get the ids of scheduled notifications
* @returns {Promise<Array<number>>} Returns a promise
*/
@Cordova()
getScheduledIds(): Promise<Array<number>> {
getTriggeredIds(): Promise<number[]> {
return;
}
@@ -578,6 +644,15 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
/**
* Get all notification objects
* @returns {Promise<ILocalNotification[]>}
*/
@Cordova()
getAll(): Promise<ILocalNotification[]> {
return;
}
/**
* Get a scheduled notification object
* @param notificationId {any} The id of the notification to get
@@ -598,51 +673,6 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
/**
* Get all notification objects
* @returns {Promise<Array<ILocalNotification>>}
*/
@Cordova()
getAll(): Promise<Array<ILocalNotification>> {
return;
}
/**
* Get all scheduled notification objects
* @returns {Promise<Array<ILocalNotification>>}
*/
@Cordova()
getAllScheduled(): Promise<Array<ILocalNotification>> {
return;
}
/**
* Get all triggered notification objects
* @returns {Promise<Array<ILocalNotification>>}
*/
@Cordova()
getAllTriggered(): Promise<Array<ILocalNotification>> {
return;
}
/**
* Request permission to show notifications if not already granted.
* @returns {Promise<boolean>}
*/
@Cordova()
requestPermission(): Promise<boolean> {
return;
}
/**
* Informs if the app has the permission to show notifications.
* @returns {Promise<boolean>}
*/
@Cordova()
hasPermission(): Promise<boolean> {
return;
}
/**
* Adds a group of actions
* @param groupId The id of the action group
@@ -650,10 +680,7 @@ export class LocalNotifications extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
addActions(
groupId: any,
actions: Array<ILocalNotificationAction>
): Promise<any> {
addActions(groupId: any, actions: ILocalNotificationAction[]): Promise<any> {
return;
}
@@ -699,6 +726,24 @@ export class LocalNotifications extends IonicNativePlugin {
return;
}
/**
* Get all scheduled notification objects
* @returns {Promise<Array<ILocalNotification>>}
*/
@Cordova()
getAllScheduled(): Promise<ILocalNotification[]> {
return;
}
/**
* Get all triggered notification objects
* @returns {Promise<Array<ILocalNotification>>}
*/
@Cordova()
getAllTriggered(): Promise<ILocalNotification[]> {
return;
}
/**
* Sets a callback for a specific event
* @param eventName {string} The name of the event. Available events: schedule, trigger, click, update, clear, clearall, cancel, cancelall. Custom event names are possible for actions
@@ -1,6 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Market
* @description
@@ -167,19 +167,22 @@ export class MediaCapture extends IonicNativePlugin {
* The recording image sizes and formats supported by the device.
* @returns {ConfigurationData[]}
*/
@CordovaProperty() supportedImageModes: ConfigurationData[];
@CordovaProperty()
supportedImageModes: ConfigurationData[];
/**
* The audio recording formats supported by the device.
* @returns {ConfigurationData[]}
*/
@CordovaProperty() supportedAudioModes: ConfigurationData[];
@CordovaProperty()
supportedAudioModes: ConfigurationData[];
/**
* The recording video resolutions and formats supported by the device.
* @returns {ConfigurationData[]}
*/
@CordovaProperty() supportedVideoModes: ConfigurationData[];
@CordovaProperty()
supportedVideoModes: ConfigurationData[];
/**
* Start the audio recorder application and return information about captured audio clip files.
+1 -7
View File
@@ -1,11 +1,5 @@
import { Injectable } from '@angular/core';
import {
checkAvailability,
CordovaInstance,
InstanceProperty,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin, checkAvailability } from '@ionic-native/core';
import { Observable, Observer } from 'rxjs';
/**
+63 -10
View File
@@ -33,15 +33,14 @@ declare var mixpanel: any;
})
@Injectable()
export class Mixpanel extends IonicNativePlugin {
/**
*
* If originalId is omitted, aliasId will be used as originalId.
* @param aliasId {string}
* @param originalId {string}
* @returns {Promise<any>}
*/
@Cordova()
alias(aliasId: string, originalId: string): Promise<any> {
alias(aliasId: string, originalId?: string): Promise<any> {
return;
}
@@ -63,12 +62,13 @@ export class Mixpanel extends IonicNativePlugin {
}
/**
*
* The usePeople parameter is used for the iOS Mixpanel SDK.
* @param distinctId {string}
* @param usePeople {boolean}
* @returns {Promise<any>}
*/
@Cordova()
identify(distinctId: string): Promise<any> {
identify(distinctId: string, usePeople?: boolean): Promise<any> {
return;
}
@@ -87,7 +87,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
getSuperProperties(): Promise<any> { return; }
getSuperProperties(): Promise<any> {
return;
}
/**
*
@@ -105,7 +107,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
registerSuperPropertiesOnce(superProperties: any): Promise<any> { return; }
registerSuperPropertiesOnce(superProperties: any): Promise<any> {
return;
}
/**
*
@@ -113,7 +117,9 @@ export class Mixpanel extends IonicNativePlugin {
* @returns {Promise<any>}
*/
@Cordova()
unregisterSuperProperty(superPropertyName: string): Promise<any> { return; }
unregisterSuperProperty(superPropertyName: string): Promise<any> {
return;
}
/**
*
@@ -147,7 +153,6 @@ export class Mixpanel extends IonicNativePlugin {
track(eventName: string, eventProperties?: any): Promise<any> {
return;
}
}
/**
@@ -160,6 +165,24 @@ export class Mixpanel extends IonicNativePlugin {
})
@Injectable()
export class MixpanelPeople extends IonicNativePlugin {
/**
*
* @param appendObject {any}
* @return {Promise<any>}
*/
@Cordova()
append(appendObject: any): Promise<any> {
return;
}
/**
*
* @return {Promise<any>}
*/
@Cordova()
deleteUser(): Promise<any> {
return;
}
/**
*
@@ -203,7 +226,7 @@ export class MixpanelPeople extends IonicNativePlugin {
/**
*
* @param peopleProperties
* @param peopleProperties {any}
* @return {Promise<any>}
*/
@Cordova()
@@ -211,4 +234,34 @@ export class MixpanelPeople extends IonicNativePlugin {
return;
}
/**
*
* @param amount {number}
* @param chargeProperties
* @return {Promise<any>}
*/
@Cordova()
trackCharge(amount: number, chargeProperties: any): Promise<any> {
return;
}
/**
*
* @param propertiesArray
* @return {Promise<any>}
*/
@Cordova()
unset(propertiesArray: string[]): Promise<any> {
return;
}
/**
*
* @param unionObject {any}
* @return {Promise<any>}
*/
@Cordova()
union(unionObject: any): Promise<any> {
return;
}
}
@@ -23,7 +23,7 @@ import { Injectable } from '@angular/core';
@Plugin({
pluginName: 'MobileAccessibility',
plugin: 'phonegap-plugin-mobile-accessibility',
pluginRef: 'MobileAccessibility',
pluginRef: 'window.MobileAccessibility',
repo: 'https://github.com/phonegap/phonegap-mobile-accessibility',
platforms: ['Android Fire OS', 'Android', 'iOS', 'Windows']
})
+9 -7
View File
@@ -1,8 +1,7 @@
import { checkAvailability, CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Injectable } from '@angular/core';
import { CordovaInstance, InstanceProperty, IonicNativePlugin, Plugin, checkAvailability } from '@ionic-native/core';
export interface AuthenticationResult {
accessToken: string;
accesSTokenType: string;
expiresOn: Date;
@@ -18,7 +17,6 @@ export interface AuthenticationResult {
* @returns {String} The authorization header.
*/
createAuthorizationHeader(): string;
}
export interface TokenCache {
@@ -52,7 +50,6 @@ export interface UserInfo {
uniqueId: string;
}
/**
* @name MS ADAL
* @description
@@ -101,12 +98,17 @@ export class MSAdal extends IonicNativePlugin {
createAuthenticationContext(authority: string, validateAuthority = true) {
let authContext: any;
if (checkAvailability(MSAdal.getPluginRef(), null, MSAdal.getPluginName()) === true) {
authContext = new (MSAdal.getPlugin()).AuthenticationContext(authority);
if (
checkAvailability(MSAdal.getPluginRef(), null, MSAdal.getPluginName()) ===
true
) {
authContext = new (MSAdal.getPlugin()).AuthenticationContext(
authority,
validateAuthority
);
}
return new AuthenticationContext(authContext);
}
}
/**
@@ -71,7 +71,6 @@ export interface MusicControlsOptions {
* // text displayed in the status bar when the notification (and the ticker) are updated, optional
* ticker : 'Now playing "Time is Running Out"',
* // All icons default to their built-in android equivalents
* // The supplied drawable name, e.g. 'media_play', is the name of a drawable found under 'android/res/drawable*' folders
* playIcon: 'media_play',
* pauseIcon: 'media_pause',
* prevIcon: 'media_prev',
@@ -1,6 +1,5 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
/**
* @name Native Audio
* @description Native Audio Playback
@@ -8,23 +8,29 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
*
* @usage
* ```typescript
* import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderForwardResult } from '@ionic-native/native-geocoder';
* import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderForwardResult, NativeGeocoderOptions } from '@ionic-native/native-geocoder';
*
* constructor(private nativeGeocoder: NativeGeocoder) { }
*
* ...
*
* this.nativeGeocoder.reverseGeocode(52.5072095, 13.1452818)
* .then((result: NativeGeocoderReverseResult) => console.log(JSON.stringify(result)))
* let options: NativeGeocoderOptions = {
* useLocale: true,
* maxResults: 5
* };
*
* this.nativeGeocoder.reverseGeocode(52.5072095, 13.1452818, options)
* .then((result: NativeGeocoderReverseResult[]) => console.log(JSON.stringify(result[0])))
* .catch((error: any) => console.log(error));
*
* this.nativeGeocoder.forwardGeocode('Berlin')
* .then((coordinates: NativeGeocoderForwardResult) => console.log('The coordinates are latitude=' + coordinates.latitude + ' and longitude=' + coordinates.longitude))
* this.nativeGeocoder.forwardGeocode('Berlin', options)
* .then((coordinates: NativeGeocoderForwardResult[]) => console.log('The coordinates are latitude=' + coordinates[0].latitude + ' and longitude=' + coordinates[0].longitude))
* .catch((error: any) => console.log(error));
* ```
* @interfaces
* NativeGeocoderReverseResult
* NativeGeocoderForwardResult
* NativeGeocoderOptions
*/
@Plugin({
pluginName: 'NativeGeocoder',
@@ -40,26 +46,24 @@ export class NativeGeocoder extends IonicNativePlugin {
* Reverse geocode a given latitude and longitude to find location address
* @param latitude {number} The latitude
* @param longitude {number} The longitude
* @return {Promise<NativeGeocoderReverseResult>}
* @param options {NativeGeocoderOptions} The options
* @return {Promise<NativeGeocoderReverseResult[]>}
*/
@Cordova({
callbackOrder: 'reverse'
})
reverseGeocode(latitude: number, longitude: number): Promise<NativeGeocoderReverseResult> {
return;
}
reverseGeocode(latitude: number, longitude: number, options?: NativeGeocoderOptions): Promise<NativeGeocoderReverseResult[]> { return; }
/**
* Forward geocode a given address to find coordinates
* @param addressString {string} The address to be geocoded
* @return {Promise<NativeGeocoderForwardResult>}
* @param options {NativeGeocoderOptions} The options
* @return {Promise<NativeGeocoderForwardResult[]>}
*/
@Cordova({
callbackOrder: 'reverse'
})
forwardGeocode(addressString: string): Promise<NativeGeocoderForwardResult> {
return;
}
forwardGeocode(addressString: string, options?: NativeGeocoderOptions): Promise<NativeGeocoderForwardResult[]> { return; }
}
/**
@@ -120,3 +124,25 @@ export interface NativeGeocoderForwardResult {
*/
longitude: string;
}
/**
* Options for reverse and forward geocoding.
*/
export interface NativeGeocoderOptions {
/**
* The locale to use when returning the address information.
* If set to 'false' the locale will always be 'en_US'.
* Default is 'true'
*/
useLocale: boolean;
/**
* The default locale to use when returning the address information.
* e.g.: 'fa-IR' or 'de_DE'.
*/
defaultLocale?: string;
/**
* The maximum number of result to return (max is 5).
* Default is 1
*/
maxResults: number;
}
@@ -10,15 +10,21 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
* ```typescript
* import { NetworkInterface } from '@ionic-native/network-interface';
*
* constructor( private networkInterface: NetworkInterface ) {
*
* constructor(private networkInterface: NetworkInterface) { }
*
* ...
*
* this.networkInterface.getWiFiIPAddress(function (ip) { alert(ip); });
* this.networkInterface.getCarrierIPAddress(function (ip) { alert(ip); });
* this.networkInterface.getWiFiIPAddress()
* .then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
* .catch(error => console.error(`Unable to get IP: ${error}`));
*
* this.networkInterface.getCarrierIPAddress()
* .then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
* .catch(error => console.error(`Unable to get IP: ${error}`));
*
* const url = 'www.github.com';
* this.networkInterface.getHttpProxyInformation(url)
* .then(proxy => console.info(`Type: ${proxy.type}, Host: ${proxy.host}, Port: ${proxy.port}`))
* .catch(error => console.error(`Unable to get proxy info: ${error}`));
* }
* ```
*/
@Plugin({
@@ -31,28 +37,32 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
@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
* @return {Promise<any>} Returns a Promise that resolves with the IP address information.
*/
@Cordova()
getWiFiIPAddress(): Promise<string> {
getWiFiIPAddress(): Promise<any> {
return;
}
/**
* Gets the wireless carrier IP address
* @param success {Function} Callback used when successful
* @param error {Function} Callback used when failure
* @return {Promise<any>} Returns a Promise that resolves with the IP address information.
*/
@Cordova()
getCarrierIPAddress(): Promise<string> {
getCarrierIPAddress(): Promise<any> {
return;
}
/**
* Gets the relevant proxies for the passed URL in order of application
* @param {url} message The message to display.
* @return {Promise<any>} Returns a Promise that resolves with the proxy information.
*/
@Cordova()
getHttpProxyInformation(url: string): Promise<any> {
return;
}
}
+6 -4
View File
@@ -6,7 +6,7 @@ import {
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { merge, Observable } from 'rxjs';
import { Observable, merge } from 'rxjs';
declare const navigator: any;
@@ -36,7 +36,7 @@ declare const navigator: any;
* let connectSubscription = this.network.onConnect().subscribe(() => {
* console.log('network connected!');
* // We just got a connection but we need to wait briefly
* // before we determine the connection type. Might need to wait.
* // before we determine the connection type. Might need to wait.
* // prior to doing any api requests as well.
* setTimeout(() => {
* if (this.network.type === 'wifi') {
@@ -88,7 +88,8 @@ export class Network extends IonicNativePlugin {
*/
@Cordova({
eventObservable: true,
event: 'offline'
event: 'offline',
element: document
})
onDisconnect(): Observable<any> {
return;
@@ -100,7 +101,8 @@ export class Network extends IonicNativePlugin {
*/
@Cordova({
eventObservable: true,
event: 'online'
event: 'online',
element: document
})
onConnect(): Observable<any> {
return;
+26 -31
View File
@@ -6,7 +6,6 @@ import {
Plugin
} from '@ionic-native/core';
import { Observable } from 'rxjs';
declare let window: any;
export interface NdefEvent {
@@ -183,7 +182,6 @@ export class NFC extends IonicNativePlugin {
write(message: any[]): Promise<any> {
return;
}
/**
* Makes a NFC tag read only. **Warning** this is permanent.
* @returns {Promise<any>}
@@ -256,7 +254,6 @@ export class NFC extends IonicNativePlugin {
enabled(): Promise<any> {
return;
}
/**
* @{ NFC } class utility methods
* for use with
@@ -270,7 +267,6 @@ export class NFC extends IonicNativePlugin {
bytesToString(bytes: number[]): string {
return;
}
/**
* Convert string to byte array.
* @param str {string}
@@ -280,7 +276,6 @@ export class NFC extends IonicNativePlugin {
stringToBytes(str: string): number[] {
return;
}
/**
* Convert byte array to hex string
*
@@ -292,7 +287,6 @@ export class NFC extends IonicNativePlugin {
return;
}
}
/**
* @hidden
*/
@@ -302,7 +296,6 @@ export class NFC extends IonicNativePlugin {
pluginRef: 'ndef'
})
/**
* @{ Ndef } class methods
* @description
* Utility methods for creating ndef records for the ndef tag format.
* Move records into array before usage. Then pass an array to methods as parameters.
@@ -311,24 +304,22 @@ export class NFC extends IonicNativePlugin {
*/
@Injectable()
export class Ndef extends IonicNativePlugin {
@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[];
@CordovaProperty() textHelper: TextHelper;
@CordovaProperty() uriHelper: UriHelper;
@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;
@Cordova({ sync: true })
record(
@@ -343,14 +334,14 @@ export class Ndef extends IonicNativePlugin {
@Cordova({ sync: true })
textRecord(
text: string,
languageCode: string,
id: number[] | string
languageCode?: string,
id?: number[] | string
): NdefRecord {
return;
}
@Cordova({ sync: true })
uriRecord(uri: string, id: number[] | string): NdefRecord {
uriRecord(uri: string, id?: number[] | string): NdefRecord {
return;
}
@@ -358,7 +349,7 @@ export class Ndef extends IonicNativePlugin {
absoluteUriRecord(
uri: string,
payload: number[] | string,
id: number[] | string
id?: number[] | string
): NdefRecord {
return;
}
@@ -407,6 +398,12 @@ export class Ndef extends IonicNativePlugin {
tnfToString(tnf: any): string {
return;
}
@CordovaProperty()
textHelper: TextHelper;
@CordovaProperty()
uriHelper: UriHelper;
}
/**
@@ -454,7 +451,6 @@ export class TextHelper extends IonicNativePlugin {
decodePayload(data: number[]): string {
return;
}
encodePayload(text: string, lang: string): number[] {
return;
}
@@ -464,7 +460,6 @@ export class UriHelper extends IonicNativePlugin {
decodePayload(data: number[]): string {
return;
}
encodePayload(uri: string): number[] {
return;
}
+66 -3
View File
@@ -372,7 +372,7 @@ export enum OSActionType {
* ```
*
* 3. From the root of your project make the file executable:
* `$ chmod +x hooks/after_prepare/030_copy_android_notification_icons.js`
* `$ chmod +x hooks/copy_android_notification_icons.js`
*
*
* @usage
@@ -418,6 +418,7 @@ export enum OSActionType {
export class OneSignal extends IonicNativePlugin {
/**
* constants to use in inFocusDisplaying()
* @hidden
*/
OSInFocusDisplayOption = {
None: 0,
@@ -563,7 +564,7 @@ export class OneSignal extends IonicNativePlugin {
/**
* Deletes tags that were previously set on a user with `sendTag` or `sendTags`.
*
* @param {Array<string>} Keys to remove.
* @param {string[]} Keys to remove.
*/
@Cordova({ sync: true })
deleteTags(keys: string[]): void {}
@@ -671,6 +672,13 @@ export class OneSignal extends IonicNativePlugin {
@Cordova({ sync: true })
setLogLevel(logLevel: { logLevel: number; visualLevel: number }): void {}
/**
* Disable or enable location collection (Defaults to enabled) if your app has location permission.
* @param shared {boolean}
*/
@Cordova({ sync: true })
setLocationShared(shared: boolean): void {}
/**
* The passed in function will be fired when a notification permission setting changes.
* This includes the following events:
@@ -703,8 +711,63 @@ export class OneSignal extends IonicNativePlugin {
}
/**
* Clears all OneSignla notifications
* Clears all OneSignal notifications
*/
@Cordova()
setEmail(email: string, emailAuthToken?: string): Promise<any> {
return;
}
/**
* If your app implements logout functionality, you can call logoutEmail to dissociate the email from the device
*/
@Cordova()
logoutEmail(): Promise<any> {
return;
}
/**
* The passed in function will be fired when a notification subscription property changes.
* This includes the following events:
* - Getting a push token from Apple / Google.
* - Getting a player / user id from OneSignal
* - OneSignal.setSubscription is called
* - User disables or enables notifications
* @return {Observable<any>}
*/
@Cordova({
observable: true
})
addEmailSubscriptionObserver(): Observable<any> {
return;
}
/**
* Clears all OneSignal notifications
*/
@Cordova({ sync: true })
clearOneSignalNotifications(): void {}
/**
* Allows you to delay the initialization of the SDK until the user provides privacy consent.
* The SDK will not be fully initialized until the provideUserConsent(true) method is called.
* @param {boolean} required
*/
@Cordova()
setRequiresUserPrivacyConsent(required: boolean): void {}
/**
* If your application is set to require the user's privacy consent, you can provide this consent using this method.
* Until you call provideUserConsent(true), the SDK will not fully initialize and will not send any data to OneSignal.
* @param {boolean} granted
*/
@Cordova()
provideUserConsent(granted: boolean): void {}
/**
* Accepts a callback, which returns a boolean variable indicating if the user has given privacy consent yet.
* @param {Function} callback
*/
@Cordova()
userProvidedPrivacyConsent(callback: Function): void {}
}

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