O'Reilly logo

Flash Development for Android Cookbook by Joseph Labrecque

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Monitoring memory usage and frame rate in an application

Android devices generally have a lot less memory and much less CPU power than a traditional desktop or laptop machine. We have to be very careful when building Android applications so as not to create something so power-hungry, that the frame rate drops to unacceptable levels or the application becomes unresponsive. To assist us in troubleshooting and monitoring these issues, we can keep track of the memory consumption and calculated frame rate of the running application which should respond accordingly.

How to do it...

We can monitor many system properties through use of the flash.system package along with the flash.utils.getTimer class for calculating the present application frame rate: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required