-1

Possible Duplicate:
How To Get Location Using AsyncTask

im trying two days to get userlocation in asyncTask but i can't. i search all google but i cant find anything that can help. can anyone help? if he had code or he know how to implement this thing. thanx guys!

Community
  • 1
  • 1
Stefos
  • 38
  • 6

1 Answers1

0

getting the location doesn't require asyncTask . you ask to get locations events via a listener that will be called in the future , and that's it . the call is asynchronous anyway.

android developer
  • 114,585
  • 152
  • 739
  • 1,270
  • so why i cant get user location and my app dont run on ICS? – Stefos May 22 '12 at 11:10
  • anyway , this seems like a nice sample : http://hejp.co.uk/android/android-gps-example/ . haven't tested it , but it looks very similar to what i know that works . – android developer May 22 '12 at 11:57
  • when i was on Gingerbread the code worked fine. the problems started when i upgrade to ICS my phone – Stefos May 22 '12 at 12:08
  • i see . sadly i don't have ICS currently . – android developer May 22 '12 at 12:24
  • i try to use salman code from here http://stackoverflow.com/questions/5676653/how-to-get-location-using-asynctask but didnt work. for some reason i cant get the location so the only i see on screen is Loading. – Stefos May 22 '12 at 13:11
  • did you also try the example i've written about? maybe google has posted some new changes about ICS regarding this topic that need your attention? – android developer May 22 '12 at 13:18
  • yeap but still tha same. i downgrade to 2.3 untill the presentation of the project. thanx for your time! – Stefos May 22 '12 at 16:33
  • maybe it's the rom that you've installed that has the problems? have you tried a different one ? have you tried an app on the market that requires the gps ? – android developer May 22 '12 at 16:38