Can anybody help me why getProviders always return True? I have tried
changing the manifest based on solution provided on the other threads.
However, it still didn't work. I have the latest SDK (1.1)

Here is my code:

        LocationManager locationManager;

        @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        String location_context = Context.LOCATION_SERVICE;
        locationManager = (LocationManager)getSystemService
(location_context);
        testProviders();
    }

        public void testProviders() {

                TextView tv = (TextView)findViewById(R.id.myTextView);
                StringBuilder sb = new StringBuilder("Enabled Providers: ");

                List<String> providers = locationManager.getProviders(true);

                for (String provider : providers){
---------

Here is my manifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="com.paad.testprovidercontroller"
      android:versionCode="1"
      android:versionName="1.0.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".TestProviderController"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <uses-permission
android:name="android.permission.ACCESS_LOCATION" />
                <uses-permission android:name="android.permission.ACCESS_GPS" />
                <uses-permission
android:name="android.permission.ACCESS_ASSISTED_GPS" />
                <uses-permission 
android:name="android.permission.ACCESS_CELL_ID" /
>
    </application>
</manifest>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to