Professional Tizen™ Application Development
Total Page:16
File Type:pdf, Size:1020Kb
PROFESSIONAL TIZEN™ AppLICATION DEVELOPMENT INTRODUCTION ................................................... xxiii ➤ PART I GEttING StARTED CHAptER 1 An Introduction to Tizen ................................... 3 CHAptER 2 Tizen Application Packages ................................ 21 CHAptER 3 Tizen Development Tools .................................. 41 ➤ PART II TIZEN WEB APIS CHAptER 4 Web Application Fundamentals ............................. 61 CHAptER 5 Location-Based Services .................................. 77 CHAptER 6 Multimedia ............................................. 89 CHAptER 7 Sensors and Other Hardware .............................. 103 CHAptER 8 Messaging Services ..................................... 117 CHAptER 9 Contacts and Calendars .................................. 133 ➤ PART III TIZEN NATIVE APIS CHAptER 10 Native UI Applications ................................... 163 CHAptER 11 Native Application Fundamentals .......................... 183 CHAptER 12 Native UI Controls ...................................... 225 CHAptER 13 Multimedia and Content ................................. 249 CHAptER 14 Telephony and Networking ............................... 283 CHAptER 15 Location and Social Services .............................. 333 CHAptER 16 Advanced UI and Graphics ............................... 367 CHAptER 17 I/O and Internationalisation ............................... 391 ➤ PART IV AdVANCED TIZEN CHAptER 18 Multithreading ......................................... 433 CHAptER 19 Inter-Application Communication and Hybrid Applications ...... 457 INDEX ........................................................... 479 ffirs.indd 1 24-03-2014 22:07:50 ffirs.indd 2 24-03-2014 22:07:50 PROFESSIONAL Tizen™ Application Development ffirs.indd 3 24-03-2014 22:07:50 ffirs.indd 4 24-03-2014 22:07:50 PROFESSIONAL Tizen™ Application Development Hojun Jaygarl Cheng Luo Yoonsoo Kim Eunyoung Choi Kevin Bradwick Jon Lansdell ffirs.indd 5 24-03-2014 22:07:51 Professional Tizen™ Application Development This edition first published 2014 © 2014 Samsung Electronics Co. Ltd. Registered office John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com. The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or website may provide or recommendations it may make. Further, readers should be aware that Internet web- sites listed in this work may have changed or disappeared between when this work was written and when it is read. Trademarks: Wiley, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Tizen is a registered trademark of the Linux Foundation. All other trademarks are the property of their respective owners. John Wiley & Sons, Ltd. is not associated with any product or vendor mentioned in this book. A catalogue record for this book is available from the British Library. 978-1-118-80926-6 (paperback) 978-1-118-80924-2 (ebook) 978-1-118-80925-9 (ebook) Set in 9.5pt Sabon LT Std-Roman by MPS Limited, Chennai, India. Printed in the United Kingdom by TJ International ffirs.indd 6 24-03-2014 22:07:51 To my wife, Hana. Without you all this wouldn’t have been possible. —Hojun To my wife, Tong; my daughter, Mary; my son, Luke; and mom and dad, with love. —Cheng To my beloved wife, Yungsuk; my kids, Yunggyun, Yungjun, and Yeeun; and my parents, Inhyung and Boksun. You made writing this book possible. —Yoonsoo As my workmate and even more my husband, Joonwoo, your devotion and support for me is always the basis for everything. —Erin To Julia and Iliya, for the mountains and the laughter. —Jon ffirs.indd 7 24-03-2014 22:07:51 ffirs.indd 8 24-03-2014 22:07:51 ABOUT THE AUTHORS HOJUN JAYGARL is a software architect and developer with experience developing software in a number of languages. He started in software development for venture companies at the age of 20, developing Windows and web applications. After working at venture companies for 5 years, Hojun moved to Samsung Electronics to develop embedded software of smart appliances. He then left Samsung to pursue a PhD in Computer Science at Iowa State University. He studied software engineering and developed an automated testing framework. After getting his PhD, Hojun came back to Samsung and developed bada and the Tizen native framework. Currently he is working on new smartphone applications for intelligence and big data. CHENG LUO is a mobile application developer and technical evangelist with extensive experience developing mobile applications on different platforms, including Maemo, Symbian, bada, Android, and Tizen. He started his application development on early mobile devices, such as Compaq iPaq 3630 and Nokia N770 using C and C++ based on Linux. Cheng currently works as a developer advocate in the Amazon EU office in Luxembourg. Prior to joining the Amazon Appstore team in Europe, Cheng lead a team of bada and Tizen experts in Samsung Europe. He has developed a number of open source projects in bada and Tizen and has spoken at various international conferences and developer events. Cheng holds a M.Sc. in Networking Technologies from Aalto University in Finland. He and his fam- ily currently reside in Luxembourg YOONSOO KIM is a Tizen platform architect who is actively participating in the development of Tizen, considering desired platform qualities such as security, reliability, maintainability, and performance. Yoonsoo reviews all Tizen native C++ API changes to ensure that all APIs are easy to use, hard to misuse, easy to extend, and have good performance. Yoonsoo also actively maintains the coding idiom with clear rationales so that Tizen developers can decide which guide they should follow for their daily development, which is very important in the environment of a large team and complex software. EUNYOUNG CHOI is a technical documentation leader with software development experience in the telephony, sensor, and content frameworks based on Tizen and bada. ffirs.indd 9 24-03-2014 22:07:51 KEVIN BRAdwICk is a web developer from South Wales who has spent the majority of his working career building websites and web applications with HTML(5), PHP, and JavaScript. His passion is for developing smart solutions that improve and enable good user experience on the web. Kevin started his career in graphic design but quickly became captivated by the creative possibilities that could be achieved in web development. Kevin currently works as a Senior Web Developer at the BBC, where he works on products relating to location services. His work is primarily concentrated in front-end development, where he devel- ops and maintains the BBC’s JavaScript mapping library in addition to web components that inter- act with various location APIs. Kevin has also formed his company, KodeFoundry, which provides bespoke web solutions for companies that want cutting-edge digital solutions. JON LANSDELL is a technical writer, trainer, and developer