Open hongnk opened 5 years ago
I think the prompt message should be handled separately from this library, as different people need the library for different things. For example, in my use case I prompt the user to scan a barcode in a particular location on an object. They then have the option to dismiss it or to permanently dismiss it. If you're instead thinking about a 'hint' type of text that is perpetually in the viewfinder, that could be something to implement that might be handy.
I wasn't aware there were physical navigation buttons on any modern devices. I was under the impression that the android devices all display home, back, and app switcher buttons on the bottom of the screen. If this isn't the case I'm not sure how you'd detect if the device was or was not showing the default software back button and I don't really think showing both would be a good idea. In all my emulators it shows the back button digitally on screen.
Oh thanks for review, let's me clarify:
Prompt message should be empty by default, but if a developer needs it, he can set that parameter and it's good to have the text displays somewhere near bottom of screen. It is an instruction for users. I can't think how that message can be done outside of library. I can prompt users to do something before launching plugin, but it is less friendly because they have not seen the camera view to understand what the prompt means.
In Huawei P20 there's no back button, not even on screen back button. User needs to swipe from left to right at bottom to go back. I have users launch the scanner then thought the app hang because no way to go back. It is common now with android material design to have a back arrow at app title bar. I thought a back arrow like iOS version would be great.
When I hear prompt I think a popup or dialog, like an alert. A helper text on the screen makes more sense.
I've put the help wanted tag on this. I haven't done much development on this recently and I'm not very familiar with android to build this type of stuff. Feel free to dig in and try to develop it if you're so inclined.
Thanks @forrestmid . I don't develop in android but will try later and submit PR if possible!
This could be solved using #13.
Suggestion for more user friendly:
Prompt message: a custom text string like "place QR code inside camera view to scan"
Back button for Android: some recent android devices remove navigation buttons, although navigate back still possible with some gesture, but quite confusing, so better for app to provide back button.