mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Commit to get icon and splash
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user