Eclipse.org Eclipse.org - Device Kit

Integrating Java code into the final application

After you integrate the Java code into the final application, the final application can use your code as a resource for completing tasks. The method that you use to integrate the Java code into the application varies depending on the type of applications you create.

For example, if your application controls a radio, then your application might include a graphical representation of the radio with buttons that represent "Power On," "Power Off," "Volume Up," "Volume Down," and so on. When you use a radio device generated from a CML file, the top-level application code does not communicate with the hardware because the CML file includes appropriate messages to communicate with the hardware. Instead, the top-level application creates a new radio device that sends commands to the hardware and receives status updates from the hardware. When the user presses a button on the radio, a listener instructs the radio device to execute the appropriate action. Similarly, when the device receives a signal or measurement, the device notifies the graphical display about the type update to instigate.