This page tells you everything you need to know in order to get started developing projects for Android. You'll need an Android device to follow along.
See the Supported platforms page for details on the Android devices and OS versions that the Stingray engine can work with, and make sure your device is a good fit.
You'll have to install and set up a few things on the Windows machine that you use to run the Stingray editor.
You need both the Java Development Kit (JDK) and the Java Runtime Environment (JRE).
Stingray requires at least version 7, but we recommend using the latest update of version 8.
You can download the JDK from the Oracle Java SE site. The JDK package contains a full version of the JRE, so you should not have to install the JRE separately.
If you don't already have the Android SDK installed on your computer,
After you install Java and the Android SDK:
When you deploy a project to a standalone .apk application, Stingray needs to sign your app using a keystore that you have set up on your system. If you do not specify a keystore when you deploy, Stingray relies on a default "debug" keystore. Most versions of the Android SDK generate this default keystore automatically when you install the Android SDK, but some may not.
Look for the default keystore at this location: C:\Users\<username>\.android\debug.keystore.
If the debug.keystore file is not present on your system, run the following command at a command prompt to create it manually:
> "%JAVA_HOME%\bin\keytool.exe" -genkey -v -keystore "%USERPROFILE%/.android/debug.keystore" -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US" -validity 10000 -keyalg RSA
Note that the debug keystore expires 365 days after creation. If your default keystore has expired, delete the debug.keystore file and re-create it using the command line above. See also the Android developer help.
In order to connect the Stingray Editor to your device over a USB connection, or to install apps to your device using the Android Debug Bridge, you need to have USB drivers installed on your computer that are compatible with your device.
Which drivers you should use, and how to install those drivers, depends on the make and model of your Android device.
For details, check your device manufacturer's documentation or support site, or consult the official Android developer site.
After installing the prerequisites and setting the environment variables listed above, restart your computer.
Connecting the editor to your device has two benefits:
You can mirror the editor's viewport to the device while you're working on your project content, so that you have a live preview of what your changes look like on the device.
You can easily run your project on the device to test your gameplay.
For more background information, see Connect to a remote device.
To connect to an Android device:
Plug your device in to a USB port on your Windows machine.
Enable USB debugging on the Android device. This is typically found in the device's Settings, under Developer options. Two examples:
If you don't see the Developer options on your device, you may need to enable them. Find the Android Build number in the device's settings, and tap the build number seven times.
In the Stingray Editor, use the Connections panel (Windows > Deploy and Connect > Connections) to set up a connection to the Android device:
For details, see Using the Connections panel.
Note: In the Address field of the Connections panel, you must enter the IP address of your Android device. You can find this in your device's settings.
When you connect to the device or run the project, the editor automatically installs the engine on the device over the USB connection, runs the engine on the device, then sends your project data to the engine.
Tip: If you're unable to connect to your Android device, you may need to install ADB drivers specific to your device and try the procedure again.
Deploying creates a standalone .apk bundle that you can try out on your device (and, eventually, distribute on the Google store). For background information, see Deploying and Building and Using the Deployer panel.
To package a project for Android:
Stingray creates an .apk file for your game, and copies it to the location on your computer that you specify in the Destination field.
After deploying from Stingray:
To copy your deployed game to a connected device for testing, use the adb utility. You can find this tool in your Android SDK installation folder, under the /platform-tools/ sub-directory. Connect your device to the computer by USB, open a command prompt, and type:
adb install <path-to-apk>
To distribute your game on the Google Play store, use the tools provided by Google. See the Developer Console Help for more information on the Google Play Developer Console.
You can set the following options in the Deployer panel for Android devices.
These settings are common for all tabs. See Using the Deployer panel.
Browse to select your game icon in PNG format. It can be any size, but we recommend a maximum of 512x512 pixels. If you leave this empty, the Deployer uses the default icon for Autodesk Stingray.
Keystore signing is required in order to test the generated .apk file on a device or publish it on the store. If you don't enable the Keystore Signing section, the editor automatically uses the debug.keystore that is installed at the same time as the Android SDK at %USERPROFILE%/.android/debug.keystore.
For more information on keystore signing, see the Android documentation.
Mobile devices don't have the same amount of memory and processor resources to throw at your project as your PC does. When you're making a project that you intend to be used on mobile platforms, it's really critical to pay close attention to the size of your resources and the overall demands that the project is putting on the device.
For some helpful tips, see Optimize memory usage.