tizen 2.3 sdk
TRANSCRIPT
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
TIZEN SDK & App Development
Kamil Grondys
Software EngineerSamsung
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
2
Agenda
1. Mobile Tizen profile
2. Wearable Tizen profile
3. TAU
4. Emulators
5. Debugging
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
3
Prerequisites
• Samsung account
– http://developer.samsung.com
– Sign up
• Tizen store account– http://seller.tizenstore.com
– Sign up
• Samsung USB Drivers (Windows)– http://developer.samsung.com
– Develop Android Tools & SDKs Samsung Android USB Drivers
• Tizen SDK 2.3 Rev1– http://developer.tizen.org
– Download the Tizen SDK
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
Mobile Tizen profile
Tizen SDK 2.3 Rev1
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
5
Mobile profile introduction
Native application API
• Tizen SDK 2.2.1
– C++ programing language
– Tizen::UI
• Tizen SDK 2.3 – major changes
– C programing language
– Enlightenment Foundation Libraries (EFL)
– Wider support for open source libraries
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
6
Mobile profile introduction
Web application API
• Tizen SDK 2.3 – major changes
– Account API
– Archive API
– Badge API
– Exif API
– FMRadio API
– Sound API
– HumanActivityMonitor API
– Sensor API
– SystemInfo API
– Calendar API
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
7
Mobile profile introduction
Web application API
Account API
• The Account API provides functionality for using existing configured online accounts and providers, and for creating accounts of known types.
• The basic concepts are:– Provider is an online service provider entity, such as Google, Vodafone or
Facebook. A service provider is identified by its applicationId. Accountprovider will be registered while the application is installed. The information will be used in the "Add account" screen in Settings.
– Account collects all the data (user name, credential, settings) needed for connecting to services. An account is always bound to a single provider, and has a list of service instances bound to the account. The services can be individually enabled and disabled on the given account. For instance, [email protected] can identify a Google account, giving access to services such as gmail, gtalk, Picasa, and Youtube with each service having a separate service instance bound to the account.
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
8
Mobile profile introduction
Web application API
Archive API
• The Archive API provides functions to create and
manage archive files (for example ZIP archives).
• You can extract files, add a file to an archive file, and so on.
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
9
Mobile profile introduction
Web application API
Badge API
• The Badge API provides Badge management functionality. It provides
functions for creating and updating a badge. The application with new
unread information has a number in the upper right hand corner of
the app icon.
• This number is called a badge. For example, when a new message is
received the badge count appears on the app icon.
The badge remains until the message is read by the user.
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
10
Mobile profile introduction
Web application API
Exif API
• The Exif API provides interfaces and methods for manipulating Exif data from a JPEG file.
• The ExifManager object provides methods to retrieve theExifInformation object from a JPEG file and save the Exif data from the ExifInformation object in the JPEG file.
• The ExifInformation object provides functionality to get and set the Exif attributes corresponding to the Exif tag. Changing the value of the attribute in the ExifInformation object stores the Exifdata in the ExifInformation object. It does not change data in the JPEG file.
• For applying the modified Exif data to the JPEG file, the saveExifInfo()method of the ExifManager object should be called with the ExifInformation object that has the modified Exif data.
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
11
Mobile profile introduction
Web application API
• The FMRadio API provides interfaces and methods for
accessing FM Radio.
• Functionalities:
– Start and stop radio
– Seek radio frequency
FMRadio API
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
12
Mobile profile introduction
Web application API
Sound API
• The Sound API provides functions to control volume level for
several sound types.
• You can get the maximum volume level for system, notifications,
alarm, media and so on. Also, you can change or get the current
volume level.
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
13
Mobile profile introduction
Web application API
HumanActivityMonitor API
• The HumanActivityMonitor API defines interfaces and methods to
manage human activity data from various sensors on the device.
• The following human activity monitor functionality is provided:
– Set up callbacks for data change notification
– Get current human activity monitor data
• The human activity monitor data that can be monitored:
– PEDOMETER
– WRIST_UP - Wrist up gesture
– HRM - Heart rate monitor
– GPS
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
14
Mobile profile introduction
Web application API
Sensor API
• The Sensor API defines interfaces and methods to
manage sensor data from various sensors on the device.
• The following sensor functionality is provided:
– Start and stop sensor
– Set and unset notification of the sensor data change
– Get current sensor data
• You can use the following sensors:
– LIGHT, MAGNETIC, PRESSURE, PROXIMITY, ULTRAVIOLET
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
15
Mobile profile introduction
Web application API
• The SystemInfo API defines interfaces and methods that provide web applications with access to various properties of a system. This API also provides interfaces and methods that can retrieve statuses of hardware devices, get the value of selected properties, and subscribe to asynchronous notifications of changes for selected values.
• You can use this API to get access to:– BATTERY
– CPU
– STORAGE
– DISPLAY
– DEVICE_ORIENTATION
– BUILD
– LOCALE
– NETWORK
– WIFI_NETWORK
– CELLULAR_NETWORK
– SIM
– PERIPHERAL
SystemInfo API
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
16
Mobile profile introduction
Web application API
Calendar API
• The Calendar API provides interfaces and methods for users to
manage their schedule. Separate calendars can be implemented for
group related events or tasks. For example, a user may have a work,
personal, and family calendar.
• A calendar entry is called an event and is composed of a series of
attributes, such as purpose, starting time, and duration. A calendar is
a collection of events.
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
17
Mobile profile introduction
Web application API
Contact API
• The Contact API provides functionality for managing address books.
• A address books is a set of information that describes a contact.
• Contact contains information about:
– Name
– Address
– Phone numbers
– Emails
– Dates (e.g. Birthday, anniversaries)
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
18
Mobile profile introduction
Web application API
Content API
• The Content API provides functionality to discover content such as
images, video, music and other files.
• API can receive notifications when content items are added, updated
or removed.
• The Content API also provides functionality for playlists.
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
19
Mobile profile introduction
Native application API
Application states
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
20
Mobile profile introduction
Native application API
Application lifecycle
• Application framework starts
an application by creating a new
proccess and calls the entry
point of the application
• In the Tizen application, the
main task is to hand over control
to the Application framework by
calling ui_app_main() function
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
21
Mobile profile introduction
Native application API
Application Framework
• Application – manages the application’s main loop, state change
events, basic system events and gets information about application.
It’s also used to launch application
• Service Application – handles Tizen service application (non UI-
application) state changes, etc.
• Application Manager – gets information such as application ID and
path to shared data directory of the current application and other
installed or running applications
• Badge – creates and removes badges of the application’s home
screen icon
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
22
Mobile profile introduction
Native application API
Application Framework continued
• Bundle – string-based dictionary
• Data Control – exchanges data between applications
• Message port – sends and receives small messages between
applications. Each message is a bundle.
• Notification – creates, inserts, and updates notifications
• Package manager – stores and receives information related to
packages installed on the device
• Shortcut – adds application shortcuts to the device home screen
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
23
Mobile profile introduction
Native application API
EFL
• Elementary – High level API + widgets + wrapping
• Evas – core scene graph + rendering
• Ecore – Mainloop + events + messaging + animation/timing
• Eina – Data structures + Low level
• Edje – Canvas object "meta” files from on-disk themes
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
24
Mobile profile introduction
Native application API
EFL Design model
• EFL is Mainloop-centric
• Mainloop Application state & UI in ONE THREAD
• Child threads work async & message mainloop
• Thread worker pool APIs
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
Wearable Tizen profile
Introduction
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
26
Wearable profile
Device API
• Tizen common API– Tizen
• Application API– Alarm
– Application
– Package
• Content API– Content
– Download
• Communication– IrLed
– SAP (Samsung Extension)
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
27
Wearable profile
Device API
• I/O API
– Filesystem
– Message Port
• System API
– Motion
– Power
– Sensor
– System Information
– System Setting
– Time
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
TAU
Tizen Advanced UI Framework
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
29
TAU
• Fast start-up time
– pre-building HTML widgets when the app is built in the IDE
• Same API for different devices and profiles
• Code optimization using Vanilla JS
• Full WebKit potential
• Backward compatibility for deprecated API
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
Emulators
Connection explorer and emulators
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
31
Emulators
Creating Emulator
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
32
Emulators
Mobile Emulator
Features
• Support for 2 screen resolutions
– 720 x 1280 px
– 480 x 800 px
• Control panel
– Device manager
– Event injector
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
33
Emulators
Wearable Emulator
Features
• Support for 2 screen resolutions
– 320 x 320 px – Gear 1, Gear 2, Gear 2 Neo
– 360 x 480 px – Gear S
• Control panel
– Device manager
– App manager
– Event injector
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
Debugging
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
35
Debugging
Native application debugging
• GNU Debugger
– Break points
– Watch points
– Step in, step out, and step over
• Dynamic Analyzer
– Profiling tool
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
36
Debugging
Native application debugging
• GNU Debugger
– Break points
– Watch points
– Step in, step out, and step over
• Dynamic Analyzer
– Profiling tool
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
37
Debugging
Wearable application debugging
• Remote Inspector
– Webkit Web Inspector
• JavaScript Debugger
– Elements
– Resources
– Network
– Sources
– Timeline
– Profiles
– Console
© 2014 Tizen Developer Summit. All rights reserved. developer.tizen.org
38