Hi,

I'm seeing some weirdness with getPackageManager().checkPermission
(permission, callerPackage);

sometimes it returns PackageManager.PERMISSION_GRANTED and sometimes
it doesn't (without reinstalling apps, just starting and stopping
apps)

I have 2 applications, call them app A and app B.
app A fires a specific intent with a string extra of "foo" which
activates an activity in app B. app B's onCreate method then checks
that the
calling activity has the "blah.blah.blah.foo" permission and allows or
denies it at runtime.

If app A fires the same intent, but now with a string extra of "bar",
then app B will then check that the calling activity has the
"blah.blah.blah.bar" permission.

I've managed to get this particular approach to work, but sometimes
checkPermission() works for a while and then stops working.
Any idea what it could be?

Do permissions have to be forward-declared? In other words, do I need
to have a <permission name="blah.blah.blah.bar"> in the
AndroidManifest of
app A or app B? Or does having a <uses-permission
name="blah.blah.blah.bar"> suffice to bring that particular permission
into the world?

Thanks in advance for any advice you can give me on this!

-Mike
--~--~---------~--~----~------------~-------~--~----~
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