December 2013
Beginner
416 pages
12h 45m
English
You have created the coordinate model, but now you need to test whether the database tables are being correctly created. It’s not easy to test the full application in the emulator, but you can make a few minor modifications to the existing code to test this code to ensure it is working. Follow these steps.
1. Open the WhereAmI.java class in the com.androiddevbook.onyourbike.chapter7.helpers package. If the map has not been created in the MapActivity class, then map will be null. Inside the onLocationChanged method, find any code that refers to the map’s methods, and protect them with an if. Be sure to check that map is not null (see Listing 7.49).
Listing 7.49 Displaying the Raw and Corrected GPS Paths on ...
Read now
Unlock full access