Fix richiesta permessi e implementazione del nuovo download degli aggiornamenti dell'app
This commit is contained in:
@@ -4,8 +4,6 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.os.Handler;
|
||||
import android.text.SpannableString;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -31,13 +29,17 @@ public class SplashActivity extends AppCompatActivity {
|
||||
|
||||
initAppVersion();
|
||||
|
||||
|
||||
PermissionsHelper.askPermissions(this, () -> {
|
||||
init();
|
||||
}, permanentlyDenied -> {
|
||||
if(permanentlyDenied) {
|
||||
DialogSimpleMessageHelper.makeErrorDialog(this,
|
||||
new SpannableString(getText(R.string.permissions_permanrntly_denied)), null, () -> {
|
||||
new SpannableString(getText(R.string.permissions_permanently_denied)), null, () -> {
|
||||
this.finish();
|
||||
}).show();
|
||||
} else {
|
||||
DialogSimpleMessageHelper.makeErrorDialog(this,
|
||||
new SpannableString(getText(R.string.permissions_denied)), null, () -> {
|
||||
this.finish();
|
||||
}).show();
|
||||
}
|
||||
@@ -71,19 +73,15 @@ public class SplashActivity extends AppCompatActivity {
|
||||
|
||||
|
||||
private void startLoginActivity(){
|
||||
this.finish();
|
||||
Intent myIntent = new Intent(this, LoginActivity.class);
|
||||
startActivity(myIntent);
|
||||
this.finish();
|
||||
}
|
||||
|
||||
private void startMainActivity(){
|
||||
new Handler().postDelayed(() -> {
|
||||
Intent myIntent = new Intent(this, MainActivity.class);
|
||||
startActivity(myIntent);
|
||||
this.finish();
|
||||
}, 3000);
|
||||
|
||||
|
||||
this.finish();
|
||||
Intent myIntent = new Intent(this, MainActivity.class);
|
||||
startActivity(myIntent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user