ok
CHOOSE YOUR LANGUAGE

APP Builder – Example


Welcome to ASUS Zenbo App application development!

This example teaches you how to build your first Zenbo app with App Builder. You’ll learn how to create a project with App Builder and run it within Zenbo simulator. Before deploy onto Zenbo devcies, you need to export a project as a zba file. You'll also learn some fundamentals of Zenbo design, including how to build a simple user interface, multimedia player, move Zenbo body and handle conversational dialouge.

Scenario


Zenbo starts playing music and flashing his wheels' LED. He moves forward 50 centimeters, then turns a full circle and looks up.
Zenbo: ‘Hello, my name is Zenbo’.
Zenbo invites someone to some his performances.
Zenbo: ‘Would you like to see my performances?’
Zenbo show an option on screen for user choosing.
Someone: ‘Music’ (or ‘Movie’)
Zenbo start playing music or movie by chosen.

How to build a Zenbo ZBA APP


 

Analysis Flow & Blocks     

No. 

Action

API

Note

            

1

            
            

Start a program

            
            

            
            

 

            
            

2

            
 

Zenbo play music

 

 

 

 

 

 

 

[Play Media at Non-Blocking]
Media source: Select which music you want to play from your PC
Volume: 80%
Duration: 30 secs

            

3

            
            

Zenbo flashes wheels’ LED

            
 

            

[Wheel LED at Non-Blocking]

Side: Both
Type: Breathing
Led number: All
Color: Red (select color from palette)
Brigtness: 80%
Duration: 30 secs           

            

4

            
            

Zenbo moves forward 50 centimeters

            
            

            

[Body Movement]

Type: Blocking
Speed: 1 (Level)
Direction: Forward
Distance: 30 cm

            

5

            
            

Zenbo turn a full circle

            
            

            

[Body Rotation]

Type: Blocking
Speed: 1 (Level)
Angle: 360 ̊

            

6

            
            

Zenbo looks up

            
            

            

[Neck Movement]

Type: Blocking
Speed: 1 (Level)
Vertical: 30 ̊
Horizontal: 0 ̊

            

7

            
            

Zenbo say hello

            
            

            

[Speak]

Speak: "Hello, my name is Zenbo."
Speed: Medium

            

8

            
            

Zenbo invites someone listen music or watch movie

            
            

            

[ListView UI]

TTS
String: "Would you like to see my performances?"

Title
String: "How about a music or movie?"

IntentID
Id: App ID
Value: listperformance_en
Context: performance

Event1
Name: musicString: Play music

Event2
Name: video
String: Play video

            

9

            
            

Music event receiver

            
            

            

[When receive]

Event’s ID: music

            

10

            
            

Play music

            
            

            

[Play media at non-blocking]

Media source: by chose
Volume: 80%
Duration: 30 secs

            

11

            
            

Dancing with music playback at same time

            
            

            

[Recursive Moves]

Action: by chose
Duration: 30 secs

            

12

            
            

Movie event receiver

            
            

            

[When receive]

Event’s ID: video

            

13

            
            

Play video

            
            

            

[Play media at blocking]

Media source: by chose
Volume: 80%
Duration: 30 secs

Register APP at developer site


Please register APP on ASUS developer site https://zenbo.asus.com/developer/

Prepare APP info

  • Using Tool

            Please choose option ‘Zenbo App Builder’.

  • App Name

            This example App name is ‘ZBAHelloWorld’

  • Package Name:

Because package name is unique, please create a new package name for your App. Please be informed there is a prefix ‘com.asus.robot.appbuilder’ adding on before you App name. The application naming format is like as ‘xxx.xxx’.
This example package name is ‘com.asus.robot.appbuild.zba.helloworld’

  • Version

Please fill out your App version.

  • Platform

Default is ‘Zenbo’

  • Are you plan to use Zenbo DDE system

If App is planning using Zenbo dialogue system, please choose ‘yes’.

  • App ID:

An App ID is generated automatically after APP registered.

 

Config dialogue


Developer can configure App dialogue using ASUS Zenbo DDE.

https://stage-developer.asus.com/documents/The-DDE-Tutorial/Welcome

Create DS Project

Please create a project for a new App and fill out App ID on DDE editor, and then start editing App dialogue.

All App info will be automatically filled out once App ID filled in.

Editing dialogue

Plan     

  • Launch App

        ID: launchhelloworld

        Event: 

  1. Type: CSR
  2. Intent ID: launchhelloworld_en

  • List performances

        ID: listperformance

        Input Context: performance

        Event:

  1. Type: CSR
  2. Intent ID: listperformance_en

        Belief:

  1. required: required    
  2. ID: media (by user defined)
  3. Classes: performance

 

Intent               

  • Launch App

        ID: launchhelloworld_en

        Sentences:

  1. Launch hello world
  2. Open hello world
  3. Run hello world

 

  • List performances

        ID: listperformance_en

        Sentences:

                   performance: media [Class]:[Belief]

Concept

  • Define performance

        Class: performance

  1. ID:

                    Key: music

                    Value: 音樂、music

  1. ID:

                    Key: video

                    Value 影片、video

Build a ZBA APP


New a project and select its default language.

Interlocking blocks according to scenario analysis to interlock APP.

Run APP on Zenbo simulator.

Run APP on Zenbo

Connecting to Zenbo by IP (Refer to below screenshot)

  • Find Zenbo IP address from Zenbo’s about status at Android Settings.
  • Fill out Zenbo IP on Connection dialog.
  • APP will transfer to Zenbo after connection build up.

Save project (.zba) file

Fill out APP information on the form before saving your project, and the relevant information should be from APP registered data at developer site.

Example download


ZBA/DDE samples

 

 

Go To Top