Question

Am building a gallery App in Sencha touch. All most all the work is done. Am planning to add a share button to all the images. I have seen this functionality in many apps. When they click the image it will list all the networking apps installed in phone (Whats App, Hike, Telegram etc..). By selecting Whats App, the image will posted to whats app. But am not sure how to achieve this functionality. Is there any share plugin available with Sencha touch. Please provide some guidance to achieve this functionality. Sorry I dint have much code to share.
enter image description here

{
                xtype:'image',
                cls:'winreologosmall',
                listeners: {
                    tap: function() {
                        try {
                            // will open share option 
                        } catch (err) {
                            // catch error
                        }
                    }
                }

}
Was it helpful?

Solution

If you are packaging with cordova (which you'll need for this kind of functionality), try this cordova plugin:

https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin

OTHER TIPS

You can use easily third party plugin for this.

Social Networking Plugin

You can use above plugin easily like to share pic on whats app on one button click -

<button onclick="window.plugins.socialsharing.shareViaWhatsApp('here path of your pic', null, null, console.log('share ok'), 
function(errormsg){
     alert(errormsg)
})">
msg via WhatsApp (with errcallback)
</button>

Refer above plugin you will get idea and examples on it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top