application communication and permissions


Last Updated:

  1. AndreMu

    AndreMu New Member This Topic's Starter

    Joined:
    Apr 29, 2010
    Messages:
    4
    Likes Received:
    0
    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:
    Code (Text):
    1.  
    2. <manifest>
    3.    <application>
    4.        <....>
    5.    </application>
    6.    <uses-permission...>
    7. </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
     

    Advertisement
  2. AndreMu

    AndreMu New Member This Topic's Starter

    Joined:
    Apr 29, 2010
    Messages:
    4
    Likes Received:
    0
    letting this one surface one more time in hope of an answer
     

Share This Page

Loading...