Lazy loaded image
安卓app快捷方式Intent获取
字数 349阅读时长 1 分钟
2024-12-23
2025-1-3
type
status
date
slug
summary
tags
category
icon
password
网址
💡
日常使用macrodroid的过程中,常常需要获取app的intent以实现快捷打开app某项功能的目的。本文将简单的以某box软件为例,展示快速获取intent的方法。

一、获取浮动菜单intent的方法

 
很多App在桌面的图标长按后可以弹出如右图这种浮动快捷菜单,可以实现快速打开app的特定功能。
如果在macrodroid的使用过程中能够使用intent直接打开该按钮实现app功能的后台无感切换,无疑会让我们的使用体验得到很大的提升。
OK! Think of it, then just do it!
 
注意:该过程安卓手机需要root权限
 
notion image

1.使用MT管理器打开io.nekohasekai.sfa.xml文件

目录为/data/system_ce/0/shortcut_service/packages/
notion image

2.打开文件后找到右侧图片显示的内容并复制intent-base=后面的所有内容

 
notion image
 
 

3.打开macrodroid动作块,添加shell脚本,并将刚刚复制的内容拼接为intent命令

 
 
 
 
 
 
 
 
 
notion image

4.保存并重命名,完成sing-boxvpn网络状态快速切换动作块的设置。

 
现在借助该动作块,你可以通过设置触发条件实现VPN的自动开关了。
 
Enjoy it!
 
notion image

二、获取桌面快捷方式intent的方法

待完成

 
 
上一篇
Qemu-guest-agent:unRaid虚拟机客户端代理
下一篇
常用Intent命令