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

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")
}

Related

How to add a New Action to the mobile App

Good day
Build 20.107.0026
I have created a New Action and want to add it to my Mobile app. Is it possible to add a custom action to a mobile screen? I have created the below action in the Appointment screen(FS300200)
namespace PX.Objects.FS
{
// Acuminator disable once PX1016 ExtensionDoesNotDeclareIsActiveMethod extension should be constantly active
public class AppointmentEntry_Extension : PXGraphExtension<AppointmentEntry>
{
#region Event Handlers
public PXAction<PX.Objects.FS.FSAppointment> DoWork;
[PXButton(CommitChanges = true)]
[PXUIField(DisplayName = "DoWork")]
protected void doWork()
{
}
#endregion
}
}
Mobile code below. If I want to add the button to the main menu; the 3 dots on the side do I use AppointmentRecords as the container?
update screen FS300200 {
update container "AppointmentRecords" {
add listAction "StartTravelAPICall" {
behavior = Void
displayName = "StartTravelAPICall"
}
}
}
The short answer is YES! The long answer depends in part on what version of Acumatica you are using. For the purpose of this answer, I'll assume you are in 2019R2 and already know how to add or edit a Mobile App screen in Acumatica. If not, the training guides referenced below should give you all the detailed information you need to accomplish your goal.
Manipulating the Mobile App screens/actions is relatively easy if the screen/action works in the browser interface. The T410 course material explains how to add an action in 2019R2. I don't work with Field Services, so I'll have to explain more generically as per the training guide.
First you must either add or edit the screen in the Mobile Application section of the Customization Project. (In your case, you want to Update the existing screen.) This will create a section of code in the customization project that looks like this:
As you can see, the original screen definition in the mobile app is shown on the right, and you will be updating the screen to add your action. You will need to add the appropriate container (not shown in your question) and then the action within that container.
To continue the answer, let's switch to the training guide example on page 12 of the T410 course updating the SO303000 screen. You can compare to your screen to see what needs to be changed.
add container "InvoiceSummary" {
# fields declaration
…
add recordAction "Save" {
behavior = Save
}
add recordAction "Cancel" {
behavior = Cancel
}
add containerAction "Insert" {
behavior = Create
}
add recordAction "ReleaseAction" {
syncLongOperation = true
behavior = Record
}
}
I believe your action would follow the ReleaseAction portion at the bottom of the example, and the need for syngLongOperation = true would depend on what your action is doing (i.e. if you need the action performed asynchronously).
Assuming your container is already defined in the page, which I suspect it is, let's instead look at the example for PO302000 on page 35. This example shows how to UPDATE a container to add your action.
update screen PO302000 {
update container "DocumentSummary" {
add recordAction "AddPOOrderLine" {
displayName = "Add PO Line"
behavior = Void
redirect = True
redirectToContainer = "AddPurchaseOrderLine$List"
}
}
}
That was a more complex action, but yours may be as simple as.
update screen FS300200 {
update container "ServiceOrderTypeLine" {
add listAction "DoWork" {
Behavior = Void
displayName = "Do Work"
}
}
}
If you need guidance on how to read the WDSL Schema to identify the container, etc. that training is found in T400 starting on Page 13.
I highly recommend reviewing both T400 and T410 if you are working with the mobile app as there is a lot more detail in those training guides than can be explained easily in a Stack Overflow post/answer.

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.

Phone Call Functionality for Bixby Capsule

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.

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