This is a CodeNameOne application sample for developers. Its source code is freely available and shows how to use Android as a mobile development platform for CN1 apps.
To develop CN1 apps on your Android tablet (or even phone!) you must first set up all the tools needed for it. Read this wiki (https://code.google.com/p/java-ide-droid/wiki/CN1developmentOnAndroid) to learn where to get the tools and how to set them up.
To test if your environment is correctly set up, try to build the AndroidDevDemo sample application on your Android device:
You start developping a new CN1 app as usual: on your desktop. Choose the empty (manual) template for creating your project, then start the Designer (in XML team mode!) and define the theme and all static resources. This is necessary because there is currently no way (yet) to define your theme on Android. When you are done, save the resources, exit the IDE and transfer the project to your Android device.
To use Android as a development platform for CN1, you need to make some changes to the project's build configuration. You also need to work around the problem that there is no CN1 designer on Android to edit your resource file.
There is a text editor built into JavaIDEdroid, but it is a very, very simple editor only. Its main purpose is to edit BeanShell scripts when you use JavaIDEdroid's security feature protected script mode. To write code, you'd better use Android apps like AIDE, Quoda or Jota+
For creating the GUIs you can use Steve Hannah's CN1MLParser (http://sjhannah.com/blog/?p=345) with which you define your GUIs in CN1ML which is an extented version of HTML. To make things easier, all classes that implement GUIs should extend com.t_arn.lib.ui.AbstractActivity which handles a lot of the tedious stuff automatically.
You can localize your GUIs by editing the /res/theme.xml file and adding l10n entries. The utility class com.t_arn.lib.ui.util.taResources can be used as replacement for Resources. When the app is run and the theme.xml file is found in the app's resources, the resources therein are merged with those in theme.res
When doing an offline build, the build process creates a default AndroidManifest.xml file in the project root directory, if there is no such file already. If the default AndroidManifest.xml does not fit your needs, you can customize it. Make sure you modify the file in the project root directory, not the one in the build_offline directory. The AndroidManifest.xml contains variables like #packageName# or #versionCode# which will be replaced with the correct values by the offline build process.
You first need to decide whether to build locally or whether to use the CN1 build servers. In the build.bsh script there is the variable buildOffline which you can set to true in order to create the Android APK completely on your device. The offline build is meant for fast prototyping. When you want to create a production release or a release for an other platform, you can set buildOffline=false to send the application to the CN1 build servers.
You might decide that in the production build you don't want to have the XML-based resource file anymore. In this case you transfer the project back to your desktop and run the Designer to synchronize the resources. After saving the resources you can send the app to the CN1 build servers for building. This will also correctly create your custom icon which is not the case for the offline build (there, you'll always have the default icon). You do not need to change the source code - taResources will also work with the binary resource file.
If you have questions about JavaIDEdroid or using Android as a CN1 development platform, you can post them in the JavaIDEdroid support forum on the JavaIDEdroid project website. For specific CN1 questions please use the Codename One forum.