0

I have one small problem i.e whenever we install an application in our android mobile we need to find whether that application reads our contacts or not. If that application reads contacts then we have to raise one alert box with red mark and with some information. So thats why i am creating one application to find, the newly installed application reads our contacts or not.

Pls help me. Thanks and regards.

NaseerKhan
  • 65
  • 2
  • 10

2 Answers2

0

Possible duplicate...

Answer is here: Java: Need some way to shorten this code

PackageManager p = context.getPackageManager(); 
final List<PackageInfo> appinstall = 
    p.getInstalledPackages(PackageManager.GET_PERMISSIONS | 
                                      PackageManager.GET_PROVIDERS)
Community
  • 1
  • 1
Lior Iluz
  • 26,213
  • 16
  • 65
  • 114
0

If an application can read contacts it requires android.permission.READ_CONTACTS permission. If you want to specify some particular contacts that should raise an alert then you cannot do this on an application level. You need to get down to the Android Framework level and build your own version of Android.

Yury
  • 20,618
  • 7
  • 58
  • 86