Well then this is extremely confusing!

Firstly, thanks Mark for taking the time to test it.

The only other thing which could be wrong is how the coordinate system
is represented in each device. I draw to the screen once I have
remapped the coordinate system i.e.:

if(screenOrientation == 1) {  // Portrait
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_MINUS_Z,
SensorManager.AXIS_X, outR);
}
else { // All other send to Landscape
  SensorManager.remapCoordinateSystem(R, SensorManager.AXIS_X,
SensorManager.AXIS_Z, outR);
}

However, this shouldn't be an issue should it?

On Oct 31, 6:19 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> mscwd01 wrote:
> > Okay this is getting really rather annoying now.
>
> > I have used both of the following methods of getting the screen
> > orientation and both do not work properly on different devices.
>
> > Method 1:
> > Display display = ((WindowManager) getSystemService
> > (WINDOW_SERVICE)).getDefaultDisplay();
> > int screenOrientation = display.getOrientation();
>
> > Method 2:
> > int screenOrientation = getResources().getConfiguration().orientation;
>
> > Both methods work fine on the HTC Hero; however, they both fail on the
> > G1 and G2 devices (according to the users of my app).
>
> > How can we be expected to make high quality applications if the API is
> > not supported on all devices???
>
> > I would be very greatful if someone could offer a solution to this,
> > its just not acceptable.
>
> I just tested this on a G1, and
> getResources().getConfiguration().orientation is 2 in landscape and 1 in
> portrait, just like it should be.
>
> I also tested it on an HTC Magic, and it works just fine.
>
> Heck, it even works on an ARCHOS 5 Android tablet.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org

-- 
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