How to access String resource from another application
<p>I have a application 'A' and application 'B'. </p>

<p>Say, I have a string resource in the application 'A'</p>

<pre><code>&lt;\string name="abc"&gt;ABCDEF&lt;\/string&gt;
</code></pre>

<p>How do I access the value of abc from the Activity in 'B'.</p>

<p>I tried the following method.</p>

<pre><code>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){

}
</code></pre>

<p>Always resId is returned 0 always.. Can anyone please let me know if I could access string abc from the application 'B'</p>

<p>Regards,
SANAT</p>
