数据,我想分享的数据到我的应用程序在WhatsApp的一样: 入门共享图片和文字
当我在我自己的应用程序,我只得到文本(“退房尝试它。 ..“)。 如何获取其余的数据:图像,标题,描述和网站地址?
Intent intent = getIntent();
String action = intent.getAction();
String type = intent.getType();
if (Intent.ACTION_SEND.equals(action) && type != null) {
if ("text/plain".equals(type)) {
sharedText = intent.getStringExtra(Intent.EXTRA_TEXT);
} else if (type.startsWith("image/")) {
handleSendImage(intent); // Handle single image being sent
}
} else if (Intent.ACTION_SEND_MULTIPLE.equals(action) && type != null) {
if (type.startsWith("image/")) {
handleSendMultipleImages(intent);
}
}
我只用EXTRA_TEXT得到ACTION_SEND。
该图像是从您共享的链接追加的。 –
@KirankumarZinzuvadia所以我可以在后端采样链接并手动创建? – user1787773