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: 60 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
IntentId: listperformance
Value: media
Context: performance

Event1
Name: music
String: 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 your chose
Volume: 80%
Duration: 30 secs

Register APP at developer site


Please visit Zenbo developer site - developer console to regiter your APP..

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 in 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.

Please visit Zenbo developer site - DDE tool to edit App dialogue.

Create DS project and fill out App info

Please visit developer site - Build Your First Dialogue to find the steps for creating a DS project.

App info will be automatically filled out once App ID is selected at Project Info form. However, please remember to choose corresponding Domain ID for your application.

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.

Interlock blocks according to scenario analysis.

Run APP on Zenbo simulator.

Run APP on Zenbo

Connecting to Zenbo by IP

  • Find Zenbo IP address from Zenbo’s about status at Android Settings.
  • Fill in Zenbo IP on Connection dialog.
  • APP will transfer to Zenbo after connected.

Save project (.zba) file

Please fill in package name, App ID, version code, domain UUID, domain version and so on APP information and then save your project.

Example download


Download ZBA/DDE sample

 

 

Go To Top