Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何用Shell触发5G开关 #2

Closed
yu-liang-zheng opened this issue Apr 26, 2021 · 3 comments
Closed

如何用Shell触发5G开关 #2

yu-liang-zheng opened this issue Apr 26, 2021 · 3 comments

Comments

@yu-liang-zheng
Copy link

想实现,每天晚上十二点,定时关掉5g。

直接用 am start -n com.ysy.fivegswitcher/.MainActivity,会弹窗“选择运营商/选择网络设置”。

请问一下,有没有办法用shell触发该应用,实习5g网络的开关,谢谢了😃

@ysy950803
Copy link
Owner

ysy950803 commented May 7, 2021

@yu-liang-zheng 嗯,目前以你的方式应该还不能实现,因为MainActivity是打开网络设置,5G开关本身是一个TileService快捷方式。
如果你只是想定时关闭网络的话,MIUI的手机管家有一个自动任务的功能,可以定时关闭数据开关或者开启飞行模式。
如果你确实需要定时开关5G,我可以试试给你弄个单独的Activity或者Service来方便调用。

@ysy950803
Copy link
Owner

@yu-liang-zheng 可以下载最新版试试。参数在README。

@yu-liang-zheng
Copy link
Author

感谢支持。
在MIUI 12的k30pro上,能正常调用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants