How to locate default dialog for detail page? - bixby

I successfully display a dialog on detail page thanks to guidance from how do I customize dialog to the detail page of an answer set?. But yet I am unable to customise the dialog shown on the detail page, "Here what i found"
Would love to know where could i find out the concept/dialog that is relate to the default dialog on detail page, based on the debug console? or there is others ways?
[Extra infomation] I display detail page with layout match,
}else-if (size(this.audioItem)==1){
layout-match (this.audioItem){
mode (Details)
}
}
It success. But when i customise the result view's message,
message{
if (size(this.audioItem)==1){
template ("Can?")
}
The message come out 'Here what i found'.

The default dialog part might be a bit confusing, there is no need to do dialog model in your case. To replace the default "here is what I found", just use the message child-key in any view model.
For example, the following would display "In result view" instead of "here is what I found"
result-view {
match: TextName (this)
message ("In result view")
render {
if (size(this)>1) {
To check the complete example, download capsule from GitHub.

Related

Display element in layout view base on existence of other element

Come after going through the solution for How to check whether a text value content exists in a Bixby layout view.
My issues is on audio element, i will check for the existence of audioItem.duration before display their title one-by-one on a list. I had make sure on the debug console that some audio is with duration while some didn't. So i try on the result view with macro
content{
if(exists(audioItem.duration)){
thumbnail-card{
image-url ("#{value(audioItem.albumArtUrl)}")
title-area {
slot1{
text{
style(Title_XS)
value ("#{value(audioItem.title)}")
}
}
}
}
}
}
It display empty but without that if it will display all of it without filter. How should i improve on the code?
The code you provided does not look wrong. In this case, the support team may need to view your code in its entirety in order to help you with this behavior.
I would recommend reaching out to the support team via the "Contact Support" option under the Help dropdown menu of Bixby Developer Studio.

Controlling the Back Button after Navigation Punchout

I have been trying to control the back button behavior on how far back it goes to the capsule after leaving the navigation punchout command. Such as, after pressing the back button on the website that was punchout, it takes me back two layout screens, rather than one.
The model of my capsule goes in this flow:
(Vocal input) -> Object List (After vocal input) -> Object Page (After selecting an object) -> Website Link Punchout (After an on-click event of the object page)
Website Link Punchout:
result-view {
match : ObjectWebsite (this) {
min(Required) max (One)
}
render {
}
app-launch {
payload-uri("object website link")
}
}
The expected result, while being on the website page, is to return to the object page, not to the object list page.
The output results in returning to the object list page after I press back button to exit the website link.
Thank you for raising this question. The scenario you have mentioned would be a bug, pending verification on our end. Please open a ticket with Developer Support to be notified when this bug is fixed/closed.

Bixby: Unable to print message

user: set my location to new york
Bixby will asked for permission and then asked to store the location and then asked to choose from list of map. User will click one and i will message user that your location is set to New York, USA. Everthing is good. But When i click on the map to select address, I won't get the message but if I voice command like "First one" or type "first one", then i get the message.
My location is result view where in message I checked if levelOne.subdivisionCode exists and country name exists, it will combine and message.
I have summary layout-macro and details 'layout-macro'.
Please let me know if you need some more information. and let me know why my message is not appearing when click select the map?
result view:
result-view {
match: Location (this)
message{
if (exists(this.levelOne.subdivisionCode) && exists(this.country.name)){
template ("Your location is set to #{value(this.name)}, #{value(this.country.name)}. You can now browse by saying following statement.")
}else-if (exists(this.country.name)){
template ("Your location is set to #{value(this.country.name)}. You can now browse by saying following statement.")
}else{
template ("We are unable to find any city")
}
}
Summary-layout
where-each (album) {
layout-macro (location-summary) {
param (location) {
expression (album)
}
}
}
Detail Layout
layout-macro (location-details) {
param(location) {
expression (this)
}
}
This may be an issue that we'll need to investigate further. Can you submit a bug report via Bixby Studio?
With new SDK 19J release, this issue is solved by enable allow-dialogs-on-detail-pages in runtime-flags
After talking with internal team, it is a generic issue we became aware of.
Current version of Bixby does NOT render message section when click from a list of results. The UL utterance "first one" actually re-run the search and display a single result, thus the message is rendered.
A request to add feature of displaying dialog/message when click a list of results is submitted to product management team. Please continue your capsule development with Bixby, and we'll see if next release include such feature.
Have fun with Bixby! And thank you for sharing the diagnostic report with us!

chrome extension background script confirm message title

I have a chrome extension. In its background script I want to present a confirm() dialog box to accept (Ok/Cancel) input from user. Have no problem doing that.
The only problem is that the title of message shows up as "chrome-extension://32_char_extension_id". Not what I want to see.
On the other hand in the safari extension (global.html) the title shows up as the "Extension name".
Would be nice to have the same functionality in Chrome Extension.
Any idea if there is a way to see extension name in the message box instead of the ID.
Anything I"m doing it wrong ?
I understand confirm() is the not the recommended solution for prompt to take user input (as it is a blocking call). But this seems like a quicker solution for what I"m doing.
The other alternatives I"m looking into using JQuery message boxes. But if I can resolve this thru simple confirm(), it would be great for now.
Probably, you should use the chrome.notifications API to display the dialog so that you ask the user something in this case. You can show a notification which has two buttons by like the following code:
chrome.notifications.onButtonClicked.addListener((notificationId, buttonIndex) => {
// If buttonIndex == 0, Ok button clicked.
chrome.notifications.clear(notificationId, wasCleared => { ... });
});
chrome.notifications.create("notificationId", {
type: "basic",
iconUrl: "SOME_ICON_PATH",
title: "YOUR_EXTENSION_NAME",
message: "SOME_MESSAGE",
buttons: [
{
title: "Ok"
},
{
title: "Cancel"
}
]
});
Of course, you need to get a "notifications" permission from the user.
You can't change window.confirm() title, it is for anti-phishing.
You should try other approaches such as Bootstrap Modal

demoProgram which can be of simple one

I am creating a program in which i want to display dialog box(which shows yes/no command) when button clicked, after dialog box has been shown, when clicking yes button it moves to another form, can you help me to achieve this task? please let me know as soon as possible.
Checkout the LWUIT repository here... In this repository contains LWUIT sample applications. See the sample code. and do like this..
Dialog.show("Sample", "Put ur information", "Ok", "Cancel");
Have a look at the Alert class (link text, the Form class, and the Display method to show stuff. That's pretty basic stuff and you'll find tons of examples / tutorials out there.
ps: Pure MIDP no LWUIT involved.

Resources