Phone Call Functionality for Bixby Capsule - bixby

Does anyone know or have a clue on implementing a phone call functionality in a Bixby capsule. That is for example, like from the Yelp capsule, a user presses a 'Call Business' button at the bottom and the capsule initiates a phone call with the business.
I have extensively been looking at the Developer's Guide (Contact library):
https://bixbydevelopers.com/dev/docs/dev-guide/developers/library.contact
But it seems like they don't have an action call for a phone call.
compound-card {
content {
single-line {
image {
url("../assets/ic_btn_call.png")
}
spacer
text {
value ("Call #{value(phoneNumber)}")
style(Title_XS)
}
}
}
on-click {
intent {
// goal : Call action not implemented
value {
$expr (phoneNumber)
}
}
}
}

An alternative solution:
Although it is not documented, use app-launch to take advantage of Android's built-in href
add the following code in your view file
app-launch {
payload-uri ("tel: 1-800-726-7864") // samsung number
}
do a private submission and load revision number to your phone.
get to the view with app-launch, and you will be re-direct to phone-call with the number.
you need to confirm the call by press the green dial icon.

Some of Bixby's early adopters helped us explore and develop new features. As a part of this partnership, they have access to newer features.
The ability to make a call is one such feature which is being developed comprehensively and will soon be available to all of our developer community!
Please follow this feature request https://support.bixbydevelopers.com/hc/en-us/community/posts/360029568074-Allow-access-to-phone-dialer for updates on release date and to share your comments or thoughts.

Related

Extra layout after select card with intent

Found this question in other place, similar to Start playing the audio after selecting card in results view and How to trigger onclick on selection in bixby but i am unable to comment to ask for further question, and i am so blur about the answer provided, so decided to open a new question.
What i want to achived is to display a list for user to choose and after user choose, it will play the news audio (action 'playnews').
So this is my view which connect to layout macro
render{
list-of (this){
has-details (true)
where-each (one){
layout-macro (display-list){
param (one){
expression (one)
}
}
spoken-summary("#{value(one)}")
}
}
}
And this is my layout-macro-def
layout-macro-def (display-list){
params{
param (one){
type (userWantToHear)
min (Required) max (One)
}
}
content{
cell-card{
slot2{
content{
primary{
template ("#{value(one)}"){
}
}
}
}
on-click{
intent{
goal: playNews
}
}
}
}
}
What i achieved is when i clicked on the list of selection,
it bring me to another page with the topic i clicked just now, and the audio play only if i click the card on the new page shown.
Yes this question is similar to those i mentioned above, but i require a further explanation as i really blur about this (and yea i can't post a comment).I want to get rid of the one-extra-click before the audio play.
Thanks !
First the easy answer:
Unfortunately, on-click does not work on list-of in result-view. So the extra page is required when doing the on-click way of the result-view.
Now the useful answer:
To implement the feature you want, an input-view with selection-of might be much easier than list-of in result-view.
This might be difficult to explain in words, so I made a sample capsule, you can download it and try.
In the two training examples provided, show me all titles use the result-view, and redirect using on-click. While play title directly use the action which triggers an input-view.
As it shows here, no extra page, one click, the same result.

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.

How can I implement this punch out from Bixby to Android App?

In my Bixby capsule I'm offering the user to open my Android app to handle more complex tasks. For this I'm constructing an intent when the user taps on on-click of a cell-card, which looks like this:
cell-card {
[slot1, slot2, etc...]
on-click {
intent {
[my intent...]
}
}
}
I want to implement this in a less intrusive way (see screenshot below), however I haven't been able to find a way how to construct an intent from a single-line. Are there any official guidelines or documentation on how to implement a punch out?
That component is the attribution-link (documentation)
Here is some generic code to help you implement it:
attribution-link {
label {
template ("Open in XYZ")
}
url ("YOUR URL HERE")
}

How to make bixby read the card?

Is there any way i can make bixby to read information on my card. Like if my card has title, date, description, so after bixby read the message "Here is what i found", it should read like "India vs Australia, Green park, Kanpur, 10th March, 1:30 PM".
Is it possible to add speech in result-view? I am showing like 6 cards on one result and want bixby to read all of them one by one and need like 3-4 seconds pause between each cards.
I am showing compound card in my result-view and using single-line. Adding speech in template resulting nothing. I am adding few lines of my code.
list-of (all) {
has-details (false)
where-each (single) {
compound-card {
content {
single-line {
if (exists(single.Name)){
text {
value {
template ("#{value(single.Name)}"){
speech("#{value(single.Name)}")
}
}
style (Title_S)
}
}
}
}
}
}
}
You would need to define the speech key of your dialog template (documentation link). This can be different from what the dialog template text says so you can customize it as needed. Your speech did not work since it needs to be a part of the dialog template.
Adding more information after initial question was modified:
Hands-free List Navigation would be the correct way for you to enable a voice output for every entry in a summary mode result-view. This allows you to choose a few different ways the summary content will be read to the user and how the user can select one of the options.

How to implement standard functionalities using SuiteScript

I'd like to build suitescript implementing same functionalities with standard function.
For instance on item detail page (List/WebSite/Items) clicking view button of any non inventory item, you could find out Convert To Inventory button.
Thanks to inspect that browser support, it shows some as follows
I want to build script that archive same functionalities like getNLMultiButtonByName('multibutton_convertinvt').onMainButtonClick(this);return false; but it throws error like getNLMultiButtonByName is not defined.
I want your help.
Regard
Probably you're looking for something similar
function onLoad(type, form, request){
if(type=='view') {
form.addButton('custpage_button','Custom Button',"getNLMultiButtonByName('multibutton_convertinvt').onMainButtonClick(this);return false;");
}
}

Resources