The arrival of Android Go has lowered the barrier for smartphones. Android Go is a trimmed down version of Android and it is likely to work efficiently even on devices with under powered hardware.
As an app entrepreneur, you would want your app to be compatible with wide range of devices including entry-level smartphones. To ensure it happens, you need pay attention to making your apps compatible with Android Go. Confused, where to start? We tell you how and where to begin.
Things you should know
As mentioned earlier, Android Go is based on the standard version of Android and all catalogs of apps on Google Play will be accessible to Android Go users. However, there is something more to it. Google Play will identify apps that are more suitable for Android Go users and these apps will be highlighted in the list of apps.
To make sure your apps figure in the list of compatible Android Go apps, you need to focus on optimizing your app to consume less battery and memory and still deliver high performance on devices with under powered hardware.This will ensure Google Play will highlight your apps for Android Go platform.
Shrink APK size
Do you know the size of APK affects the user’s decision to download and install a mobile app? According to a recent study, there is 1% decrease in installation rate with every 6MB increase in APK size.
Shrinking APK size is a great way to boost app downloads. Besides, mobile devices with Android Go are more likely to have limited internal storage. Hence APK size is going to be a critical factor to make your mobile app compatible with Android Go. Another thing you can do is provide an option to install the mobile app on SD card. Many Android Go users are more likely to use SD cards to overcome problems with limited internal storage space.
Check app’s memory usage
Android Go operating system is more likely to run on mobile devices with less than 1GB RAM. Hence, you need to optimize your mobile app for memory usage. You need to test the memory usage of your app by following the method given below.
a.) Open your mobile app and make sure it is active on-screen
b.) From the Android Studio toolbar, chooseView > Tool Windows > Android Profiler
c.) Select your device and your mobile app
d.) Click the Memory bar to start recording in Memory Profiler
e.) Spend some time to see how the memory usage increases with actions. If you see certain actions increase memory usage, you need to take steps to optimize them
Optimizing memory usage in mobile app
Optimizing your mobile app’s memory usage for Android Go can be a tricky thing to do. On one hand, you are trying to build a powerful mobile app for high-end devices and on another hand, you are trying to make it compatible with low-end devices.These are two contrasting things and you need to balance your act while doing so. Here are some ways to reduce app’s memory usage.
Tailor memory usage for the app
The getMemoryInfo () query can help you know the memory heap available for your mobile app.Since several apps run simultaneously in the background, the memory usage changes with time.
You need to design your app to use the ComponentCallbacks2 interface and onTrimMemory () callback intelligently to deal with low memory state.
The onTrimMemory () function can be used to trim unneeded memory from the app process. The ComponentCallbacks2 interface needs to be implemented to release memory incrementally taking into considering the memory constraints of the device.
This will help the Android Go system to keep your mobile app process alive for longer that will also enhance user experience.These functions and classes are highly useful in Android Go as the mobile device may encounter several low memory availability warnings on a regular basis.
Pay attention to startup time
Though Android Go devices are likely to have low horsepower, you need to ensure short startup time for your mobile app. The mobile app should launch within 5 seconds or less. The Logcat command line tool is useful to know the time spent between launching the process and finishing the drawing activity.
If you see any Displayed value is5 seconds or more, you need to check whether the app is performing any heavy work such as initializing the application object or rendering any parts of UI that are not required during initial launch of the mobile app.
Check Battery usage
Android Go devices are more likely to have less powerful batteries than their Android counterparts. Hence, you need to check battery usage and exactly find out how your mobile app is using the battery. You can use Battery Stats or Battery Historian to know about battery usage of your mobile app.
Regulate app behavior during runtime
The battery levels do not remain same all the time. Hence, you need to regulate app behavior during runtime.The battery is a valuable resource for a mobile device and you cannot keep a consistent mobile app behavior at all times.
For example, your mobile app can use the battery resource more freely when the battery level is at 100% but it should work to conserve battery when the battery charge level is around 20% or less.The user gets more concerned when the battery level drops and their concern increases when it reaches 5% or less. You need to acknowledge users concerns about battery life and regulate app’s behavior with changing battery state.
The Android platform provides BatteryManager class which has two strings ACTION_POWER_CONNECTED and ACTION_POWER_DISCONNECTED that broadcast the state of the power connection.You should use these strings wherever possible to regulate your app behavior and battery consumption during runtime.For example, you should delay battery-intensive operations until the device is not in charging mode. These way users are less likely to notice your app’s battery consumption.
You should also use the BroadcastReceiver to listen to broadcasts and use it to control app behavior. For example, you can delay or suspend non-essential activities when the system issues ACTION_BATTERY_LOW broadcast.
Using Prefetch data option intelligently
Wi-Fi and Radio are power hungry and you need to delay non-essential network requests from your app wherever necessary.You can follow the strategy of bundling multiple data requests into one network request. You need to also anticipate the data needed for next actions and use prefetch data option when the device is connected to the network. This will ensure the user is able to complete the action even when the data stream is not available due to network issues.However, beware of going overboard while prefetching data as it will only lead to wastage of data to download something users don’t need.
Use Cache option to reduce data usage
If your app has some data that is unlikely to change, you can store it in SQLite database or Shared Preferences. You can cache images in the library like Picasso or Glide.
Creating a tailored APK for Android GO devices
Google Play allows you to create multiple APK’s and assign them same package name in the listing. Instead of keeping a common APK for high-end and low-end devices, you should create a tailored APK for Android Go devices.You can upload both APK’s to Google Play and Google will select and label the best APK for Android Go devices. However, don’t forget to name the right APK in the manifest so that users know which APK they are downloading.
By following the guidelines and tips given in the article, you can ensure all app users enjoy high-level experience irrespective of the capabilities of their devices. The modifications and tweaks suggested in the article will ensure the app does not fail to impress users even on low-end devices that will take the popularity of the app to next level.
Promatics is an ISO 9001:2008 certified offshore web and mobile application development company with a strong team of 100+ highly skilled IT experts delighting SMEs across USA, Europe and APAC. Our services and solutions help clients to achieve tangible business value and remain competitive in today’s evolving marketplaces.