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

704 lines
20 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 { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
2016-09-22 04:04:46 +08:00
import { Observable } from 'rxjs/Observable';
2016-07-18 02:03:03 +08:00
export interface OSNotification {
2016-12-27 21:03:21 +08:00
/**
* Was app in focus.
*/
isAppInFocus?: boolean;
2016-12-27 21:03:21 +08:00
/**
* Was notification shown to the user. Will be false for silent notifications.
*/
shown?: boolean;
2016-12-27 21:03:21 +08:00
/**
* **ANDROID** - Android Notification assigned to the notification. Can be used to cancel or replace the notification.
*/
androidNotificationId?: number;
/**
* Payload received from OneSignal.
*/
payload?: OSNotificationPayload;
2016-12-27 21:03:21 +08:00
/**
* How the notification was displayed to the user. Can be set to `Notification`, `InAppAlert`, or `None` if it was not displayed.
*/
displayType?: OSDisplayType;
2016-12-27 21:03:21 +08:00
/**
* **ANDROID** - Notification is a summary notification for a group this will contain all notification payloads it was created from.
*/
groupedNotifications?: OSNotificationPayload[];
app_id?: string;
contents?: any;
2016-12-06 22:52:39 +08:00
headings?: any;
isIos?: boolean;
isAndroid?: boolean;
isWP?: boolean;
isWP_WNS?: boolean;
isAdm?: boolean;
isChrome?: boolean;
isChromeWeb?: boolean;
isSafari?: boolean;
isAnyWeb?: boolean;
included_segments?: string[];
excluded_segments?: string[];
include_player_ids?: string[];
include_ios_tokens?: string[];
include_android_reg_ids?: string[];
include_wp_uris?: string[];
include_wp_wns_uris?: string[];
include_amazon_reg_ids?: string[];
include_chrome_reg_ids?: string[];
include_chrome_web_reg_ids?: string[];
app_ids?: string[];
tags?: any[];
ios_badgeType?: string;
ios_badgeCount?: number;
ios_sound?: string;
android_sound?: string;
adm_sound?: string;
wp_sound?: string;
wp_wns_sound?: string;
data?: any;
buttons?: any;
collapse_id?: string;
2016-12-06 22:52:39 +08:00
small_icon?: string;
large_icon?: string;
big_picture?: string;
adm_small_icon?: string;
adm_large_icon?: string;
adm_big_picture?: string;
chrome_icon?: string;
chrome_big_picture?: string;
chrome_web_icon?: string;
firefox_icon?: string;
url?: string;
send_after?: string;
delayed_option?: string;
delivery_time_of_day?: string;
android_led_color?: string;
android_accent_color?: string;
android_visibility?: number;
content_available?: boolean;
amazon_background_data?: boolean;
template_id?: string;
android_group?: string;
android_group_message?: any;
adm_group?: string;
adm_group_message?: any;
ttl?: number;
priority?: number;
ios_category?: string;
}
/**
* **ANDROID** - Privacy setting for how the notification should be shown on the lockscreen of Android 5+ devices.
*/
export enum OSLockScreenVisibility {
/**
* Fully visible (default)
*/
Public = 1,
/**
* Contents are hidden
*/
Private = 0,
/**
* Not shown
*/
Secret = -1
}
/**
* How the notification was displayed to the user. Part of OSNotification. See inFocusDisplaying for more information on how this is used.
*/
export enum OSDisplayType {
/**
* notification is silent, or inFocusDisplaying is disabled.
*/
None = 0,
/**
* (**DEFAULT**) - native alert dialog display.
*/
InAppAlert = 1,
/**
* native notification display.
*/
Notification = 2
}
/**
* Contents and settings of the notification the user received.
*/
export interface OSNotificationPayload {
/**
* OneSignal notification UUID.
*/
notificationID: string;
/**
* Title of the notification.
*/
title: string;
/**
* Body of the notification.
*/
body: string;
/**
* Custom additional data that was sent with the notification. Set on the dashboard under Options > Additional Data
* or with the 'data' field on the REST API.
*/
additionalData?: any;
/**
* **ANDROID** - Small icon resource name set on the notification.
*/
smallIcon?: string;
/**
* **ANDROID** - Large icon set on the notification.
*/
largeIcon?: string;
/**
* **ANDROID** - Big picture image set on the notification.
*/
bigPicture?: string;
/**
* **ANDROID** - Accent color shown around small notification icon on Android 5+ devices. ARGB format.
*/
smallIconAccentColor?: string;
/**
* URL to open when opening the notification.
*/
launchURL?: string;
/**
* Sound resource to play when the notification is shown.
*/
sound: string;
/**
* **ANDROID** - Devices that have a notification LED will blink in this color. ARGB format.
*/
ledColor?: string;
lockScreenVisibility?: OSLockScreenVisibility;
/**
* **ANDROID** - Notifications with this same key will be grouped together as a single summary notification.
*/
groupKey?: string;
/**
* **ANDROID** - Summary text displayed in the summary notification.
*/
groupMessage?: string;
/**
* List of action buttons on the notification.
*/
actionButtons: OSActionButton[];
/**
* **ANDROID** - The Google project number the notification was sent under.
*/
fromProjectNumber?: string;
/**
* **ANDROID** - If a background image was set this object will be available.
*/
backgroundImageLayout?: OSBackgroundImageLayout;
priority?: number;
/**
* List of action buttons on the notification.
*/
rawPayload: string;
}
/**
* List of action buttons on the notification.
*/
export interface OSActionButton {
/**
* Id assigned to the button.
*/
id: string;
/**
* Text show on the button to the user.
*/
text: string;
/**
* **ANDROID** - Icon shown on the button.
*/
icon: string;
}
/**
* OSPermissionState
*/
export interface OSPermissionState {
/**
* User was prompted.
*/
hasPrompted: boolean;
/**
* Permissions Status
*/
status: any;
}
/**
* OSSubscriptionState
*/
export interface OSSubscriptionState {
subscribed: boolean;
userSubscriptionSetting: any;
userId: any;
pushToken: any;
}
/**
* Subscription and permissions status
*/
export interface OSPermissionSubscriptionState {
/**
* Id assigned to the button.
*/
permissionStatus: OSPermissionState;
/**
* Text show on the button to the user.
*/
subscriptionStatus: OSSubscriptionState;
}
/**
* **ANDROID** - If a background image was set, this object will be available.
*/
export interface OSBackgroundImageLayout {
/**
* Image URL or name used as the background image.
*/
image: string;
/**
* Text color of the title on the notification. ARGB Format.
*/
titleTextColor: string;
/**
* Text color of the body on the notification. ARGB Format.
*/
bodyTextColor: string;
}
/**
* The information returned from a notification the user received.
*/
export interface OSNotificationOpenedResult {
action: {
/**
* Was the notification opened normally (`Opened`) or was a button pressed on the notification (`ActionTaken`).
*/
type: OSActionType;
/**
* If `type` == `ActionTaken` then this will contain the id of the button pressed.
*/
actionID?: string;
};
notification: OSNotification;
}
export enum OSActionType {
Opened = 0,
ActionTake = 1
}
/**
* @name OneSignal
* @description
* The OneSignal plugin is an client implementation for using the [OneSignal](https://onesignal.com/) Service.
* OneSignal is a simple implementation for delivering push notifications.
*
2017-10-20 03:24:37 +08:00
* Please view the official [OneSignal Ionic SDK Installation](https://documentation.onesignal.com/docs/ionic-sdk-setup) guide
* for more information.
*
* #### Icons
* If you want to use generated icons with command `ionic cordova resources`:
*
* 1. Add a file to your `hooks` directory called `copy_android_notification_icons.js`
*
* 2. Configure the hook in your config.xml
* ```
* <platform name="android">
* <hook type="after_prepare" src="hooks/copy_android_notification_icons.js" />
* </platform>
* ```
*
* 3. Put the following code in it:
*
* ```
* #!/usr/bin/env node
* var fs = require('fs');
* var path = require('path');
* var filestocopy = [{
* "resources/android/icon/drawable-hdpi-icon.png":
* "platforms/android/res/drawable-hdpi/ic_stat_onesignal_default.png"
* }, {
* "resources/android/icon/drawable-mdpi-icon.png":
* "platforms/android/res/drawable-mdpi/ic_stat_onesignal_default.png"
* }, {
* "resources/android/icon/drawable-xhdpi-icon.png":
* "platforms/android/res/drawable-xhdpi/ic_stat_onesignal_default.png"
* }, {
* "resources/android/icon/drawable-xxhdpi-icon.png":
* "platforms/android/res/drawable-xxhdpi/ic_stat_onesignal_default.png"
* }, {
* "resources/android/icon/drawable-xxxhdpi-icon.png":
* "platforms/android/res/drawable-xxxhdpi/ic_stat_onesignal_default.png"
* } ];
* module.exports = function(context) {
* // no need to configure below
* var rootdir = context.opts.projectRoot;
* filestocopy.forEach(function(obj) {
* Object.keys(obj).forEach(function(key) {
* var val = obj[key];
* var srcfile = path.join(rootdir, key);
* var destfile = path.join(rootdir, val);
* console.log("copying "+srcfile+" to "+destfile);
* var destdir = path.dirname(destfile);
* if (fs.existsSync(srcfile) && fs.existsSync(destdir)) {
* fs.createReadStream(srcfile).pipe(
* fs.createWriteStream(destfile));
* }
* });
* });
* };
* ```
*
* 3. From the root of your project make the file executable:
* `$ chmod +x hooks/after_prepare/030_copy_android_notification_icons.js`
*
*
* @usage
* ```typescript
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 { OneSignal } from '@ionic-native/onesignal';
*
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
* constructor(private oneSignal: OneSignal) { }
2016-07-18 02:03:03 +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
* ...
*
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
* this.oneSignal.startInit('b2f7f966-d8cc-11e4-bed1-df8f05be55ba', '703322744261');
*
* this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.InAppAlert);
*
* this.oneSignal.handleNotificationReceived().subscribe(() => {
* // do something when notification is received
* });
*
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
* this.oneSignal.handleNotificationOpened().subscribe(() => {
* // do something when a notification is opened
* });
*
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
* this.oneSignal.endInit();
* ```
2016-12-06 22:52:39 +08:00
* @interfaces
2016-12-27 21:03:21 +08:00
* OSNotification
* OSLockScreenVisibility
* OSDisplayType
* OSNotificationPayload
* OSActionButton
* OSBackgroundImageLayout
* OSNotificationOpenedResult
* OSActionType
*/
@Plugin({
pluginName: 'OneSignal',
2016-07-18 02:03:03 +08:00
plugin: 'onesignal-cordova-plugin',
pluginRef: 'plugins.OneSignal',
repo: 'https://github.com/OneSignal/OneSignal-Cordova-SDK',
platforms: ['Amazon Fire OS', 'Android', 'iOS', 'Windows']
})
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
@Injectable()
export class OneSignal extends IonicNativePlugin {
2016-07-18 02:03:03 +08:00
/**
* constants to use in inFocusDisplaying()
*/
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
OSInFocusDisplayOption = {
None: 0,
InAppAlert: 1,
Notification: 2
};
/**
* Start the initialization process. Once you are done configuring OneSignal, call the `endInit` function.
*
* @param {string} appId Your OneSignal app id
* @param {string} googleProjectNumber **ANDROID** - your Google project number; only required for Android GCM/FCM pushes.
* @returns {any}
*/
@Cordova({ sync: true })
startInit(appId: string, googleProjectNumber?: string): any {
return;
}
/**
* Callback to run when a notification is received, whether it was displayed or not.
*
* @return {Observable<OneSignalReceivedNotification>}
*/
@Cordova({
observable: true
})
handleNotificationReceived(): Observable<OSNotification> {
return;
}
/**
* Callback to run when a notification is tapped on from the notification shade (**ANDROID**) or notification
* center (**iOS**), or when closing an Alert notification shown in the app (if InAppAlert is enabled in
* inFocusDisplaying).
*
* @return {Observable<OneSignalOpenedNotification>}
*/
@Cordova({
observable: true
})
handleNotificationOpened(): Observable<OSNotificationOpenedResult> {
return;
}
2016-07-18 02:03:03 +08:00
/**
* **iOS** - Settings for iOS apps
*
* @param settings
* kOSSettingsKeyAutoPrompt: boolean = true
* Auto prompt user for notification permissions.
*
* kOSSettingsKeyInAppLaunchURL: boolean = false
* Launch notifications with a launch URL as an in app webview.
* @returns {any}
2016-07-18 02:03:03 +08:00
*/
@Cordova({
sync: true,
platforms: ['iOS']
})
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
iOSSettings(settings: {
kOSSettingsKeyAutoPrompt: boolean;
kOSSettingsKeyInAppLaunchURL: boolean;
}): any {
return;
}
/**
* Must be called after `startInit` to complete initialization of OneSignal.
*
* @returns {any}
*/
@Cordova({ sync: true })
endInit(): any {
return;
}
/**
* Prompt the user for notification permissions. Callback fires as soon as the user accepts or declines notifications.
* @returns {Promise<boolean>}
*/
@Cordova({
platforms: ['iOS']
})
promptForPushNotificationsWithUserResponse(): Promise<boolean> {
return;
}
/**
* Retrieve a list of tags that have been set on the user from the OneSignal server.
*
* **Quirk**: You must wait for `getTags` to resolve before calling it again, as the plugin will only process the last method call and discard any previous ones.
*
* @returns {Promise<any>} Returns a Promise that resolves when tags are recieved.
*/
@Cordova()
getTags(): Promise<any> {
return;
}
/**
* Lets you retrieve the OneSignal user id and device token.
* Your handler is called after the device is successfully registered with OneSignal.
*
2017-01-01 17:11:51 +08:00
* @returns {Promise<Object>} Returns a Promise that resolves if the device was successfully registered.
*
* userId {string} OneSignal userId is a UUID formatted string. (unique per device per app)
*
* pushToken {string} A push token is a Google/Apple assigned identifier(unique per device per app).
*/
@Cordova()
getIds(): Promise<{ userId: string; pushToken: string }> {
return;
}
2016-07-18 02:03:03 +08:00
/**
* Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
* Recommend using sendTags over sendTag if you need to set more than one tag on a user at a time.
*
* @param {string} Key of your choosing to create or update.
* @param {string} Value to set on the key. NOTE: Passing in a blank String deletes the key, you can also call deleteTag.
2016-07-18 02:03:03 +08:00
*/
@Cordova({ sync: true })
sendTag(key: string, value: string): void {}
2016-07-18 02:03:03 +08:00
/**
* Tag a user based on an app event of your choosing so later you can create segments on [onesignal.com](https://onesignal.com/) to target these users.
* Recommend using sendTags over sendTag if you need to set more than one tag on a user at a time.
*
* @param {string} Pass a json object with key/value pairs like: {key: "value", key2: "value2"}
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
sendTags(json: any): void {}
2016-07-18 02:03:03 +08:00
/**
* Deletes a tag that was previously set on a user with `sendTag` or `sendTags`. Use `deleteTags` if you need to delete more than one.
*
* @param {string} Key to remove.
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
deleteTag(key: string): void {}
2016-07-18 02:03:03 +08:00
/**
* Deletes tags that were previously set on a user with `sendTag` or `sendTags`.
*
* @param {Array<string>} Keys to remove.
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
deleteTags(keys: string[]): void {}
2016-07-18 02:03:03 +08:00
/**
* Call this when you would like to prompt an iOS user to accept push notifications with the default system prompt.
* Only works if you set `kOSSettingsAutoPrompt` to `false` in `iOSSettings`
*/
@Cordova({ sync: true })
registerForPushNotifications(): void {}
2016-07-18 02:03:03 +08:00
/**
* Warning:
* Only applies to Android and Amazon. You can call this from your UI from a button press for example to give your user's options for your notifications.
*
* By default OneSignal always vibrates the device when a notification is displayed unless the device is in a total silent mode.
* Passing false means that the device will only vibrate lightly when the device is in it's vibrate only mode.
*
* @param {boolean} false to disable vibrate, true to re-enable it.
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
enableVibrate(enable: boolean): void {}
2016-07-18 02:03:03 +08:00
/**
* Warning:
* Only applies to Android and Amazon. You can call this from your UI from a button press for example to give your user's options for your notifications.
*
* By default OneSignal plays the system's default notification sound when the device's notification system volume is turned on.
* Passing false means that the device will only vibrate unless the device is set to a total silent mode.
*
* @param {boolean} false to disable sound, true to re-enable it.
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
enableSound(enable: boolean): void {}
2016-07-18 02:03:03 +08:00
/**
*
* Setting to control how OneSignal notifications will be shown when one is received while your app is in focus. By default this is set to inAppAlert, which can be helpful during development.
*
* @param {DisplayType} displayOption
* @returns {any}
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
inFocusDisplaying(displayOption: OSDisplayType): any {
return;
}
2016-07-18 02:03:03 +08:00
/**
* You can call this method with false to opt users out of receiving all notifications through OneSignal.
* You can pass true later to opt users back into notifications.
*
* @param {boolean} enable
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
setSubscription(enable: boolean): void {}
2016-07-18 02:03:03 +08:00
/**
* Get the current notification and permission state. Returns a OSPermissionSubscriptionState type described below.
*
* @returns {Promise<OSPermissionSubscriptionState>}
*/
@Cordova()
getPermissionSubscriptionState(): Promise<OSPermissionSubscriptionState> {
return;
}
2016-07-18 02:03:03 +08:00
/**
*
* @param {notificationObj} Parameters see POST [documentation](https://documentation.onesignal.com/v2.0/docs/notifications-create-notification)
* @returns {Promise<any>} Returns a Promise that resolves if the notification was send successfully.
*/
2016-07-18 02:03:03 +08:00
@Cordova()
postNotification(notificationObj: OSNotification): Promise<any> {
return;
}
2016-07-18 02:03:03 +08:00
/**
* Cancels a single OneSignal notification based on its Android notification integer id. Use instead of NotificationManager.cancel(id); otherwise the notification will be restored when your app is restarted.
* @param notificationId {string}
*/
@Cordova({ sync: true })
cancelNotification(notificationId: string): void {}
/**
* Prompts the user for location permission to allow geotagging based on the "Location radius" filter on the OneSignal dashboard.
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
promptLocation(): void {}
2016-07-18 02:03:03 +08:00
/**
*
* @param email {string}
*/
@Cordova({ sync: true })
syncHashedEmail(email: string): void {}
2016-07-18 02:03:03 +08:00
/**
* Enable logging to help debug if you run into an issue setting up OneSignal.
* The logging levels are as follows: 0 = None, 1= Fatal, 2 = Errors, 3 = Warnings, 4 = Info, 5 = Debug, 6 = Verbose
2016-07-18 02:03:03 +08:00
* The higher the value the more information is shown.
*
* @param {loglevel} contains two properties: logLevel (for console logging) and visualLevel (for dialog messages)
*/
2016-07-18 02:03:03 +08:00
@Cordova({ sync: true })
setLogLevel(logLevel: { logLevel: number; visualLevel: number }): void {}
2016-07-18 02:03:03 +08:00
/**
* The passed in function will be fired when a notification permission setting changes.
* This includes the following events:
* - Notification permission prompt shown
* - The user accepting or declining the permission prompt
* - Enabling/disabling notifications for your app in the device Settings after returning to your app.
* @return {Observable<any>}
*/
@Cordova({
observable: true
})
addPermissionObserver(): Observable<any> {
return;
}
/**
* The passed in function will be fired when a notification subscription property changes.
* This includes the following events:
* - Getting a push token from Apple / Google.
* - Getting a player / user id from OneSignal
* - OneSignal.setSubscription is called
* - User disables or enables notifications
* @return {Observable<any>}
*/
@Cordova({
observable: true
})
addSubscriptionObserver(): Observable<any> {
return;
}
/**
* Clears all OneSignla notifications
*/
@Cordova({ sync: true })
clearOneSignalNotifications(): void {}
}