Okay can I just summarise my problem as I believe it is an issue which
NEEDS to be addressed...

I have confirmation from five users who either have a HTC G1 or HTC
Magic who say my application works fine. However, I have had numerous
recent comments on the Market that the orientation of my applications
interface is rotated 90 degrees on G1/Magic devices.

I use this method to get the screen orientation:
getResources().getConfiguration().orientation;

and remap the coordinate system as follows before drawing the
application interface:

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

}

How can this work fine on some phones and completely break on other
peoples phones which are the same make and model?

This is really disconcerting, and needs to be explained.

On Nov 1, 11:06 pm, mscwd01 <mscw...@gmail.com> wrote:
> Well Niko that may be true but it doesn't change the fact that it
> works fine on an HTC Hero and some G1 & Magic phones.
>
> It should either work or not, having your application work fine on
> some devices and break on other devices is rediculous and its getting
> annoying now.
>
> iPhone here I come :(
>
> On Nov 1, 3:18 am, niko20 <nikolatesl...@yahoo.com> wrote:
>
> > Wait-
>
> > YOu are remapping the coords after rotation? Well then that's where
> > the problem has to be, since clearly Mark has shown that the
> > getOrientation() works correctly....
>
> > -niko
>
> > On Oct 31, 1:25 pm, mscwd01 <mscw...@gmail.com> wrote:
>
> > > 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