Download .apk file from url and install

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

Impossible. It’s not related with ionic native.

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

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?

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

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

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

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

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

I got some how in stackoverfolw:

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.

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.

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


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 ?

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

1 Like

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

you can refer to apknite downloader. They have done this extension on Chrome which can generate a link from Play Store as long as the app wasn’t removed from the store.