Skip to content

Commit

Permalink
feat(core): manage on startup option from qrcode or deeplink
Browse files Browse the repository at this point in the history
Signed-off-by: Teclib <[email protected]>
  • Loading branch information
stonebuzz committed Sep 30, 2021
1 parent 1e35a56 commit 610c2e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/assets/about.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
about.version=1.0.0
about.build=39265
about.date=lun. janv. 13 15:51:17 2020
about.date=lun. janv. 13 16:18:57 2020
about.commit=
about.commitFull=
about.github=https://github.com/glpi-project/android-inventory-agent
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@ public void onClick(View v) {
editor.putBoolean("autoStartInventory", true);
editor.apply();
}

if(extra_Data.has("ANDROID_START_ON_BOOT") &&
extra_Data.getString("ANDROID_START_ON_BOOT").equalsIgnoreCase("1")){
SharedPreferences customSharedPreference = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
SharedPreferences.Editor editor = customSharedPreference.edit();
editor.putBoolean("boot", true);
editor.apply();

}
} catch (Exception ex) {
AgentLog.e(getApplicationContext().getResources().getString(R.string.bad_qr_code_format));
}
Expand Down

0 comments on commit 610c2e2

Please sign in to comment.