Yes, you're right, I hadn't thought about it
So for downloading from pc to phone I can use okHttpUtils
Now that I have the apk file on my phone, how do I start it and allow my app to be updated?
I specify that I pass the apk file from pc to Android using app1, while the apk I'm starting to update an app is related to app2
first, when you go to play and there is an update available,
you click to install. is this really so difficult or invasive? maybe
we don't want to update. maybe we do. yes, it is possible to
configure automatic updating, but my point is the user is
informed of something, and then a decision is made by the user.
it seems to me that you want to bypass the rights of the user
by basically doing something without telling them. just sayin'.
(maybe you give them the chance to opt out before sending them
to the url. i can't say what your app does.)
as to how you would do it, maybe member aguilar's suggestion
is the answer. see what the story is.
in my case, if i want to deploy an app to one of my devices
without recompiling, i simply drag the .apk from the pc over
to the device. i leave it in the "files" folder. (maybe your
device says "downloads". whatever.) when i go to my files
folder and tap on the .apk, the system offers to install it.
so, what i'm saying is that if you download the .apk with
okhttputils2 and save it in the files folder (with a provider),
i think your app could open the files folder and the user taps
on the .apk for installation. 1 step.
i have apps that save to the files folder, but i've not tried to
open the folder (presumably with an intent). i don't see why
it wouldn't work. although i wonder what android does if an
app which is to be updated is already running. some systems
won't allow it. maybe android kills the running app before
installing over it...
if jose aguilar's link will handle an automatic install, fine. i do
think the decision should be the user's.
the whole story with the buttons on the browser might possibly
be avoided; you didn't provide any data to allow somebody to test.
ok, i see it's one of your apps, so maybe you don't want to give it away.
just leave something out there for download. if you want to
see about the buttons, let somebody else see what happens.