android6.0代码安装apk失败!
发布网友
发布时间:2022-09-08 06:04
我来回答
共1个回答
热心网友
时间:2023-08-20 17:25
1.从google搜索内容
Intent intent = new Intent();
intent.setAction(Intent.ACTION_WEB_SEARCH);
intent.putExtra(SearchManager.QUERY,”searchString”)
startActivity(intent);
2.浏览网页
Uri uri = Uri.parse(“http://www.google.com”);
Intent it = new Intent(Intent.ACTION_VIEW,uri);
startActivity(it);
3.显示地图
Uri uri = Uri.parse(“geo:38.899533,-77.036476″);
Intent it = new Intent(Intent.Action_VIEW,uri);
startActivity(it);
4.路径规划
Uri uri = Uri.parse(“http://maps.google.com/maps?” +
“f=dsaddr=startLat startLng&daddr=endLat endLng&hl=en”);
Intent it = new Intent(Intent.ACTION_VIEW,URI);
startActivity(it);
5.拨打电话
Uri uri = Uri.parse(“tel:xxxxxx”);
Intent it = new Intent(Intent.ACTION_DIAL, uri);
startActivity(it);
需要添加权限<uses-permission id=”android.permission.CALL_PHONE” >
6.调用发短信的程序
Intent it = new Intent(Intent.ACTION_VIEW);
it.putExtra(“sms_body”, “The SMS text”);
it.setType(“vnd.android-dir/mms-sms”);
startActivity(it);