I have a requirement to stop the application when it is detected that a remote application such as TeamViewer QuickSupport or AnyDesk is controlling the user's device. Are there any ways to detect when a remote application is running and the control device is active?
-
I already found solution by use getDisplays() from DisaplyManager if it return more than one it's mean it controlled from another device or it sharing the screen with some applications – Abhichet Ketsiri Mar 23 '23 at 10:58
2 Answers
following this link (How can I check if an app running on Android?) you can detect if an application is running on device. (you should detect all the packages to block). on the other request: "and the control device is active" i don't know if it's possible, because I think it is a config parameter of external application (quick support or anydesk config i mean)

- 162
- 10
-
I followed your link it's seem "runningAppProcesses" able to query only application that still in foreground – Abhichet Ketsiri Mar 16 '23 at 11:21
Hopefully this will reduce the number of remote phishing victims.
From Android 10, it has become difficult to observe the services that are being implemented with a stronger policies. But it's not impossible.
- Display
- Network Port Scan
- Network Packet Capture
- Check Running Service
The Teamview QS or AnyDesk mentioned in the question can be detected on the display. But there are also things that are not detectable. They are created in a PRIVATE_FLAG form when you create a display.
Even if it's a remote service, if it's Android anyway, it works within the framework created by Google. In other words, we need observe certain points within the framework created by Google.
Do you have any other idea besides this?

- 26
- 2