When registering a menu item for the "OK Glass..." I'd like to some how provide a different semantic value to what is actually displayed. The example I have is "OK glass, find an ATM" is difficult for Glass to recognise and I'm thinking this is because it is expecting the word "ATM" instead of "A-T-M". If possible can I somehow provide these semantics into the menu whilst displaying an alternate message?
The Glass Developers Voice Command Checklist and Voice Input pages both recommend using a generic trigger under the "ok glass" menu, immediately followed by speech recognition to determine specific/unique parts of the request.
Could you use something like: "ok glass, find the nearest location for..."
... and then recognize the speech for "...A-T-M".
Here is the example used on the Voice Command Checklist:
"ok glass, find a recipe for..." (this allows users to speak "chicken kiev" and immediately see the recipe)
This approach also has the benefit of being generic enough to have your Glassware locate a number of places, not just an ATM.
Related
I'm building my first chatbot with bot Framework Composer and I don't succeed in building a very simple scenario.
I looked deeply in the Bot Framework Composer Documentation but found nothing helpful.
Child Scenario I want to achieve:
Bot asks/prompts 'Says something plz'
User answers/types a string, something like 'anAnswer'
Bots says "You said 'anAnswer', is it correct ?"
User types "yes" or "no"
if user typed "yes" : End of dialog
if user typed "no" : repeat this dialog
See the Bot Composer Canvas here
The problems I face :
1. "Repeat this dialog" does not work as I expected.
The emulator keeps telling me :"Recursive loop detected, AdaptiveDialog cannot be repeated twice in one turn"
I tried to turn the "Allow Loop" on "True" but it seems to result on a infinite loop (though I don't know how I can check that...)
See the "Repeat the dialog" options here
Do I have to add something in the "Options" of the "Repeat the dialog" action ?
Like where the loop have to start ? If so, how to do that ?
2. How to use "Replace this dialog" with a scenario already used ?
As I didn't succeed with the "Repeat the dialog" action, I then tried to cut in half the whole dialogue by dividing it in two dialogues. Each dialogue have one goal :
the first scenario is for asking information to the user
the second scenario is for asking confirmation to the user
See the "Ask for infos" dialog here
See the "Confirmation" dialog here
The initial goal was to "redirect" the user toward the "Ask for infos" dialog when he whant to edit what he typed previously.
But here, it results on a error : POST400directline/conversations/<conversationId>/activities
Here again there are some "options" possibles for the "Replace the dialog" action, but I didn't found anything in the documentation on this subject.
Thanks a lot for helping a newbie, I'll gladly try the solutions you bring me and make the feedback.
Have a great day,
PS : Do you know a good tutorial on Bot Framework Composer (other than the Microsoft ones ?)
Before using the Repeat the dialog action you have to clear the variable storing the user answer. The reason its looping is the bot already have an answer in memory so it wont prompt the user again.
use the 'Set a property' action and set the variable value to null before repeating the dialog
After a user finishes speaking, I want to display a card telling the user that their data is being saved. I see that the "Take a note" Glassware does this however I can't figure out how to implement the same feature. Is the source code for "Take a note" available anywhere? If so, does anyone have a link to it?
INTRODUCTION AND RELEVANT INFORMATION:
I am maintaining an old application and I need to implement feature that generates reports based on data calculated from a database. User must also have an additional option of printing the file ( user must be able to choose printer, and must be able to see print preview ).
To improve my chances of getting satisfactory answer, allow me to additionally clarify matters with a small "example":
User presses a button -> application calculates data; // Done
Application creates file and populates it with the result; // Done
User gets informed that report is generated; // Done
User presses another button that is charged for printing; // Stuck here!
Print preview pops up and an option to run print dialog. // Stuck here
User starts the print dialog, chooses the printer and application prints the file;
The application is coded in C++ using raw WinAPI ( no MFC ). I am working on Windows XP.
PROBLEM:
I was able to successfully use OLE Automation to generate/save Word and Excel reports but I can not create print preview that matches exactly the print preview Word would create.
If I use OLE Automation to show Excel's print dialog/print preview, there is a following problem that might occur :
User can simply click "Close Print Preview", or can simply close print property sheet ( please see picture below ) and return to the document which might compromise document's data.
My employers do not like this ( they have no software engineering / developing background, so no matter what I say it will end up as an "echo in the wind"... ) and they wish that my print preview matches exactly the print preview Word generates.
Therefore, I need a solution for generating a print preview for the user, in a way that matches exactly print preview Word would create. Furthermore, user should be able only to see how this looks like, but not to be able to open the file from my application. User should be able to choose the printer that will print the file.
An implementation similar to the one from the picture would be fine.
QUESTION:
INTRODUCTORY NOTES:
The question is too broad to be answered in one post so I must limit myself only for seeking advice / general concept / pointing in the right direction.
THE ACTUAL QUESTIONS :
I did the best I could with the OLE Automation and Excel / Word files, but as you can see there are problems with generating a print preview, hence the following questions :
Since this is my first time to tackle this kind of task, can you recommend me the proper way to handle it ( general concepts of course )?
Is there a chance that there is a workaround for my printing problem ( like sending WM_PRINTCLIENT message to the Word / Excel or something like that )?
REMARKS :
Again, I realize the question is too broad so just give me general concepts / pointers, so I could post separate questions if I get stuck somewhere in the way.
I do not need to use Word / Excel and OLE Automation, it was my choice at the moment.
If you can recommend better solution I will gladly accept. I do not wish to use libraries.
If additional information is required, ask and I will edit my post.
You would need to bring up a dialog box when the user clicks the print button, the dialog box would contain a control that shows the preview for the default printer and three buttons to select another printer, print and exit.
The preview control could be a static control where the WM_PAINT handler would draw the preview (alternatives: a Web Browser control which is fed html text or a RichText control which is fed RTF text, but then you are constrained by the functionality of these controls).
Quote: Print preview
isn't that special. It just means that you have to render to screen
(or bitmap) what you'd otherwise would render to the printer DC. This
primarly means using the page size, and providing a UI control for the
prev/next page.
This SO Answer describes in detail the work you need to do to paint the preview.
This CodeProject article has some simple code for print-preview; it's in simple MFC which should not be too difficult to translate to plain C++/WinAPI.
Are you able to customize the appearance at all on the first two screens of Google Glass?
1) The Home screen card with time and "ok glass".
2) The Menu Item card with "ok glass," and a list of available voice actions.
For example, add an image, background image, remove the time, or add additional text. Or maybe put a custom view we create in front of everything.
I'm not looking to change the functionality, just the look and feel.
If not, are there any plans to allow this in the future?
Thanks!
It is not possible to change any of those screens. And I don't believe they will add the ability in the future. But we never know with Google, maybe in the future.
You can always make a feature request here:
https://code.google.com/p/google-glass-api/
I'm developing a GDK app where I need to provide an user experience to display status text similar to video recording status that Glass provides ( displaying "Recording" status then displaying progress indicator and finally showing 'Complete' text ). Appreciate your input.
Right now, you'll need to write your own UI logic to do this (perhaps by using a Dialog with a custom layout that has the appropriate centered label and icon, with a progress bar at the bottom, and changing the label and dismissing the dialog when the action is complete).
You may want to follow issue 271 in our issue tracker, which covers the progress indicator part of this flow.
Tony is right. There is no way to do this naively but you can build it yourself. You can create a layout that is build exactly like the menu is built in the GDK, and then just update the setcontentview() with a new layout each time you want to move to the next card. Also you can build a layout with the holo horizontal progressbar to get the general idea but it won't be like the one Google uses.
Also wanted to add that I have built a repo that you can drop into your project for this. Here is the link: https://github.com/w9jds/GDK-ProgressBar