Commit to get icon and splash

This commit is contained in:
Eudes Inácio
2022-02-25 15:10:10 +01:00
parent ef0e724f58
commit 99275b891b
78 changed files with 1432 additions and 58 deletions
@@ -0,0 +1,39 @@
package com.gpr.gabinetedigital;
import android.app.AlertDialog;
import android.app.Application;
import android.content.DialogInterface;
import android.os.Bundle;
import android.widget.Toast;
public class UpdateActivity extends Application implements UpdateHelper.onUpdateCheckListener {
@Override
public void onCreate() {
super.onCreate();
UpdateHelper.with(this)
.onUpdateCheck(this)
.check();
}
@Override
public void onUpdateCheckListener(String urlApp) {
AlertDialog alertDialog = new AlertDialog.Builder(this)
.setTitle("New Version Available")
.setMessage("Please update to new version to continue use")
.setPositiveButton("UPDATE", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(UpdateActivity.this, ""+urlApp,Toast.LENGTH_SHORT).show();
}
}).setNegativeButton("CANCEL", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
}).create();
alertDialog.show();
}
}