android - Check which app is doing what -
is there way check app doing in android, application. mean
- if app reading call logs
- if app reading msg
- if app reading data server
- if app accessing gps,
- if app playing music
please suggest idea, appreciated.
the best can check if app has permissions required each task. following snippet retrieves permissions installed applications:
packagemanager pm = getpackagemanager(); list<applicationinfo> packages = pm.getinstalledapplications(packagemanager.get_meta_data); (applicationinfo applicationinfo : packages) { log.d("test", "app: " + applicationinfo.name + " package: " + applicationinfo.packagename); try { packageinfo packageinfo = pm.getpackageinfo(applicationinfo.packagename, packagemanager.get_permissions); //get permissions string[] requestedpermissions = packageinfo.requestedpermissions; if(requestedpermissions != null) { (int = 0; < requestedpermissions.length; i++) { log.d("test", requestedpermissions[i]); } } } catch (namenotfoundexception e) { e.printstacktrace(); } }
beyond that, because app has permission doesn't mean doing that. permissions cover more 1 use, , app using 1 part of has access to.
Comments
Post a Comment