Hi All,

I'm trying to write a java program that will install an apk file on
android. I saw that there is an Intent action: ACTION_PACKAGE_INSTALL
available and the developer reference says:
    "Broadcast Action: Trigger the download and eventual installation
of a package. "

So I wrote a program like so:

    Intent newintent = new Intent(Intent.ACTION_PACKAGE_INSTALL);
    File apkFile = new File("/data/data/HelloAndroid.apk");
    newintent.setData(Uri.fromFile(apkFile));
    sendBroadcast(newintent);

But this fails to do the intended task (which is download and install
the application). I'm not able to figure what is happening to this
broadcast intent, no logs get printed in LogCat.

Any pointers on where to look or how to proceed?
Thanks in advance for the reply.

-- 
Regards
Shashank

--~--~---------~--~----~------------~-------~--~----~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to