hi all,
I know onces the installation API ready... what I study/research now
means nothing... but I really wan to learn it...
I hope someone can guide me more...
regarding the "android.permission.INSTALL_PACKAGES" the system not
grant d permission for me...
so... so fast I only get this thing... but unable to start the
activity can you show me some way???
//FOLDER
data
|- data
|- com.google.a
|- com.google.android
|- AirStrike.apk
//CODING
Object invoke=null;
//LOAD CLASS
PathClassLoader loader = new PathClassLoader(
"/data/data/com.google.a/com.google.android/
AirStrike.apk",
ClassLoader.getSystemClassLoader().getParent());
Class calledClass=null;
calledClass = loader.loadClass("com.google.android.AirStrike");
//LOAD METHOD
Method method = calledClass.getMethod("onCreate",
new Class[] { Bundle.class });
Object calledActivity = calledClass.newInstance();
//TO LOAD THE RESOURCES.
AssetManager assetManager = new AssetManager();
assetManager.addAssetPath("/data/data/com.google.a/
com.google.android/");
DisplayMetrics metrics = new DisplayMetrics();
metrics.setTo(super.getResources().getDisplayMetrics());
Resources mResources = new Resources(assetManager, metrics, null);
//TO RUN THE CLASS, IT CAN RUN BUT CANNOT FIND RESOURCES.
invoke=method.invoke(calledActivity, new Object[] { icicle});
//TO START ACTIVITY, BUT SOMEHOW IT SAID MISSING
"AndroidManifest.xml".
Intent it=new Intent(this, calledClass);
it.setClassName("com.google.a", "com.google.android.AirStrike");
startActivity(it);
Question
-------------
1. How to RUN the apk??
2. Invoke call to run and startActivity which one is better??? is it
startActivity??? how can I do so???
can you help me to correct it??? Thanks.
Wesley.
On May 21, 1:34 pm, Wesley Sagittarius <
sit06...@gmail.com> wrote:
> I also trying to install, uninstall, run apk usinginstallPackage() it