Development Techniques for Native/Hybrid Tizen Apps Presenter Matti Pakarinen 1
Content Symphony Teleca in Brief Introduction to Native/Hybrid Apps Key experiences Case Studies 2
Who we are Symphony Teleca is a global innovation and development partner Over 600 clients globally $300M in revenue and growing quickly 6,000 employees in 35 offices State of the art development centers in Americas, Asia Pacific and EMEA 3
Mobile Connected Devices (MCD) Business Units Market Areas Mobile & Media Devices (MMD) BU Mobile phones, Feature phones, Smart phones, Tablets, Smart TV s, Wearable devices, Set-top Boxes. The multi-screen experience devices. Automotive BU In-Vehicle Infotainment systems. Embedded & Telecom BU Network infra-structure equipment vendors in the fixed line and mobiletelecommunications market 4
Supporting MWC Tizen and Key Industry Events Tizen App development. Vimeo ZEN hub Jamendo Mono Weibo TuneIn Animated Wallpaper Peeking protector FEB 2013 MWC Tizen event ready apps Photos from MWC Tizen Event 5
Introduction to Native&Hybrid Apps 6
2 App Types Browser Apps Installable Apps Native WebApps Hybrid 7
Browser Apps One platform for many devices HTML5 is everywhere HTML5 is mobile HTML5 is skillful HTML5 is open 8
Installable Apps - Tizen Application Level Web Applications Native Applications Web Framework Native Framework W3C / HTML5 Device APIs Social / Content Locations Uix Media Web /Xml Video CSS3 Touch WebGL BT NFC Call MSG Net / Telephony / Messaging Graphics / UI Worker Web Runtime Base / Io / Text / Locales App / Security / System Services Core App Framework Graphics / UI Multimedia Location Messaging Web Security System Base Connectivity Telephony PIM Linux Kernel and Device Drivers 9
Key benefits of Apps of different types Native Apps Broader access to device hardware Better integration with system features Faster, smoother and better UI performance Native open-source libraries to be used Web Apps Rapid development of UI A lot of free libraries, JS frameworks, Web Runtime functionality Easy porting to/from another platform 10
Key benefits of Apps of different types Hybrid Apps Web UI and Native Services Rapid development of UI Data processing in background Share native services between applications Native open-source libraries 11
Always a Challenging Decision Native Web Hybrid Rapid UI development - + + Open standards based - + + Performance in heavy calculation + - + Works offline + + + Background support + - + Deep HW/platform integration + - + Low complexity - + - 12
Key experiences
Key experiences from Tizen Development multi-project application: native service and UI application (native or web) Communication between applications: Message Port (best way, security), Websocket (works in other platforms), JavaScriptBridge plugin (data between JavaScript in webview and native code) Use JSON to transfer data Debugging: debug in IDE, using logs and shell, debug in Chrome browser 3th library linking: static and dynamic 14
3 rd Party frameworks supporting Tizen Cordova Appcelerator Titanium Cocos2d-html5 Many others also but not necessarily having Tizen specific adaption or benefits 15
Tips & Tricks Use Message Ports as a bridge Implement re-try logic to open Message Ports for availability Use JSON to transfer data (human readable, easy debug, web services data format) Widely use Resource Acquisition Is Initialization (RAII) idiom to avoid memory issues Share assets and layouts between multiple apps in your package Specify all privileges needed for the app in the manifest of main project When your app doesn t work properly first ensure that using firmware revision corresponds to SDK revision Study examples, not only documentation Release system resources when app going to background or screen turned off (for ex. Camera) 16
Case Studies
TuneIn: Hybrid Experience TuneIn offers the user the ability to listen to streaming audio from thousands of radio stations It is a Hybrid App to support more audio formats and resolve stream handling Web App UI part TuneIn server communication Native Service audio playing playlist downloading 18
TuneIn: Hybrid Experience Base functionality that were solved in service (native) playing MP3 and AAC streams URLs testing and playlist download network status detection metadata extraction Existing issues not yet solved in the platform: user-agent (that is mentioned in HTTP request of native player) cannot be changed native player does not provide metadata from ICY streams 19
Peeking Protector: Native experience A face recognition application that restricts access to a whole device or selected applications unless the owner s face is recognized. The application is fully native because the app should: intercept launching other protecting apps have the top-most visibility hook hard keys like Home and Power utilize native built-in face recognition API use multi-threading to be responsive while the face recognition piece is in progress 20
Mobile Videos: Web App Experience Full-featured Vimeo service client: No native parts pure web development Integrated with Vimeo s web-service (JSON format) UI utilizes jquerymobile; effects use CSS3 transitions Features beyond HTML5 standard use Tizen API (Scaling, full screen, service requests, browser/sms email launching) 21
Jamendo: Web App Experience Jamendo.com music and radio streaming player Pure HTML5 web development, including the player (background playing is supported) Integrated with Jamendo web-service (JSON format) UI utilizes jquerymobile; local data are stored in SQL DB Published on Tizen Store 22
Tizen Store STC have already published an app on Tizen Store Tizen Store is opened for apps registration Registered app should be passed by Samsung s test team to get On Sale status and be available for downloading Make sure there are no unused privileges in the app s manifest Make sure the app works fine on latest official SDK before app registration (at this moment it is 2.1.0). Jamendo app is already passed by Samsung s test team and have On Sale status 23
Planned Apps STC plans to develop a few Web Apps to display readiness of Web Apps to have the similar responsiveness like native apps Money Manager Calendar Paint Bible books 24
25 Thank you