Yeah your app must first be installed for them to ever be granted that
permission.  Otherwise, at the time other app is installed, the system
doesn't know anything about that permission, so it can't tell the user about
it in any way so it just can not grant it.  If your app is installed after
that, the system could conceivably prompt the user to confirm that any other
apps who have requested your permissions now have them granted...  but there
is significant work there that we currently don't have planned, and it's not
clear to me that this would be a sane user experience at all anyway.

If this is indeed a harmless permission, why have it at all? :}

On Fri, Jan 23, 2009 at 10:26 AM, Peli <peli0...@googlemail.com> wrote:

>
> But if I create a public permission in my namespace, and a third party
> application wants to use this permission, they would have to use my
> namespace for the permission.
>
> Now the user first installs the third party application. Then they'd
> better include the definition of my permission with their apk,
> otherwise they can later not access my (intent, service, content
> provider...) when my apk gets installed.
>
> So, unless I can be sure that the permission is already installed on
> the phone, I have to include all permission definitions of third party
> applications using their namespace in my application - right?
>
> But if I do so, can my first application say:
> "Hey, I want the permission com.something.ABC which is just a harmless
> permission 'read status'", and the user grants this permission.
>
> When in fact later com.something gets installed and permission
> com.something.ABC is in fact the permission to detonate a bomb. But
> the user had already granted that permission, so the system allows the
> first application to do so.
>
> Am I seeing this correctly?
>
> Peli
>
> On 23 Jan., 18:52, Dianne Hackborn <hack...@android.com> wrote:
> > Yes, the first app gets the permission.
> >
> > Basically don't do this.  That is why permission names, like so many of
> > these things, specify to use fully-scoped names, so you can ensure that
> no
> > other app conflicts with you.
> >
> >
> >
> > On Fri, Jan 23, 2009 at 6:21 AM, Peli <peli0...@googlemail.com> wrote:
> >
> > > What happens if 2 applications (one that offers a permission, and one
> > > that uses it), define a permission in different ways?
> >
> > > Application A:
> > > <permission android:name="xxx.MYPERMISSION"... />
> > > <uses-permission android:name="xxx.MYPERMISSION".../>
> > > <activity permission="xxx.MYPERMISSION" .../>
> >
> > > Application B:
> > > <permission android:name="xxx.MYPERMISSION"... />
> > > <uses-permission android:name="xxx.MYPERMISSION".../>
> >
> > > How are permissions enforced if the definitions given for the same
> > > permission MYPERMISSION differ in application A and application B?
> > > (i.e. if the labels differ, or the permission group or protection
> > > level are different?)
> >
> > > Is it recommended that both applications define the same permission?
> > > (I have noticed, if they do not, then the order of installation of the
> > > two applications matters)
> >
> > > Peli
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support.  All such questions should be posted on public
> > forums, where I and others can see and answer them.
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  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
-~----------~----~----~----~------~----~------~--~---

Reply via email to