IOS Dev
IOS Dev

Reputation: 21

Amazon Alexa custom skill issue in ios app

I'm trying to implement custom skills using Amazon Alexa Skill Kit (ASK). I have configured Amazon Alexa Voice Service (AVS) and ASK project, Then created lambda function also.

I have 2 custom intents.

{
  "intents": [
    {
      "intent": "fIntent"
    },
    {
      "intent": "bIntent"
    },
    {
      "intent": "AMAZON.HelpIntent"
    },
    {
      "intent": "AMAZON.StopIntent"
    }
  ]
}

I have a Utterances like below

Here is my index.js code

'use strict';
var Alexa       = require('alexa-sdk');
var SKILL_NAME  = 'ScottSkill';
var APP_ID      = '';


exports.handler = function(event, context, callback) {
    var alexa = Alexa.handler(event, context);
    alexa.registerHandlers(handlers);
    alexa.execute();
};


var handlers = {
    'LaunchRequest': function () {
        this.emit(':tellWithCard','Hi, Im your personal car assistant. How can i help you');
    },
    'fIntent':function (){
        this.emit(':tell','Fuel level is 100');
    },
    'AMAZON.HelpIntent': function () {
        var readFuel        = 'Iam Personal car assistant, I can assist you with car info';
        var speeachOutput   = readFuel;
        var reprompt        = 'How can I help you';
        this.emit(':ask', speeachOutput, reprompt);
    },
    'AMAZON.StopIntent': function () {
        this.emit(':tell', 'OKay, Goodbye');
    },
    'AMAZON.CancelIntent': function () {
        this.emit(':tell', 'OKay, Goodbye');
    }
};

Now the problem is when I'm saying skill name I'm getting LaunchRequest message. But when I'm trying to get custom intent value by saying fIntent info I'm not getting the message what I configured in the index.js file.

if I say info its should tell Fuel level is 100.

But I'm Not getting that info. Can someone help me?

Upvotes: 0

Views: 159

Answers (1)

Rachel Batish
Rachel Batish

Reputation: 21

Don't develop the two components at one.

First develop you skill and test it from an Echo device

Once you are done, develop your Amazon Voice Service app

Upvotes: 2

Related Questions