You can't do this. They Android system does not allow any app to monitor the activities of another app. The closest you can come is to check for and make a list of all apps which have the android.permission.READ_CONTACTS
permission.
How to find out which application is accessing phone contacts in background?
-
15-03-2022 - |
質問
I have searched a lot but didn't find any thing useful. I have created one sample application which will read and write the contacts and check the Android Log but didn't found any intent or any thing which shows my contacts are getting accessed by app.( I have used the content resolver
To Read Contact
Cursor phones = getContentResolver().query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null,
null, null);
and To Write into Contact
ArrayList < ContentProviderOperation > ops = new ArrayList < ContentProviderOperation > ();
ops.add(ContentProviderOperation.newInsert(
ContactsContract.RawContacts.CONTENT_URI)
.withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, null)
.withValue(ContactsContract.RawContacts.ACCOUNT_NAME, null)
.build());)
I can check the app permission while installation but i want to capture the event while my contacts get accessed by other application.
解決
所属していません StackOverflow