1)两种意图(intent):
【1】开启自己应用的界面用显示意图
【2】开启其他应用(系统应用)的时候用隐示意图 例如电话拨号器
【3】显示意图更安全
1.隐示意图:
定义:通过指定一组动作或者数据
意图过滤器<intent-filter>可以有多个,只要匹配上一个意图过滤器<intent-filter>就可以
//设置意图
Intent intent = new Intent();
//设置跳转动作
intent.setAction("tlb");
//设置Category
intent.addCategory("android.intent.category.DEFAULT");
// //设置数据
// intent.setData(Uri.parse("tlb:"+110));
// //设置数据类型
// intent.setType("aa/bb");
//注意:如果setData和setType一起使用 应该用下面这个方法
intent.setDataAndType(Uri.parse("tlb:" + 110), "aa/bb");
startActivity(intent);
2.显示意图:
定义:通过指定具体的包名和类名