It's probably really cool from what I've heard. We use a similar application of our own, so I haven't tried yours yet. But it looks like you did a great job there.
On Sep 8, 9:44 am, Peli <[EMAIL PROTECTED]> wrote: > > Thanks very much, but I won't need the SensorSimulator. > > Shhh... even if you won't need it, in this public forum you should > say: "Wow! This SensorSimulator looks so cool! I have to try it > out!" :-) > > Peliwww.openintents.org > > > > > I just wanted to check if I did anything wrong or this is actually a > > design change: The sensors in the emulator used to return default > > values, which was more useful in some cases. > > > On Sep 7, 11:42 pm, Peli <[EMAIL PROTECTED]> wrote: > > > > The Android emulator is currently set up so that it returns that no > > > sensors are available. > > > (you can check this with the SensorsManager method getSensors() which > > > returns 0). > > > > One way to simulate sensors on Android is to use the OpenIntents > > > SensorSimulator: > > > >http://www.openintents.org/en/node/6http://www.openintents.org/en/dow... > > > > This can simulate orientation, accelerometer, and compass sensors, > > > (even the temperature sensor), through the same API that Android uses. > > > One only needs to replace the system's SensorManager by the > > > OpenIntents SensorManager. Please have a look at the samples provided > > > with the download there (OpenGLSensors and ApiDemosSensors) to see how > > > to set things up. > > > > Let me know if you have further questions. > > > > Peliwww.openintents.org > > > > On 7 Sep., 15:30, max <[EMAIL PROTECTED]> wrote: > > > > > I'm trying to access the sensors under the new 0.9 SDK. But I just > > > > don't get it to work. I distilled the essential code from the API > > > > demos, but registerListener() always returns false and I get this on > > > > logcat: "W/SensorService( 46): could not enable sensor 1". This is > > > > the code: > > > > > public class TestActivity extends Activity { > > > > > @Override > > > > public void onCreate(Bundle savedInstanceState) { > > > > super.onCreate(savedInstanceState); > > > > mSensorManager = > > > > (SensorManager)getSystemService(Context.SENSOR_SERVICE); > > > > setContentView(R.layout.main); > > > > } > > > > > @Override > > > > protected void onResume() > > > > { > > > > super.onResume(); > > > > mSensorManager.registerListener(mListener, > > > > SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_GAME); > > > > } > > > > > @Override > > > > protected void onStop() > > > > { > > > > mSensorManager.unregisterListener(mListener); > > > > super.onStop(); > > > > } > > > > > private SensorManager mSensorManager; > > > > private final SensorListener mListener = new SensorListener() { > > > > public void onSensorChanged(int sensor, float[] values) { > > > > Log.i("*****","SENSOR CHANGED"); > > > > } > > > > }; > > > > > }- Zitierten Text ausblenden - > > > > > - Zitierten Text anzeigen -- Zitierten Text ausblenden - > > > - Zitierten Text anzeigen - --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

