I am developing an Android application. There is a requirement that the app doesn't allow users to use the app if they are controlling the device remotely via WiFi using some apps like Air Droid, TeamViewer... In Android 9 and below, I can query the network statistics to detect if those apps are obtaining some ports to enable remote controlling. But from Android 10, Google doesn't allow app to query network statistics anymore by denying access to /proc/net directory: https://developer.android.com/about/versions/10/privacy/changes#proc-net-filesystem
Is there an alternative solution for this requirement?
Thank you for your help.
Apps that need access to this information, such as VPNs, should use the NetworkStatsManager or ConnectivityManager class.
– Bank