diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java | 13 | ||||
-rw-r--r-- | src/main/res/values/strings.xml | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java b/src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java index 4c8b524f7..3df4dca75 100644 --- a/src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/UpdaterActivity.java @@ -155,6 +155,17 @@ public class UpdaterActivity extends Activity { boolean success = responseObj.getBoolean("success"); //if the reponse was successful check further if(success){ + //Overall information about the contents of a package + //This corresponds to all of the information collected from AndroidManifest.xml. + PackageInfo pInfo = null; + try { + pInfo = getPackageManager().getPackageInfo(getPackageName(), 0); + } + catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + //get the app version Name for display + String version = pInfo.versionName; //get the latest version from the JSON string int latestVersionCode = responseObj.getInt("latestVersionCode"); String latestVersion = responseObj.getString("latestVersion"); @@ -176,7 +187,7 @@ public class UpdaterActivity extends Activity { builder.setCancelable(false); String UpdateMessageInfo = getResources().getString(R.string.update_available); - builder.setMessage(String.format(UpdateMessageInfo, changelog, latestVersion, version) + builder.setMessage(String.format(UpdateMessageInfo, latestVersion, changelog, version)) .setPositiveButton(R.string.update, new DialogInterface.OnClickListener() { //if the user agrees to upgrade public void onClick(DialogInterface dialog, int id) { diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 59a187b3c..4f7e4a1f4 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -522,7 +522,6 @@ <string name="account_status_dns_timeout">Timeout in DNS</string> <string name="action_check_update">Check for Updates</string> <string name="title_activity_updater">Update Service</string> - <string name="update_available">There is newer version of this application available. Upgrade now?</string> <string name="update_available">Conversations %1$s with the following changes is available:\n\n%2$s\n\nUpdate Conversations %3$s to Conversations %1$s now?</string> <string name="checking_for_updates">Checking for Conversations updates</string> <string name="remind_later">later</string> |