常用的调用系统资源方法.doc
上传人:sy****28 上传时间:2024-09-13 格式:DOC 页数:4 大小:33KB 金币:14 举报 版权申诉
预览加载中,请您耐心等待几秒...

常用的调用系统资源方法.doc

常用的调用系统资源方法.doc

预览

在线预览结束,喜欢就下载吧,查找使用更方便

14 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

标签:HYPERLINK"http://uni.sina.com.cn/c.php?t=blog&k=%BF%C6%BC%BC&ts=bpost&stype=tag"\t"_blank"科技HYPERLINK"http://uni.sina.com.cn/c.php?t=blog&k=%B6%E0%C3%BD%CC%E5%CE%C4%BC%FE&ts=bpost&stype=tag"\t"_blank"多媒体文件HYPERLINK"http://uni.sina.com.cn/c.php?t=blog&k=%D0%B6%D4%D8%B3%CC%D0%F2&ts=bpost&stype=tag"\t"_blank"卸载程序HYPERLINK"http://uni.sina.com.cn/c.php?t=blog&k=%B7%A2%CB%CD&ts=bpost&stype=tag"\t"_blank"发送HYPERLINK"http://uni.sina.com.cn/c.php?t=blog&k=%B5%D8%CD%BC%D7%F8%B1%EA&ts=bpost&stype=tag"\t"_blank"地图坐标HYPERLINK"http://uni.sina.com.cn/c.php?t=blog&k=%D4%D3%CC%B8&ts=bpost&stype=tag"\t"_blank"杂谈分类:HYPERLINK"http://blog.sina.com.cn/s/articlelist_1397263832_4_1.html"\t"_blank"Android1.显示网页Uriuri=Uri.parse("http://www.google.com");//网页地址Intentit=newIntent(Intent.ACTION_VIEW,uri);startActivity(it);2.显示地图:Uriuri=Uri.parse("geo:38.899533,-77.036476");//地图坐标Intentit=newIntent(Intent.Action_VIEW,uri);startActivity(it);3.路径规划:Uriuri=Uri.parse("http://maps.google.com/maps?f=dsaddr=startLatstartLng&daddr=endLatendLng&hl=en");Intentit=newIntent(Intent.ACTION_VIEW,URI);startActivity(it);4.拨打电话:(1)调用拨号程序Uriuri=Uri.parse("tel:xxxxxx");//xxxxxx代表所要拨打的电话号码Intentit=newIntent(Intent.ACTION_DIAL,uri);startActivity(it);(2)直接拨打号码Uriuri=Uri.parse("tel.xxxxxx");Intentit=newIntent(Intent.ACTION_CALL,uri);要使用这个必须在配置文件中加入5.发送SMS/MMS(1)调用发送短信的程序Intentit=newIntent(Intent.ACTION_VIEW);it.putExtra("sms_body","TheSMStext");//短信内容it.setType("vnd.android-dir/mms-sms");startActivity(it);(2)直接发送短信Uriuri=Uri.parse("smsto:0800000123");//接收短信的号码Intentit=newIntent(Intent.ACTION_SENDTO,uri);it.putExtra("sms_body","TheSMStext");startActivity(it);(3)发送彩信Uriuri=Uri.parse("content://media/external/images/media/23");//系统文件附件Intentit=newIntent(Intent.ACTION_SEND);it.putExtra("sms_body","sometext");//彩信内容it.putExtra(Intent.EXTRA_STREAM,uri);//添加附件it.setType("image/png");//附件类型startActivity(it);(4)发送附件Intentit=newIntent(Intent.ACTION_SEND);it.putExtra(Intent.EXTRA_SUBJECT,"Theemails