Android's uiautomator has a broken long click implementation.
uiautomator will not pause long enough on long click which causes Android to detect the long click as a normal click.
This fix uses reflection to access uiautomator's private touchDown/touchUp methods to reimplement longClick correctly.
In theory I should be able to obtain a reference to android.app.UiAutomation without using reflection. However this doesn't seem possible when using uiautomator. getInstrumentation().getUiAutomation(); doesn't work because we're not using instrumentation.
Below is error message.
[ERROR] Failed to execute goal on project bootstrap: Could not resolve dependencies for project io.appium.android:bootstrap:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: android:android:jar:4.3_r1, android.test.uiautomator:uiautomator:jar:4.3_r1: Could not find artifact android:android:jar:4.3_r1 in central (http://repo1.maven.org/maven2) -> [Help 1]