The past few weeks have been of great significance to the mobile app developer community with Google I/O and WWDC taking the centre stage. Not many new devices were introduced to the market, but a lot more focus has been put on the enhancements to the underlying platforms. New API’s were introduced for developers to build immersive experiences and changes to existing SDK to improve stability and performance. It will be a long post to include all of them in one article and so we will be publishing multiple articles, each focussing on a specific topic.
One of the changes to the platforms that hasn’t been much advertised is restrictions on apps running in the background. Android apps have been enjoying quite a bit of freedom in terms of running in the background, and this allowed developers to collect analytics, poll for data from servers and serve content to the user. One of the major applications of this feature is to capture user’s location when in the background. While this gives great flexibility for developers to craft new solutions, it has an impact on the device’s battery life and performance.
Android with the O version, added new restrictions specifically around a number of services and broadcast an app can initiate. For apps that run service in the background to fetch data, it is suggested to implement JobScheduler, to periodically query the server. This restriction is on implicit broadcasts and not on explicit broadcasts. The reason is that, if there are many apps subscribing to a specific broadcast, all these apps are being invoked in succession, which impacts the performance of the device.
Until now on Android, there were not many restrictions on location access for apps running in the background. Improper implementations cause apps to hold on to location access constantly, which will have a direct impact on the battery life. Such aspects impact the perception of the app and subsequently account for low user growth. A user has an option to disable location access by disabling the feature in app settings. With Android O, there is a limit on how frequently background apps can retrieve user’s current location. If an app needs to access the location at a much higher frequency, then it is suggested to implement a foreground service or implement Geofencing API.
iOS has always been restrictive on app behavior when in the background. Early on, it was not an option, but in later releases iOS started to allow apps to run in the background, to improve multi-tasking and to provide fluid experiences. On iOS, apps have an option to access user’s location when running in the background, but the location updates are not frequent. While the user is informed during app install process regarding access to the location in the background, a user does not have much control on allowing access to the location later on. With iOS 11, users now have the ability to enable or disable location access when the app is in the background.
It is interesting to see that location restriction are introduced at the same time on both the versions. While each of the platforms had a different strategy for background apps and location access until now, it looks like iOS and Android have similar behavior with the new versions. This change will impact apps that are tracking user’s location without actually providing many benefits to the user. Ride sharing apps (Uber, Lyft etc), location-based marketing apps will have a major impact due to these changes.
Imaginnovate has vast experience in implementing location strategies in mobile apps and helping businesses effectively manage user location data. To know more about Imaginnovate and how we can deliver a successful location strategy for your app, drop us a note at email@example.com and one of our mobile app experts will get in touch with you.