Hi Peli,
There are still a few things to update in the documentation at
http://code.google.com/p/openintents/wiki/SensorSimulator
such as
Intent.VIEW_ACTION => Intent.ACTION_VIEW
and the requirement to have in the manifest
<uses-permission android:name="android.permission.INTERNET"/>
but otherwise things mostly worked very nicely. However,
SensorManager sensorManager = (SensorManager)
getSystemService(Context.SENSOR_SERVICE);
ok = sensorManager.registerListener(sensorListener,
SensorManager.SENSOR_ORIENTATION,
SensorManager.SENSOR_DELAY_NORMAL);
for me still returns false for "ok". Do I need to replace these by
some OpenIntents equivalents?
What are the OpenIntents counterparts of
import android.hardware.SensorListener;
import android.hardware.SensorManager;
Thanks
On Sep 7, 9:06 am, Peli <[EMAIL PROTECTED]> wrote:
> Hi blindfold,
>
> > How can I have a simple switch (in Eclipse) during
> > the development cycle such that I can easily build with and without
> > the OpenIntents Sensor simulator?
>
> By default, the SensorManagerSimulator transparently passes requests
> to Android's internal sensor, so if you remove the line
> requiresOpenIntents() and deactivate the menus for Settings and
> Connect, you have your original functionality back. (even though OI
> code remains that increases your apk file size).
>
> If you completely want to get rid of OI code, I guess there is no way
> other than manually removing the lib from your project and commenting
> out the two additional OI code sections in your code - which is
> quickly done.
>
> Maybe you can set up two projects in Eclipse: One is your original
> project, and the second one is your test project that depends on the
> first project, but additionally contains the lib. I haven't actually
> tried this, and I don't know if it is worth the effort, given that one
> can easily add lib + code section in a few minutes and remove them
> (remove lib and comment out code) before distribution in a few seconds
> without leaving any traces.
>
> Let me know if you have further questions.
>
> Peli
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---