Getting Package string from Android manifest

Viewed 9427

This should be simple but I can't find any info on this...

I simply want to read the package value in the android manifest...

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="THIS"

the reason is simple I have to call context.getResources().getIdentifier(...) and I need the package.

since this code will be reused in other apps I want to make it fool proof when I export it and therefore not have to change the value each time.

anybody knows how to do this ?

2 Answers
Related