检测是否与用户交互的手机? [英] Detect if user interacts with phone?

查看:117
本文介绍了检测是否与用户交互的手机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在用户与手机交互检测和从去年用户对触摸屏在60秒之后重新启动我的应用程序。是有可能做这样的事情?
它必须工作作为screenserver的PC。


解决方案

  

时,可以做这样的事情?


只有当您的活动是在前台,在这种情况下,你可以跟踪触摸事件。你无法了解触摸事件在系统其他地方发生的事情。

I need to detect when user interacts with the phone and restart my app after 60 seconds from last user's touch on screen. Is is possible to do something like that? It must work as the screenserver for PC.

解决方案

Is is possible to do something like that?

Only if your activity is in the foreground, in which case you can keep track of touch events. You cannot find out about touch events happening elsewhere in the system.

这篇关于检测是否与用户交互的手机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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