I would say that you should not to whatever it is that you are trying to do. It looks like you want to persist a sensor listener via an AppWidget. Please don't. If you must... use a Service.
On Aug 11, 9:28 am, pcm2a <[email protected]> wrote: > Hey all. I am having a difficult time figuring out a way to read the > sensor data from a home screen widget. > > I can successfully create a home screen widget that extends > AppWidgetProvider. > I can successfully create a stand-alone application that reads sensor > data (extends Activity). > > What seems to be impossble (for me) is combining them into a home > screen widget that reads sensor data. The classes that you have to > use, like SensorManager, SensorListener all seem to require an > Activity which the AppWidgetProdiver doesnt have. > > I have also tried keeping my sensor data reader in a separate class > that extends Activity and then instantiating that class in my widget. > Makes sense in my head but no data is ever read from the sensors. > > Any tips or examples of how this works is appretiated! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

