Merge branch 'master' of github.com:ionic-team/ionic-native

This commit is contained in:
Ibby Hadeed 2017-06-11 15:23:19 -04:00
commit 1ccfb1d84c
17 changed files with 81 additions and 26 deletions

View File

@ -8,17 +8,17 @@ import { Injectable } from '@angular/core';
*
* @usage
* ```typescript
* import { Platfrom } from 'ionic-angular';
* import { AppMinimize } from '@ionic-native/app-minimize';
*
*
* constructor(private appMinimize: AppMinimize) { }
* constructor(private platform: Platform, private appMinimize: AppMinimize) { }
*
* ...
*
* this.plugin.minimize().then(
* success => console.log('Closed'),
* err => console.log('Something went wrong')
* );
* this.platform.registerBackButtonAction(() => {
* this.appMinimize.minimize();
* });
*
* ```
*/

View File

@ -23,7 +23,7 @@ import { Injectable } from '@angular/core';
*/
@Plugin({
pluginName: 'CouchbaseLite',
plugin: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin.git',
plugin: 'couchbase-lite-phonegap-plugin',
pluginRef: 'cblite',
repo: 'https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin',
platforms: ['Android', 'iOS']

View File

@ -22,9 +22,9 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'DeviceAccounts',
plugin: 'https://github.com/loicknuchel/cordova-device-accounts.git',
plugin: 'cordova-device-accounts',
pluginRef: 'plugins.DeviceAccounts',
repo: 'https://github.com/loicknuchel/cordova-device-accounts',
repo: 'https://github.com/danielsogl/cordova-device-accounts',
platforms: ['Android']
})
@Injectable()

View File

@ -23,9 +23,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'FileChooser',
plugin: 'https://github.com/don/cordova-filechooser.git',
plugin: 'cordova-plugin-filechooser',
pluginRef: 'fileChooser',
repo: 'https://github.com/don/cordova-filechooser',
repo: 'https://github.com/ihadeed/cordova-filechooser',
platforms: ['Android']
})
@Injectable()

View File

@ -72,7 +72,7 @@ declare const window: any;
* ### Troubleshooting ###
* #### I get compile errors when I run `ionic build ios` or `ionic run ios`. ####
* This could be caused by the Cordova project directory in `/platforms/ios` not being named correctly.
* Try running `ionic platform rm <platform>` then run `ionic platform add <platform>` to recreate the
* Try running `ionic cordova platform rm <platform>` then run `ionic cordova platform add <platform>` to recreate the
* platform directories.
*/
@Plugin({

View File

@ -26,7 +26,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
plugin: 'cordova-plugin-globalization',
pluginRef: 'navigator.globalization',
repo: 'https://github.com/apache/cordova-plugin-globalization',
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Widnows Phone']
platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone']
})
@Injectable()
export class Globalization extends IonicNativePlugin {

View File

@ -49,7 +49,7 @@ export interface HttpdOptions {
*/
@Plugin({
pluginName: 'Httpd',
plugin: 'https://github.com/floatinghotpot/cordova-httpd.git',
plugin: 'cordova-plugin-httpd',
pluginRef: 'cordova.plugins.CorHttpd',
repo: 'https://github.com/floatinghotpot/cordova-httpd',
platforms: ['Android', 'iOS', 'macOS']

View File

@ -31,7 +31,7 @@ import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'Insomnia',
plugin: 'https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git',
plugin: 'cordova-plugin-insomnia',
pluginRef: 'plugins.insomnia',
repo: 'https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin',
platforms: ['Android', 'Browser', 'Firefox OS', 'iOS', 'Windows', 'Windows Phone 8']

View File

@ -22,8 +22,8 @@ import { Injectable } from '@angular/core';
*/
@Plugin({
pluginName: 'MobileAccessibility',
plugin: 'https://github.com/phonegap/phonegap-mobile-accessibility.git',
pluginRef: 'MobileAccessibilityNotifications',
plugin: 'phonegap-plugin-mobile-accessibility',
pluginRef: 'MobileAccessibility',
repo: 'https://github.com/phonegap/phonegap-mobile-accessibility',
platforms: ['Android Fire OS', 'Android', 'iOS', 'Windows']
})

View File

@ -268,6 +268,58 @@ export enum OSActionType {
*
* Requires Cordova plugin: `onesignal-cordova-plugin`. For more info, please see the [OneSignal Cordova Docs](https://documentation.onesignal.com/docs/phonegap-sdk-installation).
*
* #### Icons
* If you want to use generated icons with command `ionic cordova resources`:
*
* 1. Add a file to your `hooks` directory inside the `after_prepare` folder called `030_copy_android_notification_icons.js`
*
* 2. Put the following code in it:
*
* ```
* #!/usr/bin/env node
*
* 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"
* } ];
*
* var fs = require('fs');
* var path = require('path');
*
* // no need to configure below
* var rootdir = process.argv[2];
*
* 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
* import { OneSignal } from '@ionic-native/onesignal';

View File

@ -3,6 +3,9 @@ import { Cordova, CordovaInstance, Plugin, IonicNativePlugin, checkAvailability
declare const Notification: any;
/**
* @hidden
*/
export class PLNObject {
private _objectInstance: any;

View File

@ -23,7 +23,7 @@ declare const navigator: any;
*/
@Plugin({
pluginName: 'Screenshot',
plugin: 'https://github.com/gitawego/cordova-screenshot.git',
plugin: 'com.darktalker.cordova.screenshot',
pluginRef: 'navigator.screenshot',
repo: 'https://github.com/gitawego/cordova-screenshot',
platforms: ['Android', 'iOS', 'macOS']

View File

@ -26,9 +26,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'Stepcounter',
plugin: 'https://github.com/Slidee/cordova-plugin-stepcounter.git',
plugin: 'cordova-plugin-stepcounter',
pluginRef: 'stepcounter',
repo: 'https://github.com/Slidee/cordova-plugin-stepcounter',
repo: 'https://github.com/ihadeed/cordova-plugin-stepcounter',
platforms: ['Android']
})
@Injectable()

View File

@ -34,9 +34,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'UserAgent',
plugin: 'https://github.com/LouisT/cordova-useragent.git',
plugin: 'cordova-plugin-useragent',
pluginRef: 'plugins.useragent',
repo: 'https://github.com/LouisT/cordova-useragent',
repo: 'https://github.com/danielsogl/cordova-plugin-useragent',
platforms: ['Android', 'iOS']
})
@Injectable()

View File

@ -131,9 +131,9 @@ export interface VideoCapturePlusOptions {
*/
@Plugin({
pluginName: 'VideoCapturePlus',
plugin: 'https://github.com/EddyVerbruggen/VideoCapturePlus-PhoneGap-Plugin.git',
plugin: 'cordova-plugin-video-capture-plus',
pluginRef: 'window.plugins.videocaptureplus',
repo: 'https://github.com/EddyVerbruggen/VideoCapturePlus-PhoneGap-Plugin',
repo: 'https://github.com/danielsogl/cordova-plugin-video-capture-plus',
platforms: ['Android', 'iOS']
})
@Injectable()

View File

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

View File

@ -27,9 +27,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
*/
@Plugin({
pluginName: 'YoutubeVideoPlayer',
plugin: 'https://github.com/JonSmart/CordovaYoutubeVideoPlayer.git',
plugin: 'cordova-plugin-youtube-video-player',
pluginRef: 'YoutubeVideoPlayer',
repo: 'https://github.com/JonSmart/CordovaYoutubeVideoPlayer',
repo: 'https://github.com/ihadeed/CordovaYoutubeVideoPlayer',
platforms: ['Android', 'iOS']
})
@Injectable()