2013-08-16 23 views
-1

我正在开发一个移动应用程序,我需要一个意图。钛股份与页面链接意向

目标是与图像共享链接。 像这个例子:

enter image description here

有一种方法,使之?

因为只有“text/plain”类型,我不知道如何放置图像!

我正在用Titanium(Javascript)开发应用程序,但也欢迎Java(Android)示例!

谢谢大家!

回答

0

你试过这个吗? http://developer.appcelerator.com/question/149385/sharing-image-via-androidintent

var file = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory,'viaInstaCheckIn.jpeg'); 
var B = file.read(); 

var shareIntent = Ti.Android.createIntent({ 
    action: Ti.Android.ACTION_SEND, 
    type: "image/jpeg" 
}); 

shareIntent.putExtra(Ti.Android.EXTRA_TITLE, "Photo via fb.com/InstaCheckInHD"); 
shareIntent.putExtra(Ti.Android.EXTRA_TEXT, "Photo By @InstaCheckInHD"); 
shareIntent.putExtraUri(Ti.Android.EXTRA_STREAM, B.nativePath); 
Ti.Android.currentActivity.startActivity(Ti.Android.createIntentChooser(shareIntent, "Share image")); 
0

我对你想要做什么感到有点困惑。什么是共享链接,以及什么?外部链接将打开你的应用程序?你的应用需要启动另一个应用?请详细说明...