Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

share image through Android intent

$
0
0

Now i wont to share image through android intent but every time i try to share doesn't shown correctly and on facebook share through intent doesn't wont to attach it

var shareImage = function(image) {
    var file = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, 'image.png');
    var B = file.read();
    alert(B);
    alert(B.nativePath);
 
    var shareIntent = Ti.Android.createIntent({
        action : Ti.Android.ACTION_SEND,
        type : "image/jpeg"
    });
    shareIntent.putExtraUri(Ti.Android.EXTRA_STREAM, B.nativePath);
    Ti.Android.currentActivity.startActivity(Ti.Android.createIntentChooser(shareIntent, "Share image"));
};

Viewing all articles
Browse latest Browse all 7655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>