Android Apps

Share this to

Related Posts

32 Comments

  1. JosephSep 15, 2012 at 1:27 pmReply

    Can we use this for phonegap iphone app

    • adminOct 8, 2012 at 11:56 amReplyAuthor

      We cannot user this for Iphone. We have to write another plugin for this.

      • mounuNov 4, 2012 at 12:24 pmReply

        Hi,

        1. This is not working with phonegap 2.1.0. please update this
        2. The above example is not explaining about twitter share.
        3. your code has some deprecated methods.

        Please fix these. i need it badly

        • adminNov 14, 2012 at 5:52 pmReplyAuthor

          Will update the fix soon.

  2. ArifSep 17, 2012 at 6:10 amReply

    Thank you for this Article but at the end from Step:5 please advice me how to go further steps its not clear for me.

    help needed*

    Thanks in Advance

    • adminOct 8, 2012 at 11:57 amReplyAuthor

      Do you still have the issue ? Sorry for the delay

  3. HarshOct 11, 2012 at 6:59 amReply

    Hi,

    I am a newbee, can you send me the sample code to show it working.

  4. AnamikaOct 15, 2012 at 9:49 amReply

    Can you please elaborate after step:4.? If possible can you provide a demo?

  5. AnamikaOct 15, 2012 at 9:51 amReply

    can you please elaborate after step:4? Also could you please provide a demo

  6. NAYFOct 28, 2012 at 8:31 pmReply

    Thanks for the tutorial and the plugin. I can’t wait to try it out. Have you tried this with Cordova 2.1.0? I’ve been working with phonegap and xcode for a while and I’m trying to move my code to eclipse and work on an android version of my app. So I’m not sure if I’m just adding the files to eclipse incorrectly of if there’s a compatibility problem with the new release.

    Here’s what I did:
    1.) Created a package under appname> src>… as in your step 1.
    2.) Dragged the java file into the new package in the Eclipse window and told it to copy the file rather than link.
    3.) Added the plugin line in your step three to the plugins list in the config.xml file.
    4.) Added a source reference to the top of my index.html file and placed the javascript file in the corresponding location.
    5.) Added the deviceready function to the script in the of my index.html file.

    But eclipse doesn’t like it. I get the following error list…

    *ctx cannot be resolved or is not a field; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 65; Java Problem
    *ctx cannot be resolved or is not a field; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 76; Java Problem
    *ctx cannot be resolved or is not a field; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 85; Java Problem
    *Plugin cannot be resolved to a type; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 15; Java Problem
    *Plugin cannot be resolved to a type; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 65; Java Problem
    *PluginResult cannot be resolved to a type; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 21; Java Problem
    *PluginResult cannot be resolved to a type; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 50; Java Problem
    *PluginResult cannot be resolved to a type; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 54; Java Problem
    *PluginResult cannot be resolved to a type; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 54; Java Problem
    *PluginResult cannot be resolved to a type; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 101; Java Problem
    *PluginResult cannot be resolved to a variable; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 50; Java Problem
    *PluginResult cannot be resolved to a variable; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 54; Java Problem
    *PluginResult cannot be resolved to a variable; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 101; Java Problem
    *The import com.phonegap.api cannot be resolved; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 12; Java Problem
    *The import com.phonegap.api cannot be resolved; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 13; Java Problem
    *The method execute(String, JSONArray, String) of type ShareSocial must override a superclass method; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 21; Java Problem
    *The method onActivityResult(int, int, Intent) of type ShareSocial must override a superclass method; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 91; Java Problem
    *The method success(PluginResult, String) is undefined for the type ShareSocial; ShareSocial.java; /U-mound 002/src/com/phonegap/plugins/ShareSocial; line 101; Java Problem
    *The import android.app.Activity is never used; UMound.java; /U-mound 002/src/us/eguides/umound002; line 4; Java Problem

  7. mounuNov 5, 2012 at 4:58 amReply

    Hi sarath,

    1. In the above twitter functionality is not implemented.

    2. There is a typo in the above facebook share code
    window.plugins.SendSms.social —-> (should be)window.plugins.ShareSocial.social

    3. As it is developed for phonegap 1.9, it has some deprecated methods to be used in the version phonegap 2.1.0,

    ctx.startActivity() —-> cordova.getActivity().startActivity()
    this.ctx.startActivityForResult —-> this.cordova.startActivityForResult
    com.phonegap —-> org.apache.cordova

    I have done all the above updates, now all my errors are gone but still nothing is happening when i click on the buttons email, sms, facebook( i correctly implemented the javascript click events for these buttons)

    could you please implement the same plugin for 2.1.0 post sample code to show how it is working.I need it badly ASAP.

  8. NiranNov 24, 2012 at 2:01 pmReply

    Thank you working fine with android…any updates on iphone?

    • adminNov 24, 2012 at 2:54 pmReplyAuthor

      Will update the iphone version this week ..

  9. NiranNov 26, 2012 at 5:32 amReply

    Oh.. Thank you.. i am eagerly waiting for iphone update. its really very useful for us, if we get this plugin in both android and iphone.. thank you

  10. Social Share plugin for Android Cordova 2.2.0 - Email, Sms ,Facebook Twitter shareNov 26, 2012 at 2:44 pmReply

    [...] is the continuation of old post Social share but it was working properly on older versions of phonegap. If you make some minor modification in [...]

  11. NiranDec 1, 2012 at 7:43 amReply

    Hi Sarath,

    I want to use share to social plugin in iphone. But i can’t able to find anywhere.. the android version of your’s looking good.. the same thing i want to implement in iphone.. i am not familiar with iphone native code to create this plugin.. can you please provide me any links or reference to create social plugin in iphone? i will try to create…

    Thanks,

  12. NiranDec 1, 2012 at 7:49 amReply

    Oh you already done that… really helped me… thank you so much…

    link for iphone plugin

    http://tech.sarathdr.com/featured/phonegap-share-plugin-for-iphone-share-facebook-twitter-email-and-sms

    • adminDec 2, 2012 at 12:02 amReplyAuthor

      Forgot to email you Niran

  13. nathiyaDec 13, 2012 at 10:17 amReply

    this plugin really helped me… thank you so much…but when i tried to share using facebook,it only share link not text. I want to share text with link.Is it possible? how to do that?

    for example I want to share :nathiya+” “+http://www.google.com

    • adminDec 13, 2012 at 10:37 amReplyAuthor

      Hi Nathiya, It will be tricky to share text in FB. You can not share text with this plugin instead you can set the text as og:description: in your destination url meta tag. So facebook will automatically fetch the copy from the url.

  14. nathiyaDec 13, 2012 at 11:04 amReply

    thanks for your reply.

    could you post the destination url with meta tag?

  15. nathiyaDec 13, 2012 at 11:48 amReply

    thanks .whether i need to create application in facebook using graph api and set the url and description for my site.

    How to change the url and description dynamically using meta tag?

  16. adminDec 13, 2012 at 11:52 amReplyAuthor

    When you share the url add some get parameter along with that you can print dynamic copies as per the parameter in the web page.

  17. nathiyaDec 13, 2012 at 12:16 pmReply

    I can’t understand . how to add get parameter with url?Could you provide some example?

    Please clear my doubts
    1.whether i need to create application in facebook using graph api and set the url and description for my site. or can i use the meta tag directly in my application?
    2.where should I add the meta tag in my application? whether in header tag in my html or any other place.
    3.If my url is http://www.google.com means how to add get parameter with that url?

  18. BhaiJan 4, 2013 at 12:05 pmReply

    Please could you provide sample demo….
    please…………………….

  19. MAYUR BALDHAJan 30, 2013 at 9:13 amReply

    Hi Sarath..

    I need to add share buttons as in yahoo in app.. where my video link should appear in tweet / fb post..
    and it should give email to the user’s email id..

    did not got u for Share options ..

    and u didn’t mentioned in phonegap-share.zip about permissions also..

  20. muhsinAug 28, 2013 at 5:33 amReply

    Hi, am using cordova 2.7
    i was getting some error in ShareSocial.java file, and i corrected some changes now it’s showing there is no error. But when i running the project nothing happening and i got some error in logcat
    Uncaught TypeError:Cannot read property ‘ShareSocial’ of undefined at file:///

    • adminAug 28, 2013 at 4:15 pmReplyAuthor

      Did you add the plugin class in config.yml file ?

  21. suhaibNov 17, 2013 at 8:11 pmReply

    where do I give sms number?

Leave a reply

Your email address will not be published. Required fields are marked *

*

About
View Sarath D R's profile on LinkedIn

I am a technology consultant and an entrepreneur focused on the following technologies Java,Spring, Android, Angular, Asterisk, Symfony, Cake , Code-Igniter, Jquery , XAMPP, XHTML, AJAX, MySql, Seo, Web Design, Wordpress, iPhone development.

Today’s Tips
  • Generate Codova.jar file from Phonegap project using ant
  • Google map javascript client  to find the geographic co-ordinates  from  Address or post code
  • Update Android main UI from Webview – Phonegap Plugin
  • Jplayer is not working  with HTC One Android 4.3 version browser
  • Regular expression to validate mobile phone numbers starting with + ( plus ) – php
  • Simple pagination script for PHP
  • Useful adb ( Android Debug Bridge ) commands
  • Change the javascript files url to absolute url – Symfony 1.4
  • Set Http authentication header from Client – PHP / CURL

This site uses cookies from Google to deliver its services, to personalise ads and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.This site also uses cookies from Google to deliver its services, to personalise ads and to analyse traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies.

Close