Tag Archives: Notifications

Android Oreo

How to Optimize GPS and Background Processes for Android Oreo

As our past article Android Oreo Serves Up the Sweets will show, Android Oreo lived up to expectations upon release and gave both consumers and app developers plenty of enhancements to enjoy.

However, for app developers, enhancements to the UI aimed to conserve battery life affect GPS services and require changes to the code in order to optimize pre-existing apps for the new OS. Specifically, Android Oreo restricts apps that are running in the background with limited access to background services. Additionally, apps can no longer use their manifests to register for most implicit broadcasts. When an app is in the background, it is given several minutes to create and use services, but at the end of that time slot, the app is considered idle and the OS will stop running background services.

These changes directly affect apps with geolocation functionality. Android Oreo limits how frequently apps can gather location in the background. Background apps can only receive location updates a few times each hour. The APIs affected due to these limits include Fused Location Provider, Geofencing, Location Manager, Wifi Manager, GNSS Measurements and GNSS Navigation Messages.

Apps that currently use location services in previous Android OS’s will require an update to optimize for Android Oreo. Apps that use location services range anywhere from navigational apps like Waze and Google Maps to social media apps like Twitter, and food apps like Yelp and Seamless.

For apps that require frequent location updates, increasing the usage of the app in the foreground will ensure that the app gets frequent access to location information. In order to program this, developers must implement startServiceinForeground() instead of startService() in Activity class.

In Service class in onStartCommand(), developers can use the following code:

Screen Shot 2018-05-07 at 12.46.57 PM

Via StackOverflow

When foreground services running in the background consume high energy, Oreo fires an automatic push notification to the user informing them of the battery-consuming service. With the push notification in place, app users are more likely to uninstall apps that track location without conserving battery life, putting the onus on software developers to deliver battery-efficient apps. One of the biggest issues facing some app developers is ensuring that battery life is not sucked as a result of tracking location in apps. Check out our full rundown of how to build battery-efficient geolocation apps for supplementary reading.

The results of the limits put in place with Android O are increased battery life for the user and the necessity for app owners to consider how their apps interact with location information. Retaining a thorough understanding of how location information will be retrieved and used through out the development process ultimately benefits both software developers and consumers with better UI and more energy efficient processes.

Android Oreo

Android Oreo Serves Up the Sweets

Like the candy, Google’s newest delectable dessert-themed operating system Android 8.0 Oreo offers the best of both worlds: crunchy cookie goodness of versatile functionality and the creamy frosting of beautiful UI and presentation.

PROJECT TREBLE 

Project Treble is one of the major aspects of Android Oreo that makes it a full 1.0 update. Project Treble is designed to reduce device fragmentation by making it easier for hardware manufacturers to issue updates on Android devices. The architecture redesign modularizes the Android OS away from the drivers and other hardware-specific code. By making it easier for manufacturers to update Android devices, Project Treble makes accessing the latest Android OS from your devices  easier than ever.

HIGH-PERFORMANCE BLUETOOTH AUDIO

Android Oreo is loaded up with BLUETOOTH 5 and LDAC, making Oreo capable of supporting audio quality that surpasses what the vast majority of high-end audio equipment can reproduce.

LDAC is a codec that supports the transfer of 24 bit, 96kHz audio via Bluetooth. The closest competitor is Qualcomm’s aptX HD which supports 24 bit, 48kHz technology. LDAC was created by Sony, who donated the codec to Android for Oreo as a part of the core AOSP code for other OEMS to implement.

Whereas previous iterations of Bluetooth offered a range of 50m-100m outdoors and 10m-20m indoors, Bluetooth 5 can reach up to 200m outdoors and 40m indoors. Additionally, Bluetooth 5 BLE doubles Bluetooth 4.x BLE’s data transfer rate with up to 2Mbps. The kicker is: Bluetooth 5 actually utilizes up to 2.5 times less power while increasing range and speed.

BATTERY LIFE

The Android Oreo update includes multiple initiatives designed to improve battery life. Background execution limits have been enacted to limit requests to scheduled windows of activity, resulting in longer battery life and less strain on the device by inactive apps.

Android Oreo places two major limitations on what apps can do while users aren’t directly interacting with them:

  1. Background Service Limitations limit the use of background services by idle apps. This does not apply to foreground apps, which are defined as apps with visible activity, apps with a foreground service, or apps that are connected to another foreground app.​
  2. Broadcast Limitations prevent apps from using their manifest to register for implicit broadcasts. Apps can still use their manifest to register for broadcasts at runtime and for explicit broadcasts targeted specifically at their app.

For the most part, app developers can work around these limitations using JobScheduler jobs. Android has also made several improvements to JobScheduler.

Background execution limits will have a major impact on the functionality of existing and future apps, check out a full breakdown of the new functionality directly from Android.

Additionally, Android Oreo comes with Vitals. Vitals is an initiative by Google that improves system performance and stability by offering developers various tools to monitor app usage on a device. Vitals enables developers to  optimize their apps for improved battery life and performance.

UI

Google’s strategy with OS updates has become more and more minimal in recent years. The last major visual OS overhaul was enacted by Google in Android 5.0 Lollipop. Android Oreo does not change the name of the game, but offers a variety of UI improvements.

DOWNLOADABLE FONTS: Android 8.0 Oreo offers support for apps to request fonts from a “provider” application, reducing the amount of disk space spent by apps on storing font libraries individually.

NOTIFICATION CHANNELS: Notifications have always been one of the strong suits of Android Operating Systems. With Android Oreo, app notifications must be sorted by the developer into channels based on type, so that the user can then customize what types of notifications they would like to receive and how they receive them.

For example, users can modify characteristics of notification channels that apply to all notifications in that channel, including:

  • Importance
  • Sound
  • Lights
  • Vibration
  • Show on lock screen
  • Override do not disturb

PICTURE IN PICTURE MODE: Oreo ports Android’s famous “Picture-In-Picture Mode” for phones and tablets. Picture-In-Picture Mode allows users to view multiple apps at the same time. It is most handy for watching video or having a video call while using another app.

TAKEAWAY

Overall, Android 8.0 Oreo delivers the goods. It’s sleek, supports the best audio quality available, allows more UI customizability, saves battery life, and it’s a major step toward conquering device fragmentation which has plagued Android since its inception.

Not Too Pushy: 5 Rules for Pushing App Notifications Without Annoying the User

An application can do great things for a business. It’s a gateway into a digital experience catered to a brand, an opportunity to ingrain a brand into the user’s daily life. Push notifications allow applications to send messages with pertinent information to the user. Some are silent and simply light up the phone screen with a notification, while others vibrate to physically notify the user of more important, time-sensitive information.

The problem is: push notifications are… well… pushy. They can be annoying. It takes a mere Twitter search to prove that when users get annoyed, they take to social media, which is bad for business.

And yet, studies show when push notifications are turned on, they average 88% more launches than those with push notifications disabled. Some studies show up to a 540% increase in daily app opens.

Thus the conundrum becomes: how does one balance between being overly pushy, and not pushy enough? Although each case is subjective, we put together some guidelines for app developers and businesses looking to boost app usage without alienating customers.

1. Make Them Customizable

This is easily the cardinal rule. Do not push your push notifications on the user. Allow them to choose both whether and which push notifications to receive. Give the user options for how frequently they wish to receive notifications and/or what prompts them. There’s no excuse for an overly pushy app and it will be uninstalled.

2. Silent Notifications Work Too

Silent push notifications light up the phone screen with neither a sound nor a vibration. They are great for games, a tempting little offer which may catch the user’s eye when it lights up and lingers on the screen until the smartphone is next unlocked. Diversifying your notifications only makes for a more tolerable digital experience.

3. Analyze Customer Data

App developers have a host of awesome data at their disposal which ought to be utilized in tweaking their apps. If you notice customers often opting out of certain types of notifications, do them a favor and get rid of them. Or make them sign-up for them rather than giving them the work of having to opt-out. As they say, the customer is always right.

4. Geo Detection Is Your Friend

Geo Detection technology allows retailers to detect when a customer last visited their store or when a customer is nearby. Retailers can use Geo Detection technology to put out blasts to all customers in the area of special offers and coupons. For more information on Geo Detection notifications, check out this awesome article.

5. Offer Value

Seamless and GrubHub offer silent push notifications which, when swiped, give the user a discount on their order. Customers are more likely to read push notifications if they know there’s something in it for them. Push notifications are your friend, make sure they are your customer’s too.

Mystic Media is a web and software development company with expertise in iOS and Android application development and strategic marketing. Follow us today on Twitter (@mysticmediasoft), like us on Facebook, and contact us with any questions by clicking here or by phone at 801.994.6815