Location is null

by zeeshan » Sat, 31 Jan 2009 11:37:18 GMT

Sponsored Links

i am trying to run a simple program which shows lat and long values
but Location value is always null.

LocationManager locationManager;
    locationManager = (LocationManager)getSystemService
    Location location = locationManager.getLastKnownLocation

emulator shows alert force close - wait

please help me how can i fix this problem and also how can i debug
line by line,   at the moment i am usinng if, else to see veriable



Location is null

by Chander Pechetty » Sat, 31 Jan 2009 15:58:03 GMT

 Use the geo command:
 http://code.google.com/android/reference/emulator.html #geo

If you are using eclipse plugin for development, you can use the the
Emulator Location Controls.
In Eclipse Go to : Windows/Show View/Others/Android/Emulator



Sponsored Links

Other Threads

1. Scroll view reset to top

My layout has a scroll view, a linear layout, an image view and a
button below the image which needs to be scrolled down.

I load a new image each time the  button is clicked. All of this
works, the problem is when
a new image is loaded  the scroll bar is at the bottom and the user
has to scroll up.

calling scrollTo(0,0) on the image view does not reset the scroll bar
to the top.

What would be the correct mechanism to reset the scroll to the top
after loading an image.


2. Hello World app - the emulator is different

2009/7/29 Balwinder Kaur (T-Mobile) <balwinder.k...@t-mobile.com>

yes it usually take a minute to completely load. another thing is do not
close the emulator after you test it keep it there and you'll save lot of


[[Jose Luis Ayerdis Espinoza]]


3. Hello World app - the emulator is different

4. ExpandableListView won't redraw, static group data, dynamic child data

5. Where to send SDK (reference) documentation corrections?

6. virtualbox+ubuntu as Android development enviroment

7. Getting the source for cupcake