I have been struggling with this issue all day and have had no success. I am basically trying to get an image resource from another apk.
So if com.example.app has an
try this:
final String packName = "com.example.app ";
Resources resources;
try {
PackageManager manager = getPackageManager();
resources = manager.getResourcesForApplication(packName);
int resID = resources.getIdentifier("image1", "drawable", packName);
Log.d(TAG, "resID = " + resID);
Drawable image = getResources().getDrawable(resID);
Log.d(TAG, "resID = " + resID);
}
catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}