屏幕关闭时的 Android 轨迹球事件
我正在寻找一种在屏幕关闭时捕获轨迹球事件的方法,最好是在 N1 上。我正在构建自己的音乐播放器,并且希望添加通过轨迹球按下跳过歌曲的功能,而无需每次都解锁我的设备。
我找到了 TrackBallSkip,但是源代码已被删除并集成到 CyanogenMod 中。我担心我可能需要对我的手机做一些奇怪的事情(root它,修改它,等等)。虽然这不是问题,但如果我可以自由地共享我的音乐播放器,我会更高兴。
任何人都可以确认我需要修改主页才能访问此功能吗?或者我可以直接编码它(如果是这样,任何指向正确方向的指针都会很棒)。
谢谢!
I'm looking for a way to grab trackball events while the screen is off, preferrably on a N1. I'm building my own music player and would love to add the feature to skip songs by trackball press, without having to unlock my device everytime.
I've found TrackBallSkip, however the source code has been taken down and integrated into CyanogenMod. I fear that I may need to do something exotic to my phone (root it, mod it, whatever). While this isn't a problem, I would be happier if I could freely share my Music player.
Can anyone confirm that I'll need to mod the home to get access to this functionality? Or can I just straight code it (if so, any pointers in the right direction would be amazing).
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了 Cyanogen 将 TrackBallSkip 放入其源代码库的位置(此提交)。它似乎驻留在
phone/com/android/internal/policy/impl/PhoneWindowManager.java
中,这意味着如果不修改固件就无法实现它(因为相关包驻留在/系统
)。I found where Cyanogen put TrackBallSkip into their source base (this commit). It appears to reside in
phone/com/android/internal/policy/impl/PhoneWindowManager.java
which means it can't be implemented without modding the firmware (since the related package resides in/system
).