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 <[EMAIL PROTECTED]> wrote:
> I also trying to install, uninstall, run apk usinginstallPackage() it
> got permission problem...
>
> is there any one successfully found the solution???
> can share out??? please...
>
> Wesley.
>
> On Mar 27, 8:34 am, Ben Dodson <[EMAIL PROTECTED]> wrote:
>
> > Extremely unlikely is better than no chance at all :) I posted a
> > request here if anyone's
> > interested:http://code.google.com/p/android/issues/detail?id=545
>
> > thanks for the help Diane.
>
> > Ben
>
> > On Mar 25, 12:31 pm, hackbod <[EMAIL PROTECTED]> wrote:
>
> > > On Mar 25, 5:58 am, Ben Dodson <[EMAIL PROTECTED]> wrote:
>
> > > > if I'm correct, activities can only exist when defined by a top-level
> > > > application, which must be installed through the package manager.
>
> > > Correct.
>
> > > > If that's the case, would it be worthwhile to file a feature request?
>
> > > You can, but it is extremely unlikely this is something we'd have time
> >
> to address for 1.0.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---