Greetings.
Ive recently started dabbling with android application development, and permission enforcement confuses me a bit, so I was hoping someone could elaborate on the following:
Im working on application communication, and if I run two applications with different permissions, and app#1 starts a service belonging to app#2 by sending an intent, with the startService method, should it not generate a SecurityException?
I am asking because I was expecting an error but did not get any, so I am wondering why.
The permissions are set in the manifest like so:
If I nest the <uses-permission> statement in the <service> tag, I get the expected SecurityException, but that is not the case, when the <uses-permission> tag is placed outside of the application, as done in the example above.
So what is the difference? Ive been searching the forums and the official site, and havent been able to find an answer for this one.
Shouldn't the service also inherit the permissions required by the application?
- I am not sure if this is of any importance, but I am using an emulated android version 2.1 phone.
Hope someone can point me in the right direction on this one
Thanks for your time,
Andr
Ive recently started dabbling with android application development, and permission enforcement confuses me a bit, so I was hoping someone could elaborate on the following:
Im working on application communication, and if I run two applications with different permissions, and app#1 starts a service belonging to app#2 by sending an intent, with the startService method, should it not generate a SecurityException?
I am asking because I was expecting an error but did not get any, so I am wondering why.
The permissions are set in the manifest like so:
Code:
<manifest>
<application>
<....>
</application>
<uses-permission...>
</manifest>
If I nest the <uses-permission> statement in the <service> tag, I get the expected SecurityException, but that is not the case, when the <uses-permission> tag is placed outside of the application, as done in the example above.
So what is the difference? Ive been searching the forums and the official site, and havent been able to find an answer for this one.
Shouldn't the service also inherit the permissions required by the application?
- I am not sure if this is of any importance, but I am using an emulated android version 2.1 phone.
Hope someone can point me in the right direction on this one
Thanks for your time,
Andr