Download .apk file from url and install

#1

I am developing one android application with ionic 4, Now I don’t want put the google Play store, Instead of that I can put my server.

Usecase : User gets the message (SMS) with URL (path of .apk is located into my server), once he open the that url, automatically download the apk file and install automatically, how we can achieve this concept.

Could you please help me any one!!

Advance Thanks!!!

#2

Impossible. It’s not related with ionic native.

#3

User will have to adjust security settings to support manual download and install using the URL

Not impossible if you allow some manual intervention

Very undesirable. Check also the discussions on Fortnite apk bypass for Android

Better use Ionic Deploy

#4

what is best solution for do that, one thing is i won’t put into google play store, I am requesting to your thoughts, how can we do that?

#5

Installing APK without Google Play Market means you are trying to install application that might be included some viruses (It doesn’t matter if you include virus code or not).
That’s why Android does not allow to install any apk files automatically except Google Play Market.
(Automatically apk install means the Google Play Market app installs the downloaded apk).

Without root permission of Android device, impossible.
(And only one who has the root permission for all android devices is Google)

Of course, if end-users are possible to install through some steps by manual.

At least, they needs to allow ‘unknown source apk’ in the developer settings page, then open the apk file from Download folder.
But I don’t believe all your customers do that.


PWA, progressive web app, allows end-users to kind-of-install small application from browser.
Ionic should work as PWA app.
However PWA app works in sandbox. Only limited features are available.

1 Like
#6

So you mean, with out puting into google play store, user can’t install the app from URL ?

#7

Correct. You can’t install any apk files automatically.

(Do you want to install an apk file that might be included virus?)

#8

so, can we download automatically from URL ? after download user can install manually. is this possible ?

#9

I got some how in stackoverfolw:

#10

Downloading apk itself is possible. It’s just downloading a file.

If you believe the stack overflow answer is possible to solve your request, you should try before asking.

#11

Sorry, I not into that meaning to believe stackoverflow, I just searching i got this link. Sorry. So we can download the app using URL, but we can’t install automatically.

#12

we can download the app using URL, but we can’t install automatically.

correct.

#13

Thank you so much for your help and spending the time to clarify the question.

Do you have any idea how download automatically .apk file once hit the URL ?

#14

It’s the same as normal file download. Web server needs to send download header. (And googling by yourself, please).

1 Like
#15

Yeah. Thank you. Thank you so much for your help…