Coder Social home page Coder Social logo

gdbwarez / cordova-sharingreceptor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stample/cordova-sharingreceptor

0.0 2.0 0.0 7 KB

A cordova plugin that permits to receive data sent from other applications (like urls, images...)

License: MIT License

Java 97.33% JavaScript 2.67%

cordova-sharingreceptor's Introduction

cordova-sharingreceptor

A cordova plugin that permits to receive data sent from other applications (like urls, images...) It handles cases where app is started or resumed.

This is for doc purpose, you should customize this plugin for your needs because currently I only made it work to share browser urls (like a clipper)

For iOS, it is harder but achievable!

Usage:

cordova.SharingReceptor.listen(function(data) {
    // do something
});

Android

Listens for data of intents SEND / SEND_MULIPLE. Intent filters have been set to receive data of any mime type (better solution exists?)

The data contains the intent name and the intent extras.

Here is an example of data that is send when sharing a web page with Chrome:

{  
   "intent":{  
      "action":"android.intent.action.SEND",
      "extras":{  
         "android.intent.extra.TEXT":"http:\/\/www.conforama.fr\/",
         "android.intent.extra.SUBJECT":"Meuble, cuisine, décoration, électroménager, image et son, informatique : Conforama, c'est bon de changer - Conforama"
      }
   },
   "platform":"android"
}

Notes

It is initially inspired by (cordova-webintent)[https://github.com/Initsogar/cordova-webintent] plugin but simpler. This Android-only plugin is now unmaintained and has a larger goal than this plugin.

Licence: MIT

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.