Module Services
From BUG Wiki
Contents |
Overview
This page describes the OSGi services (Java interfaces) that each BUG module exposes to the OSGi runtime environment.
Motion/Accelerometer Module
- IMotionObserver
- IMotionSubject
You can use the IMotionSubject service to register an IMotionObserver which will be invoked whenever motion is detected.
In the emulator, there is a shell command to simulate motion (moving the emulator window does not seem to work ;) ).
GPS Module
- IPositionProvider
Camera Module
- ICameraDevice
You can ask the ICameraDevice service for a picture.
The byte[] you get contains the raw bytes. If you want to convert that into an image, you can use Toolkit.getDefaultToolkit().createImage(allYourBytes).
LCD Module
- IModuleDisplay
