能否举例让常用的action匹配一个category

leetow2006 2019-09-21 01:37:55
比如:
Intent intent=new Intent();
intent.setAction(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:13301234567"));
startActivity(intent);
这里都不没有category的,我测试很多系统内置的action,
并且是隐含调用的Intent的,都不能使用category,如果使用
程序会崩溃。
请问能否举个例,action用常用的,也需要category?
另外:常用的action该如何匹配category?
...全文
87 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
leetow2006 2019-09-22
  • 打赏
  • 举报
回复
没有人有遇到这样的例子吗?就是action用常用的,category用其他的,就是不用android.intent.category.DEFAULT和android.intent.category.LAUNCHER
leetow2006 2019-09-21
  • 打赏
  • 举报
回复
如果不用,那么系统内置的category在什么时候用?(除了android.intent.category.DEFAULT和android.intent.category.LAUNCHER外)能否举例
键盘舞者113 2019-09-21
  • 打赏
  • 举报
回复
action用常用的,不需要category,category用android.intent.category.DEFAULT就行

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧