With approach 1, I get an error server-side because the operation has not been implemented yet.
With approach 2, I get an unknown server-side error. Here are some traces from Appium 1.1.0:
debug: Appium request initiated at /wd/hub/session/c77dfdfc-92b3-41c5-ae3e-66e44
2eb3ae0/touch/multi/perform
debug: Request received with params: {"actions":[[{"action":"press","options":{"
x":380,"y":242}},{"action":"moveTo","options":{"x":1210,"y":881}},{"action":"rel
info: Pushing command to appium work queue: ["performMultiPointerGesture",{"acti
ons":[[{"touch":{"x":380,"y":242},"time":0.005},{"touch":{"x":1590,"y":1123},"ti
info: [BOOTSTRAP] [info] Got data from client: {"cmd":"action","action":"perform
MultiPointerGesture","params":{"actions":[[{"touch":{"x":380,"y":242},"time":0.0
05},{"touch":{"x":1590,"y":1123},"time":0.01}]]}}
info: [BOOTSTRAP] [info] Got command of type ACTION
info: [BOOTSTRAP] [debug] Got command action: performMultiPointerGesture
info: [BOOTSTRAP] [debug] Updating class "class com.android.uiautomator.core.UiD
evice" to enable field "mUiAutomationBridge"
info: [BOOTSTRAP] [debug] Updating class "class com.android.uiautomator.core.UiA
utomatorBridge" to enable field "mInteractionController"
info: [BOOTSTRAP] [debug] Finding methods on class: class com.android.uiautomato
r.core.InteractionController
info: [BOOTSTRAP] [debug] Exception: java.lang.reflect.InvocationTargetException
info: [UIAUTOMATOR STDOUT] java.lang.reflect.InvocationTargetException
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] java.lang.reflect.Method.invokeNative(Native Method)
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] java.lang.reflect.Method.invoke(Method.java:515)
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.handler.MultiPointerGestu
re.execute(MultiPointerGesture.java:46)
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.AndroidCommandExecutor.ex
ecute(AndroidCommandExecutor.java:94)
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.SocketServer.runCommand(S
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.SocketServer.handleClient
Data(SocketServer.java:91)
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.SocketServer.listenForeve
info: [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.Bootstrap.testRunServe
info: [UIAUTOMATOR STDOUT] at java.lang.reflect.Method.invokeNative(Native Metho
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] java.lang.reflect.Method.invoke(Method.java:515)
info: [UIAUTOMATOR STDOUT] at junit.framework.TestCase.runTest(TestCase.java:168
info: [UIAUTOMATOR STDOUT] at junit.framework.TestCase.runBare(TestCase.java:134
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] junit.framework.TestResult$1.protect(TestResult.java:
info: [UIAUTOMATOR STDOUT] at junit.framework.TestResult.runProtected(TestResult
info: [UIAUTOMATOR STDOUT] at junit.framework.TestResult.run(TestResult.java:118
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] junit.framework.TestCase.run(TestCase.java:124)
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] com.android.uiautomator.testrunner.UiAutomatorTestRun
ner.start(UiAutomatorTestRunner.java:160)
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] com.android.uiautomator.testrunner.UiAutomatorTestRun
ner.run(UiAutomatorTestRunner.java:96)
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] com.android.commands.uiautomator.RunTestCommand.run(R
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] com.android.commands.uiautomator.Launcher.main(Launch
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] com.android.internal.os.RuntimeInit.nativeFinishInit(
info: [UIAUTOMATOR STDOUT] at
info: [UIAUTOMATOR STDOUT] com.android.internal.os.RuntimeInit.main(RuntimeInit.
info: [UIAUTOMATOR STDOUT] at dalvik.system.NativeStart.main(Native Method)
info: [UIAUTOMATOR STDOUT] Caused by:
info: [UIAUTOMATOR STDOUT] java.lang.IllegalArgumentException: Must provide coor
dinates for at least 2 pointers
info: [UIAUTOMATOR STDOUT] at com.android.uiautomator.core.InteractionController
.performMultiPointerGesture(InteractionController.java:689)
info: [UIAUTOMATOR STDOUT] ...
info: [UIAUTOMATOR STDOUT] 23
info: [UIAUTOMATOR STDOUT] more
info: [BOOTSTRAP] [info] Returning result: {"status":13}
info: Responding to client with error: {"status":13,"value":{"message":"An unkno
wn server-side error occurred while processing the command."},"sessionId":"c77df
dfc-92b3-41c5-ae3e-66e442eb3ae0"}
POST /wd/hub/session/c77dfdfc-92b3-41c5-ae3e-66e442eb3ae0/touch/multi/perform 50
debug: Appium request initiated at /wd/hub/session/c77dfdfc-92b3-41c5-ae3e-66e44
debug: Request received with params: {}
info: Shutting down appium session...
info: [ADB] Pressing the HOME button
debug: executing: "C:\adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.
exe" -s 571b26df062a824b shell "input keyevent 3"
info: Stopping logcat capture
debug: Logcat terminated with code null, signal SIGTERM
info: [BOOTSTRAP] [info] Got data from client: {"cmd":"shutdown"}
info: [BOOTSTRAP] [info] Got command of type SHUTDOWN
info: [BOOTSTRAP] [info] Returning result: {"value":"OK, shutting down","status"
info: [BOOTSTRAP] [info] Closed client connection
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.boots
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [UIAUTOMATOR STDOUT] Time: 386.542
info: [UIAUTOMATOR STDOUT] OK (1 test)
info: Sent shutdown command, waiting for UiAutomator to stop...
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: UiAutomator shut down normally
info: Cleaning up android objects
info: Cleaning up appium session
info: Responding to client with success: {"status":0,"value":null,"sessionId":"c
77dfdfc-92b3-41c5-ae3e-66e442eb3ae0"}
DELETE /wd/hub/session/c77dfdfc-92b3-41c5-ae3e-66e442eb3ae0 200 811ms - 89b
Am I not able to do a drag and drop simply because it is not available yet? Or am I doing it the wrong way?