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. Two-level lists?

I am struggling with the following problem.  I need an activity that
lists seven items, each corresponding to a day of the week.  It should
be scrollable.  Each day item consists of a date heading and below
that one or two items, call them tasks, each with an icon and text.
Clicking on a task item calls an activity specific to that task.  It
should look something like this:

January 1, 2010
[(icona) (Task 1 description)]
[(iconb) (Task 2 description)]

January 2, 2010
[(iconc) (Task 3 description)]

January 3, 2010
[(icona) (Task 4 description)]
[(iconc) (Task 5 description)]


I can see how I could use a ListView for the seven items, with each
day a separate view produced by a custom ListAdapter.  But how could I
distinguish between clicks on different tasks on a two-task day?  What
kind of view should the task list be?  Is is possible to have
listviews within listviews?  I'm sure this is real Noob question.


2. How to create a shaped Button?

Hi ,

Does any one know how can I create a button of any shape?

I don't mean to use ImageButton and set it's background drawable or
image drawable. In this case, ImageButton are in fact rectangle
buttons. Any touches within its bounds will cause OnClick event.  If
you put some buttons together to make up a new shape, those buttons
will overlap each other and only top-most button is clickable... I
don't want this to happend.

3. Ringer setup

4. ContentResolver.query() returning null Cursor

5. apn type

6. Sudah Dapat : WTB: converter mini usb ke 3.5"

7. Notepad Tutorial and sqlite3