Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
i assume face up / face down orientation is possible on the new iPhone 3GS devices using the magnetometer and i'd like to know if Apple supplies sample code for this? also, since most iPhone OS devices currently wouldn't support this, is it possible to poll for the device specifically for iPhone 3GS? the UIDevice class notes in the documentation is unclear and only suggests @"iPhone" or @"iPod touch" as possible model strings.
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
You can detect face up / face down orientations using just the accelerometer; no need to use the magnetometer. So, you don't need to restrict this functionality to 3GS devices.
 

Darkroom

Guest
Original poster
Dec 15, 2006
2,445
0
Montréal, Canada
You can detect face up / face down orientations using just the accelerometer; no need to use the magnetometer. So, you don't need to restrict this functionality to 3GS devices.

what?! really? i have never seen anything in the documentation concerning this. maybe i wasn't clear with my question. say i have a device that's laying face up on the table. if i turn the device 45º while it is laying face up on the table, the accelerometer will detect this shift and change orientations?
 

dejo

Moderator emeritus
Sep 2, 2004
15,982
452
The Centennial State
maybe i wasn't clear with my question. say i have a device that's laying face up on the table. if i turn the device 45º while it is laying face up on the table, the accelerometer will detect this shift and change orientations?
Oh, that's different. That's not the same as the difference between face up and face down. But it still is possible to detect the movement using the accelerometer, although not the actual heading, from such a change. Usage of the AccelerometerGraph sample app bears this out.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.