mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-27 00:00:05 +08:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdffb055be | ||
|
|
d0c680fe3a | ||
|
|
5cd719d272 | ||
|
|
9c88cfb577 | ||
|
|
fa047d2171 | ||
|
|
3154fea2b9 | ||
|
|
7b069a3e58 | ||
|
|
602f14771c | ||
|
|
396bce1710 | ||
|
|
82d2ae8c4d | ||
|
|
0c9eb8e1dd | ||
|
|
3830de5d69 | ||
|
|
ec0e1ff3a1 | ||
|
|
5d35434866 | ||
|
|
016f174b53 | ||
|
|
997f7a03aa | ||
|
|
5bf1cbeba3 | ||
|
|
7e174b6e3a | ||
|
|
b52328c07b | ||
|
|
cb0a3664fd | ||
|
|
5be6a155e6 | ||
|
|
2e93c50b7d | ||
|
|
f122a14445 | ||
|
|
53f4ae8e6b | ||
|
|
073535102b | ||
|
|
5001b9bd25 | ||
|
|
3d5b9e71a5 | ||
|
|
fe3e31d580 | ||
|
|
da109514ae |
25
CHANGELOG.md
25
CHANGELOG.md
@@ -1,3 +1,28 @@
|
||||
<a name="3.2.0"></a>
|
||||
# [3.2.0](https://github.com/driftyco/ionic-native/compare/v3.1.1...v3.2.0) (2017-03-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **media-plugin:** MediaPlugin.create promise never fires (#1220) ([82d2ae8](https://github.com/driftyco/ionic-native/commit/82d2ae8))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **jins-meme:** add support for jins meme smart glasses (#1212) ([9c88cfb](https://github.com/driftyco/ionic-native/commit/9c88cfb))
|
||||
|
||||
|
||||
|
||||
<a name="3.1.1"></a>
|
||||
## [3.1.1](https://github.com/driftyco/ionic-native/compare/v3.1.0...v3.1.1) (2017-03-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **media-plugin:** export MediaPlugin class ([cb0a366](https://github.com/driftyco/ionic-native/commit/cb0a366)), closes [#1207](https://github.com/driftyco/ionic-native/issues/1207)
|
||||
|
||||
|
||||
|
||||
<a name="3.1.0"></a>
|
||||
# [3.1.0](https://github.com/driftyco/ionic-native/compare/v2.9.0...v3.1.0) (2017-03-20)
|
||||
|
||||
|
||||
136
README.md
136
README.md
@@ -8,6 +8,8 @@
|
||||
|
||||
Ionic Native is a curated set of wrappers for Cordova plugins that make adding any native functionality you need to your [Ionic 2](http://ionicframework.com/) mobile app easy.
|
||||
|
||||
Ionic Native wraps plugin callbacks in a Promise or Observable, providing a common interface for all plugins and making it easy to use plugins with Angular change detection.
|
||||
|
||||
## Installation
|
||||
|
||||
Run following command to install Ionic Native in your project.
|
||||
@@ -15,52 +17,151 @@ Run following command to install Ionic Native in your project.
|
||||
npm install @ionic-native/core --save
|
||||
```
|
||||
|
||||
You also need to install the Ionic Native package for each plugin you want to add. Please see the Ionic Native documentation for complete instructions on how to add and use the plugins.
|
||||
You also need to install the Ionic Native package for each plugin you want to add. Please see the [Ionic Native documentation](http://ionicframework.com/docs/v2/native/) for complete instructions on how to add and use the plugins.
|
||||
|
||||
## Documentation
|
||||
|
||||
For the full Ionic Native documentation, please visit [http://ionicframework.com/docs/v2/native/](http://ionicframework.com/docs/v2/native/).
|
||||
|
||||
### Promises and Observables
|
||||
### Basic Usage
|
||||
|
||||
Ionic Native wraps plugin callbacks in a Promise or [Observable](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754), providing a common interface for all plugins and ensuring that native events trigger change detection in Angular 2.
|
||||
To use a plugin, import and add the plugin provider to your `@NgModule`, and then inject it where you wish to use it.
|
||||
|
||||
```typescript
|
||||
// app.module.ts
|
||||
import { Camera } from '@ionic-native/camera';
|
||||
|
||||
...
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
|
||||
providers: [
|
||||
...
|
||||
Camera
|
||||
...
|
||||
]
|
||||
...
|
||||
})
|
||||
export class AppModule { }
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { Geolocation } from '@ionic-native/geolocation';
|
||||
import { Platform } from 'ionic-angular';
|
||||
|
||||
import { NgZone } from '@angular/core';
|
||||
|
||||
@Component({ ... })
|
||||
export class MyComponent {
|
||||
|
||||
constructor(private geolocation: Geolocation, private platform: Platform) {
|
||||
|
||||
constructor(private geolocation: Geolocation, private platform: Platform, private ngZone: NgZone) {
|
||||
|
||||
platform.ready().then(() => {
|
||||
|
||||
|
||||
// get position
|
||||
geolocation.getCurrentPosition().then(pos => {
|
||||
|
||||
|
||||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// watch position
|
||||
const watch = geolocation.watchPosition().subscribe(pos => {
|
||||
|
||||
|
||||
console.log(`lat: ${pos.coords.latitude}, lon: ${pos.coords.longitude}`)
|
||||
|
||||
|
||||
// Currently, observables from Ionic Native plugins
|
||||
// need to run inside of zone to trigger change detection
|
||||
ngZone.run(() => {
|
||||
this.position = pos;
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
|
||||
// to stop watching
|
||||
watch.unsubscribe();
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### Mocking and Browser Development
|
||||
|
||||
Ionic Native 3.x makes it possible to mock plugins and develop nearly the entirety of your app in the browser or in `ionic serve`.
|
||||
|
||||
To do this, you need to provide a mock implementation of the plugins you wish to use. Here's an example of mocking the `Camera` plugin to return a stock image while in development:
|
||||
|
||||
First import the `Camera` class in your `src/app/app.module.ts` file:
|
||||
|
||||
```ts
|
||||
import { Camera } from '@ionic-native/camera';
|
||||
```
|
||||
|
||||
Then create a new class that extends the `Camera` class with a mock implementation:
|
||||
|
||||
```ts
|
||||
class CameraMock extends Camera {
|
||||
getPicture(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve("BASE_64_ENCODED_DATA_GOES_HERE");
|
||||
})
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Finally, override the previous `Camera` class in your `providers` for this module:
|
||||
|
||||
```ts
|
||||
providers: [
|
||||
{ provide: Camera, useClass: CameraMock }
|
||||
]
|
||||
```
|
||||
|
||||
Here's the full example:
|
||||
|
||||
```ts
|
||||
import { NgModule, ErrorHandler } from '@angular/core';
|
||||
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
|
||||
import { MyApp } from './app.component';
|
||||
import { HomePage } from '../pages/home/home';
|
||||
|
||||
import { Camera } from '@ionic-native/camera';
|
||||
|
||||
class CameraMock extends Camera {
|
||||
getPicture(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve("BASE_64_ENCODED_DATA_GOES_HERE");
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
MyApp,
|
||||
HomePage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(MyApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
MyApp,
|
||||
HomePage
|
||||
],
|
||||
providers: [
|
||||
{provide: ErrorHandler, useClass: IonicErrorHandler},
|
||||
{ provide: Camera, useClass: CameraMock }
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
```
|
||||
|
||||
|
||||
### Runtime Diagnostics
|
||||
|
||||
Spent way too long diagnosing an issue only to realize a plugin wasn't firing or installed? Ionic Native lets you know what the issue is and how you can resolve it.
|
||||
@@ -71,6 +172,9 @@ Spent way too long diagnosing an issue only to realize a plugin wasn't firing or
|
||||
## Plugin Missing?
|
||||
Let us know or submit a PR! Take a look at [the Developer Guide](https://github.com/driftyco/ionic-native/blob/master/DEVELOPER.md) for more on how to contribute. :heart:
|
||||
|
||||
## Ionic 1/Angular 1 support
|
||||
|
||||
Ionic Native 3.x supports Ionic 2.x and above. For Ionic/Angular 1 support, please use version 2 of Ionic Native. See the [2.x README](https://github.com/driftyco/ionic-native/blob/8cd648db5cddd7bdbe2bd78839b19c620cc8c04c/README.md) for usage information.
|
||||
|
||||
# Credits
|
||||
|
||||
@@ -78,6 +182,8 @@ Ibby Hadeed - [@ihadeed](http://github.com/ihadeed)
|
||||
|
||||
Tim Lancina - [@timlancina](http://twitter.com/timlancina)
|
||||
|
||||
Mike Hartington - [@mhartington](https://twitter.com/mhartington)
|
||||
|
||||
Max Lynch - [@maxlynch](http://twitter.com/maxlynch)
|
||||
|
||||
Rob Wormald - [@robwormald](https://twitter.com/robwormald)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ionic-native",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -20,6 +20,7 @@ const ROOT = path.resolve(path.join(__dirname, '../../')), // root ionic-native
|
||||
// dependency versions
|
||||
const ANGULAR_VERSION = '2.4.8',
|
||||
RXJS_VERSION = '5.0.1',
|
||||
MIN_CORE_VERSION = '^3.1.0',
|
||||
IONIC_NATIVE_VERSION = require(path.resolve(ROOT, 'package.json')).version;
|
||||
|
||||
// package dependencies
|
||||
@@ -28,7 +29,7 @@ const CORE_PEER_DEPS = {
|
||||
};
|
||||
|
||||
const PLUGIN_PEER_DEPS = {
|
||||
'@ionic-native/core': IONIC_NATIVE_VERSION,
|
||||
'@ionic-native/core': MIN_CORE_VERSION,
|
||||
'@angular/core': ANGULAR_VERSION,
|
||||
'rxjs': RXJS_VERSION
|
||||
};
|
||||
|
||||
@@ -20,6 +20,7 @@ module.exports = function(currentVersion) {
|
||||
.processor(require('./processors/remove-private-members'))
|
||||
.processor(require('./processors/hide-private-api'))
|
||||
.processor(require('./processors/collect-inputs-outputs'))
|
||||
.processor(require('./processors/npm-id'))
|
||||
|
||||
// for debugging docs
|
||||
// .processor(function test(){
|
||||
|
||||
@@ -19,6 +19,7 @@ module.exports = function(currentVersion) {
|
||||
|
||||
// .processor(require('./processors/latest-version'))
|
||||
.processor(require('./processors/readmes'))
|
||||
.processor(require('./processors/npm-id'))
|
||||
.processor(require('./processors/remove-private-members'))
|
||||
.processor(require('./processors/hide-private-api'))
|
||||
// .processor(require('./processors/collect-inputs-outputs'))
|
||||
|
||||
25
scripts/docs/processors/npm-id.js
Normal file
25
scripts/docs/processors/npm-id.js
Normal file
@@ -0,0 +1,25 @@
|
||||
module.exports = function npmId(renderDocsProcessor) {
|
||||
return {
|
||||
name: 'npm-id',
|
||||
$runAfter: ['paths-computed'],
|
||||
$runBefore: ['rendering-docs'],
|
||||
$process: function(docs) {
|
||||
var currentVersion = renderDocsProcessor.extraData.version.current.name;
|
||||
|
||||
// pretty up and sort the docs object for menu generation
|
||||
docs = docs.filter(function(doc) {
|
||||
return (!!doc.name && !!doc.outputPath) || doc.docType === 'index-page';
|
||||
});
|
||||
|
||||
docs.forEach(function(doc, i) {
|
||||
doc.npmId = doc.outputPath.replace('/README.md', '') // for readmes
|
||||
.replace('@ionic-native/plugins/','') // for readmes
|
||||
.replace('content/docs/v2/native/', '') // for docs
|
||||
.replace('/index.md', ''); // for docs
|
||||
});
|
||||
|
||||
// returning docs will replace docs object in the next process
|
||||
return docs;
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports = function jekyll(renderDocsProcessor) {
|
||||
module.exports = function readmes(renderDocsProcessor) {
|
||||
return {
|
||||
name: 'readmes',
|
||||
description: 'Create jekyll includes',
|
||||
@@ -13,8 +13,6 @@ module.exports = function jekyll(renderDocsProcessor) {
|
||||
});
|
||||
|
||||
docs.forEach(function(doc, i) {
|
||||
doc.npmId = doc.outputPath.replace('/README.md', '')
|
||||
.replace('src/@ionic-native/plugins/','');
|
||||
doc.outputPath = doc.outputPath.replace('src/', '');
|
||||
});
|
||||
|
||||
|
||||
11
scripts/docs/templates/common.template.html
vendored
11
scripts/docs/templates/common.template.html
vendored
@@ -27,13 +27,13 @@ docType: "<$ doc.docType $>"
|
||||
<tr>
|
||||
<td>
|
||||
<$ param.name $>
|
||||
<@ if param.optional @><div><em>(optional)</em></div><@ endif @>
|
||||
</td>
|
||||
<td>
|
||||
<code><$ param.returnType | escape $></code>
|
||||
</td>
|
||||
<td>
|
||||
<$ param.description | marked $>
|
||||
<@ if param.optional @><strong class="tag">Optional</strong><@ endif @>
|
||||
</td>
|
||||
</tr>
|
||||
<@ endfor @>
|
||||
@@ -71,14 +71,14 @@ docType: "<$ doc.docType $>"
|
||||
<td>
|
||||
<$ param.name $>
|
||||
<@ if param.alias @>| <$ param.alias $><@ endif @>
|
||||
<@ if param.type.optional @><div><em>(optional)</em></div><@ endif @>
|
||||
</td>
|
||||
<td>
|
||||
<$ typeList(param.typeList) $>
|
||||
</td>
|
||||
<td>
|
||||
<$ param.description | marked $>
|
||||
<@ if param.default @><p><em>(default: <$ param.default $>)</em></p><@ endif @>
|
||||
<@ if param.optional @><strong class="tag">Optional</strong><@ endif @>
|
||||
<@ if param.defaultValue @><p><em>(default: <$ param.defaultValue $>)</em></p><@ endif @>
|
||||
</td>
|
||||
</tr>
|
||||
<@ endfor @>
|
||||
@@ -224,9 +224,8 @@ docType: "<$ doc.docType $>"
|
||||
</p>
|
||||
<@ endif @>
|
||||
|
||||
<pre><code>
|
||||
$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ prop.pluginRef $>
|
||||
<pre><code>$ <@ if prop.install @><$ prop.install $><@ else @>ionic plugin add <$ prop.plugin $><@ endif @>
|
||||
$ npm install --save @ionic-native/<$ doc.npmId $>
|
||||
</code></pre>
|
||||
<p>Repo:
|
||||
<a href="<$ prop.repo $>">
|
||||
|
||||
@@ -288,7 +288,7 @@ export interface BackgroundGeolocationConfig {
|
||||
* // IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,
|
||||
* // and the background-task may be completed. You must do this regardless if your HTTP request is successful or not.
|
||||
* // IF YOU DON'T, ios will CRASH YOUR APP for spending too much time in the background.
|
||||
* BackgroundGeolocation.finish(); // FOR IOS ONLY
|
||||
* this.backgroundGeolocation.finish(); // FOR IOS ONLY
|
||||
*
|
||||
* });
|
||||
*
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface DeeplinkMatch {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Ionic Deeplinks
|
||||
* @name Deeplinks
|
||||
* @description This plugin handles deeplinks on iOS and Android for both custom URL scheme links
|
||||
* and Universal App Links.
|
||||
*
|
||||
@@ -32,9 +32,9 @@ export interface DeeplinkMatch {
|
||||
* ```typescript
|
||||
* import { Deeplinks } from '@ionic-native/deeplinks';
|
||||
*
|
||||
* constructor(private deepLinks: DeepLinks) { }
|
||||
* constructor(private deeplinks: Deeplinks) { }
|
||||
*
|
||||
* this.deepLinks.route({
|
||||
* this.deeplinks.route({
|
||||
* '/about-us': AboutPage,
|
||||
* '/universal-links-test': AboutPage,
|
||||
* '/products/:productId': ProductPage
|
||||
@@ -53,7 +53,7 @@ export interface DeeplinkMatch {
|
||||
* the actual navigation for you:
|
||||
*
|
||||
* ```typescript
|
||||
* this.deepLinks.routeWithNavController(this.navController, {
|
||||
* this.deeplinks.routeWithNavController(this.navController, {
|
||||
* '/about-us': AboutPage,
|
||||
* '/products/:productId': ProductPage
|
||||
* }).subscribe((match) => {
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface FingerprintOptions {
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name FingerprintAIO
|
||||
* @name Fingerprint AIO
|
||||
* @description
|
||||
* Use simple fingerprint authentication on Android and iOS.
|
||||
* Requires Cordova plugin: cordova-plugin-fingerprint-aio. For more info about plugin, vist: https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio
|
||||
|
||||
@@ -122,15 +122,20 @@ export interface GeolocationOptions {
|
||||
* ```typescript
|
||||
* import { Geolocation } from '@ionic-native/geolocation';
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* Geolocation.getCurrentPosition().then((resp) => {
|
||||
* constructor(private geolocation: Geolocation) {}
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.geolocation.getCurrentPosition().then((resp) => {
|
||||
* // resp.coords.latitude
|
||||
* // resp.coords.longitude
|
||||
* }).catch((error) => {
|
||||
* console.log('Error getting location', error);
|
||||
* });
|
||||
*
|
||||
* let watch = Geolocation.watchPosition();
|
||||
* let watch = this.geolocation.watchPosition();
|
||||
* watch.subscribe((data) => {
|
||||
* // data can be a set of coordinates, or an error (if an error occurred).
|
||||
* // data.coords.latitude
|
||||
|
||||
158
src/@ionic-native/plugins/jins-meme/index.ts
Normal file
158
src/@ionic-native/plugins/jins-meme/index.ts
Normal file
@@ -0,0 +1,158 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, CordovaCheck } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
declare var cordova: any;
|
||||
|
||||
/**
|
||||
* @name Jins Meme
|
||||
* @description
|
||||
* Implementation of the JINS MEME SDK
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { JinsMeme } from '@ionic-native/jins-meme';
|
||||
*
|
||||
* constructor(private jinsMeme: JinsMeme) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* this.jinsMeme.setAppClientID(appClientId: string, clientSecret: string)
|
||||
* .then(this.jinsMeme.startScan())
|
||||
* .catch(console.log('jinsMeme.setAppClientID authentication error!'));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Jins Meme',
|
||||
plugin: 'JinsMemeSDK-Plugin-Cordova',
|
||||
pluginRef: 'cordova.plugins.JinsMemePlugin',
|
||||
repo: 'https://github.com/jins-meme/JinsMemeSDK-Plugin-Cordova.git'
|
||||
})
|
||||
@Injectable()
|
||||
export class JinsMeme {
|
||||
/**
|
||||
* Authentication and authorization of App and SDK.
|
||||
* Must call this method at first.
|
||||
*
|
||||
*@param {string} setAppClientID
|
||||
*@param {string} clientSecret
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setAppClientID(appClientId: string, clientSecret: string): Promise<any> { return; }
|
||||
/**
|
||||
* Starts scanning for JINS MEME.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
clearFunction: 'stopScan',
|
||||
clearWithArgs: true
|
||||
})
|
||||
startScan(): Observable<any> { return; }
|
||||
/**
|
||||
* Stops scanning JINS MEME.
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopScan(): Promise<any> { return; }
|
||||
/**
|
||||
* Establishes connection to JINS MEME.
|
||||
* @param {string} target
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@CordovaCheck({
|
||||
observable: true
|
||||
})
|
||||
connect(target: string): Observable<any> {
|
||||
return new Observable<any>((observer: any) => {
|
||||
let data = cordova.plugins.JinsMemePlugin.connect(target, observer.next.bind(observer), observer.complete.bind(observer), observer.error.bind(observer));
|
||||
return () => console.log(data);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Set auto connection mode.
|
||||
*@param {Boolean} flag
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
setAutoConnect(flag: boolean): Promise<any> { return; }
|
||||
/**
|
||||
* Returns whether a connection to JINS MEME has been established.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isConnected(): Promise<any> { return; }
|
||||
/**
|
||||
* Disconnects from JINS MEME.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
disconnect(): Promise<any> { return; }
|
||||
/**
|
||||
* Starts receiving realtime data.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
clearFunction: 'stopDataReport',
|
||||
clearWithArgs: true
|
||||
})
|
||||
startDataReport(): Observable<any> { return; }
|
||||
/**
|
||||
* Stops receiving data.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopDataReport(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns SDK version.
|
||||
*
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getSDKVersion(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns JINS MEME connected with other apps.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedByOthers(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns calibration status
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isCalibrated(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns device type.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedDeviceType(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns hardware version.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectedDeviceSubType(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns FW Version.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getFWVersion(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns HW Version.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
getHWVersion(): Promise<any> { return; }
|
||||
/**
|
||||
* Returns response about whether data was received or not.
|
||||
*@returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
isDataReceiving(): Promise<any> { return; }
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export type LinkedInLoginScopes = 'r_basicprofile' | 'r_emailaddress' | 'rw_comp
|
||||
*
|
||||
* @usage
|
||||
* ```
|
||||
* import { LinkedIn } from 'ionic-native';
|
||||
* import { LinkedIn } from '@ionic-native/linkedin';
|
||||
*
|
||||
* constructor(private linkedin: LinkedIn) { }
|
||||
*
|
||||
|
||||
@@ -14,7 +14,7 @@ export class MediaObject {
|
||||
* @param src {string} A URI containing the audio content.
|
||||
* @param onStatusUpdate {Function} A callback function to be invoked when the status of the file changes
|
||||
*/
|
||||
constructor(private _objectInstnace: any) {}
|
||||
constructor(private _objectInstance: any) {}
|
||||
|
||||
/**
|
||||
* Get the current amplitude of the current recording.
|
||||
@@ -201,7 +201,7 @@ export class MediaObject {
|
||||
pluginRef: 'Media'
|
||||
})
|
||||
@Injectable()
|
||||
class MediaPlugin {
|
||||
export class MediaPlugin {
|
||||
|
||||
// Constants
|
||||
/**
|
||||
@@ -256,7 +256,8 @@ class MediaPlugin {
|
||||
// Creates a new media object
|
||||
// Resolves with the media object
|
||||
// or rejects with the error
|
||||
const instance = new Media(src, () => resolve(new Media(instance)), reject, onStatusUpdate);
|
||||
const instance = new Media(src, resolve, reject, onStatusUpdate);
|
||||
return resolve(new MediaObject(instance));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -229,6 +229,8 @@ export type PushEvent = 'registration' | 'error' | 'notification';
|
||||
*
|
||||
* pushObject.on('notification').subscribe(notification => console.log('Received a notification', notification));
|
||||
*
|
||||
* pushObject.on('registration').subscribe(registration => console.log('Device registered', registration));
|
||||
*
|
||||
* pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
|
||||
*
|
||||
*
|
||||
|
||||
@@ -45,7 +45,7 @@ export interface SpeechRecognitionListeningOptionsAndroid {
|
||||
|
||||
/**
|
||||
* @beta
|
||||
* @name SpeechRecognition
|
||||
* @name Speech Recognition
|
||||
* @description
|
||||
* This plugin does speech recognition using cloud services
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Cordova, Plugin } from '@ionic-native/core';
|
||||
|
||||
|
||||
/**
|
||||
* @name SplashScreen
|
||||
* @name Splash Screen
|
||||
* @description This plugin displays and hides a splash screen during application launch. The methods below allows showing and hiding the splashscreen after the app has loaded.
|
||||
* @usage
|
||||
* ```typescript
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface TTSOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name TextToSpeech
|
||||
* @name Text To Speech
|
||||
* @description
|
||||
* Text to Speech plugin
|
||||
*
|
||||
|
||||
@@ -51,7 +51,7 @@ export interface ToastOptions {
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* thisoast.show("I'm a toast", '5000', 'center').subscribe(
|
||||
* this.toast.show("I'm a toast", '5000', 'center').subscribe(
|
||||
* toast => {
|
||||
* console.log(toast);
|
||||
* }
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface VideoOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @name VideoPlayer
|
||||
* @name Video Player
|
||||
* @description
|
||||
* A Codova plugin that simply allows you to immediately play a video in fullscreen mode.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user