Android:通过意图启动其他程序、Uri、setAction、setData、setDataAndType
Uri、setAction、setData通过按钮启动其他程序: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 //通过隐式意图启动其他程序 private void btn2Click() //浏览某个网页 { Intentintent= new Intent(); intent.setAction(Intent.ACTION_VIEW); Uridata=Uri.parse( "http://www.163.com" ); intent.setData(data); startActivity(intent); } private void btn1Click() //通过按钮启动拨号 { Intentintent= new Intent(); intent.setAction(Intent.ACTION_CALL); //自动拨号需要设置权限,CALL_PHONE //intent.setAction(Intent.ACTION_DIAL);//跳转到拨号界面 //Uri.fromFile(fi...