Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I am sharing my code which is working fine. Please refer <a href="https://github.com/phonegap/phonegap-plugins/tree/master/Android/Share" rel="nofollow noreferrer">This link</a> for share plugin functionality and follow below given steps.</p> <p>1- Place the JS file in the same folder of the MainActivity.java folder.</p> <p>2- Place the Js file in the www folder and add it to the index.html folder.</p> <p>3- Add the following line to the config.xml (if you are using new version of Phonegap) or plugins.xml (for old version of Phonegap):</p> <p></p> <p>4 - add html </p> <pre><code> &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="js/libs/cordova-2.0.0.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/libs/jq_min.js"&gt;&lt;/script&gt; &lt;script src="js/libs/share.js"&gt; &lt;/script&gt; &lt;script&gt; // Wait for Cordova to load // document.addEventListener("deviceready", onDeviceReady, false); // Cordova is ready // function onDeviceReady() { } //share plugin for update status function share(subject, text) { window.plugins.share.show({ subject: subject, text: text}, function() { alert("sent success");}, // Success function function() {alert('Share failed')} // Failure function ); }; //Send message on facebook $(document).ready(function() { $("button#sendFacebook").click(function(){ var txtsub = $("input#txtsub").attr("value"); var txtmsg = $("#txtmsg").val(); share(txtsub, txtmsg); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input id="txtsub" type="text" placeholder="Enter Subject" maxlength="20" required /&gt;&lt;br/&gt;&lt;br/&gt; &lt;textarea placeholder="Enter Message" id="txtmsg" rows="4" cols="25"&gt;&lt;/textarea&gt;&lt;br/&gt; &lt;button id="sendFacebook"&gt;Update Status &lt;/button&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and test this plugin for Face book,twitter,gmail etc. &amp; enjoy :). </p> <p>Let me know if you have any query. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload