I meet an issue when using below method. It works if apk file is put
on sdcard. However, if there is no sdcard on phone, app must put apk
file at "/data/data/<appname>/xxx", package installer fail to install
the apk because file in "/data/data/<appname>/xxx" only has private
permission. How do you deal with this issue?
Thanks!

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
I do this kind of incremental update for the PayPal version of my
app.  I do it in the same way that Brad described.  If the app finds a
new version on the server, it pops a dialog asking the user to update
or postpone it.  If they click update, it downloads via an AsyncTask,
and installs via the following code:

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);

You could then delete the downloaded apk file on the next run to clean
up.

-- 
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