You are here: Tools > Genymotion Java API

Genymotion Java API

This feature is only available with Indie and Business licenses.

Sometimes, in your Android tests (formerly known as instrumented tests), you need to test what happens in your application when sensors return specific values. As Android real devices cannot fake sensor values, you need to modify your source code to mock sensors and create proxy objects. This adds unwanted noise into your project source code only useful for testing, making your code less readable and harder to maintain.

All sensors being already mocked inside Genymotion, the Genymotion Java API allows you to directly manipulate sensor values from your Android tests.

This section explains how to install and use Genymotion Java API.