如何将项目添加到 Android 中的快速设置 [英] How to add an item to Quick Settings in Android

查看:50
本文介绍了如何将项目添加到 Android 中的快速设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在想是否有办法在 android 的快速设置面板中添加一个项目?我有一个由 Koushik Dutta 开发的名为 Mirror 的应用程序,它的功能相同.它在快速设置面板中添加了一个项目.我反编译了应用程序,看到他正在将 apk 移动到/system/priv-app .就是这样.与在快速设置切换"中添加项目无关.我知道它需要 root 访问权限(只是一个大学项目).请如果有人知道如何做到这一点,那将非常有帮助.

I was thinking if there is a way to add an item in Quick Settings Panel in android ? I have an app called Mirror by Koushik Dutta that does the same. It adds an item in Quick Settings panel. I decompiled the app and saw that he's moving the apk to /system/priv-app . That's it. Nothing's related to adding an item in Quick Settings Toggle. I know it'll require root access (just a college project). Please if anyone has any idea how it can be done, it would be really helpful.

推荐答案

Koushik Dutta 没有添加新的快速设置磁贴.Cast Screen"-Tile 由android系统实现,有时会出现.这是系统设置中投射屏幕"菜单的快捷方式.Koush 为这个菜单添加了新选项(我不知道是否有开放的 api 或者他是否需要 root 权限),现在,磁贴总是显示,因为总是有内容.

Koushik Dutta didn't add a new quick settings tile. The "Cast Screen"-Tile is implemented by the android system and appears sometimes. It's a shortcut to the "cast screen"-menu in system settings. Koush added new options for this menu (i don't know if there's an open api or if he needs the root permission for that) and now, the tile is always displayed because there's always content.

回答你的问题:不,没有root系统修改,你不能在android快速设置中添加tile.(我没有读到您也使用 root.因此,您无法轻松添加磁贴,而且 Koushik Dutta 的镜像应用程序也不会这样做.)

To answer your question: No, without system modifications with root, you can't add tiles to the android quick settings. ( I haven't read that you'd also use root. So, you can't add tiles easily and the mirror application by Koushik Dutta doesn't do that, too.)

PS:这不是因为 CyanogenMod,因为我使用的是原生 android 并且该应用程序也可以运行.

PS: It isn't because of CyanogenMod, because I use stock android and the app works, too.

更新 2019-08-08:对于 Android N,有一个官方 API 可以添加自定义快速设置图块(请参阅 山姆的回答).

Update 2019-08-08: With Android N, there's an official API to add custom quick setting tiles (see Sam's answer).

这篇关于如何将项目添加到 Android 中的快速设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆