Skip to content

Commit

Permalink
Update version to 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipse7 committed Jul 16, 2019
1 parent ab2b2c6 commit 5a563d4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "2.0"
versionName "2.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"2.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"2.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
15 changes: 12 additions & 3 deletions app/src/main/java/com/eclipse7/polytuner/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.os.Bundle;
Expand Down Expand Up @@ -152,10 +153,18 @@ public boolean onOptionsItemSelected(MenuItem item) {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setCancelable(true);

String version = "";
try {
PackageInfo pInfo = this.getPackageManager().getPackageInfo(getPackageName(), 0);
version = pInfo.versionName;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}

View view = getLayoutInflater().inflate(R.layout.about_dialog, null);
TextView version = view.findViewById(R.id.about);
String s = "Tuner version " + "1.0";
version.setText(s);
TextView version_view = view.findViewById(R.id.about);
String s = "Tuner version " + version;
version_view.setText(s);
alertDialogBuilder.setView(view);

alertDialogBuilder.setTitle(R.string.info_title);
Expand Down

0 comments on commit 5a563d4

Please sign in to comment.