Testing Queries

With your repository in place, there is one last step before you can test your query functions. Currently, your database is empty, because you have not added any crimes to it. To speed things up, you will upload existing database files to your emulator to populate your database. The database files have been provided for you in the solutions file for this chapter (www.bignerdranch.com/​solutions/​AndroidProgramming4e.zip).

You could programmatically generate and insert dummy data into the database, like the 100 dummy crimes you have been using. However, you have not yet implemented a DAO function to insert new database entries (you will do so in Chapter 14). Uploading a preexisting database file allows you to easily seed ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.