awesome-cordova-plugins/src/@ionic-native/plugins/media/index.ts

303 lines
7.1 KiB
TypeScript
Raw Normal View History

chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
import { Injectable } from '@angular/core';
import { CordovaInstance, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core';
2016-07-18 02:00:56 +08:00
2017-05-14 12:55:16 +08:00
declare const Media: any;
2017-05-17 19:13:04 +08:00
// TODO for ionic native 4.x ... rename plugin class to Media and use Media.getPlugin() to retrieve the original media object
/**
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
* @hidden
*/
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
export class MediaObject {
constructor(private _objectInstance: any) {}
/**
2016-09-07 03:48:53 +08:00
* Get the current amplitude of the current recording.
* @returns {Promise<any>} Returns a promise with the amplitude of the current recording
*/
@CordovaInstance()
2016-07-18 02:00:56 +08:00
getCurrentAmplitude(): Promise<any> { return; }
/**
2016-09-07 03:48:53 +08:00
* Get the current position within an audio file. Also updates the Media object's position parameter.
* @returns {Promise<any>} Returns a promise with the position of the current recording
*/
@CordovaInstance()
2016-07-18 02:00:56 +08:00
getCurrentPosition(): Promise<any> { return; }
/**
2016-09-07 03:48:53 +08:00
* Get the duration of an audio file in seconds. If the duration is unknown, it returns a value of -1.
* @returns {number} Returns a promise with the duration of the current recording
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
getDuration(): number { return; }
/**
* Starts or resumes playing an audio file.
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
play(iosOptions?: {
numberOfLoops?: number,
playAudioWhenScreenIsLocked?: boolean
2016-07-18 02:00:56 +08:00
}): void { }
/**
* Pauses playing an audio file.
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
pause(): void { }
/**
* Releases the underlying operating system's audio resources. This is particularly important for Android, since there are a finite amount of OpenCore instances for media playback. Applications should call the release function for any Media resource that is no longer needed.
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
release(): void { }
/**
* Sets the current position within an audio file.
2016-09-07 03:48:53 +08:00
* @param {number} milliseconds The time position you want to set for the current audio file
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
seekTo(milliseconds: number): void { }
/**
* Set the volume for an audio file.
* @param volume {number} The volume to set for playback. The value must be within the range of 0.0 to 1.0.
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
setVolume(volume: number): void { }
/**
* Starts recording an audio file.
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
startRecord(): void { }
/**
* Stops recording
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
stopRecord(): void { }
/**
* Pauses recording
*/
@CordovaInstance({
sync: true
})
pauseRecord(): void { }
/**
* Resumes recording
*/
@CordovaInstance({
sync: true
})
resumeRecord(): void { }
/**
* Stops playing an audio file.
*/
@CordovaInstance({
sync: true
})
2016-07-18 02:00:56 +08:00
stop(): void { }
2017-04-27 12:49:23 +08:00
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
}
export type MediaStatusUpdateCallback = (statusCode: number) => void;
export interface MediaError {
/**
* Error message
*/
message: string;
/**
* Error code
*/
code: number;
}
export type MediaErrorCallback = (error: MediaError) => void;
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
/**
2017-03-24 02:09:49 +08:00
* @name Media
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
* @description
* Some hints if you are using iOS and recording doesn't work:
* 1.) Try to use a absolute file path but remove beginning "file://".
* Then it looks like: `/var/mobile/Containers/Data/Application/AF438B8B-7724-4FBB-8E69-083463224FC4/tmp/my_file.m4a`
* Example: `this.media.create(this.file.tempDirectory.replace(/^file:\/\//, '') + 'my_file.m4a')`
* 2.) If that's not working, too, create the file before using.
* Example:
* ```typescript
* import { MediaPlugin, MediaObject } from '@ionic-native/media';
* import { File } from '@ionic-native/file';
*
* ...
*
* constructor(private media: MediaPlugin, private file: File) { }
*
* ...
*
* this.file.createFile(this.file.tempDirectory, 'my_file.m4a', true).then(() => {
* let file = this.media.create(this.file.tempDirectory.replace(/^file:\/\//, '') + 'my_file.m4a');
* file.startRecord();
* window.setTimeout(() => file.stopRecord(), 10000);
* });
* ```
2017-05-14 12:55:16 +08:00
*
* You can find the reasons here: https://github.com/driftyco/ionic-native/issues/1452#issuecomment-299605906
*
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
* @usage
* ```typescript
* import { MediaPlugin, MediaObject } from '@ionic-native/media';
*
*
* constructor(private media: MediaPlugin) { }
*
*
* ...
*
*
* // Create a MediaPlugin instance. Expects path to file or url as argument
* // We can optionally pass a second argument to track the status of the media
*
* const onStatusUpdate = (status) => console.log(status);
* const onSuccess = () => console.log('Action is successful.');
* const onError = (error) => console.error(error.message);
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* const file: MediaObject = this.media.create('path/to/file.mp3', onStatusUpdate, onSuccess, onError);
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* // play the file
* file.play();
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* // pause the file
* file.pause();
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* // get current playback position
* file.getCurrentPosition().then((position) => {
* console.log(position);
* });
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* // get file duration
* let duration = file.getDuration();
* console.log(duration);
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* // skip to 10 seconds (expects int value in ms)
* file.seekTo(10000);
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* // stop playing the file
* file.stop();
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* // release the native audio resource
* // Platform Quirks:
* // iOS simply create a new instance and the old one will be overwritten
* // Android you must call release() to destroy instances of media when you are done
* file.release();
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
*
*
* // Recording to a file
* const file: MediaObject = this.media.create('path/to/file.mp3');
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* file.startRecord();
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
* file.stopRecord();
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*
*
* ```
* @classes
* MediaObject
* @interfaces
* MediaError
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*/
@Plugin({
pluginName: 'MediaPlugin',
repo: 'https://github.com/apache/cordova-plugin-media',
plugin: 'cordova-plugin-media',
pluginRef: 'Media'
})
@Injectable()
export class MediaPlugin extends IonicNativePlugin {
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
// Constants
/**
* @hidden
*/
MEDIA_NONE: number = 0;
/**
* @hidden
*/
MEDIA_STARTING: number = 1;
/**
* @hidden
*/
MEDIA_RUNNING: number = 2;
/**
* @hidden
*/
MEDIA_PAUSED: number = 3;
/**
* @hidden
*/
MEDIA_STOPPED: number = 4;
// error codes
/**
* @hidden
*/
MEDIA_ERR_ABORTED: number = 1;
/**
* @hidden
*/
MEDIA_ERR_NETWORK: number = 2;
/**
* @hidden
*/
MEDIA_ERR_DECODE: number = 3;
/**
* @hidden
*/
MEDIA_ERR_NONE_SUPPORTED: number = 4;
/**
* Open a media file
* @param src {string} A URI containing the audio content.
2017-04-27 12:49:23 +08:00
* @param [onStatusUpdate] {MediaStatusUpdateCallback} A callback function to be invoked when the status of the file changes
* @param [onSuccess] {Function} A callback function to be invoked after the current play, record, or stop action is completed
* @param [onError] {MediaErrorCallback} A callback function is be invoked if an error occurs.
* @return {MediaObject}
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
*/
@CordovaCheck({ sync: true })
create(src: string,
onStatusUpdate?: MediaStatusUpdateCallback,
onSuccess?: Function,
onError?: MediaErrorCallback): MediaObject {
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
// Creates a new media object
const instance = new Media(src, onSuccess, onError, onStatusUpdate);
return new MediaObject(instance);
chore(): merge v3-injectable into master (#1203) * feat(push): plugin is now instance based no more callbacks closes #250 * fix(push): fix typo in PushEvents enum * fix constructor * feat(push): add subscribe/unsubscribe fixes #861 * First try * Moving to modules * Removed * Moving things aroudn * tsconfig for plugins * Plugin tsconfigs * Core kind of buidls * Core * Plugin tsconfig * Test * Remove core * Build * Individual packages * Build and push * Some stuff * Bump * Update core-package.json.template * Update plugin-package.json.template * 3.0.0 * Working on injectable * Updates * Checkpoint * More stuff * Remove duplicate injectables * Remove lots of static stuff with a fancy regex * Fix build errors * chore(): nodejs build script * chore(): move fs-extra-promise to devDeps * feat(): make instance based plugins injectable * Cleanup * chore(build): convert dependencies to peer dependencies * chore(build): add auto install scripts (#1059) * feat(core): auto install scripts * minor fixes * minor fixes * remove prompt message * fix(plugins): rename packages/classes * rename google maps * gulp task to generate readme files * readme templates * automating readme file generation and adding it to CI # Conflicts: # src/@ionic-native/plugins/googlemap/index.ts # src/@ionic-native/plugins/inappbrowser/index.ts # src/@ionic-native/plugins/media/index.ts # src/@ionic-native/plugins/sqlite/index.ts * outputting readmes to dist dir instead of src * updating package name in usage instructions * chore(): ngc build * fix build * 3.0.1-0 * 3.1.0-alpha.1 * fix AoT support and add publish script * 3.1.0-alpha.2 * edit publish command * remove alpha tag * remove auto-install and cleanup * 3.1.0-alpha.3 * remove utils from publish command * refactor(): remove some prefixes * remove console logs closes #1145 * chore(): merge master into v3-injectable (#1146) * 2.5.0 * chore(): update changelog * fix(pin-dialog): add missing errorIndex * 2.5.1 * chore(): update changelog * fix(zip): progress callback is optional (#1049) * fix(apprate): add missing Windows Store option (#1072) * Update file-chooser.ts (#1071) Removed semicolon after .then() in usage instructions * docs(device-motion): update interface names (#1076) AccelerationData interface is wrongly named in docs. It should be DeviceMotionAccelerationData. And I added it to import statement. * feat(inappbrowser): add interface for IAB options (#1065) * Add InAppBrowserOptions Interface for better tooling. * feat(inappbrowser): add interface for IAB options * Add more constructor tests. * Add missing iOS options. * docs(media): update method usage (#1089) * fix(push): add the missing option clearBadge (#1087) * docs(badge): fix example (#1096) Error in code example (supplied parameters do not match call signature) * fix(imagepicker): add outputType option (#1098) * fix(facebook): fixes issue when not supplying default params (#1088) * Fix default facebook logEvent parameters * Implement correct parameters format in facebook logEvent method * Update ibeacon.ts (#1099) Return type of `getAuthorizationStatus()` made more explicit. * fix(file): add missing exports (#1101) Any declaration that is not being exported is missing from the resulting d.ts declaration files. * Add InAppBrowserOptions interface to documentation. (#1103) * Update sqlite.ts (#1106) Added a bracket to remove the syntax error * update device orientation docs to reflect renaming of CompassHeading interface (#1107) * Move marker code inside MAP_READY (#1108) The code to set the camera position and marker should be moved inside the function handling MAP_READY. Otherwise they execute before the event is fired and it doesn't work. * refactor(file): accept ArrayBuffer for data to write (#1109) * docs(google-maps): fix param type closes #1110 * fix(media): add missing pauseRecord and resumeRecord methods (#1122) * docs(stripe): fix type and naming issues (#1129) * refactor(paypal): fix type of items (#1125) Type of items should be Array<PayPalItem> instead of string. * fix(serial): Serial.requestPermission() options are optional (#1128) * add success/error indices * feat(browser-tab): add browser tab plugin (#1126) * feature: added hasPermission function to Firebase fixes #1115 * feat: Implemented support for BrowserTab #1077 * docs(browser-tab): add proper docs * fix(background-geolocation): configure returns a promise closes #1118 * docs(background-geolocation): add return types and platforms * fix(contacts): allow passing asterisk as contact field type closes 1093 * fix(contacts): allow passing asterisk as contact field type closes #1093 * fix(plugin): revert changes to support stable version (#1116) fix #1001 * feat(file): add system paths * feat(app-update): add cordova-plugin-app-update support (#1105) * add new app-update plugin * update plugin info * docs(app-update): add docs * feat(alipay): add alipay support. (#1097) * add cordova-alipay-base plugin. to support Alipay payment * change ALI_PID to APP_ID, make it same with the latest SDK * rewrite comments * docs(google-maps): improve docs (#1095) Move `map.moveCamera(position);` inside the MAP_READY event. Allow to zoom the map on first launch (both iOS and Android). * fix(file): remove FileError from return type (#1086) Promises that reject with a `FileError` are not of the type `Promise<T|FileError>`, but `Promise<T>`. The previous declarations of `Promise<T|FileError>` would break typing further down the chain where you are trying to use the value that the typing says could be `T|FileError` but in reality could only be `T`. * feat(google-maps): add constant for map type * fix(file): platform Browser will raise a an DOMException (#1082) fix(File): Platform Browser will raise a an DOMException on resoleLocalFilesystemUrl and tries to write on readonly property DOMException err.message in fillErrorMessage * feat(local-notifications): support for icon background color (#1079) The Cordova plugin Ionic Natives uses allows specifying the background color of the smallIcon. By not including it in your interface you force users to use the default color for their version of Android. While the LocalNotification plugin is not well documented, it does include this feature, see Options.java line 253: ``` /** * @return * The notification background color for the small icon * Returns null, if no color is given. */ public int getColor() { String hex = options.optString("color", null); if (hex == null) { return NotificationCompat.COLOR_DEFAULT; } int aRGB = Integer.parseInt(hex, 16); return aRGB + 0xFF000000; } ``` I've simply added the option to the interface as well as a short description. This lets you go from the default color (varies by Android version): https://goo.gl/photos/nERcj4GZgapy8aee9 To any color you'd like: https://goo.gl/photos/t8V9WVba8jDU49aHA And also works if you also specify a large icon: https://goo.gl/photos/gWQYwa12djmdXfYcA * feat(unique-device-add): add UniqueDeviceId plugin (#1064) * fix plugin * feat(text-to-speech): Add stop method (#1063) https://github.com/vilic/cordova-plugin-tts/pull/32 * feat(appodeal): adds Appodeal SDK wrappers for iOS and Android (#1031) * feat(Appodeal) bootrapping * starting docs * more docs * feat(appodeal): add event Observables * feat(appodeal): replace Cordova Observable events with #.fromEvent() * feat(appodeal): update decorator metadata * feat(couchbase-lite): add CouchbaseLite cordova plugin (#1025) * feat(CouchbaseLite): add CouchbaseLite cordova plugin * add plugin url * feat(background-fetch): Adding Background Fetch requested in #990 (#1013) * Adding Background Fetch (https://github.com/transistorsoft/cordova-plugin-background-fetch) requested in #990 * Adding BackgroundFetch to index * feat(gyroscope): add Gyroscope plugin (#1004) * add gyroscope.ts to plugins * add gyroscope to index * Update gyroscope.ts * Update gyroscope.ts * Revert "fix(File): typing where `FileError` can be thrown" (#1130) * tslint and fix build issues * 2.6.0 * chore(): update changelog * fix(core): dont check if method exists when overriding fixes #1043 * fix(file): fix writeExistingFile closes #1044 * feat(diagnostic): add new methods closes #1045 * feat(background-mode): replace event listeners with on method The methods onactivate, ondeactive and onfailure no longer exist. You must now use `on` method. * feat(background-mode): add missing functions closes #1078 * tslint * set GoogleMapsMapTypeId to private * remove beta from stripe * 2.7.0 * chore(): update changelog * feat(app-preferences): added cordova-plugin-app-preferences support (#1084) * (feat) added cordova-plugin-app-preferences support * replaced callback functions with promises * updated example * (feat) added cordova-plugin-browsertab support * Revert "(feat) added cordova-plugin-browsertab support" This reverts commit 00eb5cf5d8aaac9d798f9d8450e0f35f57ffb52a. * (update) synchronize fetch * feat(photo-library): added cordova-plugin-photo-library (#1102) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * refactor(photo-library): fixed circleci failing in 2.7.0 (#1132) * feat(photo-library): added cordova-plugin-photo-library * CordovaFiniteObservable moved to photo-library. Overloads are marked as private. * fixed typescript error in 2.7.0 * feat(health): add wrapper for cordova-plugin-health (#1039) * feat(health): add wrapper for cordova-plugin-health * fix(Health): add optional params to QueryOptions for .query() * docs(health): fix javadoc of interfaces * fix(health): remove unused Plugin option * docs(health): add missing documentation * doc(health): add promise to return * doc(health): remove empty lines * doc(health): Add description & reference to repo * doc(health: add "return {Promise<any>}" * refactor(safari-view-controller): hide returns promise * fix typo in ibeacon plugin (#1138) * fix(file): fix return types fixes #1139 * docs(background-geolocation): fix param docs * refactor(health): fix return types and prefix interfaces * 2.8.0 * chore(): update changelog * docs(sqlite): syntax error resolved (#1142) * Syntax error resolved The `{}` should be `[]`, but since there is no binding we do not get error. In case we add one, then the syntax will be incorrect. * Fixed a syntax error * fix(background-geolocation): configure returns an observable * docs(): update docs * 3.1.0-rc.1 * refactor(background-geolocation): update imports * docs(background-fetch): fix return type * docs(health): fix return type * chore(CI): fixing npm install instructions in generated readmes * set concurrency to number of cores * chore(): update deps * 3.1.0-rc.2 * chore(): update angular to 2.4.8 * 3.1.0-rc.3 * chore(): update angular to 2.4.8 * chore(): update rxjs to 5.0.1 * chore(): organize and enhance decorators (#1171) * fix/add decorators * fix google maps design * chore(): add root tsconfig to resolve imports in IDE * updates * more fixes * chore(): add options to InstanceCheck * chore(decorators): promise is default for Cordova/Instance check * chore(): add check decroators * docs(): update plugin docs * chore(decorators): fix cordovaCheck and instanceCheck * 3.1.0-rc.4 * chore(docs): remove gitPackage from doc generator * chore(docs): update to latest dgeni version * fix diagnostic * feat(media): create method now returns a promise Breaking change: create no longer returns a MediaObject instance. Make changes to your app accordingly. * docs update + remove any static methods/properties * remove duplicate method * remove extra docs * remove extra docs * docs(): rename plugins * chore(decorators): do not check method name on instancecheck * chore(decorators): do not check method name on cordovacheck * chore(plugin): fix pluginWarn * chore(plugin): fix pluginWarn * fix(decorators): fix InstanceCheck decorator * 3.1.0-rc.5 * chore(docs): fix readme generation * fix(transfer): fix v3 implementation * refactor(paypal): PayPal is brand name * chore(docs): replace all spaces with dashes * chore(): add dashify filter * chore(build): add aot path to core tsconfig * feat(action-sheet): add ANDROID_THEMES constant * refactor(): general cleanup (#1193) * feat(screen-orientation): update wrapper to match v2 of the plugin The whole implementation has changed now. You must update your code. * feat(stripe): add new methods * feat(linkedin): add LinkedIn plugin * 3.1.0-rc.6 * style(screen-orientation): double quote to single * tslint * refactor(pedometer): rename file to index
2017-03-21 04:38:14 +08:00
}
}