2013年9月18日星期三

[Android] APK resources directly call each other .

I am now developing two APP as : A.apk B.apk this program, by specifying : android: sharedUserId = "com.xxxx.plugin"
achieve 2APP share a uid.

I now want to use B.apk from A.apk the resource file, how to do, to achieve it ?

For example : B.apk in raw / comm.xml, I hope A.apk able to obtain use .

So my comm.xml change as long as the upgrade B.apk on it.
------ Solution ---------------------------------------- ----

public abstract Resources getResourcesForApplication (String appPackageName)

------ Solution ------------------------------------ --------
http://blog.sina.com. cn/s/blog_6714fba701018k8h.html
------ eference ----------------------------- ----------
yourself up waiting for large cattle to answer
------ eference ------------------- --------------------
apk this is just a resource for itself , I think this is another one for the associated resource
---- apk - eference ---------------------------------------
waiting for large cattle appear < br> ------ eference ---------------------------------------
own solution :
Context slaveContext = null;
try {
slaveContext = convertView.getContext (). createPackageContext ( ;
"com.carnurse. plugin.laws ", Context.CONTEXT_IGNORE_SECURITY);
} catch (NameNotFoundException e) {
e.printStackTrace ();
}
int resID = slaveContext.getResources (). getIdentifier ("ic_launcher", "drawable", " ; com.carnurse.plugin.laws ");
holder.ivIcon.setImageDrawable (slaveContext.getResources (). getDrawable (resID));

没有评论:

发表评论