19. Using the Yocto-Display with Android
To tell the truth, Android is not a programming language, it is an operating system developed by
Google for mobile appliances such as smart phones and tablets. But it so happens that under
Android everything is programmed with the same programming language: Java. Nevertheless, the
programming paradigms and the possibilities to access the hardware are slightly different from
classical Java, and this justifies a separate chapter on Android programming.
19.1. Native access and VirtualHub
In the opposite to the classical Java API, the Java for Android API can access USB modules natively.
However, as there is no VirtualHub running under Android, it is not possible to remotely control
Yoctopuce modules connected to a machine under Android. Naturally, the Java for Android API
remains perfectly able to connect itself to a VirtualHub running on another OS.
19.2. Getting ready
Go to the Yoctopuce web site and download the Java for Android programming library
1
. The library is
available as source files, and also as a jar file. Connect your modules, decompress the library files in
the directory of your choice, and configure your Android programming environment so that it can find
them.
To keep them simple, all the examples provided in this documentation are snippets of Android
applications. You must integrate them in your own Android applications to make them work.
However, your can find complete applications in the examples provided with the Java for Android
library.
19.3. Compatibility
In an ideal world, you would only need to have a smart phone running under Android to be able to
make Yoctopuce modules work. Unfortunately, it is not quite so in the real world. A machine running
under Android must fulfil to a few requirements to be able to manage Yoctopuce USB modules
natively.
1
www.yoctopuce.com/EN/libraries.php
www.yoctopuce.com
113
Summary of Contents for Yocto-Display
Page 1: ...Yocto Display User Manual...
Page 2: ......
Page 40: ...34 www yoctopuce com...
Page 52: ...46 www yoctopuce com...
Page 84: ...78 www yoctopuce com...
Page 92: ...86 www yoctopuce com...
Page 130: ...124 www yoctopuce com...
Page 422: ...416 www yoctopuce com...