I have an application in which I need to implement image editing, which also includes pinch zooming. I am done with pinch zooming but I can test this only on device, not on emulator.
Is there any way for testing pinch zooming in android emulator, any shortcut key or any other way?
Since ADT 17, it is possible to use a physical Android 4.0 device to send multitouch gestures to the emulator.See Android's instructions here.
Multi-Touch
The emulator supports multi-touch input, as an experimental feature in r17, using a tethered Android device running the SdkControllerMultitouch application. The application contains an activity that monitors touch inputs and sends them to the emulator. This requires an Android 4.0 or later system image. The activity displays the content of the emulator screens to help with interactivity. It is recommended to enable "show touches" in the Developer section of the Settings on the emulator to see exactly where the touches are sent.
The SdkControllerSensor application source code is located in
$SDK/tools/apps/SdkControllerMultitouch/
But this is still a workaround since we need a real device. My advice would be to test your app directly on a real device as it's more robust, and even more performant.