added Update notification and button to download from Website

This commit is contained in:
2021-03-18 09:56:59 +01:00
parent 4fc7f0833e
commit a6f9970e86
3 changed files with 23 additions and 2 deletions
+9 -2
View File
@@ -10,8 +10,8 @@ android {
applicationId "de.joel.zoomhelper"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName '0.4.4'
versionCode 9
versionName '0.4.5'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -28,6 +28,12 @@ android {
}
}
repositories {
maven {
url "https://jitpack.io"
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
@@ -37,4 +43,5 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.github.javiersantos:AppUpdater:2.7'
}
@@ -19,6 +19,9 @@ import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import com.github.javiersantos.appupdater.AppUpdater;
import com.github.javiersantos.appupdater.enums.UpdateFrom;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.EOFException;
@@ -80,6 +83,12 @@ public class MainActivity extends AppCompatActivity {
watchDeleteIcon();
watchNewIcon();
watchShareIcon();
AppUpdater appUpdater = new AppUpdater(this).setUpdateFrom(UpdateFrom.XML).setUpdateXML("https://baldaufwd.de/ZoomHelper/update.xml");
appUpdater.start();
}
private void watchShareIcon() {