Android:锁定屏幕后识别手势 [英] Android: Recognising Gestures when screen is locked

查看:86
本文介绍了Android:锁定屏幕后识别手势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在创建MP3播放器.特别地,用户输入的主要模式是(触摸屏)手势输入的形式.我想添加功能,允许用户在屏幕锁定时继续与MP3播放器进行交互.也就是说,如何使设备(尤其是值得一提的Galaxy S3)能够识别锁定屏幕中的手势并将其解析"到MP3播放器?

I am currently in the process of creating an MP3 player. In particular, the main mode of user input is in the form of (touchscreen) gestural input. I would like to add the functionality allowing users to continue interacting with the MP3 player when the screen is locked. That is, how can I get the device (A Galaxy S3 in particular if it's worth mentioning) to recognise gestures in the lock screen and "parse" them to the MP3 player?

注意:锁定"是指何时可以看到锁定屏幕(即,当屏幕关闭时).

Note: by "locked" I mean when one can see the lock screen (i.e. not when the screen is turned off).

我将如何去做?

谢谢.

推荐答案

推荐的方法是制作锁屏小部件.这些小部件可让您与锁定屏幕中的应用(例如Google Play音乐应用)进行交互.

The recommended way is to make Lock Screen Widgets. These are widgets that allow you to interact with apps in the lockscreen such as the Google Play Music app.

在此处查看官方教程:

http://developer.android.com/guide/topics/appwidgets/index.html#lockscreen

这篇关于Android:锁定屏幕后识别手势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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