Android Hack, Your Competitor Does Not Want Your Team to Know About

Perry Garg April 18, 2017
First of all, in order to add the first wing to your excitement, here is that ‘piece’ of Android hack:

<Code of class extending AccessibilityService Android class>

<Manifest file injection>

However, if you are not a techie, of course, you have skipped that above boring code part. So for you, here we go:

Above code represents developing ‘Android Accessibility Service’ in Android by extending Android’s “AccessibilityService” class.

What is Android Accessibility Service?

This code enables an application to read “any” screen data of “any” other open application on user’s Android smartphone.

If you are concerned about the privacy of user, you will be happy to know that  this code/feature is wrapped under a user permitted action by Google, which means that user will be prompted for a permission at the time of installing the app. Apart from that, it will work only if user allows this application to act as Accessibility Service from “Accessibility Settings” of device.

Why it is so important to discuss:

This code enables an application to read the screen of currently opened application and perform any kind of operation on the screen based on that data. For example, If an eCommerce app is opened on your device, then this code can read information about a particular product and populate an UI suggesting that product on some other sponsored website in lesser price.

What it is not:

It has nothing to do with implementing general accessibility in your Android app. They are completely different apart from the one common word: “Accessibility”.

How it is different from general accessibility:

While implementing general accessibility practices in your Android application, ‘TalkBack’ is used. Talkback is nothing but an ‘Accessibility service application’ developed by Google itself, which has the ability to read any opened screen and populating UI elements over it in order to enable specially abled users to use the application. For deeper context, if you are a Windows user, you can say Talkback is a ‘Narrator’ for Android or if you are a iOS user, it is ‘Voice over’ for Android.

So, implementing accessibility using abilities of Talkback is a different ball game. Here we are talking about making our own ‘Accessibility Service’ inside our application. Let’s rephrase this sentence to get a clear pitch: Here we are talking about making our own ‘Talkback’ inside our application. Yes, you read that right. Google has provided code to build your own accessibility service just like Talkback. In a brief manner, this will enable your code to read current screen like Talkback does, now this data can be used for all the good and bad purposes.

The user will have to turn on these applications’ accessibility services from “Accessibility Settings”, just like one has to do for Talkback. These apps also get listed along with Talkback in Accessibility settings. Refer screenshot below (peers to Talkback):

Has anyone used it yet?

YES, Absolutely yes. However, there are very very few Android geeks, who are aware of this. But there are players which have used this ‘opportunity’ for adding value to their businesses. Here are few examples:

  1. Hike: If you are a Hike user, you must have loved that feature in Hike Android version which enables you to use cool Hike stickers no matter which chats application is currently opened at your screen like on WhatsApp, messenger etc. This feature created lots of buzz. Have you wondered, how Hike knows that you are currently in a chat application and you want to send a message to someone? You’re right, Hike engineers used that Android piece of code to do this. Refer to below screenshot to get a Deja Vu:
  2. Freecharge: Around May 2016, Freecharge rolled out an unusual feature called ‘Chat n Pay’. It enables the user to pay/transfer money/Freecharge credits while chatting with someone on WhatsApp. As you type ‘<amount>FC’ (for example, 100FC or 200FC) in any chat window in WhatsApp, a Freecharge bubble pops up on your screen. How Freecharge app managed to know that you have typed that in WhatsApp, because it has the ability to read your messages. As you tap on that bubble, a Freecharge window opens up with your and other person’s mobile number and amount to be transferred ‘already filled in’. With one click, you can make payment while you were using WhatsApp. Here is Freecharge blog link stating same:

    I tried reaching out FreeCharge asking for this feature on iOS (as being a techie I knew that this feature is not feasible to built in iOS as of now), Here is a snapshot of twitter conversation:

  3. Voodoo: According to their play store description, “Voodoo is an intelligent shopping assistant application which has an AUTO-ASSIST feature which means you don’t need to launch Voodoo before you plan to shop online. Just open the app of your choice and Voodoo will show up with the best deal. It’s good to be lazy!”Voodoo can communicate with almost 40-50 different kind of apps like Amazon, Paytm, Ola, Uber, Flipkart, Jabong, Myntra etc. With its Accessibility Service, Voodoo can read current screens of all these apps and can draw its own content over them to divert traffic to some other portal. Have a look at the screen captures below:
Few more names are there as well along with this list which uses Android Accessibility services as their backbone.

Take away:

This tool can be used by any application owner in any domain on Android platform, which platform has around 88% market share in smartphone market. It enables to use someone else’s data for someone else’s purposes. However, there are technical complexities in that, probably that’s the reason it is not yet famous in dev community also. There are several technology arms on different platforms, which can impact your business in big manners just like Android Accessibility Services. Stay informed about those in order to build an application which can make your users feel easy, secure and WoW. If you are an Android Developer and want to read about Developing Android Accessibility Services from a technical point of view, refer official Android documentation for same as below:

Android CodeLabs Link:

About the Author:

Perry Garg has been very curious kid always and aspires to board a spaceship running his very own code. Currently serving as Android Module Lead in Magic Software Inc. He is a Punjabi boy in a complicated relationship with gadgets. He loves when someone pronounces his name correctly at first attempt.

Perry Garg

Serving as Android Module Lead in Magic Software Inc. He is a Punjabi boy in a complicated relationship with gadgets. He loves when someone pronounces his name correctly at first attempt.