At some point in the android platform, I wish to identify the application that is requesting location updates although I realize that this violates the programming logic of the platform being ‘context’-free.
I scourged through the android location framework and could not find a way to tag a LocationListener back to an application.
Is it possible to identify which class or package instantiated a particular object?
You can do the following:
frameworks/base/services/java/com/android/server/LocationManagerService.javarequestLocationUpdatesmethod and also into other methods) a functionBinder.getCallingUid()So after that you’ll know the uid of the calling application. I hope this will help you!