hi,
I have a application 'A' and application 'B'.
Say, I have a string resource in the application 'A'
<\string name="abc">ABCDEF<\/string>
How do I access the value of abc from the Activity in 'B'.
I tried the following method.
try { PackageManager pm = getPackageManager();
ComponentName component = new ComponentName(
"com.android.myhome",
"com.android.myhome.WebPortalActivity");
ActivityInfo activityInfo = pm.getActivityInfo(component, 0);
Resources res = pm.getResourcesForApplication(activityInfo.applicationInfo);
int resId = res.getIdentifier("abc", "string", null);
} catch(NameNotFoundException e){
}
Always resId is returned 0 always.. Can anyone please let me know if I could access string abc from the application 'B'
Regards, SANAT