本网页所有文字内容由 imapbox邮箱云存储,邮箱网盘, iurlBox网页地址收藏管理器 下载并得到。
ImapBox 邮箱网盘 工具地址: https://www.imapbox.com/download/ImapBox.5.5.1_Build20141205_CHS_Bit32.exe
PC6下载站地址:PC6下载站分流下载
本网页所有视频内容由 imoviebox边看边下-网页视频下载, iurlBox网页地址收藏管理器 下载并得到。
ImovieBox 网页视频 工具地址: https://www.imapbox.com/download/ImovieBox4.7.0_Build20141115_CHS.exe
本文章由: imapbox邮箱云存储,邮箱网盘,ImageBox 图片批量下载器,网页图片批量下载专家,网页图片批量下载器,获取到文章图片,imoviebox网页视频批量下载器,下载视频内容,为您提供.
android app中,我想从intentChooser 中抓取发送邮件的附件,以便知道是什么时候从sd卡中删除文件的时候 SHARE_INTENT 初始化如下 public static final int SHARE_INTENT = 2; 运行结果我得到的返回值是 144563 而不是预期的 4 ,why? 少了一段代码 super.onActivityResult(requestCode, resultCode, data). 原文地址:https://www.itmmd.com/201411/96.html
intentChooser 在下面的Fragment 中被调用
Intent intent =
new
Intent(Intent.ACTION_SEND);
intent.setType(
"message/rfc822"
);
intent.putExtra(Intent.EXTRA_EMAIL,
new
String[]{
"email"
});
intent.putExtra(Intent.EXTRA_SUBJECT,
"subject"
);
intent.putExtra(Intent.EXTRA_TEXT,
"body"
);
Uri uri = Uri.fromFile(file);
intent.putExtra(Intent.EXTRA_STREAM, uri);
startActivityForResult(Intent.createChooser(intent,
"Send..."
), Consts.SHARE_INTENT);
在下面的代码中我想获得返回结果
@Override
public
void
onActivityResult(
int
requestCode,
int
resultCode, Intent data) {
if
(requestCode == Consts.SHARE_INTENT) {
if
(resultCode == RESULT_OK) {
//do something
}
if
(resultCode == RESULT_CANCELED)
Toast.makeText(
this
,
"Share cancelled"
, Toast.LENGTH_SHORT).show();
}
}
处理方法
该文章由 萌萌的IT人 整理发布,转载须标明出处。
阅读和此文章类似的: 程序员专区