Oh yeah and actually this is the one most people use: http://developer.android.com/reference/android/content/Context.html#enforceCallingPermission(java.lang.String, java.lang.String)
On Fri, Jul 30, 2010 at 7:07 PM, Dianne Hackborn <[email protected]>wrote: > Binder.getCallingUid() returns the uid of the calling who initiated the > current incoming call. > > However more typically you'll use one of the flavors of these to just do a > permission check on the incoming call: > http://developer.android.com/reference/android/content/Context.html#checkCallingPermission(java.lang.String) > > That function calls Binder.getCallingUid() for you and then does the > permission check with the system. > > On Mon, Jul 26, 2010 at 11:13 AM, Jin Chiu <[email protected]> wrote: > >> In the implementation of my remote service's published API, is there a >> way to identify which client called a given method? For example, is >> there a way to obtain a unique ID or address of the caller? I already >> cache an AIDL callback reference to the client, but not sure how I can >> use this for identification. >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

