how can I let my application auto look for a new update in the startup? like if I'm making new changes in the android studio and I start my application it needs to check for updates and then if there are new updates then it needs to download it and then start up the application.
Asked
Active
Viewed 36 times
1 Answers
0
I have one my old java project where I had that function. What you need:
Simple website where to upload text file with newest version and also newest version's jar file. I recommend 000webhost.com.
*.bat file that replaces old *.jar file with new one and then runs that jar.
Java application that downloads that text file from that website, gets the newest version and compares with current version. If your current version isn't the newest then launch that *.bat file and terminate currently running Java application.
Done!
Click here to see how to download file from url in Java.
How *.bat file should look like:
copy C:/User/Matrx007/Documents/AutoUpdate/autpupdate_v1.0.2.jar
C:/User/Matrx007/Documents/AutoUpdate/autpupdate.jar
java -jar C:/User/Matrx007/Documents/AutoUpdate/autpupdate.jar

Matrx007
- 25
- 7