Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Programming for Beginners

You're reading from   Android Programming for Beginners Learn all the Java and Android skills you need to start making powerful mobile applications

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher Packt
ISBN-13 9781785883262
Length 698 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Paresh Mayani Paresh Mayani
Author Profile Icon Paresh Mayani
Paresh Mayani
John Horton John Horton
Author Profile Icon John Horton
John Horton
Arrow right icon
View More author details
Toc

Table of Contents (32) Chapters Close

Preface 1. The First App FREE CHAPTER 2. Java – First Contact 3. Exploring Android Studio 4. Designing Layouts 5. Real-World Layouts 6. The Life and Times of an Android App 7. Coding in Java Part 1 – Variables, Decisions, and Loops 8. Coding in Java Part 2 – Methods 9. Object-Oriented Programming 10. Everything's a Class 11. Widget Mania 12. Having a Dialogue with the User 13. Handling and Displaying Arrays of Data 14. Handling and Displaying Notes in Note To Self 15. Android Intent and Persistence 16. UI Animations 17. Sound FX and Supporting Different Versions of Android 18. Design Patterns, Fragments, and the Real World 19. Using Multiple Fragments 20. Paging and Swiping 21. Navigation Drawer and Where It's Snap 22. Capturing Images 23. Using SQLite Databases in Our Apps 24. Adding a Database to Where It's Snap 25. Integrating Google Maps and GPS Locations 26. Upgrading SQLite – Adding Locations and Maps 27. Going Local – Hola! 28. Threads, Touches, Drawing, and a Simple Game 29. Publishing Apps 30. Before You Go Index

Chapter 24. Adding a Database to Where It's Snap

In this chapter, we will be entirely focused on using all we know about fragments, interfaces, and SQLite in order to add significant functionality to Where it's Snap.

We will cover the following tasks:

  • Building a new class to represent a photo
  • Creating a DataManager class to handle our database, including a selection of helper methods to make the appropriate queries
  • Enabling the saving of photos into the database from the FragmentCapture class
  • Coding an interface to handle communications
  • Coding TagsFragment to show a list of tags and sending a tag to MainActivity when one is clicked
  • Coding TitlesFragment to show a list of titles either based upon a specific tag or the entirety of wis_tables_photos
  • Coding the MainActivity class to handle the communications of the fragments via the interface

As usual, the files for all of the above are in the download bundle in the Chapter 24/Where Its Snap 3 folder.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime