Friday, April 23, 2010

[android-developers] getProviders(true) always return empty list

Hi all,

I have a problem using getProviders(true) function.

The code is following is tested (SDK1.6) is tested on emulator and
actual phone (I checked if GPS is working on other applications).


Location Manager manager =
(LocationManager)this.getSystemService(Context.LOCATION_SERVICE);
List<String> providers = manager.getProviders(true);


Also I have following permissions in manifest xml file:
<uses-permission android:name="android.permission.INTERNET" />
<user-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<user-permission
android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" /
>
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission
android:name="android.permission.ACCESS_MOCK_LOCATION" />


Kind Regards.


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate