Dr. Sbaitso is one of our newer demos. We wrote it for a workshop at JavaZone a couple of years ago and it
proved to be an excellent tutorial on many complex abilities of Codename One. It captures images from the
camera, rounds them, does dynamic search with a chat like bubble interface…
But the coolest part is the speech synthesis…
It uses native interfaces to access the text-to-speech capabilities of the device and “says” what the “doctor” is
saying. This both demonstrates native access and the rather cool TTS functionality.
What’s to Improve?
The demo is already so good and relatively terse, there isn’t much to improve about it.
We naturally updated it to Java 8 and the newer terse syntax which cleaned up a bit of the UI. We also replaced
the next command with an arrow material design icon which is more attractive…
the Chrome browser!
This works really well and runs very smoothly on my desktop, it’s not ideal because speech synthesis isn’t
widely supported by browsers and I wasn’t able to get it to work on firefox or any other browser. But it’s still
|This pretty much shows off the benefit of having a native framework vs. the pain of web fragmentation…|
Hi Shai, would it be possible to create text input that allows for paragraph to be created and emojis to be inserted? Also allow to create a bubble to format text appropriately when needed like bullet points (if pasted from a document that does have them), telephone numbers (tapping on numbers to trigger events like calling or saving to address book) , URL links (underline them and when tapped to open web browser), i.a.w, pretty much like the way bubbles displays the text richly like existing IMs you get now?
You can insert emojiis on the device today and it should work fine for this and other apps.
However, what you are talking about is called a “rich edit component” we have a cn1lib that supports that somewhere (Steve did it) thru a web browser UI. The problem is that Android and iOS have rather bad support for that concept and it’s rather different between the OS’s.
It’s something we wanted to integrate a while back but we didn’t have any actionable user demand which is really needed for such a problematic task.
You have to be kidding…all it does is ask you questions about what you just said. Dr. Sbaitso actually is intelligent compared to this. He does more than just that.
That’s the nature of demos. I totally meant to write a decent AI chat and instead focused on the other features. By the time I was done I couldn’t justify writing more code for something that’s meant to teach UI programming and native interfaces…
Feel free to submit a pull request though, all the logic is in [AI.java](http://AI.java) so it should be pretty easy.
I appreciate that you were not offended and I apologize for being a bit harsh. I do look forward to the eventual release of an application that does Dr. Sbaitso one better. The voice has to be the same, though…sorry. I’m sentimental.
If I’d spend time on this I’d work on the AI but I doubt I’ll get any time to work on that. When I initially presented the demo no one knew about the original so the points were a bit lost on them… Plus it made me feel old 😉