https://developer.android.com/design/wear/patterns.html#Countdown states
The cue card can be invoked to continue specifying the action. For
example in a messaging application, tapping a “Reply” action button
invokes the Cue Card and prompts for voice input. In this case the
prompt label (such as “Speak your message…”) and a set of sample voice
suggestions can be specified by developers.
I want to have a wear application, which when launched could show a Cue Card with my custom voice suggestions. How can I do it?
Looks like there's a similar question and here is the link.
The Android documentation for voice commands also implies the same thing: you cannot add custom commands, but you can invoke the voice recognition activity and handle the input from that.
Related
My bot has been created purely with BotFramework Composer. It has several dozen dialogs. The user's question is mapped to an intent with LUIS; it uses LUIS as the main recogniser. Each intent has its own dialog. Each dialog has many user text inputs, formalised as buttons for the user to click.
I'd like to support a typed 'cancel' across all these dialogs.
I can do this by adding an intent for it with LUIS, and allowing interrupts on the text input action. However, as a side effect, all the other LUIS intents come into play, and mess up my dialogs by launching new child dialogs – other than 'cancel' – into what should be a strict linear process. I only want it to recognise 'cancel' after the dialog has been started.
Is there some way to achieve this with Composer, other than adding a manual check for 'cancel' as user input after each text input action?
I've developed a bot that calls a prompt dialog based menu at the beginning of the conversation.
Dialog call used on the Message Controller:
await Conversation.SendAsync(activity, () => new Dialogs.CustomBellaHelp());
The problem is when I execute it over the Bot Emulator prompt dialog options are properly addressed by the code.
However, when I execute it over Direct Channel prompt dialog options "leak" from the dialog code and move to the Root dialog which invokes LUIS to manage the menu options.
Thoughts on how to avoid that?
Thx!
I think you may be misunderstanding the purpose of Conversation.SendAsync(). The MakeRoot delegate isn't a function to navigate to whatever dialog you want. It's only called at the start of the conversation and it's used to create the conversation's root dialog. If a conversation is already underway, Conversation.SendAsync() sends the activity to whatever dialog is on top of the stack and the MakeRoot delegate is ignored. You can read more about dialogs and conversation flow here: https://learn.microsoft.com/en-us/azure/bot-service/bot-service-design-conversation-flow?view=azure-bot-service-3.0
If you want to start a dialog in the middle of a conversation you should do it from within another dialog and not from your messages controller. A typical way of doing this is to use context.Forward(): https://learn.microsoft.com/en-us/azure/bot-service/dotnet/bot-builder-dotnet-manage-conversation-flow?view=azure-bot-service-3.0#invoke-the-new-order-dialog
As far as why Direct Line behaves differently from the emulator, you have to understand that events like conversationUpdate are channel-specific and may behave in unexpected ways on different channels.
I'm new to Windows Phone development and I've found something about background agents in WP 7.5:
http://code.msdn.microsoft.com/wpapps/CSWP7ScheduledTaskAgent-6450bcf1
I wasn't able to find a way of making the toast notification fixed, I mean, when it appears on the screen it should disappear.
Is there any way of doing this? any advices, documentation should be great.
Thanks.
Toast Notification by the OS
When a toast notification is created, the OS handles the amount of time it is displayed for...
A toast notification displays for about 10 seconds unless the user
dismisses it with a flick to the right. If the user taps the toast, by
default, your app's start screen launches. Or, you can choose to
specify which screen of your app will launch.
Taken from the official documentation.
The API for toast notifications does not allow you to specify a time. Only a title, content and deep link into your app. This is the only type of toast/notification that can be used by a Background Agent. But it will appear:
on the Start screen
when your app is being used
when any other app is being used.
Custom toast-like notification (eg. Coding4Fun Toolkit's Toast Prompt)
A custom toast notification, although more flexible, must obey all the system rules unlike the system's Toast Notification which has special permissions.
This means the Coding4Fun Toolkit's Toast Prompt cannot:
Display notifications when your app is not running (apps cannot run in the background, they are essentially paused)
Display notifications when the user is on the Start screen or not using your app
Having a permanently (or long) displaying toast notification would be annoying to the user (hence the 10 second limit by the OS version) so do think carefully about why you need it - is the System Tray or MessageBox a better idea?
If you're new to Windows Phone, I would recommend using a handset for a while to get the feel for how the system works and how other apps use all kinds of notifications.
If I have a program running in the background and it needs the user to see it (like a dialog box) when it pops up, can I take the user out of Metro Mode (in Windows 8) for him to be able to see this notification?
I highly doubt it, such a capability would spawn a bunch of apps that would essentially try to take over and be very jarring for the user. Your desktop app though could generate a toast notification that would alert the user there is some action to take, see this MSDN topic for details.
I agree with Jim: switching context automatically from the desktop to Metro (or whatever they're calling it now) would be visually jarring and user-hostile. I realize the OS itself does this, like when you launch a desktop app from the Start screen. That doesn't make it good design.
Besides, when it does it, the user (presumably) wanted to interact with the newly-launched application. That's not necessarily the case when you're just showing a notification. There may not even be action required.
Instead, I recommend that you use Toast, the notification framework designed explicitly for this purpose. There's a sample application available for download: Sending toast notifications from desktop apps.
Note, however, that in order for Toast notifications to work from desktop applications, you must install a shortcut to your desktop application in the Start screen, with a System.AppUserModel.ID. This should be handled by your installer. More information is here.
Of course, the user can disable this by either turning off notifications or removing your app's shortcut from their Start screen. That's perfectly okay—if they take either of these actions, you can assume that they no longer want to receive notifications from your app.
We have a very simple demo app with the Windows Phone map app sending a link via 'tap and send' to an NFC tablet. I can get and read the URL coming over, but Windows 8 pops over a purple bar in the top right asking if I want to receive content from another device, which then opens IE to the URL.
Is there an easy way to stop the default Windows behavior (not have the purple bar slide in)?
Thanks!
There is no way of disabling the toast pop-up and still have the OS launch the browser by default.
When not inside of a "metro style" app toast will always should for incoming proximity payloads such as an NFC tap, however if you are inside of your application you can subscribe to the proximity events and respond with your own user experiences, which means you don't have to show the toast. However when you are in the OS/Start Menu experience Windows always mandates the toast I'm afraid.
In addition; following on from the title of your question NFC tags respond based on the default program for the MIME type/extension on the tag (if using a URL). So if you want a custom experience instead of IE launching you can register your app again an extension or protocol such as map://mydataUrl and Windows will automatically launch your app when you acknowledge the toast popup.