Saturday, September 4, 2010

Re: [android-developers] Permission checked at install time, but what happens if the "permission user" is installed before the "permission definer"?

Generally, unfortunately, this doesn't work.  As of froyo, if it is a signature permission, it will work -- the original app will be granted the permission once it is known.  (This is safe because it is not a permission the user ever needs to be shown anyway.)

But for a permission the user needs to approve...  it won't get granted until the first app is re-installed or updated, and the permission it wants is known.

This is something that really needs to be improved.

On Sat, Sep 4, 2010 at 2:56 PM, Flying Coder <av8r.steve@gmail.com> wrote:

For example, I am adding an option to my app (Executive Assistant) to
integrate with the Astrid TODO list app.  Astrid defines the
permissions necessary for doing this. My app uses those permissions.
Everything works fine if Astrid is installed before my app.  However,
many users will use my app first, then decide to use Astrid later
(e.g., in at least some cases, because its now supported by my app).
However, in this case, I will get a SecurityException if I try to read
from the Astrid ContentProvider since that permission didn't exist
when my app was installed.

One easy solution would be to simply uninstall, then re-install my app
after Astrid has been installed.  However, this would require the user
to reconfigure my app, which would understandably be quite annoying
for the user.

So, two questions:  (1) is there any way for my app to "re-request"
the permission after Astrid has been installed?  And, (2) if not, is
there any easy way to save & restore my applications data (database &
shared preferences) between an uninstall/reinstall so that the user
does not have to reconfigure?

Thanks a bunch,
Steve




--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



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

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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment