【Android】 常用的Intent
发布日期:2021-06-29 20:55:20 浏览次数:3 分类:技术文章

本文共 1223 字,大约阅读时间需要 4 分钟。

常用广播动作

动作                                        备注

ACTION_TIME_TICK            每分钟发一次,以表明时间的变化

ACTION_TIME_CHANGED            用户更改设备的时间时发送。

ACTION_TIMEZONE_CHANGED        用户更改设备的时区时发送。

ACTION_BOOT_COMPLETED        平台完成启动时发送

ACTION_PACKAGE_ADDED        有软件包添加到平台时发送

ACTION_PACKAGE_REMOVED        有软件包从平台移除是发送

ACTION_BATTERY_CHANGED        电池的电量级别或充电状态发生改变时发送

常用Intent

常用动作和类型的匹配

ACTION_MAIN      CATEGORY_HOME                      Launch the home screen.

常用动作和URL的匹配

ACTION_CALL        tel:phone_number                打开电话应用程序并拨打指定的电话号码

ACTION_DIAL     content://contacts/people/1     Display the phone dialer with the person filled in.
ACTION_DIAL        tel:phone_number                打开电话应用程序并拨打指定的电话号码(但不打出)
ACTION_DIAL        voicemail:                        打开电话应用程序并拨下语音信箱的指定的电话号码(但不打出)

ACTION_EDIT     content://contacts/people/1        编辑联系人

ACTION_VIEW     content://contacts/people/        显示对用户可见的联系人列表。@1
ACTION_VIEW     content://contacts/people/1        查看某个联系人信息
ACTION_VIEW        geo:latitude,longitude            打开地图应用程序并显示指定的纬度和经度
ACTION_VIEW        geo:0,0?q=stree+address            打开地图应用程序并显示指定的地址
ACTION_VIEW        http://web_address                打开浏览器应用程序并显示指定的URL
ACTION_VIEW        https://web_address                打开浏览器应用程序并显示指定的URL
ACTION_VIEW     tel:123                            Display the phone dialer with the given number filled in.@2
                                
Intent.ACTION_WEB_SEARCH    plain_text            打开浏览器应用程序并显示指定的并使用google搜索引擎

注1:在列表中可选中联系人可查看具体信息
注2:Note how the VIEW action does what what is considered the most reasonable thing for a particular URI.    

转载地址:https://dengjin.blog.csdn.net/article/details/42171031 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Android中AsyncTask的简单用法
下一篇:【Android】 Intent详解

发表评论

最新留言

感谢大佬
[***.8.128.20]2024年04月10日 03时00分00秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章