Android SQLite Essentials

Similar documents
Selenium Testing Tools Cookbook

Learning Embedded Linux Using the Yocto Project

Selenium Testing Tools Cookbook

HTML5 Games Development by Example

Apache Hive Cookbook. Hanish Bansal Saurabh Chauhan Shrey Mehrotra BIRMINGHAM - MUMBAI

TortoiseSVN 1.7. Beginner's Guide. Perform version control in the easiest way with the best SVN client TortoiseSVN.

Android SQLite Essentials

PHP 5 e-commerce Development

Summary 4. Sample RESS Page WURFL plus screen size detection Dave Olsen's Detector Pure JavaScript screen size test Utility functions Dave Olsen's

Learning Drupal 6 Module Development

Raspberry Pi Cookbook for Python Programmers

Learning PrimeFaces Extensions Development

Instant Nginx Starter

Foundation Flash MX Applications

App Inventor 2 Essentials

vsphere Design Best Practices

3. Part of Speech Tagging What is Part of speech tagging Stanford tagger Diving deep into a tagger Sequential tagger N-gram tagger Regex tagger Brill

Training Kit Administering Microsoft SQL Server 2012 Databases. Training Kit EXAM SQL Server 2012 Databases

Learning Redis. Design efficient web and business solutions with Redis. Vinoo Das BIRMINGHAM - MUMBAI.

Data storage and exchange in Android

Content Provider. Introduction 01/03/2016. Session objectives. Content providers. Android programming course. Introduction. Built-in Content Provider

Builder Implementation Factory Method Implementation Singleton Implementation Disadvantages Prototype Implementation Hints and tips Summary 4.

Companion ebook Available Pro Android Includes Android 1.5 SOURCE CODE ONLINE US $44.99

Learning Heroku Postgres

Writing & Executing a Software Validation Protocol: Plain and Simple

CS371m - Mobile Computing. Content Providers And Content Resolvers

Copyright Samsung Electronics Co., Ltd. All rights reserved.

Automatically persisted among application sessions

Getting Started with SOQL

Mastering FreeSWITCH

7 Windows Tweaks. A Comprehensive Guide to Customizing, Increasing Performance, and Securing Microsoft Windows 7. Steve Sinchak

Android Programming - Jelly Bean

Away3D 3.6 Essentials

/smlcodes /smlcodes /smlcodes JIRA. Small Codes. Programming Simplified. A SmlCodes.Com Small presentation. In Association with Idleposts.

Enterprise JavaBeans 2.1

Mobile Application Development Android

Software Testing using Visual Studio 2010

Mobile Application Development Android

Copyright 2018 by Pearson Education Inc. or its affiliates. All Rights Reserved.

Tread-bot with the Retail kit Tread-bot with the Educational kit Programming the robot to move forward Summary 4. Sensors and Control Using sensors

Copyright Samsung Electronics Co., Ltd. All rights reserved.

CS371m - Mobile Computing. Persistence - SQLite

Android Application Development

Join the p2p.wrox.com. Wrox Programmer to Programmer. Beginning PHP 5.3. Matt Doyle

How-to s and presentations. Be prepared to demo them in class. ons

Tables Columns Measures Relationships Hierarchies 2. Setting up a Tabular Mode Environment Introduction Installing and configuring a development

CMS Design Using PHP and jquery

Oracle CPQ Cloud for Salesforce.com

Oracle PL/SQL. DUMmIES. by Michael Rosenblum and Dr. Paul Dorsey FOR

Oracle Pl Sql Programming Fundamentals 2nd Edition A Practical Tutorial By Examples

DEVELOPMENT OF PUBLIC FACILITY AND HOUSEHOLD LOCATOR TOOL USING MOBILE GIS AND ANDROID TECHNOLOGY

Disaster Recovery Using VMware vsphere Replication and vcenter Site Recovery Manager

Oracle Pl Sql Programming Covers Versions Through Oracle Database 12c

Page intentionally blank Replace with cover artwork

An Easy to Understand Guide 21 CFR Part 11

Building a Web Application with PHP and MariaDB: A Reference Guide

Microsoft Dynamics AX 2012 R2 Services

The Basis of Data. Steven R. Bagley

Beginning Transact-SQL with SQL Server 2000 and Paul Turley with Dan Wood

Alan Forbes - The Joy of PHP 1

Technical Brief Exporting a List of Device MAC Addresses from Xcalibur Global Document Version 1.0

Mastering DynamoDB. Master the intricacies of the NoSQL database DynamoDB to take advantage of its fast performance and seamless scalability

App Development. Quick Guides for Masterminds. J.D Gauchat Cover Illustration by Patrice Garden

Quick Desktop Application Development Using Electron

Learning Xamarin Studio

IBM Worklight Mobile Application Development Essentials

Getting Started with Django

Agile Swift. Swift Programming Using Agile Tools and Techniques. Godfrey Nolan

Beginning Robotics Programming in Java with LEGO Mindstorms

Learning Redis. Design efficient web and business solutions with Redis. Vinoo Das BIRMINGHAM - MUMBAI.

/smlcodes /smlcodes /smlcodes. Shell Scripting TUTORIAL. Small Codes. Programming Simplified. A SmlCodes.Com Small presentation

Building Wireless Sensor Networks Using Arduino

JONATHAN PICKUP VECTORWORKS LANDMARK TUTORIAL MANUAL 5TH EDITION TUTORIAL MANUAL WRITTEN WITH VERSION 2015

Android Application Development Course 28 Contact Hours

Study Guide. Robert Schmidt Dane Charlton

Exam Ref Implementing Microsoft Azure Infrastructure Solutions Michael Washam Rick Rainey

Fundamentals of Operating Systems. Fifth Edition

MCITP Windows Server 2008 Server Administrator Study Guide

Essential Angular for ASP.NET Core MVC

Android For Programmers: An App-Driven Approach (2nd Edition) (Deitel Developer Series) By Harvey Deitel, Paul Deitel

Pro.NET 4 Parallel Programming in C#

Boston Limited IT system builder and distributor

Android App Development for Beginners

JONATHAN PICKUP 3D MODELING WITH VECTORWORKS 7TH EDITION TUTORIAL MANUAL WRITTEN WITH VERSION 2015

Mobile Application Development Android

Table of Contents. VisualSVN Server on Windows Integrating Eclipse with code repositories

GUI 1.5 Release Notes

Professional ASP.NET 2.0 Databases. Thiru Thangarathinam

DOWNLOAD OR READ : JAVA PROGRAMMING COMPREHENSIVE CONCEPTS AND TECHNIQUES 3RD EDITION PDF EBOOK EPUB MOBI

Mobile and Ubiquitous Computing: Android Programming (part 4)

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

First Course In Finite Elements Solution Manual

The 7 Success Secrets for Building a Million Download Mobile App

Wednesday 14 May 2014 Morning

Limit of Liability/Disclaimer of Warranty:

Pro MERN Stack. Full Stack Web App Development with Mongo, Express, React, and Node. Vasan Subramanian

DotNetNuke Skinning Tutorial

MAGENTO 2 DEVELOPMENT COOKBOOK BY BART DELVAUX DOWNLOAD EBOOK : MAGENTO 2 DEVELOPMENT COOKBOOK BY BART DELVAUX PDF

[ 1 ]

SQLite Database. References. Overview. Structured Databases

Transcription:

Android SQLite Essentials

Table of Contents Android SQLite Essentials Credits About the Authors About the Reviewers www.packtpub.com Support files, ebooks, discount offers and more Why Subscribe? Free Access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy Questions 1. Enter SQLite Why SQLite? The SQLite architecture The SQLite interface The SQL compiler The virtual machine The SQLite backend A quick review of database fundamentals What is an SQLite statement? The SQLite syntax

Datatypes in SQLite Storage classes The Boolean datatype The Date and Time datatype SQLite in Android SQLite version Database packages APIs The SQLiteOpenHelper class The SQLiteDatabase class ContentValues Cursor Summary 2. Connecting the Dots Building blocks A database handler and queries Building the Create query Building the Insert query Building the Delete query Building the Update query Connecting the UI and database Summary 3. Sharing is Caring What is a content provider? Using existing content providers What is a content resolver? Creating a content provider Understanding content URIs Declaring our contract class Creating UriMatcher definitions Implementing the core methods

Initializing the provider through the oncreate() method Querying records through the query() method Adding records through the insert() method Updating records through the update() method Deleting records through the delete() method Getting the return type of data through the gettype() method Adding a provider to a manifest Using a content provider Summary 4. Thread Carefully Loading data with CursorLoader Loaders Loader API s summary Using CursorLoader Data security ContentProvider and permissions Encrypting critical data General tips and libraries Upgrading a database Database minus SQL statements Shipping with a prepopulated database Summary Index

Android SQLite Essentials

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 (<tysoncinematics@gmail.com>)

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 <gaurav1maru@gmail.com>. 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 www.packtpub.com and as a print book customer, you are entitled to a discount on the ebook copy. Get in touch with us at <service@packtpub.com> 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.