On Apr 3, 7:05 am, JoeB <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Any advice on this would help--I can never get a provider from
> LocationManager (there is supposed to be a mock one at least, and I
> can see the data for it by using "adb shell"). I also can't get
> locations or anything else. Any of the following statements crash the
> application, every time (take your pick, they all crash it).
>
> LocationProvider mockProvider = locMgr.getProvider("gps");
> locMgr.getBestProvider(CRITERIA);
> locMgr.requestUpdates(CRITERIA, LOCATION_PERIOD,
> LOCATION_ACCURACY, notifyIntent);
>
> Oh, and this....
> List providers = locMgr.getProviders();
> ...doesn't crash, but returns an empty list.
>
> This is the Criteria setup btw:
>
> private static final Criteria CRITERIA;
> static{
> CRITERIA = new Criteria();
> CRITERIA.setSpeedRequired(false);
> CRITERIA.setAltitudeRequired(false);
> CRITERIA.setBearingRequired(false);
> CRITERIA.setCostAllowed(false);
> }
>
> I also have the following permissions defined in my manifest (I added
> all the location-related ones, just in case that was the issue):
>
> <uses-permission android:name="android.permission.ACCESS_GPS" />
> <uses-permission
> android:name="android.permission.ACCESS_ASSISTED_GPS" />
> <uses-permission android:name="android.permission.CELL_ID" />
> <!-- Logically, this perm should be the set of the ones above, but
> declare everything just in case -->
> <uses-permission android:name="android.permission.LOCATION" />
>
> I don't get any kind of error message in the console, but I also can't
> run "adb debug" from command line anymore since moving to m5-rc15 for
> unknown reason. It always just displays "error: closed", whether I
> run the emulator stand-alone or from eclipse. I know the
> LocationManager calls are causing the crash by tracing w/ debugger.
>
> Any tips on why this is happening, or why I can no longer get any
> debug information, would be greatly appreciated. By the way,
> everything described above behaves exactly the same way with either m5-
> rc14 or m5-rc15 (I tried switching back to no avail).
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---