Show "Checking for updates..." on splash progress bar

This commit is contained in:
drdev
2014-08-23 03:33:45 +00:00
parent 9aa23e0436
commit 0c5fa57737

View File

@@ -30,10 +30,11 @@ public class AssetsDownloader {
public static boolean checkForUpdates(final SplashScreen splashScreen) { public static boolean checkForUpdates(final SplashScreen splashScreen) {
if (Gdx.app.getType() == ApplicationType.Desktop) { return true; } if (Gdx.app.getType() == ApplicationType.Desktop) { return true; }
splashScreen.getProgressBar().setDescription("Checking for updates...");
boolean connectedToInternet = Forge.getNetworkConnection().isConnected(); boolean connectedToInternet = Forge.getNetworkConnection().isConnected();
if (connectedToInternet) { if (connectedToInternet) {
/*splashScreen.getProgressBar().setDescription("Checking for updates..."); /*try {
try {
URL versionUrl = new URL("http://cardforge.org/android/releases/forge/forge-gui-android/version.txt"); URL versionUrl = new URL("http://cardforge.org/android/releases/forge/forge-gui-android/version.txt");
String version = FileUtil.readFileToString(versionUrl); String version = FileUtil.readFileToString(versionUrl);
if (!StringUtils.isEmpty(version) && !Forge.CURRENT_VERSION.equals(version)) { if (!StringUtils.isEmpty(version) && !Forge.CURRENT_VERSION.equals(version)) {