Hi folks,

Im trying to write a piece of code which checks if GPS is supported by
the device.

                locationProvider = locManager.getProvider("gps");

                if (locationProvider != null) {
                        if (locManager.isProviderEnabled("gps")) {
                                Log.d(TAG , TAG + "GPS supported, enabled");
                                        return true;
                                }
                                Log.d(TAG, TAG + "GPS supported, disabled");
                                return false;
                }
                Log.d(TAG, TAG + "GPS not supported");
                return false;

I've tried creating an AVD with no GPS support to test the code above
but the emulator is buggy: "process system is not responding"... Alot
of error when starting it up: "Unable to read framework command" and
so on...
I don't have any device without GPS support available...

Can you guys see anything wrong with my code? Or maybe u know a better
way to do the GPS support check?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to