Heey everyone,
I have another question on locking your app with a password.
This is a code i use:
but now, when you press the back key, the dialog just close. I want to know that when you press the back key, the activity closes instead of the dialog.
How should I do this?
XverhelstX
I have another question on locking your app with a password.
This is a code i use:
B4X:
Sub Activity_Resume
Dim PasswordAsk As InputDialog
Dim Passwordinput As String
PasswordAsk.Input = PasswordAsk.INPUT_TYPE_TEXT
PasswordAsk.PasswordMode = True
PasswordAsk.Hint = "<1234>"
PasswordAsk.HintColor = Colors.ARGB(196, 255, 140, 0)
ret1 = PasswordAsk.Show("Enter your password below.", "Password", "Ok", "","", Trackedbmp)
Passwordinput = PasswordAsk.Input
If ret1 = -1 Then
If Passwordinput = Interceptor.PasswordString Then
Return True
Else
Activity.Finish()
End If
End If
CallSub("","Activity_KeyPress (KeyCode As Int) As Boolean")
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If Keycode = KeyCodes.KEYCODE_BACK AND canFinish = True Then
canFinish = False
activity.Finish()
End If
End Sub
but now, when you press the back key, the dialog just close. I want to know that when you press the back key, the activity closes instead of the dialog.
How should I do this?
XverhelstX