Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Raghav Sood
Thanks Mark, TreKing and Filip. The problems gone away and will not be coming back. LocationManager.NETWORK_PROVIDER works like a charm. Thanks On Thu, Jul 7, 2011 at 7:32 PM, TreKing wrote: > On Thu, Jul 7, 2011 at 8:47 AM, Mark Murphy wrote: > >> Don't use Criteria. Use LocationManager.NETWORK

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread TreKing
On Thu, Jul 7, 2011 at 8:47 AM, Mark Murphy wrote: > Don't use Criteria. Use LocationManager.NETWORK_PROVIDER. > To add to this, this is because by using Criteria and, more importantly, specifying ACCURACY_FINE and POWER_HIGH, you are pretty much saying "gimme GPS if available". ---

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Mark Murphy
On Thu, Jul 7, 2011 at 9:43 AM, Raghav Sood wrote: > Coming back to the point. Is there any way to make sure that the app does > not use GPS? That is even if GPS is on the app only uses the cell network? > The whole point of my app was to provide the location without the GPS being > used. Can I se

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Raghav Sood
@TreKing: getBestProvider(); returns GPS but as my app is perfectly functional without the GPS I would like to use the cell network even when GPS is available. Is there any way to do so? Thanks On Thu, Jul 7, 2011 at 7:13 PM, Raghav Sood wrote: > I am aware of the last know location returning n

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Raghav Sood
I am aware of the last know location returning null. As for my code using GPS, the book that I learnt geo services said that this shouldn't happen. Seems they were wrong. Coming back to the point. Is there any way to make sure that the app does not use GPS? That is even if GPS is on the app only u

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread TreKing
On Thu, Jul 7, 2011 at 8:28 AM, Raghav Sood wrote: > I would like this group's help on the fact as to why the app force closes > when the GPS is turned on and how do I fix it. The app does not use the GPS > at all. Are you sure about that? When GPS is on, what does getBestProvider return?

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Mark Murphy
On Thu, Jul 7, 2011 at 9:28 AM, Raghav Sood wrote: > I have a app that triangulates the users location and displays it on a map > without using the GPS. As long as the GPS is off the app does its job > perfectly. The moment someone turns the GPS on the app force closes and > gives a NullPointerExc

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread TreKing
On Thu, Jul 7, 2011 at 7:18 AM, Raghav Sood wrote: > Does anyone know what could be causing this and how to fix it? Are you waiting for the GPS to actually report that it found a valid location ... ? --

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Filip Havlicek
In brief, Mark wanted to see the code of the null Location acquisition using GPS. 2011/7/7 Raghav Sood > Exactly my point. When the GPS is on it returns null for the location, but > if the GPS is off then the cell phone tower location works fine. Is there > any way that I can set my app to tria

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Raghav Sood
Exactly my point. When the GPS is on it returns null for the location, but if the GPS is off then the cell phone tower location works fine. Is there any way that I can set my app to triangulate using only the cellphone network? Thanks On Thu, Jul 7, 2011 at 5:58 PM, Mark Murphy wrote: > How ar

Re: [android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Mark Murphy
How are you getting that Location that is null? On Thu, Jul 7, 2011 at 8:18 AM, Raghav Sood wrote: > Hi all > I wrote an app that gets and displays your location on a map. I am using the > Google Maps service to render the map. The app has been live for less than > two hours and I have received 3

[android-developers] Puzzling crash report. Location app doesn't work if the GPS is on

2011-07-07 Thread Raghav Sood
Hi all I wrote an app that gets and displays your location on a map. I am using the Google Maps service to render the map. The app has been live for less than two hours and I have received 33 crash reports (using ACRA). I have been able to recreate the problem. The app works fine if the GPS is of