Back to Content

Android (.apk) Target

You can create Android applications with mobile devices with the Google Android operating system with CopperCube. When publishing to this target, the editor will generate a file with the filename extension .apk, which is the ready android application. You can transfer it to your device, for example by downloading it to the device from anywhere on the internet or hitting the 'Install on Device' button in CopperCube, and then run it. You can even sell or publish it on the Google Play Store.


Setting up CopperCube for creating Android apps

If you want to publish your CopperCube created 3d scenes as Android apps, you need to download and install some software packages before. Follow these steps to do this:

Download and install the Android SDK


Setup CopperCube to use the Android SDK

We only need to tell CopperCube where we installed the SDK in order to create Android packages. That's it, now you can create Android Apps with CopperCube.
Note that under Tools -> Publishing Settings -> Android, you will find a lot of options for your apps to be generated, such as an icon file, package name, version number and more. Also, be sure that the keystore file which you generated in the last step above is very important. Make a backup of the file, if you are planning to publish or sell your android app. For creating updates of your app, this key is necessary. It cannot be re-generated. You need only this one key, even if you are planning to create multiple apps.




System Requirements

CopperCube created android apps run on any android system starting with version 2.2, and support for OpenGL ES2. But since there are very fast and also very slow devices existing with these, performance of your app might vary between different devices. An android device with at least ARMv7 is recommended, in order to be fast enough. If you are using Skeletal Animations in your app for example, performance might be very poor if the device doesn't support this.

Please also note that Android devices are usually much less powerful than your average PC or Mac. Be sure to use very simple 3D geometry, skeletal animations with very few bones and the most important: Just a few textures with a very low resolution. If your android app gets out of memory, and this is likely when using for example many big textures, it might crash.




Scripting

Android apps support the same JavaScript functionality as the other publishing targets, as well as the 'Execute Javascript' action. See the scripting overview for a detailed description how to use this feature.

See the JavaScript reference for a detailed list of all available functions.




Menu Key

For some apps, it might be useful to react when the user presses the 'Menu' key on the Android device. You can do this in CopperCube by using a "When a key is pressed do something" behavior on any 3D object or the scene root object, and selecting the "App Menu key" key.




Sound

For playing sounds in the android target, it is recommended to use .ogg files.




Source Code

If you want to extend the android app with very specific android custom features, you can do this by compiling the Android App yourself and programming your own additions. You can get the source code if you own the Professional Edition of CopperCube: In the editor, click Help -> About, and then the "Download Android Source" button.
The code is an Eclipse Project which can be compiled using the Android SDK and the Eclipse Android Development plugin. A short documentation on how to build the package can be found in the root named documentation.txt.