I use an AsyncTask to download the file, then launch the package
manager.  The task expects to be passed the URL of the apk to be
downloaded:

http://pastebin.com/5fgrgDEd

Here is the meat of how to launch the package manager once you have
the apk saved:

                                Intent intent = new Intent();
                                Uri uri = Uri.fromFile(file);
                                
intent.setAction(android.content.Intent.ACTION_VIEW);
                                intent.setDataAndType(Uri.parse(uri.toString()),
                                "application/vnd.android.package-archive");
                                startActivity(intent);

On Sep 29, 6:04 am, TheViking <[email protected]> wrote:
> I have developed client software that is connected to a server using
> TCP sockets.
>
> I would like to send an upgrade request to the server which replies
> with a binary stream. (=.apk file)
> If I would save that APK in a file on the smartphone, can I now start
> something, or run a function that starts the installation of thet APK
> file? (=execute an upgrade)
>
> Thanks in advance.

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

Reply via email to