Merge branch 'master' into v5

This commit is contained in:
Daniel 2018-03-24 21:14:09 +01:00
commit 70f01fe528
3 changed files with 86 additions and 1 deletions

11
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,11 @@
# Contributor Code of Conduct
As contributors and maintainers of the Ionic project, we pledge to respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.
Communication through any of Ionic's channels (GitHub, Slack, Forum, IRC, mailing lists, Twitter, etc.) must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
We promise to extend courtesy and respect to everyone involved in this project regardless of gender, gender identity, sexual orientation, disability, age, race, ethnicity, religion, or level of experience. We expect anyone contributing to the Ionic project to do the same.
If any member of the community violates this code of conduct, the maintainers of the Ionic project may take action, removing issues, comments, and PRs or blocking accounts as deemed appropriate.
If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at [hi@ionicframework.com](mailto:hi@ionicframework.com).

View File

@ -158,7 +158,7 @@ export interface Player {
pluginRef: 'plugins.playGamesServices',
repo: 'https://github.com/artberri/cordova-plugin-play-games-services',
platforms: ['Android'],
install: 'ionic cordova plugin add cordova-plugin-play-games-service --variable APP_ID="YOUR_APP_ID',
install: 'ionic cordova plugin add cordova-plugin-play-games-services --variable APP_ID="YOUR_APP_ID',
})
@Injectable()
export class GooglePlayGamesServices extends IonicNativePlugin {

View File

@ -0,0 +1,74 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
export interface OpenALPROptions {
/** Country used for scanning the license plate */
country?: string;
/** Amount of results returned */
amount?: number;
}
export interface OpenALPRResult {
/** LicensePlate */
number: string;
/** Probability */
confidence: number;
}
/**
* @name OpenALPR
* @description
* This Cordova plugin adds support for the OpenALPR (Automatic License Plate Recognition) library, which provides support for retrieving the license plate from a picture.
*
* @usage
* ```typescript
* import { OpenALPR, OpenALPROptions, OpenALPRResult } from '@ionic-native/openalpr';
*
*
* constructor(private openALPR: OpenALPR) { }
*
* const scanOptions: OpenALPROptions = {
* country: this.openALPR.Country.EU,
* amount: 3
* }
*
* // To get imageData, you can use the @ionic-native/camera module for example. It works with DestinationType.FILE_URI and DATA_URL
*
* this.openALPR.scan(imageData, scanOptions)
* .then((res: [OpenALPRResult]) => console.log(res))
* .catch((error: Error) => console.error(error));
*
* ```
*/
@Plugin({
pluginName: 'OpenALPR',
plugin: 'cordova-plugin-openalpr',
pluginRef: 'cordova.plugins.OpenALPR',
repo: 'https://github.com/iMicknl/cordova-plugin-openalpr',
platforms: ['Android', 'iOS']
})
@Injectable()
export class OpenALPR extends IonicNativePlugin {
Country = {
AU: 'au',
BR: 'br',
BR2: 'br2',
EU: 'eu',
IN: 'in',
KR2: 'kr2',
US: 'us',
VN2: 'vn2'
};
/**
* This function does something
* @param imageData {any} Base64 encoding of the image data or the image file URI
* @param options {OpenALPROptions} Options to pass to the OpenALPR scanner
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova()
scan(imageData: any, options?: OpenALPROptions): Promise<any> {
return;
}
}