diff options
author | Christian Schneppe <christian.schneppe@pix-art.de> | 2020-01-31 15:14:57 +0100 |
---|---|---|
committer | Christian Schneppe <christian.schneppe@pix-art.de> | 2020-01-31 15:14:57 +0100 |
commit | b3ee23d8f08c848ef6f25a9616914414e0079bf1 (patch) | |
tree | 400fea3a0c85224a669e4f2d07fec6a1e4f74fd0 /src/main/java/de/pixart/messenger | |
parent | 18be460e10f7bd3f80ec5839a37bed17380e6446 (diff) |
change updater a bit
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/UpdateService.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/UpdateService.java b/src/main/java/de/pixart/messenger/services/UpdateService.java index 5c0313320..64347bd5a 100644 --- a/src/main/java/de/pixart/messenger/services/UpdateService.java +++ b/src/main/java/de/pixart/messenger/services/UpdateService.java @@ -15,6 +15,7 @@ import org.json.JSONObject; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; +import java.util.Arrays; import javax.net.ssl.HttpsURLConnection; @@ -82,7 +83,7 @@ public class UpdateService extends AsyncTask<String, Object, UpdateService.Wrapp JSONObject json = new JSONObject(jsonString.toString()); if (json.getBoolean("success") && json.has("latestVersion") && json.has("appURI") && json.has("filesize")) { String version = json.getString("latestVersion"); - String[] ownVersion = BuildConfig.VERSION_NAME.split("-"); + String[] ownVersion = BuildConfig.VERSION_NAME.split(" "); String url = json.getString("appURI"); String filesize = json.getString("filesize"); String changelog = ""; @@ -90,11 +91,11 @@ public class UpdateService extends AsyncTask<String, Object, UpdateService.Wrapp changelog = json.getString("changelog"); } if (checkVersion(version, ownVersion[0]) >= 1) { - Log.d(Config.LOGTAG, "AppUpdater: Version " + ownVersion[0] + " should be updated to " + version); + Log.d(Config.LOGTAG, "AppUpdater: Version " + Arrays.toString(ownVersion) + " should be updated to " + version); UpdateAvailable = true; showNotification(url, changelog, version, filesize, store); } else { - Log.d(Config.LOGTAG, "AppUpdater: Version " + ownVersion[0] + " is up to date"); + Log.d(Config.LOGTAG, "AppUpdater: Version " + Arrays.toString(ownVersion) + " is up to date"); UpdateAvailable = false; } } |