How to upgrade Android Application - android

I have developed android application.Current version is : android:versionCode="1" and android:versionName="2.0.3"
Sales Rep is going to use this application.
1 ) When They are in the field/working plac, if there are application upgrade available how we are going indicate to them?
2) Its a private application.They don't like to put in the android market place. So I thought we create one web application in PHP/other language & using that application user enter their credential/login to go home screen & in that place I want to take the my android application's version number. (that means need to show current version & new version). Is it possible to do this?
3) My application size is 7MB.So when they upgrade the application its overwriting previous version ? or uninstall application & install it?
4) When we do the application upgrade, apk file will download to the internal storage & upgrade it.after upgradehas been successfully the downloaded apk will remove it?
Thanks in advance...
I am expecting your suggestion.Please help me out from this issue

Distribution is easy: Just put you apk on some predefined loaction in web server (do not forget to configure proper mime type) - then field people will be able to install it by just clicking on link in their android webbrowser / email program.
To inform them about new version you can:
send email to them
deposit version number somewhere on webserver, and check it in your app. When new version is available you can prompt them for upgrade

There are several other Android Markets that are just apps you install and run.
You can configure them to point to your own repository of apps.
Then you just increase your apps versions number as normal, release a new version into your repository and the market app will alert the user.
Some of them don't provide security against someone finding your server and downloading the code directly, but at least they wont be in the Google Android Market for all to find.
http://f-droid.org/ can be configured to do this. There are others I can't remember at the moment.

Related

Flutter: in app update without google/apple store?

My company (where I work) created an application for a company. I worked alone on this app and nobody else is into mobile developing + I am new in application developing. I use the firebase app distribution function to share the APK with the testers.
The problem that the testers are bored that they always get an email when there is a new version and have to install the new version through that.
Is it possbile to achieve some kind of in-app-update without using google/apple store? This app is for a company, that is not an option to put it on google/apple store.
The packages I found are using the store...
https://pub.dev/packages/new_version
https://pub.dev/packages/in_app_update
Sorry for the newbie question, thanks you in advance.
I'd suggest the following steps:
Enable Firebase Storage
Name your apks by version code
When you run your app, search the Firebase Storage for the max version code file
Compare running app's version with max
Download
Launch installer
Note: This is not in-app-update, but rather an automated process for downloading updates to a device. And launching installs may be restricted on Android 11 and higher, so look into that if necessary.

Auto Updating Sideloaded Android App on Start

We have an Android app (.apk) published to a publicly accessible URL, any user who knows the URL can download and install the app.
The app is already installed on the relevant user phones and allowing sideload option from the settings is turned on.
How can I force the app, on start, to check for update and replace the existing app if found, then restart the app (to pick up the latest version)?
Is there a standard solution or a software package? Should I be thinking in a different way?
I am using Xamarin Forms, however, I am happy with Xamarin Android or any Java-based solution.
One thing you could do is to have a small plain text file in the same server where the APK is, that contains the version number of the APK available on the server. The runing app then just reads that text file and compares against its own version number.
If the version on the server is newer (has a higher version number), you simply download the new APK to a temp dir and install the APK programatically using the method outlined here: Android: install .apk programmatically
The way to go is HockeyApp. It´s a distribution system that does exactly what you are looking for. Besides, you get a useful crash logger and some statistics, etc. It´s free for 2 apps.
Once you install and configure their SDK in your Android app, an activity will popup telling the user a new update is available if there is any.
The user can install the new version with a button tap. Simple.
The setup process involves installing a nuget package and write a few lines of code in your main Activity class.

Can I increment version number of iOS/Android app even users don't install app to update

I create iOS and Android apps as hybrid app.
My apps send HTTP request to server, and then get HTML,CSS,JS etc.
Users don't need to update my apps until I change native side project.
It means that sometimes my apps version don't changes even I provide new functions or fix bugs.
It's wired for user. I should display increment version number when my apps have changes.
I want to increment version number of my apps even users don't install my apps to update.
Is there any good way to achieve it?
I come up with one idea to directly change setting file like Android manifest file.
However, I don't know whether it's good and works....
It is not possible for iOS, you need to submit new version for version number to change for your app
Also not possible for android as well
I don't think it is possible.
AndroidManifest is XML file attached to your APK and could not be changed when it's installed - only by application update (I mean installing new APK with incremented version number).
In iOS situation is the same. Version code is attached in Info.plist file which, like AndroidManifest, is just file attached to your application archive and could not be changed.
I don't think you can dynamically change your version code - because this is what you are trying to do.
For Android that's simply possible, for iOS, because of the Sandbox and Apples protections, not. (If not jailbroken)
You could let the app have a settings/information section where it displays current version, and this version will be loaded from your server as well as the HTML, CSS and JS.

Can an Android app auto-upgrade itself?

The device my Android app is running does not have Playstore on it. The plan is to pre-install the software when shipping the device. I am now looking for a strategy to upgrade the application.
I found this useful link to install an Android app from the apk file:
Android: install .apk programmatically
I am thinking I will use this logic to auto-upgrade my app. I am wondering if it is even possible. I am thinking the upgrade will first try to uninstall existing version but will fail as the executable is still running and the file may be locked. Is there a better way? Regards.
Peter, we've just implemented the same thing.
Users have the software pre-installed on their device and we host update APK's on the companies servers.
From the app they can then check for updates where we have a WCF service which extracts the APK file (essentially a .zip) and returns the manifest details. From there we have the version of the APK and can compare it against the local version.
If the user decides to upgrade they can download the APK and you can automatically launch it. At which point the user will be told the application is going to be updated. There are no file locks etc, the app will just close and restart using the new version.
Note: Downgrading is not "automatic". The user would have to first uninstall the app. For upgrades, however, it's a simple case of downloading and launching the APK version (the user will be told they need to allow installations from unknown sources if this is not checked).
You have a couple of options, depending upon your target system.
Use the link you posted. This will provide the user with a traditional install dialog, whereby the user can choose to install or not. You should avoid doing that automatically, as APKs can be large and you might irritate the user if they don't want updates.
You can install updates magically, but you will require the firmware signing key (or possibly root, but I haven't tested that). That will not ask for consent from the user. You will need to add additional code using reflection to access the installation methods of Android. If you go this way, you should build an opt-out/in mechanism.
If your app is open-source, F-Droid would solve the problem for you.
F-Droid is an installable catalogue of FOSS (Free and Open Source
Software) applications for the Android platform. The client makes it
easy to browse, install, and keep track of updates on your device.
Mainly, it updates your app when necessary. (Or just have a look at its source code for inspiration on how to do it).
Yes but as far as I remember only if you had Root privileges in order to have access to the INSTALL_PACKAGES permission.

Auto Update APK version on Android Phone

If a user downloads my app (a .apk file) onto their android phone from the market place,
Where does the .apk file end up on their phone?
When they're running my application, if I detect that there is a new later version of the application available is it possible to from within the application that they're running download the latest version off an ftp link (I can programmatically do that now) and then replace the existing .apk that they're now running with the newer version. [Not sure about this one at all.]
Is the existing application all in memory when it's being run, so that when i download the new version, I can delete its apk file without it being locked up and replace it with the later build and then restart the app?
What's the best way to handle this scenario? I have an app where I want to ensure that users are on the latest version before they use it.
Apps are stored in /data/app see https://android.stackexchange.com/questions/3002/where-in-the-file-system-are-applications-installed.
IMHO, You should let the market manage updates for you, there's no need to bother doing anything by hand and as an user I would be "angry" if some app start downloading stuff on my phone without my consent, especially when abroad (some users are paying their datas).
If this user has rooted phone, you may use code provided in this answer: Android silent apk update.
If not, user has to be prompted, and you may start an activity with an intent (as usual), but also, before calling startActivity(intent), call intent.setDataAndType(Uri.fromFile(...)).

Categories

Resources