Hi,
could someone please sheds some light on this topic?

Il giorno sabato 3 marzo 2012 20:28:00 UTC+1, Alexander Osmanov ha scritto:
>
> Hi Dianne,
>
>   could you please comment which would be a correct way to handle this 
> limitation then? If I want to protect a plugin to my application with a 
> custom permission, should I declare this permission in both apps?
>
> Thanks.
>
> On Wednesday, February 22, 2012 12:11:33 AM UTC+4, Dianne Hackborn wrote:
>>
>> Sorry, no this is a current limitation of permissions, they need to be 
>> known at install time to be granted.
>>
>> On Tue, Feb 21, 2012 at 11:52 AM, Kevin TeslaCoil Software <
>> ke...@teslacoilsw.com <javascript:>> wrote:
>>
>>> I'm trying to implement a custom permission to be used between two of
>>> my apps.
>>> In AppA I declare:
>>>
>>>    <uses-permission android:name="com.teslacoilsw.TEST_PERMISSION" />
>>>
>>> And in AppB I declare:
>>>    <permission android:name="com.teslacoilsw.TEST_PERMISSION"
>>>        android:label="TeslaCoil Test"
>>>        android:protectionLevel="normal" />
>>> ...
>>>        <service android:name=".TestService"
>>>            android:exported="true"
>>>            android:permission="com.teslacoilsw.TEST_PERMISSION"
>>>        />
>>>
>>> If I install AppB and then install AppA, it work as expected (AppA can
>>> bind to AppB's service). However if I install AppA and then install
>>> AppB, I get a SecurityException when trying to bind to the service as
>>> the permission is not granted. (Tested on Android 4.0.3)
>>>
>>> I've investigated adding the <permission> declaration to both
>>> manifests and this does seem to work, I assume because the permission
>>> now always exists at install time. However this feels wrong to me.
>>>
>>> Is there a correct way for an app to declare a permission in an
>>> environment like the Market where installation order is not
>>> guaranteed?
>>>
>>> Thanks,
>>> -Kevin
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to 
>>> android-d...@googlegroups.com<javascript:>
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com <javascript:>
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
>>
>> -- 
>> Dianne Hackborn
>> Android framework engineer
>> hac...@android.com <javascript:>
>>
>> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to