Download - Bada Overview
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 1bada 1.2.0
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved
bada Overview
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 2
What is bada?
bada, (bɑdɑ, the Korean word for “ocean”,) is a new smartphone platform that allows developers to create feature-rich applications
that elevate the user experience in mobile spaces.
User-interactive
Samsung bada includes a new UI framework that supports the next generation Samsung touch UI. The main UI delivers simplicity
and ease, without decreasing usage efficiency. The UI framework introduces an open-ended evolutionary innovation from the
current touch UI to leverage better user experiences.
Some additional UI tools include the ability to embed the Adobe® Flash® Player and the WebKit Internet browser directly into
native bada applications, allowing seamless integration of premiere UI technologies. Also, the bada map control is easily
embedded in your applications to deliver interactive mapping and routing with POI features for your users.
The bada platform provides user interaction modalities including motion sensing, fine-tuned vibration control, and face detection.
These interfaces open up new possibilities for greater creativity and user interactivity in developing applications. Samsung bada
also provides a mechanism to develop sensor-based, context-aware applications. With weather service and sensors such as
acceleration, magnetic, tilt, GPS, and proximity sensors, application developers can easily implement context-aware, interactive
applications.
Service-oriented
Samsung bada introduces several new service-oriented capabilities that differentiate it from conventional mobile operating
systems. These new features include social networking, content management, location-based services, and commerce services,
all supported by back-end bada servers. Developers can now create service-oriented applications without additional effort
compared to developing mobile standalone applications.
Social networking applications can manage user profiles, including buddy information for application users, and can integrate
users on most popular social networking services. Content management applications can store and search contents on devices
and servers. Location applications can use landmark stores, maps, and geo-coding services. Commerce applications can sell
products, such as game items in applications.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 3
What is bada?
Open and Configurable
Samsung bada enables developers to take full advantage of mobile device capabilities to easily create compelling applications.
Applications can use device functions to make phone calls, send messages, or access the contact list, as various application
controls allow developers to create richer, more consistent applications.
Different service applications can share information such as personal profiles, social relations, schedules, and contents with
simple user confirmation, all in order to provide services with greater personal relevance and cooperative service extensions. For
example, social networking applications can share user information with commerce or location-aware applications, and share
photos from other content publishing applications.
The bada platform is kernel-configurable so that it can run either on the Linux kernel or real-time OS kernels, which makes bada
applicable to a wider range of devices than any other mobile operating system. Samsung bada uses Eclipse and a GNU tool-
chain, providing developers with a popular and extensible development environment.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 4
What is bada?
bada Architecture
Samsung bada has a four-layer architecture: kernel, device, service, and framework layers. The kernel layer can be the Linux
kernel or a real-time OS kernel, depending on the hardware configuration. The device layer provides the core functions as a
device platform, such as system and security management, graphics and windowing system, data protocols and telephony, as
well as audio-visual and multimedia management. The service layer provides service-oriented functions that are provided by
application engines and web-service components interconnecting with bada Server. Only the framework layer can export the C++
open API. The framework consists of an application framework and functions exported by the underlying layers.
bada
FrameworkOpen API framework that consists of an application framework and
functions exported by underlying layers.
ServiceService-oriented functions that are provided by application engines
and server-assisted components.
DeviceCore functions of a device platform that are provided by system,
security, graphics, multimedia, and communication components.
Device
Applications
Web and Flash
Applications
Service
Applications
KernelOS kernel.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 5bada 1.2.0
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved
Features
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 6
Osp::Base
• Namespaces for basic types, execution environment, and utilities
– Basic data types
• Object, String, DateTime, ByteBuffer, UuId, and other base types
• Wrapper classes for C++ primitive types, such as Integer, Short, Double,
and LongLong
– Runtime
• Timer and Thread
• Synchronization with Mutex, Semaphore, and Monitor
– Collection
• ArrayList, HashMap, Stack, and other collection types
• Object-based collections and template-based collections
– Utility
• Math, StringUtil, StringTokenizer, Uri, Inflator, and Deflator
– Standard library support
• A subset of newlib
• C++ STL (Standard Template Library)
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 7
Osp::Io
• Namespace for input/output data handling– File and Directory
• Basic file and directory operations
• Data caging per application
– Database:• Transactions such as begin, commit, and rollback
• Support of both SQL queries and enumerations with DB statements
– Registry:• System-provided data store in which applications store and retrieve settings
Virtual path prefix Usage Permission
/Home Home directory for an application. r/w
/Home/Share Used to share temporary data with other applications. r/w
/Home/Share2 Used to share data with other applications which are listed as trusted applications in application.xml.
r/w
/Share/[appid] Used to read temporary data of other applications. r
/Share2/[appid] Used to access other application's data . These applications must be listed as trusted applications in your application's application.xml.
r/w
/Res Used to read resource files, such as the icon file that was shipped with
the app. package.r
/Share/AppControl/[appcontrol-name] Used to read data provided by an app control by its name. r
/Media/{Images,Sounds,Videos,
Themes,Others}
Used to read media data like image, sound, video, theme, and so on.r
/Storagecard/Media/{Images,Sounds,
Videos,Themes,Others}
Used to read media data in external memory like image, sound,
video, theme, and so on.r
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 8
• Namespaces for internationalization and localization
– Text
• Conversion between the major character encoding schemes, such as UTF8,
UCS2, Latin1, GSM, and ASCII
• Other encoding schemes available through the Encoding::GetEncodingN() method
– Locale
• Identifying a specific language code, country code, and variant code
• Formatting locale-sensitive information, such as date, number, and currency
• Converting a date, time, and number into a string
Osp::Text and Osp::Locales
Unicode
UCS2
UTF8
Latin1
GSM
ASCII
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 9
Osp::System
• Namespace for controlling devices and getting system information
– Device control
• Register an alarm
• Screen power management
– Keeping LCD on with or without dimming
• Vibrator activation with level, on/off period, and count
– System information
• Getting uptime and current time in UTC, Standard, and Wall time mode
• Run-time heap memory and storage availability
• Battery level and charging status
• System specification for current target device
– Platform version, screen size, keyboard type, etc.
• Device accessory connection state
– Bluetooth headset, MMC, USB, TV-out, etc.
• Getting values about current user settings
– Language/country code, silent mode, etc.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 10
Osp::App
• Namespace for application framework
– Application types
• UI applications
– Normal applications with a UI
– Only one UI application can run at one time
• Agents
– Applications without a UI
– Limited use only
– Application life-cycle management
• Initializing:
– Resource allocation
– Loading application states from AppRegistry
• Terminating:
– Resource de-allocation
– Providing platform-managed registry to let applications save data
– System key, memory violation, power off, low memory and battery, and others
• Running:
– UI applications can be sent to the background if an embedded service such as an
incoming call is invoked.
ApplicationLaunch
ApplicationExit
OspMain()
OnAppInitializing()
OnAppTerminating()
OnForeground()
OnBackground()
Application Application Framework
Application::Execute()
Initialize()
Terminate()
Event_runMainloop()
Destroy()
AppRegistry
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 11
Osp::App
– Application control
• Standard mechanism to consume operations exported by other applications
• Specified with an AppControl ID and an Operation ID:
Caller
Application
AppControls
Registry
AppControl AppManager
[AppControl Resolver]
Application
(Dialer)
AppControl
3. Launch the application
with resolved AppControl
2. Resolve with AppControl ID and
Operation ID
1. Find and start AppControl
AppControl ID: APPCONTROL_DIAL
Operation ID: NONE
Option: “tel:82312798707”
Application Controls
APPCONTROL_CALENDAR APPCONTROL_CONTACT APPCONTROL_MESSAGE
APPCONTROL_BROWSER APPCONTROL_EMAIL APPCONTROL_SIGNIN
APPCONTROL_DIAL APPCONTROL_CALL APPCONTROL_MEDIA
APPCONTROL_VIDEO APPCONTROL_IMAGE APPCONTROL_AUDIO
… … ...
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 12
Osp::Graphics
• Namespace for drawing-related functions
– 2D graphics
• 32-bit color (RGB with alpha)
• Vector fonts
– System fonts
– Dynamic font loading
• Bitmaps
– 16-bit bitmap with masking color
– 32-bit bitmap with alpha channel
• Drawing primitives
– Point, line, rectangle, ellipse, and polygon
– Text and bitmap
– 3D graphics
• OpenGL® ES 1.1 and 2.0
• EGL
bada
Osp::Graphics
Primitives
Color
Canvas
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 13
Osp::Ui
• Namespace for creating user interfaces
– Ui base
• Event-related classes and interfaces as well
as common base classes for all controls
– Containers
• Frame, form, popup, panel, menu,
and message box
• Frame and forms support portrait
and landscape orientations
– Controls
• Common UI controls fully
supporting TouchWiz 3.0
FrameThe top level window of an application.
There can only be one per application.
Form(s)High level container containing
general controls. There can be
multiple forms per application.
Each form has an indicator,
soft key, and title bar area.
Control(s)There are multiple user-interface widgets that
the application can utilize. These can be
placed in any container such as a form.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 14
Osp::Ui
– Advanced controls
• FlashLite, Animation, Map, and Web controls
– Virtual keypad
• 3x4 keypad, handwriting recognition, and QWERTY keyboards
– XML UI Builder
• Controls and Containers can be created using the UI Builder. The UI
Builder’s XML files are parsed at runtime to create the widgets onscreen.
– Resolution independent
• Controls have the same ratio across different resolutions (WVGA and
WQVGA) so that developers can code once to create applications that run
on both device resolutions.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 15
Osp::Uix
• Namespace for advanced user interaction
– Various sensors
• Acceleration, Tilt, Magnetic, Proximity
• GPS
– Weather service
• Providing weather information for specified location
– Programmable vibration
• Playing vibration effects
• Magsweep and periodic effects, effect styles, and IVT files from Immersion
Corporation
– Motion
• Notification for complex and abstract patterns of movement of the device
• Three types of motions: snap, shake, and double-tap
– Face
• Locating faces in still images or in camera previews
• Tracking faces as they move in camera previews
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 16
Osp::Net
• Namespace for data networking
– Network management
• Account management for various bearer information like UMTS and Wi-Fi
• System default and user-controlled connection management
• DNS lookup and others
– Socket
• TCP client/server, UDP: non-blocking/blocking mode support
• TCP client with TLS1.0 and SSL3.0: non-blocking mode support
– HTTP
• HTTP 1.1 including chunking, proxy, and connection management
• HTTP cookies
• HTTP basic and digest authentication, and SSL tunneling
– Bluetooth
• GAP, OPP, and SPP support
– Wi-Fi
• Infrastructure mode and independent mode (ad-hoc service)
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 17
Osp::Telephony
• Namespace for telephony capabilities
– Call
• Getting current call type and call status
– Network
• Getting network status for voice and data service availability
• Getting network information, such as PLMN, MCC, MNC, Cell ID, and LAC
– SIM
• Getting SIM card information, such as SPN, MCC, MNC, ICC-ID, and
operator name
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 18
Osp::Messaging
• Namespace for messaging services
– Messaging service
• Creating and sending messages: SMS, MMS, and email messages
• File attachments for specific types
SMS or MMS
Server
bada
Osp::MessagingSmsManager
MmsManager
EmailManager
Server
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 19
Osp::Media
• Namespace for multi-media handling
– Media playback• Local playback of contents
• Streaming playback of contents
• Multiple stream playback of audio
• Playback of DRM encrypted contents
– Media recording• Recording of video/audio contents
• Control of recorder settings
– Camera control• Live preview and image capture
• Control of camera settings
– PCM audio input/output
• Playback and capturing of PCM data
– Image encoding, decoding, and conversion
– DRM information retrieval
• OMA-DRM and WM-DRM.
– Media capability retrieval
Type Format Enc Dec File Type
Video H.263 O O .3gp .mp4
H.264 O .3gp .mp4
MPEG-4 O O .3gp .mp4
VC-1 O .wmv .asf
Audio AAC, AAC+,
EAAC+O .aac .3ga
.m4a
AMR-NB O O .amr .3ga
.m4a
MP3 O .mp3
WMA O .wma .asf
MIDI O .mid .spm
.imy
.mmf .xmf
.mxmf
PCM,
MS-ADPCM,
IMA-ADPCM,
ITU-ADPCM
(G.711)
O O .wav
Image JPEG O O .jpg
GIF O .gif
PNG O O .png
TIFF O .tiff
WBMP O .wbmp
BMP O O .bmp
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 20
Osp::Security
• Namespace for cryptography keys, algorithms, and certificate
management
– Cryptography keys and PRNG (Pseudo Random Number Generator)
– Cryptographic algorithms, such as HMAC, Hash, AES, DES, and RSA
– X.509 certificate information retrieval and certificate path validation
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 21
Osp::Social
• Namespace for managing user data stored on a device
– Contacts
• Read and write Contacts database
• Database change notification
– Event and To-Do
• Read and write Scheduler database
• Database change notification
– Application log query
• Call, message, application usage, and application installation logs
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 22
Osp::Social
• Namespace for managing user data in the cloud and enabling inter-
user communication
– User profile service
• Managing user’s own profile and publishing it on the server
• Fine-grained privacy control
– Buddy service
• Buddy requests between users
• Buddy list management
– Messaging service
• Exchanging text messages between users within applications
– SNS gateway
• Unified interface to various social networking services
such as Twitter, Facebook, and MySpace
bada Server
Social
bada
Osp::SocialProfile
Buddy
MySpace
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 23
Osp::Content
• Namespace for content management and search services on a
device
– Local content management
• Lifecycle management
• Content information
– User tagging info, such as comments
– Media metadata, such as ID3 and EXIF
– Context info, such as GPS information
– Local content search
• List of values for specific columns
• SQL-like searchMedia File,
Content Information
Media Storage Content DB
bada
Content
Image
Audio
Video
Others
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 24
Osp::Content
• Namespace for content management and search services in the
cloud
– Content management on server
• Life-cycle management
• Content information
– Various user-defined content types, such as image, video, audio, game, and text
– Various user-selected or defined attributes (metadata)
– Content search on server
• Content type and category list
• Conditional search
– Content transfer to and from the server
• HTTP upload and download for normal content
• OMA download for DRM contents
bada Server
Content
Search
bada
Osp::ContentContentManager
ContentSearch
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 25
Zone
Osp::Locations
• Namespace for location-related information and services
– Locating
• GPS and/or WPS
– Location updates and retrieval
• Periodic and distance-based location updates
• Getting the last known location of other devices
• Subscribing to trace service
• Privacy protection
– Landmark management
• Landmark store management
– Create, read, and delete
– Device-wide or application bounded
• User-created landmark management
– Add, update, delete, and search
• Pre-defined landmark search
Enter
Leave
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 26
Osp::Locations
– Location services from deCarta
• Map rendering, zooming, and panning
• Geocoding and reverse geocoding
• Directory services
• Route services
– Map UI control
• Map zooming and panning
• Overlay and information windows
• Event notifications
bada Server
Location
deCartabada
Osp::LocationsLocationProvider
LandmarkStore
RemoteLocationProvider
RemoteLandmarkStore
ProviderManager
Map
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 27
Osp::Commerce
• Namespace for commerce services through the Samsung
Application Store
– Item information queries
• Getting item information in applications
• Managing item information, such as item name and description, through the
Samsung Apps Seller Office
– Item purchases
• Purchasing items in applications
• Getting purchase records on the device
App.
Developer
Settlement
Operator
Payment
InformationSettlement
Process
Samsung
Application Store
ServerServer for bada Commerce
Seller Office
bada
Osp::Commerce::StoreItemService
PurchaseService
Appl.
bada Server
Commerce
Billing
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 28
Osp::Web
• Namespace for embedded browsing functionality
– Web control
• Rendering web contents in a Web UI control without running a browser
application
– Browser utilities
• History management
– Interfaces to intercept URL requests and responses
• Intercepting URL requests and giving an application
a chance to handle the request
• Routing fetched data with the URL to an application
without displaying it in the Web UI control.
– JavaScript utility
• Evaluating JavaScript code given by an application and returning the result
of the code
Application
Application Content
Ui
Controls
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 29
Osp::Test
• Namespace for testing bada applications at the unit level
– Test case
• Basic element of a test scenario in the bada Test Framework
– Test suite
• Collection of test cases
– Test fixture
• Set of preconditions and postconditions that need to be repeated during
testing
– Condition macros
• Assertion macros
• Check macros
– Test runner
• For executing
test suites
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 30bada 1.2.0
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved
Ecosystem
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 31
Application Development Process
IDE and SDK
Developer Site(developer.bada.com)
• Run Application Wizard
• Write code in IDE
• Design UI with UI Builder
• Build, debug, and test with
simulator
• Build, debug, and test on
device
• Create package and deploy
Download
manifest.xml
Samsung Apps Seller
Office (seller.samsungapps.com)
Download
IDE and SDK
Registration for
Certification
• Verify and validate application
• Certify application
• Sell application
• Check sales statistics
• Remove application
• Sign up
• Generate a new application
profile
• Set application version
• Select privileged API
groups to use
• Set up bada components
• Select application features
• Create application groups
• Remove application
Product Unregistration
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 32
bada Developers
• The bada developer site
(http://developer.bada.com/)
helps developers to create
and manage applications.
– Generate a new application
profile with a name and get
a unique application ID.
– Select privilege groups to use
in the application.
– Define the minimum platform
features that the application
requires.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 33
bada Developers
– Download manifest.xml
• Download manifest.xml for application development.
• Manifest.xml includes application ID, privileges, application features, and
other design and runtime information.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 34
Membership and Privileges
• Developer site memberships: Basic, Partner
• Privileges
– Permission to access a sets of sensitive functions and system
resources
– Privilege criteria, such as security, cost, privacy, and performance
– Privilege groups:
• ADDRESSBOOK
• ADVANCED_SEARCH
• BLUETOOTH
• ...
• Access control
– Privilege selection on Developer Site (developing) (certification)
(installation) Manifest file verification Privilege registration
Checking privilege at runtime
Developer Site
Membership
Privilege Levels
Non-
privilegedNormal System
Basic O O X
Partner O O O
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 35
bada IDE
• Eclipse RCP and CDT-based (C/C++ Development Tools)
– Syntax highlighting, code folding, tabbed documents, and content assist
– GNU tool-chain for building and debugging
– Integration of SDK tools. For example, file explorer for browsing the
simulator and device file system
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 36
bada UI Builder
• The UI Builder creates XML files that are loaded and parsed by the
UI Framework at runtime.<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE Scene SYSTEM "UIForm.dtd">
<Scene>
<Form id="IDF_FORM1">
<property title="" headerHeight="0" … />
<layout mode="Portrait" style="FORM_STYLE_INDICATOR|…"/>
<layout mode="Landscape" style="FORM_STYLE_NORMAL"/>
</Form>
<Button id="IDC_BUTTON1" parent="IDF_FORM1">
<property text="" hAlign="ALIGN_CENTER" vAlign="ALIGN_MIDDLE"
normalBGColor="" normalTextColor=""
pressedBGColor="" pressedTextColor=""
disableBGColor="" disableTextColor=""/>
<layout mode="Portrait"
x="40" y="526" width="410" height="90"/>
<layout mode="Landscape"
x="66" y="352" width="683" height="54"/>
</Button>
</Scene>
Loading form XML
MyApp::Initalize(…)
{
…
Form form1;
form1.Construct(“IDF_FORM1”);
…
}
Form XML contains design and
layout information
Save to XML
Drag and Drop
Toolbar
Multiple language string tables
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 37
bada UI Builder
• Orientation (portrait ↔ landscape)
– Controls mostly re-align when the orientation changes; the indicator,
soft key, and title areas are all automatic. Other controls may require
slight modifications.
• Screen resolutions (WVGA ↔ WQVGA)
– Controls can be automatically resized when the screen resolution
changes.
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 38
bada Simulator
• Feature-rich simulation
– Interactivity
• MultiPoint-touch, motion, accelerometer, tilt, and other sensors
• Changing orientation between portrait and landscape modes
– Graphics and media
• Hardware-assisted OpenGL ES
• Camera with WebCam (some limitations on effects)
– Communication
• Incoming calls, receiving SMS, and WAP push
• Network indicator and signal level
– Location
• NMEA data and coordinates from Google Map
– Device
• Battery level
• USB or ear-jack insertion and removal
• Resource monitoring
– Thread, heap, file, database, registry, timer, form and socket information.
Inject arbitrary event data
into device simulator
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 39
bada Application Store
• Samsung Application Store delivers applications to devices mainly
through device clients. It also supports side-loading with PC clients.
Web Marketing
Developer Site
Managing customers and
contents as well as billing and
settlement
Seller Office Admin Site
SDK and technical support
for developers
Promotion and marketingBy device
client
Uploading and distribution
By PC
client
Distribution Channels
Copyright © 2010 Samsung Electronics Co., Ltd. All rights reserved. 40