//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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---