0

I'm coding myself a simple utility library for handling runtime permission requests and I want it to throw an error every time I request a permission that is not declared in my manifest.

Is there any convenient way of checking the manifest for uses-permission entries without parsing it every time an activity starts?

I know there's something like Bundle.getHeaders() but I can't find it's documentation anywhere so I don't know how to use it.

m93a
  • 8,866
  • 9
  • 40
  • 58
  • 4
    https://stackoverflow.com/questions/39401699/determine-whether-a-permission-is-present-in-the-manifest-with-android-23/39401722#39401722 If you want, cache the results in a `static` field somewhere, since they will not change while the process is running. – CommonsWare Sep 17 '16 at 21:56
  • check it. – D.J Sep 19 '16 at 06:01

0 Answers0