App Tune-up Kit

A central theme to all embedded development has been getting better performance and thus increasing battery life.  This is entirely an exercise on how to get more out of the same hardware by doing things smarter with better design.
To that end, let's talk about how to rate and compare your app with what others are doing in the wild.  On Android, this is a very easy process thanks to Qualcomm's App Tune-up Kit.  From an Android device, you can quickly grab details about any app currently installed on your device and learn about how costly it is to run that app.  Watch how when the CPU and GPU are working hard crunching numbers the battery life correlates and goes down.  Most importantly, take note of apps that run over the network.  Networking is very battery intensive, especially when not using wifi and going over the cell's 3g or 4g connection.
One of the gravest sins an app can do is a process called sending heartbeats.  Heartbeats are short status notifications used to let servers know that the client is still connected.  What this does is make the network gear turn on, establish a connection, send data, and then stay on for 2 minutes in high power mode.  Every communication on all 3g or 4g connections require the hardware to go into high power mode.  This mode eats a LOT of power.
Transitioning to high power mode is traditionally a time requirement so manufactures leave it in high power mode for a period of time in case the app decides to send more data.  In the case that the app stops sending data for 2 minutes, the device will enter a medium power mode which is quick to enter high power and send more for a further 3 minutes.  This optimization means that sending data requires that the subsequent 5 minutes after the data send, the networking gear will be drawing a lot of power from the battery.
When not doing embedded programming, a heartbeat is a great idea, as is smaller and more frequent updates.  However, embedded network programming requires that we are smart about when we fire up a network message or lose the power to waste.  The battery changes everything in the equation, and we must respect that.  So when using networking, try to get more data sent per communication instance and send it infrequently, build up what you want to send and send it all at once.
In any case, the App Tune-up Kit is a wonderful way to watch for these networking missteps in any project and compare your created android application with the top 30 in your category from the Google Play Store.  It's an awesome way to get an overview of how your app is performing and easily tell what needs to be improved.

Comments

Popular posts from this blog

Build Snapdragon Flight Drone

Build custom arm model for VR

Setting up the Snapdragon DragonBoard 410c for headless server operation