How to use Android native capabilities to build a great experience?

One of the main reasons to shift your development efforts from hybrid (HTML 5 web) funnel to native app is to improve user experience and with that comes the opportunity to use some of the native Android capabilities which are not possible in mobile web world or even if possible the usage is very limited. So, while we spend the increased effort to develop native apps instead of going with hybrid funnel in apps, we should definitely leverage native capabilities which helps improve user experience. Some of the top and most used Android native capabilities are:

  1. Location –Fetching user’s geo-location (exact latitude and longitude) to personalize user experience and showing relevant options to user is at the core of using Android location services. Some of the cases where location is fetched are:
  • Food delivery apps like Zomato and Food Panda fetch location to show nearby restaurants
  • Cab service providers like Ola and Uber fetch location data to show nearby cabs and use location data to track real time cab location
  • Hotel booking apps fetch location data to show nearby hotels
  • Real estate apps fetch location to show available properties near by
  • Recent phenomenon Pokémon uses user location to show nearby Pokeys to catch and Poke stops
  • Google Photos captures user’s location in background to tag photos to user’s location and create timeline on top of that
  • Location specific offers provided by apps like Foursquare and fitness tracking apps which measure steps taken during the day etc. Though these require a slightly more nuanced implementation which I will cover in the below section on how to do it.

So how to do it? You can fetch user’s last known location using Google location services. These location services leverage GPS signals and the location of nearby cell towers to estimate where you are. In recent years, these location services also began noting the MAC addresses of nearby Wi-Fi networks, adding additional precision. These can be accurate to within 3–3.6 meters (10–12 feet), depending on your proximity to Wi-Fi routers. So, this is pretty accurate actually.

In addition to fetching user’s location one time, you can request location update as well. For this we need to implement a Location Listener interface which gets called every time a new location is detected by the Google Play service and is silently working in the background updating the location. Location specific offer apps like Foursquare fetch user’s location after every pre-defined time interval and check if the location is in proximity to any of the defined zones which have stores/places about which user needs to be notified.

Image Source

How it works? — We can set the priority to high accuracy which means we want location updates as accurate as possible. This mode also drains the most battery. If we don’t need so high accuracy we can lower the value. Next up is the interval which means after that interval the location update is triggered. Foursquare uses interval mechanism to keep the user’s current location updated whereas fitness tracking apps use high accuracy location updates and the user sensor data (will cover in next section) to track user activity.

2. Sensors- Most Android-powered devices have built-in sensors that measure motion, orientation, and various environmental conditions. Reading sensor data in Android is pretty straightforward as it involves implementing the SensorEventListener interface.

  • A game might track readings from a device’s gravity sensor to infer complex user gestures and motions, such as tilt, shake, rotation, or swing. E.g. Subway surfer game uses gravity sensor to infer tilt of phone
  • A weather application might use a device’s temperature sensor and humidity sensor to report the temperature
  • Google maps use of shake feature to report a feedback regarding a route
  • A fitness app counting up your steps, monitoring your sleep and calculating the difference between a light jog and a mad sprint

So how to do it? — There are motion, environmental and position sensors to track user data.

  • Motion sensors — These sensors measure acceleration forces and rotational forces along three axes. This category includes accelerometers, gravity sensors, gyroscopes, and rotational vector sensors.
  • Environmental sensors — These sensors measure various environmental parameters, such as ambient air temperature and pressure, illumination, and humidity. This category includes barometers, photometers, and thermometers.
  • Position sensors — These sensors measure the physical position of a device. This category includes orientation sensors and magnetometers.

Let me explain this by taking an example of fitness app — Google Fit

It tracks movement in every direction using 3-axis accelerometer which detects changes in the position and uses magnetometer to identify the direction. The data collected is then converted into steps, calories burnt and distance travelled.

These sensors measure the acceleration, frequency, duration, intensity and patterns of your movement — taken together that’s a good bunch of data and it can help a tracker work out if you’re walking down the road or riding a car.

3. Read user’s network type to optimize performance — We can detect whether the user is using the app on Wi-Fi, 4G, 3G or 2G and optimize the app performance accordingly. For e.g. a user using an app on 2G should be served a less data consuming experience with less images vis-à-vis a user using an app on Wi-Fi/4G can be served with image/video heavy experience. I would say Facebook is best in this as they optimizes the user experience depending on network type. One example is that they load low resolution images on slower network types whereas high resolution images on faster ones.

4. Other apps on user’s phone — We can read other apps on user’s phone to create a user profile basis the apps s/he is using. Some of the examples are as below:

  • We can figure out competitor apps on user’s phone to do segmented targeting as you would know that the intent to purchase is higher in that case
  • We can do user profiling basis the apps s/he has in the phone. E.g. Some of the user attributes like gender, age, interests can be figured out from the types of apps user has in the phone
  • Specific ad targeting can be done. Apps like Truecaller/Saavn/Ganna can display relevant ads to the user basis the apps a user has or doesn’t have on the phone (thus leading to improved conversion). Similarly, they can also choose whether to show an app install ad v/s re-engagement ad depending upon whether the user has the app or not.

5. Photos/Media/Files — We can take user’s permission to modify, read or delete files from USB storage, like uploading private camera images to a server. The date and time when each photo was taken is embedded within the photo.

  • Apps like Google Photos creates a trip timeline using those images
  • Other use cases like attaching images from your phone while submitting a feedback would need access to user’s photos and media files
  • Photo editing apps like Bobble/Prisma would need access to photos/media/files to access media files and allow users to pick the photo to edit
  • You can also write data in phone storage so that you can access the data next time the user launches the app. This would help in making the experience faster.

6. Camera/Microphone — We can take user’s permission to use camera and microphone. Camera can be used to take pictures and record videos while microphone can be used to record audio.

  • Photo editing apps like Instagram/Prisma uses camera to allow users to take pictures, edit and share the same with their network
  • Apps which allows submitting photo reviews would need access to camera to click the pictures and share
  • Messaging apps like WhatsApp/Messenger uses microphone feature to allow users to record and share audio files
  • Google apps uses microphone to allow voice based search

7. Contact list — You can read user’s contacts to use the same to build features on top of that. Though reading contacts is a permission that you should be extremely wary of and should only do if the feature built on top of that provides a real value to the user. Social networking apps like Facebook use this permission legitimately and back-it up with a privacy statement.

  • Facebook reads your contact list for “Add a friend” recommendation to you in your news feed. They also take into account the people you have made a call recently to sort “Add a friend” recommendations
  • True caller reads your contact list to store the contact information in their data base basis which they create the user profile they eventually show
  • More and more companies these days are trying to leverage the power of user’s contact book as that’s the best network for user to share with and in turn benefit the app in reaching/acquiring new users and engaging with existing ones. An example is Inshorts app’s “Toss” feature, they sync your contact list and then you can share the news with people in your contact list thus enabling personalized news sharing.

8. SMS — Reading user’s SMS data to build features is another smart way to engage users. Similar to contact list permission, SMS also contains sensitive user data and should only be used if it provides a real value to the user. Otherwise, this could really backfire and make user uninstall your app.

  • SMS permission to do automatic OTP verification is the most widely used case for reading SMS data
  • Financial apps like Walnut money manager and Finbox read user’s SMS data to parse transaction SMS and provide the expenditure summary to the user
  • Then apps like ReadItToMe totally rely on reading SMS data as that is very core to what they do. They would read out SMS while you are driving and help you reply back without touching your phone.

9. Calendar — You can read or modify user’s calendar data to add events to user’s calendar. Any ticket booking app can use this functionality as they can add the event in user’s calendar once a user has made a booking. This will help remind the user about the booking near to the event date/time.

In all, you can fetch/access a lot of user information using Android OS native capabilities but you should use your judgement to decide what you should use/not use to create the best user experience.