The permissions are:

    <uses-permission android:name="android.permission.ACCESS_GPS" />
    <uses-permission
android:name="android.permission.ACCESS_ASSISTED_GPS" />
        <uses-permission android:name="android.permission.ACCESS_LOCATION"/>

Anything missing?

Dan U. wrote:
> have you set proper uses-permission settings in androidmanifest.xml?
>
> On Apr 6, 5:36 pm, NTR <[EMAIL PROTECTED]> wrote:
> > I even tried running "emulator -wipe-data" again, but it didn't
> > help...
> >
> > NTR wrote:
> > > When I try using the "gps" provider, I get the following:
> >
> > > ERROR/AndroidRuntime(3253): Caused by: java.lang.NullPointerException
> > > ERROR/AndroidRuntime(3253):     at
> > > android.location.LocationManager.createProvider(LocationManager.java:
> > > 61)
> > > ERROR/AndroidRuntime(3253):     at
> > > android.location.LocationManager.getProvider(LocationManager.java:119)
> > > ERROR/AndroidRuntime(3253):     at
> > > net.lbns.mobileclient.util.LocationUtil.getLocationProvider(LocationUtil.java:
> > > 21)
> >
> > > Code:
> >
> > > public static LocationProvider getLocationProvider(Application app) {
> > >     try {
> > >       LocationManager locationManager = getLocationManager(app);
> > >       return locationManager.getProvider("gps");
> > >     }
> > >     catch (SecurityException e) {
> > >       return null;
> > >     }
> > >   }
> >
> > >   public static LocationManager getLocationManager(Application app) {
> > >     return (LocationManager)
> > > app.getSystemService(Context.LOCATION_SERVICE);
> > >   }
> >
> > > The application is retrieved by using getApplication() of a sub-
> > > activity. Any help?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to