I am trying to develop some stories to test my Bixby capsule. The thing is that every time I clear cache or create a new story, I always end up with an error of 1 Cache miss. According to Bixby Studio, this is caused by the capsule from be locked by the permission request, preventing the story from finishing.
I have been looking at the Bixby documentations, but there isn't a solution to be found.
What is to be expected is the story to approve the permission request, otherwise, continue on with the story.
This doesn't sound right. Can you provide the specific permission request that you are making in the capsule.bxb file?
It should be fine creating story using simulator's "export story" function.
clear or reset learning->"selection learning" in simulator window
start the story flow, either accept or reject permission and continue with utterance.
click "export story" at the lower right corner of simulator window at the end of story flow to save.
For example, the Yes to permission request should be saved as the following intent.
intent { goal { viv.core.ServicePermissionResponse {
accessGranted { viv.core.Boolean(true) }
persist { viv.core.Boolean(false) }
} } }
Related
I am trying to create bot for MS Teams via Microsoft Bot Framework using some examples from the Internet.
I have created user card that has button "See Report"
function userCard(session, connector, name, workingStatus, TeamsID) {
var card = new builder.HeroCard(session)
.title(name)
.subtitle(workingStatus.toString())
.buttons([
builder.CardAction.dialogAction(session, 'userReport', TeamsID, 'See Report')
]);
return card;
}
Card is displayed without any issues. When I press on button it should trigger new dialog
//Begins the userReport dialog if the button on the userCard is pressed
bot.beginDialogAction('userReport', '/userReport');
This functionality works perfect when I test it in Bot Framework Emulator.
In MS Teams instead of triggering userReport dialog it goes to the main dialog (the one that is used when message is sent). So that this button does not work at all.
Could you, please, advise what should be adjusted/added in order to make this button work in MS Teams?
Thanks in advance!
Thank goodness you're just getting started. It looks like you're using Bot Framework V3, which is severely outdated. You should definitely switch to V4.
Teams has it's own additional trickiness. I recommend trying out and combing through each of these samples:
57.teams-conversation-bot
07.using-adaptive-cards
Then read through the Adaptive Cards blog post.
Basically, a response from an Adaptive Card comes back in activity.value, so in onTurn(), you'll want to use an if statement to watch activity.value for the value sent in your Adaptive Card when the user clicks "See Report". Then, use beginDialog or dialog.run(), as appropriate to start your dialog.
I have an Action that integrates with Dialogflow which as part of the conversation requests access to the user's location.
This is fulfilled via a webhook:
app.intent('actions_intent_PERMISSION', async (conv, params, permissionGranted) => {
if (!permissionGranted) {
app.intent('actions_intent_PERMISSION - no', (conv, params) => {
conv.ask('sad face, you said no to my permission request!');
});
// conv.ask(`Ok, no worries. I'll have to figure out how to get your postcode. follow-up intent I suppose`);
} else {
conv.data.postcode = conv.device.location.zipCode;
conv.ask(`Ok great - please give me a minute, I have to get data from a few different places.`);
//use postcode to make some other API calls
}
});
Everything is fine when the user gives permission but when they don't give permission I would like to pass off to an intent that asks for their location manually ('what is your postcode/zipcode?').
As per the screenshot I tried creating a followup intent to actions_intent_PERMISSION called actions_intent_PERMISSION - no but this causes the app to crash.
What is the best way to pass the conversation to another intent is the value of permissionGranted is false?
Your question doesn't quite make sense the way you've asked it. Intents represent what the user has said and not what you do with it - that is what your webhook does in an Intent Handler. There is nothing (technically) stopping you from replying to the user asking for their zip code by just replying differently.
If you want users to be able to trigger some Intents if they have given permissions, and other Intents if they have not, you can set a different Context for each. Then you would set some Intents to only be triggered if the "permitted" context was set, and others only if the "notpermitted" context was set.
However, you have a non-technical problem to consider. If they aren't giving you permission to get their location, why would they tell you their location? It also is likely that the reviewers would reject it, saying that you should be getting location information through the provided API.
Debug tab:
{
"response": "We're sorry, but something went wrong. Please try again.",
"expectUserResponse": false,
"conversationToken": "",
"audioResponse": ""
}
I create the sample project in Dialogflow and it works, but in the simulator Actions on Google it doesn't!
Please read the "Preview the app" section of this page:
https://developers.google.com/actions/dialogflow/first-app?hl=en
To preview your app:
Turn on the following permissions on the Activity controls page for your Google account:
Web & App Activity
Device Information
Voice & Audio Activity
You need to do this to use the Actions Simulator, which lets you test your actions on the web without a hardware device.
Activity control page: https://myactivity.google.com/activitycontrols
Please go to the Actions console and enter the 'Backend services' - it's in the left menu below the 'Simulator'.
There should be one card for Cloud Functions. Does this say, that there's an error? If so, you can find out more in the logs of Firebase Functions, which is linked in this card.
Check the settings and permissions, if you are a developer, owner etc. of the application. I got this fixed by changing the settings...need to dig a little more to understand the exact reason. Will do an update if I understand more
My question:
I have an adaptive card with a postback button whose value is say "thisIsMyPostback". Now, I want to act on this postback as one would.
The problem is that this postback can also be typed out to reach the same result. In other words, clicking the button and also just messaging my bot "thisIsMyPostback" straight up result in the same thing.
Is there a way to separate a postback message from a 'message_received'? That way a user messaging "thisIsMyPostback" straight up would not result in the same thing as clicking the button.
Thanks!
The Adaptive Cards readme on the BotFramework WebChat GitHub repo GitHub repo states:
The data property of the action may be a string or it may
be an object. A string is passed back to your bot as a Bot Builder SDK
imBack activity, and an object is passed as a postBack activity.
Activities with imBack appear in the chat stream as a user-entered
reply. The postBack activities are not displayed.
"actions": [
{
"type": "Action.Submit",
"title": "Next",
"data": { "postBack": "thisIsMyPostback" }
}
]
If the value of the Activity doesn't have an object, then the user did not click the button.
Is there a way to separate a postback message from a 'message_received'? That way a user messaging "thisIsMyPostback" straight up would not result in the same thing as clicking the button.
No, it's not currently possible, because all messages, user or imBack/postBack, are of type "message" so there's no way to tell the difference unless you put some special text in your postBack and configure a triggerAction to recognize it.
For more information on using trigger actions, see:
https://learn.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-global-handlers#trigger-a-help-dialog
I am developing an app that requires an internet connection, so I want to check the availability before launch.
If internet connection it is not available, show an alert to the user and go back to Home instead of trying to launch the app.
So I used the Reachability class, that was recommended here (http://stackoverflow.com/questions/1961341/check-for-internet-access-with-monotouch) to check the internet connection.
So far so good. But if I place this check in my Main.cs, it performs the check, but will not display the alert.
if(!Reachability.IsHostReachable("http://google.com")) {
Debug.WriteLine("OFFLINE");
UIAlertView alert = new UIAlertView("Offline","Voor deze app is een internetverbinding vereist.",null,"OK",null);
alert.Show();
}
else{
MPFramework.Application app = new MPFramework.Application();
UIApplication.Main (args, null, "AppDelegate");
}
If I place this check in AppDelegate.cs it performs the check, displays the alert, but keeps a black screen instead of returning to Home.
So where do I place my code in order to check before launching the app, and displaying an alert?
You're looking at this a bit wrong:
Apple doesn't approve of apps that kill/close themselves (see this: https://stackoverflow.com/a/356342/183422). If the user wants to close your app, he should do it himself.
You need the main loop running to show any UI - and that main loop is started when you call UIApplication.Main (which is why you have to do the check in AppDelegate.cs and show the corresponding alert there instead of in your Main method).
So, putting these things together, I think you should show a blank/splash screen, check for reachability and if there is none then show the alert (and if the user dismisses the alert, maybe check again).