Can I use the Android app to track user activity?

I want to know if it is possible to write an Android application that, when it is running in the background, can track user actions? (For example, what other application did the user use, what phone number did the user dial, the GPS location for the user, etc.) Cause I'm not sure if one Android application can respond to another application, does anyone know the answer? Thanks

+7
source share
4 answers

Generally no, you cannot. And users would probably prefer that.

Once this has been said, there are certain partial solutions. Sometimes the system is so useful that it will publish an Intent that reflects the user's actions: for example, when the user uninstalls the application - with the caveat that you do not get this intention in the deactivated application itself.

It used to be before Jelly Bean (4.1) applications could read a magazine that other applications publish and try to extract information from there, but it was a cumbersome, error-prone, thankless task. For example, the browser does not show when it goes to a specific page. You can read the logs for some time adb logcat to understand what is possible and what is not. This action requires appropriate permission , which can no longer be performed by regular applications.

Thanks to @WebnetMobile for magazine titles and @CommonsWare for links see comments below.

+5
source

Fortunately, spyware users at this level should not be possible. Some functions can be achieved by misuse of android errors that will be fixed sooner or later. I see absolutely no reason for you to know what number I am calling and where I have been recently. This is basically none of your business.

+1
source

Yes, you can.

You can see here, for example, information about the phone: Track the duration of a phone call

or

http://www.anddev.org/video-tut_-_querying_and_displaying_the_calllog-t169.html

There is a way to let Android and users know what you are using and access their data to determine if they will allow it.

I'm not sure that you can simply access any application, but theoretically, if you know how to read stored files that might be possible.

For example, Runtime.getRuntime().exec("ls -l /proc"); will provide you with the root folder "proc" with a lot of data that you might need. Perhaps this has been changed, I'm not sure, and I also don't know what you need.

Perhaps to get started, try:

 public static boolean getApplications(final Context context) { ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List<RunningTaskInfo> tasks = am.getRunningTasks(1); } 

To do this, you must include this in your AndroidManifest.xml

 <uses-permission android:name="android.permission.GET_TASKS" /> 

More on this: http://developer.android.com/reference/android/app/ActivityManager.html#getRunningAppProcesses%28%29

+1
source

You could, of course, but I think that reporting that data to you, without the user's knowledge, via the Internet, will be considered spyware and almost certainly illegal in most jurisdictions.

0
source

All Articles