Android SQLite Essentials
Copyright 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: August 2014
Production reference: 1200814
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-295-1
www.packtpub.com
Cover image by Pratyush Mohanta (<>
)
Credits
Authors
Sunny Kumar Aditya
Vikash Kumar Karn
Reviewers
Amey Haldankar
Gaurav Maru
Commissioning Editor
Pramila Balan
Acquisition Editor
Nikhil Karkal
Content Development Editor
Ruchita Bhansali
Technical Editors
Dennis John
Gaurav Thingalaya
Copy Editors
Roshni Banerjee
Gladson Monteiro
Adithi Shetty
Project Coordinator
Kranti Berde
Proofreaders
Simran Bhogal
Joanna McMahon
Indexers
Mariammal Chettiyar
Rekha Nair
Graphics
Ronak Dhruv
Production Coordinator
Saiprasad Kadam
Cover Work
Saiprasad Kadam
About the Authors
Sunny Kumar Aditya has been working on the Android platform for the past 4 years. His tryst with Android began with his college project, and he continued with his work in R&D at HCL Infosystems Ltd. Sunny loves to stay up to date with the latest trends and practices in Android development. Apart from building Android applications, he writes at www.deadmango.com. He is currently the head of Android development at Yamunix.
I would like to thank Packt Publishing for this opportunity and my family as well as friends for their support.
Vikash Kumar Karn is an IIIT Allahabad alumnus and an ECE student whose love for code drove him towards the software development field. He has worked with leading multinationals and is currently working at Samsung Research Institute, Bangalore, exploring Android.
Vikash likes to learn the intricacies of the Android framework and help newcomers in this field. Some of his applications, such as Movtan Fishing and Compare Pictures, can be found on the Play Store.
I would like to thank my friends and family for their support during the course of writing this book.
About the Reviewers
Amey Haldankar is an Android enthusiast hooked on the platform since its early days. Equipped with a degree in Computer Science Engineering from GIT, Belgaum, he is working for HCL Infosystems Ltd. as a Senior Software Engineer.
Amey has been working on the platform for the past 3 years developing several applications for major clients such as Domino's, Galatsaray, HCL, and Nokia.
A note of thanks to the publishing house for considering me for the role of a reviewer for Android SQLite Essentials .
Gaurav Maru has a Bachelor's degree in Computers from Shah & Anchor Kutchhi Engineering College. Since 2011, he has been working as an Android application developer at various organizations, including India's largest retail sector company. Gaurav has developed various apps, including the one developed for the USA's largest bookseller (a Fortune 500 company). He drinks, eats, and sleeps Android. You can contact him at <>
.
I would like to thank my family, friends, colleagues, and Packt Publishing, who helped me pull this one off successfully. Cheers!
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print and bookmark content
- On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Preface
Android is probably the buzzword of this decade. In a short span, it has taken over the majority of the handset market. Android is staged to take over wearables, our TV rooms, as well as our cars this autumn with the Android L release. With the frantic pace at which Android is growing, a developer needs to up his or her skill sets as well. Database-oriented application development is one of the key skills every developer should have. SQLite database in applications is the heart of a data-centric product and key to building great products. Understanding SQLite and implementing the Android database can be a steep learning curve for some people. Concepts such as content providers and loaders are more complex to understand and implement. Android SQLite Essentials equips developers with tools to build database-based Android applications in a simplistic manner. It is written keeping in mind the current needs and best practices being followed in the industry. Let us start our journey.
What this book covers
, Enter SQLite , provides an insight into SQLite architecture, SQLite basics, and its Android connection.
, Connecting the Dots , covers how to connect your database to Android views. It also covers some of the best practices one should follow in order to build a database-centric/database-enabled application.
, Sharing is Caring , will reflect on how to access and share data in Android via content providers and how to construct a content provider.
, Thread Carefully , will guide you on how to use loaders and ensure security of database and data. It will also provide you with tips to explore alternate approaches to building and using databases in Android applications.