Starling Stress Test
The other day while working on a project we needed to gauge the speed of AIR on mobile, and to do so we created a stress test to see just how fast the latest AIR 3.6 SDK was. We created a small AIR application using Starling and decided to share it with the community. The application creates 1000 particles which are emitted by two emitters, one produces 500 Cowlorful Cows and the other 500 GrindheadGames logos. It seems to run at a solid 30FPS on a Samsung Galaxy S3 and an Apple 4S, however we would love to hear performance reports from other mobile devices, so please leave a comment if run the test yourselves.
We have made a GitHub repository for the Starling Benchmark so that you can download the code and run it yourself. Instructions are included how to get the project to compile, but leave a comment if you get stuck. There is also a precompiled APK in the build folder, so you can run the test on Android without having to compile if you want to. You will have to set up development certificates to get the application to compile for iOS, there is no precompiled file for the platform included.
We created used the Starling framework and the Particles extension to run this, make sure you add them to the source path to build the project.
When developing an application for Android in AIR, you may wish to override the default functionality that occurs when a user presses the Back button on their Android device. The default behavior is to exit the application completely, so in many cases it is important to handle this properly. To do so is very easy, and using AIR you can use an event listener like you would for a normal keyboard event.
Here is the code to listen for and override a Back button press on an Android device:
Also…..happy 2012 everyone.
During development of the Magic Baby Books application, we tested the application on a HTC desire. Problems were encountered when connecting the device to a computer and it wouldn’t appear when the ADB Devices command was called. When developing for other mobiles we did not encounter this problem, but the HTC Desire ships with its own HTC Sync drivers that are not included in the Google Android SDK.
After some headbanging, a tutorial post by James Giang titled ADB Drivers for HTC Desire came to our rescue. The solution was to download and install the HTC-Sync drivers, and then reconnect the device using USB. Thankfully James has made these available, and they can be downloaded and installed manually from here: http://dl.dropbox.com/u/1349362/HTCSync_2.0.33.exe
After installing the HTC Sync drivers, reconnect the device in Disk Drive mode and the ADB drivers will be successfully installed. Your phone should show up when the ADB Devices command is run. Thanks James!