{"action":"closed","issue":{"url":"https://api.github.com/repos/RobotiumTech/robotium/issues/440","labels_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/440/labels{/name}","comments_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/440/comments","events_url":"https://api.github.com/repos/RobotiumTech/robotium/issues/440/events","html_url":"https://github.com/RobotiumTech/robotium/issues/440","id":102008651,"number":440,"title":"solo.clickLongOnScreen do not work on Robotium 3.6","user":{"login":"renas","id":165541,"avatar_url":"https://avatars.githubusercontent.com/u/165541?v=3","gravatar_id":"","url":"https://api.github.com/users/renas","html_url":"https://github.com/renas","followers_url":"https://api.github.com/users/renas/followers","following_url":"https://api.github.com/users/renas/following{/other_user}","gists_url":"https://api.github.com/users/renas/gists{/gist_id}","starred_url":"https://api.github.com/users/renas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renas/subscriptions","organizations_url":"https://api.github.com/users/renas/orgs","repos_url":"https://api.github.com/users/renas/repos","events_url":"https://api.github.com/users/renas/events{/privacy}","received_events_url":"https://api.github.com/users/renas/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/bug","name":"bug","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/duplicate","name":"duplicate","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/RobotiumTech/robotium/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-19T21:58:39Z","updated_at":"2015-08-19T21:58:52Z","closed_at":"2015-08-19T21:58:52Z","body":"_From [shared.a...@gmail.com](https://code.google.com/u/111598369398453964911/) on November 27, 2012 04:53:02_\n\nWhat steps will reproduce the problem? 1. Use not MDPI device, i.e. HDPI Galaxy S (Android 2.3.7)\r\n2. Add solo.clickLongOnScreen(X, Y, TIME) into test operation What is the expected output? What do you see instead? onLongClick event must occured on view at X,Y\r\ninstead of this event I see these events:\r\n1. POINTER_DOWN at X,Y\r\n2. Small movement (about 3-5 pixels)\r\n3. POINTER UP What version of the product are you using? On what operating system? Robotium 3.6 on Android 2.3.7 Galaxy S Please provide any additional information below. I found the bug is in Clicker.java\r\n\r\nThe issue is in calling of ViewConfiguration.getTouchSlop(). This method is deprecated and may work incorrecly on some devices. In my case on Galaxy S and some simulators (HDPI, XHDPI)\r\n\r\nI just copy this function in my test and use it instead of solo.clickLongOnScreen() (ViewConfiguration.getTouchSlop() replaced on 1.0f). And this works fine:\r\n\r\npublic void clickLongOnScreen(float x, float y, int time)\r\n    {\r\n        final Instrumentation inst = getInstrumentation();\r\n        long downTime = SystemClock.uptimeMillis();\r\n        long eventTime = SystemClock.uptimeMillis();\r\n        MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, 0);\r\n        try\r\n        {\r\n            inst.sendPointerSync(event);\r\n        }\r\n        catch(SecurityException e)\r\n        {\r\n            Log.e(\"TYPHOON_TEST\", e.getMessage());\r\n        }\r\n        eventTime = SystemClock.uptimeMillis();\r\n        event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_MOVE,\r\n                x + 1.0f,\r\n                y + 1.0f, 0);\r\n        inst.sendPointerSync(event);\r\n        try\r\n        {\r\n            Thread.sleep(time);\r\n        }\r\n        catch(InterruptedException e)\r\n        {\r\n            Log.e(\"TYPHOON_TEST\", e.getMessage());\r\n        }\r\n        eventTime = SystemClock.uptimeMillis();\r\n        event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, x, y, 0);\r\n        inst.sendPointerSync(event);\r\n        try\r\n        {\r\n            Thread.sleep(500);\r\n        }\r\n        catch(InterruptedException e)\r\n        {\r\n            Log.e(\"TYPHOON_TEST\", e.getMessage());\r\n        }\r\n    }\n\n_Original issue: http://code.google.com/p/robotium/issues/detail?id=361_"}}