locked
Special Entry Requirement RRS feed

  • Question

  • User354290 posted

    My requirement: 1. We have android devices out in the field, and our app has an entry to sign on - it is a badge ID so only numeric is allowed for the Keyboard 2. These devices also have a data wedge driver on them that allows the user to use the camera to scan a barcode - this comes in just like keyed in text from a keyboard 3. User want the popup keyboard to only accept numeric (employee keys in their badge #) 4. User wants the camera to be able to scan alpa-numeric (this would be a special badge like supervisor badge that might have both #'s and chars) 5. Employee must not be able to manually enter these special characters - Camera must be able to enter these characters 6. * this is a IsPassword=true Entry

    So, my tests on XAMARIN when I set the Keyboard = Numeric - then the camera will only scan the #'s on the supervisor badge - this happens before the TextChanged event happens - so I cannot trap those characters myself

    My solution was to just use the full keyboard - their answer is they do not want Employees passing around supervisor badges mouth to mouth - must have the badge from the actual person

    Ideas??

    thanks so much

    JAMES

    Wednesday, November 7, 2018 2:35 PM

All replies

  • User180523 posted

    Android device? Make an actual Android keyboard and install it to the OS. Have the keyboard set as an alpha-numeric keyboard-That makes the camera happy. But in the layout only place the numeric keys the user should be able to use. So you have an alpha-numeric keyboard with no alpha keys on it.

    Wednesday, November 7, 2018 2:51 PM
  • User354290 posted

    OK- this sounds like a workable solution, except I am new to XAMARIN and have only worked with the XAMARIN FORMS side of the world - I've not any android code - Our Android project is just the stub to load our XAMARIN App - Can you point to some sample code that works for your suggestion? Maybe I can use that as a basis for what I need to do? We are running the latest XAMARIN FORMS release version 3.2.0.871581, and are NET Standard 2.0 for our application framework

    thanks again!!!

    JAMES

    Wednesday, November 7, 2018 3:17 PM
  • User180523 posted

    You build the keyboard app in Android Studio. Its not a Xamarin app. Its a true android project. There's lots of articles on how to make a custom android keyboard.

    Wednesday, November 7, 2018 4:03 PM
  • User354290 posted

    OK - I'm looking at those examples, but so far I do not see how to load it from my XAMARIN FORMS App via an Entry Editor - and I do not want this KBD to take over the device - just only on this one login page - So, in XAMARIN.FORMS App in XAML I would say that's where I am not sure how to get that ANDROID keyboard down into my app layer - it would be outside wouldn't it? (these are locked down devices and we have a lot of them, to many to manually install a KBD to every device - has to be a part of the XAMARIN FORMS App

    thanks

    JAMES

    Wednesday, November 7, 2018 6:13 PM
  • User180523 posted

    do not see how to load it from my XAMARIN FORMS App via an Entry Editor - You're missing what I'm saying. You don't load it to an app or a view.

    You make a keyboard and install it to the device. Period. It becomes the keyboard used by the device by default for all apps. If you opened Notepad you will still see that custom keyboard.

    (these are locked down devices and we have a lot of them, to many to manually install a KBD to every device - has to be a part of the XAMARIN FORMS App Same situation here. We have about 40k units out there. ANd we installed a custom keyboard to all of them. Our custom keyboard has no settings, no emoji, no voice command, none of the things that get a user outside of our app through alternative means.

    But ok. Its not an option for you. Then we can forget about that direction.

    Plan B

    When you tap the button for Camera switch the Entry keyboard specification to alpha so it is camera-friendly. When you get hte picture back from the camera, switch the Entry back to numeric.

    Plan C##

    Or... You make your own screen/layout and make your own numeric paid in XAML. Not a real Entry that is going to trigger the OS keyboard. But your own look-a-like that uses your own XAML layout. I prefer this direction as it keeps the OS keyboard out of the conversation entirely.

    Wednesday, November 7, 2018 6:42 PM
  • User354290 posted

    Plan B might work - So in the XAMARIN App - Handle Camera Button Pressed - then Switch the KBD - How do you switch a KBD once the user has tapped and the Numeric KBD is up? I will try in the event if I can, but that might not be just like { MyEntry.Keyboard = "Default" }

    I'll look into it - thanks

    And thanks for the detailed answers too - yep we have about the same number of devices here too plus we have Windows Devices on every product, probably then tripling that many devices. All running the same app now as WPF on those, which increases the traffic :-)

    JK

    Wednesday, November 7, 2018 7:12 PM
  • User180523 posted

    How do you switch a KBD once the user has tapped and the Numeric KBD is up? Switch it BEFORE it is shown? Or take the focus off the Entry so the keyboard drops. Then change the keyboard. Then refocus.

    Thursday, November 8, 2018 2:56 PM
  • User354290 posted

    Will try your last suggestion - and get back to you on the results - They would have to be pressing the camera button and holding it in I think, will keep you posted later today/early tomorrow

    thanks :-)

    JAMES

    Thursday, November 8, 2018 7:17 PM
  • User180523 posted

    Shouldn't have to hold it in. On tap toggle the keyboard from Alpha to numeric or vice versa. On value received from the camera, toggle the keyboard. That's it.

    If they tap the camera icon - then change their mind and tap it a second time - you're back where you started. If they tape the camera icon - then take a picture - you're back at the same point.

    Thursday, November 8, 2018 7:48 PM
  • User354290 posted

    Except there is no camera icon on this device - its a button on the back of the device - the app takes over the entire UI and they are blocked from going anywhere outside the app

    Make sense?

    thanks

    JK

    Friday, November 9, 2018 12:55 PM
  • User180523 posted

    Camera icon... Camera button on the back... whatever. It still raises an event you can trigger off. And you still get notified of when the user is done shooting the photo.

    Friday, November 9, 2018 1:08 PM
  • User354290 posted

    Hey - thanks for all the good and helpful feedback - I was able to meet with the head of data collection/IT services and we came up with a simpler solution, that will work without any more than 3 lines of code - can't divulge the trade secret though, but I'll give you a hint - think about the scanner/photo keyboard wedge and what it can send

    thanks for your insight !!!

    JK

    Friday, November 9, 2018 6:06 PM