문제

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
                        }
                    }
                }

}
도움이 되었습니까?

해결책

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top