Notice: This page contains information for the legacy Phidget21 Library. Phidget21 is out of support. Bugfixes may be considered on a case by case basis. Phidget21 does not support VINT Phidgets, or new USB Phidgets released after 2020. We maintain a selection of legacy devices for sale that are supported in Phidget21. We recommend that new projects be developed against the Phidget22 Library.
|
OS - Android
Android is a mobile OS commonly used on smartphones and tablet computers.
Getting Started (Libraries and Drivers)
Installing
Android Java Platform
Phidget Libraries
Permissions
Checking
Software
Hardware
Troubleshooting
Programming Languages
Android OS programs are written in Java using the Android SDK and the Phidgets library.
Note that Android Java is NOT the same as mainstream Java. Any Java programs you have will probably need significant modification before they run on Android, including our mainstream Java Phidget Examples
Webservice
Setting Up the Webservice
Using the Webservice
Advanced Uses
Installing Libraries and Drivers
Development for your Android OS Phidget application can occur on Linux, Mac OSX, or Windows.
Setup
You will need the following:
- The JDK and Java on your development system
- The Android SDK package for your development system
- See the download link at http://developer.android.com/sdk/installing.html
- For 64-bit Linux, you will need the
ia32-libs
package as well
- The Eclipse plug-in for Java development
- http://www.eclipse.org/downloads/ for Windows or MacOS
sudo apt-get install eclipse
(for Linux)
Step One: Install the Android SDK
Google's instructions for installing the Android SDK may be found here:
http://developer.android.com/sdk/installing.html
That link contains help and code for:
- Installing the SDK and platform emulators
- Connecting the SDK into Eclipse, which is useful for following the example descriptions later
Step Two: Run Google's Hello Android Application
To check that the JDK, the Android SDK, and Eclipse have all been configured correctly, use the Google HelloAndroid example:
http://developer.android.com/resources/tutorials/hello-world.html
Once you have confirmed that the Android SDK has been correctly installed, you are ready to begin developing applications with the Android Java libraries and language.
Common Problems and Solutions
If you are having trouble, ensure your Phidget libraries are up to date.
Limitations
Android 3.1 and later can run Phidgets directly plugged into a local USB port.
Other versions of Android can remotely control Phidgets over a network via the Phidget Webservice. This has been tested down to Android version 2.1.