2

I have feature check newest version the application, if current version is lesser than version in server it will show dialog to update the application like this .

in above update, if i click copy link and download, it will copy url and open the browser,after that download .apk from url server i already setting.

it's work , but i want make it more efficient. I want if i click the button , it will download .apk from server and show the progress download without open the browser. How can i do this ?

Thank's

Saamer
  • 4,687
  • 1
  • 13
  • 55
Zeffry Reynando
  • 3,445
  • 12
  • 49
  • 89

2 Answers2

1

Play Store

It's not a feature currently available to my knowledge. In apps I develop, I can check the version number and block the user from using the app via a dialog, but provide a link to the Play Store, so they can update to the latest version.

However, Android 11 provides Inline Updates, which provides a more streamlined experience.

Check out In-App Updates

Android 11 as of this date is currently in preview. To use the APIs you will have to use a platform channel to call natively from Flutter.

Side loading

Check out Install Application programmatically on Android

You will have to use http to download the APK to external storage, then call these APIs via a platform channel.

Adam
  • 16,089
  • 6
  • 66
  • 109
0

Yes you can make it to where when you click a button, a file (any format including APK) is downloaded to the Downloads/Files folder of the user's device.

However, it is something that is handled by the server that is storing the files.

For example, if you tap on this link, it will automatically download a PDF file on your Android phone or on your browser, even if PDFs generally open inside your browser.

There is a few suggestions given here on how to do it, including setting "Content-Disposition: attachment" or "Content-Type: application/octet-stream"

Saamer
  • 4,687
  • 1
  • 13
  • 55