0

I am new to android development. I came to know that Intent and Intent filters can be used to share data among applications but I wonder if it is possible to design an android application which can extract some specific information from other applications while running in the background. For example, if the user is using whatsapp it may get know the call drop rate or if a video is being played at user terminal in YouTube, Facebook or Netflix, it will get buffer playtime, video bitrate etc. I will be very grateful if answer to this question is provided with an example.

Tim
  • 41,901
  • 18
  • 127
  • 145
Dr. Arslan
  • 1,254
  • 1
  • 16
  • 27

3 Answers3

1

No, mostly no.

However, as wrote Tim Castelijns, if the 'target' app allows it, like via a content provider, its possible.

On a rooted device, after long hours of reverse engineering the targeted apps, it MAY also be possible to get some info. Only from rooted devices too.

Other case is you write several app and design that they can communicate together, like via intents, content providers.

There is also possible to get the list of running apps (user must permit it)

Jerome_B
  • 1,079
  • 8
  • 15
  • *There is also possible to get the list of running apps* what use would that have – Tim Aug 02 '16 at 14:20
  • @TimCastelijns the list of apps installed and/or running say a lot on a user. Got stackoverflow app, you are an über geek, have 200 apps ? must mean something too. Got Tinder/grinder/whatever ? it says your sx orientation. – Jerome_B Aug 02 '16 at 15:08
  • That's quite a shallow conclusion. Anyway, the personal interests of a user are of no relevance to this question whatsoever. – Tim Aug 02 '16 at 15:11
  • @TimCastelijns I thought you were asking what it could be used for. My bad. – Jerome_B Aug 02 '16 at 15:14
1

In Android, each application is running on its own "sandbox" that is supposed to be isolated from the rest of the applications running on the device.

In order for an application to communicate with other applications, the Android framework supplies several mechanisms to send/receive data to/from other applications: Intents, IPC (AIDL), Content Providers etc...

Each application that wants to expose its data to other applications on the device needs to implement an interface using one or more of the mechanisms described above.

That means that if an application doesn't implement an interface to expose its data or inner workings, it won't be possible for another application to access this information.

Keep in mind that some applications choose to save some of their data on publicly available disk spaces (i.e. a camera that takes pictures might save them on the SDcard that is accessible by all applications). In that case, if you know what to look for, you can tell certain things about certain applications.

In addition, the Android operation system exposes the states of several global settings such as: Device's connectivity state, Battery state, currently opened Bluetooth interfaces, running applications, last executed apps etc...

This configurations might give you an overall idea of what is happening on the device.

Community
  • 1
  • 1
David Lev
  • 813
  • 5
  • 12
0

As indicated in other answers, you're mostly limited to what apps will explicitly make available to you; in fact, well-engineered apps will generally try to prevent "information leakage" beyond what they actually want to make available.

Some other people mentioned Content Providers but the one other construct to look into is Broadcasts. If an app broadcasts an intent locally (i.e. is using the Local Broadcast Manager) you won't be able to see it but if they're using a "system-wide" broadcast or receiving another "system-wide" broadcast you can receive the same event.