Getting GPS location is a very different thing than hooking into the orientation sensors. For GPS, you fire off (at certain intervals) or as it seems in your response, upon turning on the screen. I'd imagine it is not hooked to the screen turning on, to be honest, but tied to other events or timers. But I don't have access to a Hero to know what is the case exactly. So from your response, I am guessing you are trying to make a compass widget so you can just go to your home screen and check which way you are headed? Updating the Widget constantly to display your bearing is going to be very very costly. This seems unnecessary, especially since you are bound not to need to know your bearing all the time. If this is what you are doing, I would highly recommend you create a Compass activity that you can open when needed. That being said... As I indicated before, you should look into using a service to listen for orientation events then push them out to the widget. If the Hero widget truly does update your location when you turn the screen on, then it probably has a broadcast listener that listens for the screen on event, and fires off a service to pull down GPS coordinates and the corresponding weather information, then pushes that data out to the widget.
On Aug 12, 6:33 am, pcm2a <[email protected]> wrote: > The main Hero widget is a clock with the weather. Every time you turn > your screen on, it reads your gps locations and gives you the weather > in that location. It is obviously reading the gps sensor from the > widget. I am looking to do something similar, except I want to read > the compass. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

