Dimitri Rogava
Dimitri Rogava

Reputation: 5

Is it possible to update android app from private server while running?

I have to develop some specific software, which sometimes can't connect to the App store, but I will have to send some updates. this software can be restarted but it needs to check for updates itself and download it, so I am looking for ways to update like Facebook is doing for example. Change its own package and restart, but I could not find any helpful information or SDK to do so. What is the right way to do so? How can I achieve that.

edit: I have seen some solutions. One is having 2 apps (1 updater and 1 main app, it is ok but I am looking for a bit more flexible ways if possible). And SDK-s just send you to the download page, but I need my app to download and install it itself (This software will be used as a middlware controlling app for IPTV devices, so there is no security issues in terms of not notifying user about update, I'll handle it with popups)

Upvotes: 0

Views: 1317

Answers (1)

rguzman
rguzman

Reputation: 329

There is an API in android for update apps. It is called In-app Updates. Basically, it has two options:

  • Flexible: The user choose if he wants to update the app or not

A user experience that provides background download and installation with graceful state monitoring. This UX is appropriate when it’s acceptable for the user to use the app while downloading the update. For example, you want to urge users to try a new feature that’s not critical to the core functionality of your app.

  • Immediate: The app shows a screen where the user must be update the app

A full screen user experience that requires the user to update and restart the app in order to continue using the app. This UX is best for cases where an update is critical for continued use of the app. After a user accepts an immediate update, Google Play handles the update installation and app restart.

In your case, you can use the "Inmediate" option

References:

https://developer.android.com/guide/playcore/in-app-updates

Upvotes: 2

Related Questions