Location is null

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


Sponsored Links
 Hi,

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
(Context.LOCATION_SERVICE);
    Location location = locationManager.getLastKnownLocation
(LocationManager.GPS_PROVIDER);


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
value.

Thanks,
Zeeshan

--~--~---------~--~----~------------~-------~--~----~



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

-Chander



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. wanted software professionals for USA

http://123maza.com/75/expressions

-- 

2. Tab Event

Hi I want to add content to linear layout dynamically when i click on
tab .For that purpose i use the following code to create a new Linear
layout and new text view .
LinearLayout ll = new LinearLayout(this);
                                ll.setId(i);
                                ll.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
                                ll.setPadding(0, 0, 0, 5);
                                ll.setClickable(true);

TextView name = new TextView(this);

                        name.setText(user_peoples.get(j).toString());
                                name.setWidth(100);
                                name.setId(++i);
                                name.setClickable(true);
                                name.setLayoutParams(new
LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));

But it is not worked ,Give me some suggestion.Here Null Pointer
Exception is coming.Thanks in advance

-- 

3. Looking for bench help to port our iPhone app to Droid anyone out there that has time and skills to do this?

4. Reg. accessing the external files

5. PhoneFactory

6. Best practices for integrated (context-sensitive) help?

7. license question about bootchart.c