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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.