Giter Site home page Giter Site logo

danielsogl / awesome-cordova-plugins Goto Github PK

View Code? Open in Web Editor NEW
2.4K 105.0 2.4K 35.13 MB

Native features for mobile apps built with Cordova/PhoneGap and open web technologies. Complete with TypeScript support.

Home Page: https://danielsogl.gitbook.io/awesome-cordova-plugins/

License: Other

JavaScript 0.86% TypeScript 98.67% Shell 0.01% HTML 0.46%
ionic cordova angular cordova-plugin ionic-framework

awesome-cordova-plugins's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-cordova-plugins's Issues

Cordova File Transfer Plugin

I have a new application that I am working on using Ionic2 with Typescript. One of the requirements is offline video downloads. I would like to be able to use Ionic-Native to perform the download of the videos and saving on the device. Is this on the roadmap?

How to properly use ionic-native?

Hey,

I'm developing an Ionic 2 app and I'm struggling with ionic-native. Do I have to add the plugins on the CLI manually and call them with ionic-native or this is done automatically when downloading ionic-native?

When I try to use ionic-native without adding the plugin, I get an undefined when trying to access it. When I add the plugin, it won`t build.

Any docs that could assist me?

about ionic-native project

I find ionic2 removed direct references Cordova plugin method, ionic-native is the new solutions to used Cordova plugin for ionic2 ?

Discuss: A good way to implement instance based plugins

Many good plugins out there that we want to implement are instance based.

For example, look at the usage of the SQLite plugin:

// first we create a database object
var db = window.sqlitePlugin.openDatabase(....);

// then we call it's methods
db.executeSql(...);

Now if we were to wrap this plugin and add it to Ionic Native, we wouldn't really be improving anything since we can't wrap the internal (prototype) methods. Not being able to wrap these internal methods means that we still have to use callback functions. Therefore, the Angular 2 change detection will not be triggered.

So the purpose of this discussion to gather ideas on how we can approach these type of plugins in a better way.

All thoughts and suggestions are welcome!

Device plugin error

Hello!

I'm getting the following error while using Device plugin:
image

If I call it from window.device it works as expected. I have the import from 'ionic-native' at the top of my js file.
Is there anything I'm doing wrong?

Thanks!

Ionic/Angular 1 Demo

I've noticed there is a ng1demo folder in this repository which makes me believe that this plugin is supported in Angular 1. I believe maybe a folder was omitted when being checked in as I am unable to see where the js/bundle.js gets generated from which I assume would have the code example for how to correctly import this plugin in an Angular 1 application. Is there official support for Ionic/Angular 1 applications so that we can attempt to bridge the gap between Ionic 1 and Ionic 2 a bit more?

background-geolocation

I would love to migrate our app to ionic2 but this could not be done without this plugin.

Support using ionic-native as a library when implementing a custom Cordova plugin?

I like your @Plugin and @Cordova decorators!

Would it make sense to let them be importable into another project?

Use-case: niche Cordova-plugins built with Cordova-style callbacks, where it wouldn’t make sense to bundle their Promise-enabling TypeScript wrappers in ionic-native due to them being obscure, private, app-specific, not-generally-useful, whatever, but where ionic-native’s conventions would still make a lot of sense.

This is actually quite seamless with npm and ES6 imports:

import {Plugin, Cordova} from 'ionic-native/src/plugins/plugin’;

...assuming:

npm install --save https://github.com/driftyco/ionic-native.git#1334f60b681fa5440174ca984d5a3a8b2d2814e6

No longer works with master though, due to this commit from a few days ago: 2330670

Google maps mobile sdk

There is no support for this, can you please add it.

It is so difficult to get mobile sdk up and running.

tutorial

Need how to install ionic-native on ionic2 app?

This should be on README.md

Add media plugin

Please add the media plugin, I notice that it's currently missing.

I am just starting on a fresh rewrite of my app using ionic v2 and it would be nice to do so with the media plugin through ionic native as I HD it through ngcordova before.

Format @Plugin annotation meta data

In one branch, I began pulling out data from the @Plugin annotation

3569e20

Only problem is that it outputs them as one giant string. Looks like we'll need a process or macro that will format things accordingly. I started some work on it but it ended up using some ugly regex to try and extract the data. Maybe it would be better to do this work in a process and create a new property on a single doc object?

@perrygovier you're our dgeni master, thoughts?

Typescript typings

Would it be possible to somehow either integrate or reference typings for various interfaces used by the plugins? It seems odd that (for example) the File plugin is using any to cover for many cases where types are known.

Documentations for developer falls severly short

The documentation for developer misses important components in how-to-start and how to test.
The documentation doesn't match the files I see in node_modules/ionic-native... how are those generated ?

There are many cordova plugins written by individuals that I want to use like the ones in Ionic-native. Unfortunately, the documentation here is not sufficient.

Feature Request: Email Composer Plugin

I would love to see the email composer as part of Ionic Native. We use it in several apps and I bet a lot of other companies do too. Super common use case to build a CSV of some data and let it be shared via email. This plugin works great for attachments.

http://ngcordova.com/docs/plugins/emailComposer/

Happy to help if you'll accept the PR. Gotta read through the code to see what's going on.

Thanks,
Dan

Discussion: Add event wrappers

Some plugins have events that the user can listen to. Some of them even depend on those events completely, such as battery status plugin:
https://github.com/driftyco/ionic-native/blob/master/src/plugins/batterystatus.ts#L33-L51

I thought we can add a new wrapper to the the cordova decorator. The plugin will basically wrap that event with an observable.

This:

  static onChange () : Observable<StatusObject> {
    return getEventObservable("batterylevel"); 
  }

FYI, The definition for getEventObservable() can be found here: https://github.com/driftyco/ionic-native/blob/master/src/plugins/batterystatus.ts#L72-L78

Will become this:

@Cordova({
  eventObservable: true,
  event: 'batterylevel'
})
static onChange () : Observable<StatusObject> { return } // return value will be overwritten by @Cordova decorator

unable to locate ionic-native module / missing dist in master

I recently updated the ionic-native module using npm install ionic-native --save and it updated to 1.0.10. But I noticed there's dist folder now missing which throws a lot of errors now while trying to locate this module and unable to find it finally.

cordova-plugin-file support

Hi,

I see that this plugin is not enabled (and not implemented in fact). So I'm trying to implement it myself, if I understand correctly, the ionic-native plugin is just a wrapper of the ngCordova plugin ? If not, it could be the reason why I can't make it working.

The plugin :

// src/plugins/file.ts
import {Plugin, Cordova} from './plugin';

@Plugin({
  plugin: 'cordova-plugin-file',
  pluginRef: 'cordova.file'
})
export class File {
  @Cordova()
  static getFreeDiskSpace(): Promise<any> { return }
}

How I call it :

// myService.ts
import {Injectable} from 'angular2/core';
import {Storage, Platform} from 'ionic-angular';

import {File} from 'ionic-native';


@Injectable()
export class StorageService {

  constructor(private platform: Platform) {
  }

  getFreeDiskSpace(path: string, directory: string) {
    this.platform.ready().then(() => {
      File.getFreeDiskSpace(path, directory).then(result => {
        console.log(result);
      }, err => {
        console.log(err);
      });
    });
  }
}

I have an error on line 100 in plugins.ts return get(window, pluginObj.pluginRef)[methodName].apply(pluginInstance, args); If I enable the console.log just before this line, it's the call on File.getFreeDiskSpace with the arguments. But there is no indication on what's wrong.

Just to be sure, to test the package, you do npm run-script build_bundle then you install the package like this npm install path/to/my/local/package from the ionic project ?

Can I have some help or maybe this will be implemented soon ?

launch navigator use old api v2 instead of v3

Hello

LN throws error using ionic-native

launchnavigator.navigate() called using deprecated v2 API signature. Please update to use v3 API signature as deprecated API support will be removed in a future version

I think that is a problem using ionic native?

Cordova CLI: 6.1.0 (cordova-lib@undefined)
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.22
Ionic App Lib Version: 2.0.0-beta.12
ios-deploy version: 1.8.5
ios-sim version: 5.0.7
OS: Mac OS X El Capitan
Node Version: v5.7.0
Xcode version: Xcode 7.3 Build version 7D175

cordova-plugin-actionsheet 2.2.2 "ActionSheet"
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-splashscreen 3.2.1 "Splashscreen"
cordova-plugin-statusbar 2.1.2 "StatusBar"
cordova-plugin-whitelist 1.2.1 "Whitelist"
ionic-plugin-keyboard 2.0.1 "Keyboard"
uk.co.workingedge.phonegap.plugin.launchnavigator 3.0.0 "Launch Navigator"

regards

peter

Discussion: Adding @platforms parameter to docs

Many cordova plugins work only on specific platforms. Some even have platform specific functions.

It would be helpful to add a processor for @platforms parameter to docs generation process ..

Example:

/**
 * @name Base64 To Gallery
 * @description This plugin allows you to save base64 data as a png image into the device
 * @platforms Android, iOS, Windows Phone
 * @usage
 * ```ts
 * Base64ToGallery.base64ToGallery(base64Data, 'img_').then(
 *   res => console.log("Saved image to gallery ", res),
 *   err => console.log("Error saving image to gallery ", err)
 * );
 * ```
 */

Should output the following in docs:

Base64 To Gallery

This plugin allows you to save base64 data as a png image into the device

Platforms supported: Android, iOS, Windows Phone

Usage

Base64ToGallery.base64ToGallery(base64Data, 'img_').then(
  res => console.log("Saved image to gallery ", res),
  err => console.log("Error saving image to gallery ", err)
);

Discuss: Replace implicit return type with explicit and void return?

Right now many of the wrapper functions return something along the lines of:

    // This Promise is replaced by one from the @Cordova decorator that wraps
    // the plugin's callbacks. We provide a dummy one here so TypeScript
    // knows that the correct return type is Promise, because there's no way
    // for it to know the return type from a decorator.
    // See https://github.com/Microsoft/TypeScript/issues/4881
    return new Promise<any>((res, rej) => {});

With the intention to reduce confusion about the decorator magic that is happening to change the return type. But I'm wondering if we just add the return type and a void return, so each wrapper looks more like an interface:

  @Cordova()
  static show(options?: {
    buttonLabels: string[],
    title?: string,
    androidTheme?: number,
    androidEnableCancelButton?: boolean,
    winphoneEnableCancelButton?: boolean,
    addCancelButtonWithLabel?: string,
    addDestructiveButtonWithLabel?: string,
    position?: number[]
  }) : Promise<any> { return }


  /**
   * Hide the ActionSheet.
   */
  @Cordova()
  static hide() : Promise<any> { return }

Seems a bit cleaner, @ihadeed thoughts?

getLoginStatus in Facebook plugin does not work

The getLoginStatus method for the Facebook Connect plugin does not work, however other methods (login, logout, api) do work.

Steps to Reproduce:

  1. Generate new project
  2. Set up Ionic Native npm install ionic-native --save
  3. Set up application on developers.facebook.com
  4. Install Facebook connect plugin: ionic plugin add cordova-plugin-facebook4 --variable APP_ID="AppId" --variable APP_NAME="AppName"
  5. Import 'Facebook' and access getLoginStatus method.

Results in the promise rejecting with:

{error: "plugin_not_installed"}

and warnings:

[Warning] Native: tried calling Facebook.getLoginStatus, but the Facebook plugin is not installed. (app.bundle.js, line 63314)
[Warning] Install the Facebook plugin: 'cordova plugin add cordova-plugin-facebook4' (app.bundle.js, line 63319)

Plugins Installed:

cordova-plugin-facebook4 1.6.3 "Facebook Connect"
cordova-plugin-inappbrowser 1.2.1 "InAppBrowser"
cordova-sqlite-storage 0.8.4-dev "Cordova sqlite storage plugin (core version)"
Your system information:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.8.11
Gulp local:   Local version 3.9.1
Ionic Version: 2.0.0-beta.2
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
ios-deploy version: 1.8.5
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v4.2.2
Xcode version: Xcode 7.2 Build version 7C68

Omission in Native Facebook Plugin Docs

From @xthilakx on March 28, 2016 6:19

Short description of the problem:

Facebook Native docs in Ionic v2 documentation has a minor omission that causes some confusion.

What behavior are you expecting?

App Name, and App ID must be passed while installing cordova-plugin-facebook4 plugin, but the documentation does not mention it.

ionic plugin add cordova-plugin-facebook4

should be

ionic plugin add cordova-plugin-facebook4 --variable APP_ID="123456789" --variable APP_NAME="myApplication"

Which Ionic Version? 1.x or 2.x
2.x

Copied from original issue: ionic-team/ionic-framework#5961

Are you accepting contributions?

Hi there,

I'm currently working on my own library that gives me functionality similar to ngCordova for Ionic 2 ... Just simplifying plugin calls.

I thought I could help build Ionic-native instead of building my own thing and I was wondering if you are accepting contributions to this repository at the moment?

Toast new 2.4 styling option attribute is not handled by the native wrapper

Hi, since v 2.4 the Toast Plugin support a styling attribute in the option object passed to the showWithOptions method. Please update the ionic wrapper with it (just an update to the ToasterOption class)

Styling

Since version 2.4.0 you can pass an optional styling object to the plugin. The defaults make sure the Toast looks the same as when you would not pass in the styling object at all.

Option to wait for device ready event on "@Cordova"-decorator

Shouldn't all plugin-calls wait for the device-ready-promise to be fulfilled?

Or could we at least have an option to delay plugin-calls until the device is ready?

import {Plugin, Cordova} from 'ionic-native';
...
export class Test{
    @Cordova(onDeviceReady:true)
    static startTrackerWithId(id:string): Promise<any> { return }
}

Docs: Display interfaces

Many plugins have interfaces to define an object parameter of a method

It would be nice to have these interfaces visible in the ionic-native docs to make it easier for people to learn the usage.

image

@tlancina

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.