aaaaalbert / sensibility-testbed

1 stars 2 forks source link

auto-installer functionality added #26

Closed msk610 closed 7 years ago

msk610 commented 7 years ago

Added the following method, which checks if the required components are installed then installs them automatically:

private void installRequired();

The method is called at onStart() method after checkRequestPermissions(); it uses SharedPreferences, which allows developers to store key value pairs locally. The path and the keys used in the method to check whether Python and Seattle were installed are stored in global constants DOWNLOAD_PREF_STR, PYTHON_KEY, SEATTLE_KEY. The ProgressDialog class was used to give a feedback on the components being installed. Following is a screenshot of how the ProgressDialog looks:

msk610 commented 7 years ago

If you want to change the seattle installer to downloadAndInstallSeattle() instead of rawResourceInstallSeattle() I used raw install because the other methods sometimes crashes for me.

lukpueh commented 7 years ago

@msk610 thanks for your contribution. Could you please remove the non-SensibilityActivity.java files from you PR?

lukpueh commented 7 years ago

@msk610, thanks for your awesome additions. I am going to merge your PR into yet another install-ui branch in @aaaaalbert's repo to perform some cleanup (remove the cache files, etc...).