Six Tips for Developing Mobile Applications

Apps-using-network-dataDuring our work on the ‘Magical Shrinking Machine’ here at Onavo, we have come across hundreds of thousands of different iOS and Android apps and services. After studying these apps, we have identified a relatively small set of design patterns (or “network usage models“) on the apps’ side that drive their usage of network resources. The more popular models seem to be those that are easier to implement and more design-intuitive, but unfortunately these easy-to-implement models don’t always coincide with being data-friendly, and at times can turn apps into genuine data hogs.

To help developers avoid these pitfalls, we have compiled a list of design and implementation guidelines for responsible network behavior for mobile apps and services. These tips are OS-independent, and apply for iOS and Android apps alike. Here they are, ordered by ease of implementation:

1. Data-friendly state-of-mind - Respecting the user’s data connection is the cornerstone of building data-friendly apps. Too few app developers realize that a device’s data connection is a very limited resource and should be treated as such. This means that being data-responsible should be a key factor when designing your service or implementing your app. 

2. Use built-in compression protocols - If your app is using the network, chances are that you’re using HTTP or a proprietary HTTP-based protocol. If so, make sure that your app and server are set up to take advantage of the built-in HTTP gzip compression layer.

3. Design for a mobile UI - As you introduce server-side content to your service, make sure it’s designed to fit into your app and does not exceed its UI limitations. For example, if your app pulls images from the network to display as pretty icons, there’s no sense in downloading the full-sized image and resizing it on the device – have your servers provide them in the required size. Almost all news apps fail to do this, pulling large images over mobile networks, only to resize them into a thumbnail for display.

4. Implement different behaviours for different networks – Have your app detect the current network type (mobile data or Wi-Fi) and use the network accordingly – On Wi-Fi networks you can typically be more worry-free regarding network usage, while mobile data usage is almost always capped and paid for. The Google Maps app does this, prefetching map tiles on Wi-Fi only (unless the user specifically enabled mobile data prefetching).

5. Defer some network operations to Wi-Fi - Many mobile services and apps need to perform non-time-critical network operations such as relaying analytics information or checking and performing possible updates. These operations can be delayed for hours or sometimes even days. Have your app delay these operations for when the device is connected to a Wi-Fi network.

6. Make your app roaming-ready – Take extra care to detect whether or not a device is roaming. Roaming data usage charges tend to be rediculously high, and your app should avoid using data when roaming unless absolutely necessary. Detecting whether or not a device is currently roaming can be tricky on iOS. We have several solutions for that here at Onavo and will share them with you in the future. Our own app does this in order to avoid unnecessary charges.

Following the tips above will make your app not only data-friendly, but it’s also important to note that data-friendliness usually brings about several other benefits:

Much of an app’s battery usage is incurred by its network usage. This means that making your app more data-friendly will reduce its battery usage, making your app more battery-friendly.

Making your app use less data will make your app’s user experience smoother, reducing load time and improving overall responsiveness.

In future posts, we’ll zoom into the tips above and demonstrate some lower-level best practices to help developers improve their apps and make them more data-responsible. Have a question on how to implement one of our tips? Want to share your own best practice? Comment below and we’ll respond.