quantcast / android-measurement

Quantcast Measure for Android
13 stars 12 forks source link

Crash when trying to obtain the location #1

Closed OmarPedraza closed 11 years ago

OmarPedraza commented 11 years ago

Hi, We're starting to use your measurement system on our app on both platforms (Android and iOS), but we have found an issue when trying to enable the location gathering.

We receive the following error trace:

Caused by: java.lang.IllegalArgumentException: The provided object cannot be null. at com.quantcast.json.JsonString.(JsonString.java:20) at com.quantcast.measurement.service.LocationEvent.(LocationEvent.java:28) at com.quantcast.measurement.service.MeasurementSession.logLocation(MeasurementSession.java:147) at com.quantcast.measurement.service.QuantcastClient.logLocation(QuantcastClient.java:516) at com.quantcast.measurement.service.QuantcastClient.access$300(QuantcastClient.java:41) at com.quantcast.measurement.service.QuantcastClient$LocationMonitor.logLocation(QuantcastClient.java:551) at com.quantcast.measurement.service.QuantcastClient$LocationMonitor.startListening(QuantcastClient.java:597) at com.quantcast.measurement.service.QuantcastClient$2.callback(QuantcastClient.java:500) at com.quantcast.measurement.service.QuantcastGlobalControlProvider.getControl(QuantcastGlobalControlProvider.java:140) at com.quantcast.measurement.service.QuantcastClient.startLocationGathering(QuantcastClient.java:495) at com.quantcast.measurement.service.QuantcastClient.beginSessionWithApiKeyAndWithUserId(QuantcastClient.java:148) at com.quantcast.measurement.service.QuantcastClient.beginSessionWithApiKeyAndWithUserId(QuantcastClient.java:109) at com.quantcast.measurement.service.QuantcastClient.beginSessionWithApiKey(QuantcastClient.java:74)

The problem may probably be due to we're based on Madrid (Spain) and Spain doesn't have a division through states so location.getState() is null and it creates a crash on JsonString. Can you get deeper into this?

Thank you very much!

SmithKevin commented 11 years ago

Thank you for your feedback. I will look into this now.

OmarPedraza commented 11 years ago

Well done, thank you!