android跳转之短信浏览器拨打电话界面

 Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:1555656****"));
	intent.putExtra("sms_body", "编辑短信内容 !!");
	startActivity(intent);

     这段代码简单明了,需要用到的朋友一试便知。号码跟内容就不用备注了.



Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.******.com"));
			startActivity(intent);
			//浏览器也是这么简单,一个网址搞定,就不多讲了,玩这个的人讲究的是实用


Intent intent = new Intent(Intent.ACTION_DIAL);
			intent.setData(Uri.parse("tel:187*****750"));
			intent.addCategory(Intent.CATEGORY_DEFAULT);
			startActivity(intent);
从此打电话也不再是难题


Intent intent = new Intent();
			intent.setAction("android.intent.action.CALL_BUTTON");
			startActivity(intent);
此代码一样可以打电话,就是无法把号码传过去


Intent intent = new Intent();
			intent.setComponent(new ComponentName("com.chengxl.demo",
					"com.chengxl.demo.IntentDemo"));
			intent.putExtra("str", "大米");
			startActivity(intent);
跳转到自己的程序,两个参数,前一个是包名,后一个是主activity的名。加个一个信息来知道是跳转了。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值