I am experiencing the same issue as well.  I am assuming this is the
case because the emulator doesn't have a sensor service.  However my
understanding of the API is that the method call should return null if
the service is not available.

What should we expect to happen on real devices which do not have the
sensor service?  Unlimited wait (unacceptable, really), return null,
or something else?

Thanks...

On Apr 29, 3:07 am, ad <avra...@gmail.com> wrote:
> Thanks for quick response,
> The problem was somewhere else:
> m_sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
>
> it hangs,so the next line wasn't called
> setContentView(gameView);
>
> Sorry for the not being precise, but I don't know why getSystemService
> (SENSOR_SERVICE) causes the problem now? Is it depreciated?
> I would like to know how to make it now compatible to all versions.
>
> AA
>
> On Apr 28, 11:41 pm, Jon Colverson <jjc1...@gmail.com> wrote:
>
> > On Apr 28, 12:56 pm, ad <avra...@gmail.com> wrote:
>
> > > The problem is that surfaceCreated is not called :
> > >                 SurfaceHolder mSurfaceHolder = getHolder();
> > >                 mSurfaceHolder.addCallback(this);
> > >                 setFocusable(true);
>
> > >                 waitForScreen(); - here I untill surfaceCreated change 
> > > variable that
> > > it's ready,but it's never called.
>
> > surfaceCreated() is getting called for me in the 1.5r1 emulator. Can
> > you give a bit more detail about what you're doing? Does waitForScreen
> > () spawn another thread and return?
>
> > --
> > Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to