There isn't any way to do this for a service, though you can find out the calling intent for an activity when the caller is waiting for a result. Most security is enforced in the system either by associating permissions with components in the manifest, or checking the uid of incoming IPC calls to services and content providers.
On Tue, Aug 18, 2009 at 11:03 AM, Jonathan Herriott <[email protected]>wrote: > > I was wondering if there is a way to determine who passed an intent to > my application. For example, I have a service, that I want to act > differently depending on who passed the intent (for security > reasons). I'm trying to sandbox each calling application, so they > only have access to their data stored in my application. > > For it to be secure, I cannot trust any application to be truthful > about the identifying data it is passing into my service. Therefore, > I need some system way of identifying who sent the intent in a way > that the calling application cannot change that information. I don't > know if it is possible, but I can't find anything in the Intent class, > and I was wondering if there may be another structure which does what > I want it to. If it is not possible, I would like to get some type of > mechanism to do this in the roadmap. > > Thanks, > Jonathan Herriott > > > -- 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 -~----------~----~----~----~------~----~------~--~---

