Access Keys:
Skip to content (Access Key - 0)

A quick note to developers. An OpenRemote panel based on Android platform has been added to subversion at http://openremote.svn.sourceforge.net/viewvc/openremote/trunk/Panels/Android/

The current panel rendering is based on the existing iphone.xml UI schema and therefore most suitable for Android based touch phones with similar screen dimensions (G1, HTC Magic/Hero, etc.)

The functionality in the current implementation is roughly equivalent of OR Boss milestone 2 (M2) that was released earlier in June this year. Video of the iPhone UI is available on YouTube. The features in iPhone panel for M3 (mainly controller auto-discovery) has not yet been added to the Android codebase.

In order to run or test the Android panel, you will need to download the Android SDK. The SDK is available on the most popular systems including Windows, Linux and Mac. The application can be run on a emulator on any of these systems. No payments, subscriptions or additional hardware purchases required.

To deploy the the OpenRemote Android panel on the emulator, follow the instructions in the Android developer guide online. The SDK has all the necessary tools in its /Tools directory although an Eclipse plugin is also available if you have a fear of CLI.


(Click for larger image)

Steps to Build and Deploy

The process of building and deploying the OpenRemote Android panel on the emulator is roughly the following:

1. Create a new Android Virtual Device (AVD) profile. This configures the emulator for your target hardware profile

AndroidSDK/tools/android create avd --name G1 [you can use another name here] --target 2 [revealed by the 'list' operation, see below]

The hardware platform targets can be revealed by using the following command:

AndroidSDK/tools/android list targets

which should yield a target roughly similar to what is below:

id: 2
     Name: Android 1.5
     Type: Platform
     API level: 3
     Skins: HVGA (default), HVGA-L, HVGA-P, QVGA-L, QVGA-P

2. Checkout the trunk of OpenRemote SVN:

svn co http://openremote.svn.sourceforge.net/svnroot/openremote/trunk/Panels/Android

3. Set up an Android project

AndroidSDK/tools/android update project --target 2 --path OpenRemoteSVN/trunk/Panels/Android

This should create a 'local.properties' file in the /trunk/Panels/Android directory which contains a path to the root of your Android SDK installation

4. Build the OpenRemote Android panel

The OpenRemoteSVN/trunk/Panels/Android contains an Ant 'build.xml' file you can use to build the project:

OpenRemoteSVN/trunk/Tools/apache-ant-1.7.0/bin/ant debug

The 'debug' target automatically signs the package with a self-signed key which is sufficient to deploy and execute the app on the emulator. The binary is created in OpenRemoteSVN/trunk/Panels/Android/bin/.Main-debug.apk

5. Run the Android Emulator

AndroidSDK/tools/emulator -avd G1 [or any other name you used for your hardware profile]

Wait for the emulator to start completely (it can take a while)

6. Install the app

AndroidSDK/tools/adb install OpenRemoteSVN/trunk/Panels/Android/bin/.Main-debug.apk

You should see OpenRemote in the application selection.

7. Start the OpenRemote Controller

Download latest OR Controller beta: http://archive.openremote.org/download/OpenRemote-Controller-1.0.0_Beta6_JavaOnly.zip

It contains a stand-alone Tomcat which you can run directly:

OpenRemote-Controller-1.0.0_Beta6_JavaOnly/bin/startup

8. Create a sample user interface

http://composer.openremote.org/demo/

When you're done, use the download button and save the OpenRemote Zip file on your hard drive.

http://composer.openremote.org/demo

9. Deploy UI definition

Go to http://localhost:8080/controller and upload the OpenRemote Zip.

10. Start the OpenRemote Android app

Configure the application to http://<Your IP>:8080/controller

Configure Controller URL
(Click for larger image)

Have fun!

Added by Juha Lindfors , last edit by Juha Lindfors on Aug 15, 2009 09:49

  1. Aug 12, 2009

    Neil Cherry says:

    Juha, thnks this will be very helpful!

    Juha, thnks this will be very helpful!

    1. Aug 16, 2009

      Marc Fleury says:

      http://www.ehomeupgrade.com/2009/08/14/mystery-android-mid-capturing-peoples-att...
      1. Aug 17, 2009

        Juha Lindfors says:

        Indeed it does. One thing we need to add to UI composer in the future is hardwa...

        Indeed it does.

        One thing we need to add to UI composer in the future is hardware profiles for devices with different screen dimensions. Basically the earlier profile idea generalized (UI for me vs. grandmom) but driven by screen dimension that calls for differently arranged UI elements.

© 2008-2011 OpenRemote Inc. OpenRemote is a trademark of OpenRemote, Inc.
Adaptavist Theme Builder (3.3.3-conf210) Powered by Atlassian Confluence 2.10.3, the Enterprise Wiki.
Free theme builder license