I have
        locMgr =
            (LocationManager) getBaseContext().getSystemService(
                Context.LOCATION_SERVICE);

but I don't remember why I put in the "getBaseContext()".
Also, as Mark said, I never tried with 0,0 for time and distance
intervals.



On Dec 11, 2:33 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> Aldo Neto wrote:
> > I have a very simple code (see below) that I took from a
> > tutorial but even that doesn't work. I believe that I'm missing
> > something here, but I have no idea what it might be.
>
> The only difference I see off the top of my head between what I've used
> and what you have there is that I never use 0, 0 for the minimum
> distance and time. I always use some non-zero value there.
>
> You say you took code from a tutorial. Have you tried just using the
> tutorial without modifications? Does that work?
>
> If it works, then the problem is clearly with the modifications you made
> to the tutorial code.
>
> If it does not work, there are any number of possible causes, including
> a bad tutorial.
>
> If you want to try a different starting set of code, you can try:
>
> http://commonsware.com/Android
>
> Download the source to Version 1.9 of my book. The Internet/Weather and
> Service/WeatherPlus examples both use locations. They go a little
> overboard on the permissions, as I too had frustrations with the
> location stuff, during the M5->0.9->1.0 SDK shifts. They definitely work
> under 1.0r1. I'll be trying them on 1.0r2 before the year's out.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
>
> Android Training on the Ranch! -- Mar 16-20, 
> 2009http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
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