mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-28 22:39:50 +00:00
Italian meringue
This commit is contained in:
parent
6af45d514d
commit
0b68237c0c
13 changed files with 286 additions and 199 deletions
|
|
@ -54,8 +54,13 @@ public class CqcmActivity extends AppCompatActivity {
|
|||
super.onResume();
|
||||
Log.i("CqcmActivity", "Checking access to storage...");
|
||||
if(VectrasApp.checkpermissionsgranted(this,false)) {
|
||||
startAdd();
|
||||
if (getIntent().hasExtra("command")) {
|
||||
runCommand(getIntent().getStringExtra("command"));
|
||||
} else {
|
||||
startAdd();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private void startAdd() {
|
||||
HashMap<String, Object> mapForCreateNewVM = new HashMap<>();
|
||||
|
|
@ -123,4 +128,23 @@ public class CqcmActivity extends AppCompatActivity {
|
|||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
private void runCommand(String _command) {
|
||||
VectrasApp.prepareDataForAppConfig(CqcmActivity.this);
|
||||
AppConfig.pendingCommand = _command;
|
||||
|
||||
if(!MainActivity.isActivate) {
|
||||
Log.i("CqcmActivity", "Vectras VM is not opening.");
|
||||
gotoActivity.setClass(getApplicationContext(), SplashActivity.class);
|
||||
startActivity(gotoActivity);
|
||||
Log.i("CqcmActivity", "Opened SplashActivity");
|
||||
} else {
|
||||
Log.i("CqcmActivity", "Vectras VM is opening.");
|
||||
openURL.setAction(Intent.ACTION_VIEW);
|
||||
openURL.setData(Uri.parse("android-app://com.vectras.vm"));
|
||||
startActivity(openURL);
|
||||
Log.i("CqcmActivity", "Opened Vectras VM using URL.");
|
||||
}
|
||||
finish();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue