Esri / quickstart-map-android

Quickly build maps for Android with this library and sample app.
Apache License 2.0
24 stars 32 forks source link

Application crashes upon launch when used in Europe #2

Closed andygup closed 11 years ago

andygup commented 11 years ago

V1.0 and v1.1 location code only relies on NETWORK_PROVIDER. In certain areas of Europe this functionality may not be available and it will fail silently resulting in your application crashing immediately upon startup. A work-around is in EsriQuickStart under the setLocationListener() method change out NETWORK_PROVIDER TO GPS_PROVIDER and use _locationService.setAllowNetworkLocation boolean to toggle NETWORK_PROVIDER off, and the LocationService isAllowNetworkLocation() to determine if a NETWORK_PROVIDER is even available.

dzlab commented 11 years ago

I had the same problem but when I create a new empty project than copy the code from your sample to my new project I have no longer this problem!

andygup commented 11 years ago

Good to know, thanks!

andygup commented 11 years ago

Fixed in v1.2. Library now detects if provider is enabled and (hopefully) switches appropriately.