Am facing the same problem , can you tell me how did you solve this problem...
On Nov 24, 6:22 am, Leon Li <[email protected]> wrote: > thanks ip332 and Dan: > i have found answer. > Listener must be created,beacuse getBestKnownLocation() is just for > gettinggpsimmediately,so it is agps,not realgps. > > On Wed, Nov 24, 2010 at 4:45 AM, Dan <[email protected]> wrote: > > On Nov 23, 2:28 am, Leon Li <[email protected]> wrote: > >> hi all: > >> i use Location location=manager.getLastKnownLocation("gps") to get > >> realgps,but it allways returnnull,and i walk around outside office > >> long time. > >> but if i use "network",it work. > > >> dose anyone else know what is wrong? > > > Do you have both > > > <uses-permission > > android:name="android.permission.ACCESS_COARSE_LOCATION"></uses- > > permission> > > <uses-permission > > android:name="android.permission.ACCESS_FINE_LOCATION"></uses- > > permission> > > > in your manifest? When you started your app did you answer the > > dialog saying it's ok to usegps? Is the > > > settings->location&security->UseGPSsatellites > > > checkbox checked on the phone? If all those are true/positive, we > > might > > need to see more code. > > > -- > > 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 -- 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

