Force keypad to stay open on card...
Posted: Sun Oct 16, 2016 8:57 pm
I have recently been trying to get my app working on Android. I have a card where the user inputs numbers and I use the numeric keypad.
It all works fine except...
If the user navigates away from the app, say by pressing the hard "home" button on Android, does some stuff then returns to the app, the keypad is no longer displayed. I added code so that the keypad pops up when the user taps on the input field, but in this case the field already has focus so even tapping on the field will not bring up the keypad unless you click somewhere else first to take focus off the field, then back on the field, which most users would find both confusing and annoying.
When looking for a solution I did see some mention of using "focus on nothing", however in this case I am not sure where you would insert the "focus on nothing". Is there a way to have this happen automatically when the user navigates away from the app, such as by pressing the hard "home" button on Android?
I tried adding mobileSetKeyboardType to both OpenCard and PreOpenCard, which works when the user navigates to the card through the app itself. But when a user goes to the home screen on their Android, then back to the app it does not seem to run OpenCard or PreOpenCard, it's as if the user has picked up right where they left, but now the keypad is gone.
Ideally I'd like to be able to force the numeric keypad to stay open when the user navigates away from the app. If this is not possible then a way to force the keypad to launch again when they navigate back to the app would work too. I suppose I could add a button that relaunches the keypad, but I would prefer not to if at all possible.
Thanks for any help or suggestions on this,
TJ.
It all works fine except...
If the user navigates away from the app, say by pressing the hard "home" button on Android, does some stuff then returns to the app, the keypad is no longer displayed. I added code so that the keypad pops up when the user taps on the input field, but in this case the field already has focus so even tapping on the field will not bring up the keypad unless you click somewhere else first to take focus off the field, then back on the field, which most users would find both confusing and annoying.
When looking for a solution I did see some mention of using "focus on nothing", however in this case I am not sure where you would insert the "focus on nothing". Is there a way to have this happen automatically when the user navigates away from the app, such as by pressing the hard "home" button on Android?
I tried adding mobileSetKeyboardType to both OpenCard and PreOpenCard, which works when the user navigates to the card through the app itself. But when a user goes to the home screen on their Android, then back to the app it does not seem to run OpenCard or PreOpenCard, it's as if the user has picked up right where they left, but now the keypad is gone.
Ideally I'd like to be able to force the numeric keypad to stay open when the user navigates away from the app. If this is not possible then a way to force the keypad to launch again when they navigate back to the app would work too. I suppose I could add a button that relaunches the keypad, but I would prefer not to if at all possible.
Thanks for any help or suggestions on this,
TJ.