android intent
来源:互联网 发布:斯芬克 知乎 编辑:程序博客网 时间:2024/06/07 07:14
隐式Intent 的action 匹配 只需要一个满足条件即可
category 必须全部符合条件 必须加上
> data 匹配规则类似于action满足一个条件即可。
每一个通过 startActivity() 方法发出的隐式 Intent 都至少有一个 category,就是 “android.intent.category.DEFAULT”,所以只要是想接收一个隐式 Intent 的 Activity 都应该包括 “android.intent.category.DEFAULT” category,不然将导致 Intent 匹配失败。
<activity android:name=".Main3Activity" android:launchMode="singleTask" android:taskAffinity="com.allen.androidtest.task1" android:label="@string/title_activity_main3" > <intent-filter> <action android:name="com.allen.test"></action> <category android:name="android.intent.category.DEFAULT"></category> <category android:name="com.category.c"></category> </intent-filter></activity>
Intent intent = new Intent("com.allen.test");intent.addCategory("com.category.c");startActivity(intent);
0 0
- Android intent intent-filter
- Android intent intent-filter
- Android intent intent-filter
- Android intent
- Android Intent
- Android Intent
- android Intent
- android intent
- android intent
- android intent
- Android------Intent
- android Intent
- Android Intent
- android intent
- Android Intent
- android intent
- Android Intent
- android --------intent
- extract用法
- 线程等待的几种方式
- iOS 开发之 菜单栏UITabBarController
- 删除表空间报错ORA-00604&ORA-02429解决过程
- Android View坐标getLeft, getRight, getTop, getBottom解惑
- android intent
- 播放视频VideoView和SurfaceView(它是父类)(查看api)(更高级的查看vitamio)
- STL 中的 std::string大小写转换 lowercase、uppercase、Trim、replace、split
- Android 多媒体应用:视频播放之VideoView与SurfaceView
- uva 815
- 【HEOI2014】【BZOJ3613】南园满地堆轻絮
- jquery处理html格式的数据
- android 获取系统时间
- nginx利用fastcgi_cache模块缓存