droidofdewm
Lurker
I'm creating an app that requires GPS to gather information and insert this information into a SQLiteDatabase. The app works perfectly fine as coded UNTIL the GPS is turned off. Apparently, when the GPS is turned off, my insert method for the database throws a NullPointerException. I figured it was because the location object was null since there was no actual GPS location. So, I created dummy variables to insert into the database in case the GPS was turned off, but am still getting a NullPointerException when calling db.insert with these dummy variables. I've checked all possible points of failure and know for a fact correct types and values are being sent. Does anyone know if for some strange reason that the SQLiteDatabase is tied to the GPS in any way, shape or form that would cause this to fail?