Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sending payload from V1 SDK #100

Open
skeer00 opened this issue Aug 24, 2018 · 1 comment
Open

sending payload from V1 SDK #100

skeer00 opened this issue Aug 24, 2018 · 1 comment

Comments

@skeer00
Copy link

skeer00 commented Aug 24, 2018

How can I send payload and lat, lon from dialogflow android sdk?

@skeer00
Copy link
Author

skeer00 commented Aug 28, 2018

Update

I am able to pass payload when I use the code like below,

final AIRequest aiRequest = new AIRequest();
AIOriginalRequest aiO = new AIOriginalRequest();
HashMap<String, String> hm = new HashMap<String, String>();
hm.put("element_1", "8888");
hm.put("element_2", "abcd");
aiO.setData(hm);
aiRequest.setOriginalRequest(aiO);
aiRequest.setQuery("find Cheese");
and I am getting this in server as below,

{
"responseId": "ddsds-qwq-qwqwq-wqwqwq",
"session": "<>",
"queryResult": {
"languageCode": "en",
"intentDetectionConfidence": "0.93",
"allRequiredParamsPresent": "true",
"parameters": {
"item": "Cheese"
},
"fulfillmentMessages": [{
"text": {
"text": [""]
}
}],
"queryText": "find Cheese",
"intent": {
"name": "<>",
"displayName": "item-req"
}
},
"originalDetectIntentRequest": {
"payload": {
"element_2": "abcd",
"element_1": "8888"
}
}
}
But as I am using AIService and using startListening method of that, I am not able to set the AIRequest and setOriginalRequest. There is no way to set OriginalRequest if are using AIService and startListening. The Dialogflow sdk is automatically doing this.

Any one faced such situation or solved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant