How to read Sensors from home screen Widget (1.5 cupcake)?

Tutorials with advanced 'difficulty' and more Lines of Code.

How to read Sensors from home screen Widget (1.5 cupcake)?

Postby pcm2a » Tue Aug 11, 2009 5:03 pm

Hey all, I have been messing with this for days but have gotten no where. I can get an app to work that creates a home screen widget (extends AppWidgetProvider) and I can also get an app to work that reads Sensor data (extends Activity). What I can't seem to get working is a home screen widget that reads sensor data!

It doesn't appear that you can use SensorManager, SensorListener, etc inside of a widget that extends AppWidgetProvider.

The next thing I tried was having a separate class that extends Activity whic handles my Sensor data, then creating an instance of that class inside my Widget, but no sensor data ever populates.

Any tips is appretiated!
pcm2a
Developer
Developer
 
Posts: 27
Joined: Tue Aug 11, 2009 4:54 pm

Top

Return to Advanced Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests