3

For the research I am doing, I am required to collect data from user interaction with android devices ICS or better for touch inputs. I was thinking the best way to do so would be to use the Pointer Location available under Developer Options settings. I traced the source code that recreated that into a program was able to see the logs from that program through logcat, but I am not able to see it when I am running from the settings. Could anyone please point me into a right direction on how can I go about getting those log files? Here's the source that seems to be responsible for logging which does fine in my application but not through the settings menu:

private void More ...logPointerCoords(MotionEvent.PointerCoords coords, int id) {
    Log.i(TAG, mText.clear()
            .append("Pointer ").append(id + 1)
            .append(": (").append(coords.x, 3).append(", ").append(coords.y, 3)
            .append(") Pressure=").append(coords.pressure, 3)
            .append(" Size=").append(coords.size, 3)
            .append(" TouchMajor=").append(coords.touchMajor, 3)
            .append(" TouchMinor=").append(coords.touchMinor, 3)
            .append(" ToolMajor=").append(coords.toolMajor, 3)
            .append(" ToolMinor=").append(coords.toolMinor, 3)
            .append(" Orientation=").append((float)(coords.orientation * 180 / Math.PI), 1)
            .append("deg").toString());
}

Edit on what I did with source:

I recreated a program/app from two class: public class PointerLocationView extends View called from public class PointerLocation extends Activity and managed to replicate the same functionality in an activity.

Thank your for the help.

4

2 回答 2

1

AFAIK 无法以编程方式记录系统范围的触摸:https ://android.stackexchange.com/questions/13992/how-can-i-record-touches

而且我无法使用指针位置开发人员选项生成任何触摸日志。它仅在您打开一次时记录,它们不是指针位置,它们就像一般信息。

也许这个应用程序可能会给你一个想法(我还没有尝试过)

https://play.google.com/store/apps/details?id=com.cygery.repetitouch.free

http://forum.xda-developers.com/showthread.php?t=2270795

于 2013-08-21T16:27:24.007 回答
1

对于将来对此类事情感兴趣的每个人来说,重复触摸都很棒。我尝试了一段时间,但我需要一些额外的和不同的用户界面。因此,我为自己编写了一个带有 getevent 和 sendevent 的程序。

于 2013-09-02T10:55:22.447 回答