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] |
3 |
Zenbo flashes wheels’ LED |
[Wheel LED at Non-Blocking] Side: Both |
|
4 |
Zenbo moves forward 50 centimeters |
[Body Movement] Type: Blocking |
|
5 |
Zenbo turn a full circle |
[Body Rotation] Type: Blocking |
|
6 |
Zenbo looks up |
[Neck Movement] Type: Blocking |
|
7 |
Zenbo say hello |
[Speak] Speak: Hello, my name is Zenbo. |
|
8 |
Zenbo invites someone listen music or watch movie |
[ListView UI] TTS Title IntentID Event1 Event2 |
|
9 |
Music event receiver |
[When receive] Event’s ID: music |
|
10 |
Play music |
[Play media at non-blocking] Media source: by chose |
|
11 |
Dancing with music playback at same time |
[Recursive Moves] Action: by chose |
|
12 |
Movie event receiver |
[When receive] Event’s ID: video |
|
13 |
Play video |
[Play media at blocking] Media source: by your chose |
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:
- Type: CSR
- Intent ID: launchhelloworld_en
- List performances
ID: listperformance
Input Context: performance
Event:
- Type: CSR
- Intent ID: listperformance_en
Belief:
- required: required
- ID: media (by user defined)
- Classes: performance
Intent
- Launch App
ID: launchhelloworld_en
Sentences:
- Launch hello world
- Open hello world
- Run hello world
- List performances
ID: listperformance_en
Sentences:
performance: media [Class]:[Belief]
Concept
- Define performance
Class: performance
- ID:
Key: music
Value: 音樂、music
- 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