1. Amrykid's Avatar
    I hope MS will introduce something along the lines of "Cortana Background Agents". It would allow developers to introduce commands without having to start an application. A good example would be a dictionary definition app or a WolframAlpha app.

    You could say "define 'cool'" which would trigger a dictionary defining background agent.

    Code wise, it might look like this:
    Code:
    using System;
    
    public class DictionaryDefinitionAgent: CortanaBackgroundAgent
    {
        public override Task InvokeAsync(CortanaWrapper cortana, SpeechAgentInvokedEventArgs args)
        {
            //Entry point for the background agent.
            var deferral = await args.GetDeferral(); .//We know this task may take longer than 3 seconds so let the system know this. Cortana could say "hold on a second".
            var wordToDefine = args.Arguments[0]; //Get "cool"
    
            //insert magic code to get definition here
    
            cortana.Say("The definition of {0} is \"{1}\", wordToDefine, definition); //tell Cortana to say the definition
            deferral.Complete();
        }
    }
    The code above will grab the definition for the specified word and show it from inside of Cortana, without starting a dictionary app or performing a Bing search. There are other uses for this such as a calculator or a custom Google search.

    Perhaps we can set triggers that would allow these agents to run at start-up (and limit it to one, specified by the user). It could be used to say or name or something.

    I don't know, I just can't wait for the API to be released (if it hasn't already). What do you guys (and gals) think?
    04-21-2014 03:35 PM

Similar Threads

  1. Lumia 925 can't connect to Microsoft Account/ Twitter the works.
    By AdamJoeOos in forum Windows Phone 8.1 Preview for Developers
    Replies: 17
    Last Post: 01-07-2015, 05:17 AM
  2. how to delete custom word from prediction
    By Ichigo in forum Windows Phone 8.1 Preview for Developers
    Replies: 2
    Last Post: 04-23-2014, 12:35 PM
  3. How can I make the Sync Contacts Notifications go away?
    By every name is taken in forum Nokia Lumia 920
    Replies: 6
    Last Post: 04-22-2014, 06:26 PM
  4. 8.1 cortana in the UK
    By ThE.G33K in forum Cortana
    Replies: 2
    Last Post: 04-22-2014, 05:28 AM
  5. Is Cortona not global?
    By himmatsj in forum Windows Phone 8.1 Preview for Developers
    Replies: 2
    Last Post: 04-21-2014, 02:59 PM
LINK TO POST COPIED TO CLIPBOARD