From 005f962271b6389922e4119f49a867a9621b1e41 Mon Sep 17 00:00:00 2001 From: Julian Schmuckli Date: Fri, 3 Aug 2018 12:16:10 +0800 Subject: [PATCH 1/5] Added QR Code generation in settings for TOTP --- .idea/caches/build_file_checksums.ser | Bin 537 -> 536 bytes app/build.gradle | 1 + .../coderbunker/kioskapp/KioskActivity.java | 36 ++-- .../kioskapp/SettingsActivity.java | 79 ++++++-- .../com/coderbunker/kioskapp/lib/Base32.java | 176 ++++++++++++++++++ app/src/main/res/layout/activity_settings.xml | 16 +- app/src/main/res/layout/password_dialog.xml | 14 ++ 7 files changed, 283 insertions(+), 39 deletions(-) create mode 100644 app/src/main/java/com/coderbunker/kioskapp/lib/Base32.java diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 574d9121d27189faf6ca171181da59cc59d02179..d9501ab451e0815b2578abb30cd2a41e69556a2e 100644 GIT binary patch delta 208 zcmbQqGJ|Ep43@vA!rUg#@eklHPAw_P%u6rUOD{@H$w@6OVql7PTJu@_2OCGo111KB ziUI}(27%@Oqz+Ha-1<}_DlRxpUsbw0EsUB1 z%BLr9PSc8>Xn8SS=aPO&_T;^cvI1*6ZeI_%zF+ypKF{;|c^m2`zhacL6WCoAaQ?04 z4~ta}2MazW>6b7FBo-9tCzWRAq`+KN$WX_?26D(>&HTs@j=iVnuUR%Fg~M5=0sszk BQeFT6 delta 210 zcmbQiGLvP(43^UpIt3Hw_}2?078JxJm1gFo=%p7WrsSlS7BMhIJFWRF{)3Gpr>d6JIrq>1?-SL1`>w^jgn_>}wWK67FTEJ1v5=vTfeoZ~-pz!4Huu@{ zbQAQX!krE;EMd@awu%WYPAw{qaVn}z%!`3)iAkS)fKh647^9{@Rx|&p9ga2mXT!4d zj`_9knB31ODo`j`-n{3mJpPdy*ssI3I C!BPtV diff --git a/app/build.gradle b/app/build.gradle index a76f02d..e102807 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,6 +23,7 @@ dependencies { implementation 'com.android.support:appcompat-v7:27.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.2' implementation 'com.android.support:support-v4:27.1.1' + implementation 'com.journeyapps:zxing-android-embedded:3.6.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' diff --git a/app/src/main/java/com/coderbunker/kioskapp/KioskActivity.java b/app/src/main/java/com/coderbunker/kioskapp/KioskActivity.java index a1b0de2..62ec944 100644 --- a/app/src/main/java/com/coderbunker/kioskapp/KioskActivity.java +++ b/app/src/main/java/com/coderbunker/kioskapp/KioskActivity.java @@ -24,7 +24,7 @@ public class KioskActivity extends Activity { private final Context context = this; - private WebView webView; + private WebView webView; private static String password = "1234"; private static String URL = "https://naibaben.github.io/"; @@ -35,7 +35,7 @@ public class KioskActivity extends Activity { private boolean locked = false; private Dialog dialog; - private Button b1, b2, b3, b4; + private Button b1, b2, b3, b4, b5, b6; private Button n0, n1, n2, n3, n4, n5, n6, n7, n8, n9; private ArrayList