I try to share an file I downloaded. I put that file in the Ti.Filesystem.externalStorageDirectory
. The file is saved correctly since i can show it in an ImageView.image
.
Here's the code I use to start a android share intent: (apparently you can not use the file:// scheme with android API 24. See this post: stackoverflow)
filePath = filePath.replace('file','content');
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_SEND,
});
intent.putExtraUri(Ti.Android.EXTRA_STREAM, filePath);
$.FileList.activity.startActivity(intent);
What happens is, the share dialog opens, I choose the app I wish to share to, but then I get a notice there is nothing to share.
Screenshot of failed notification: