一个intent包含的一组信息:
component name
action
data
category
extras---key-value---额外的数据
flags
第一种:
发送方:
Intent intent=new Intent(this,other.class); intent.putextras("other","123"); startactivity(intent)
接收方:
Intent intent=getIntent(); String value=intent.getStringExtra("other");
第二种:
发短信:
Uri uri=Uri.parse("other"); Intent intent=new Intent(Intent.action_sendto,uri); intent.putextra("sms_body","the snsn"); startactivity(intent);
Integer.parseInt(String)就是将String字符类型数据转换为Integer整型数据
显示在页面的int类行要加+""