- This topic has 4 replies, 2 voices, and was last updated 10 years, 11 months ago by
support-octavio.
-
AuthorPosts
-
MichaelDziekanMemberDoes anyone know how to use MobiOne to gain access to the iPhone’s internal magnetometer X, Y, Z axis data?
I am trying to write an app that display’s X, Y, and Z axis data, but cannot find anything that is actually useful. I did find stuff related to the accelerometer, but nothing on the magnetometer. I have also found references that talk about how polling the accelerometer and magnetometer are similar, but they did not give any details, so that was not helpful at all!!!
I am using the following ….
0) MobiOne v2.6.2 (20140109)
1) Windows OS version (XP Professional SP3)
2) I am writing in Native iOS Mode for an iPhone 5, Device OS is 6 and 7
Can anyone tell me how to easily read the individual X, Y, and Z axis values of the iPhones magnetometer?
Thanks,
Mike
support-octavioMemberHi Mike,
Have you taken a look at the compass API? If no, you can find it here: http://docs.phonegap.com/en/2.9.0/cordova_compass_compass.md.html#Compass
MichaelDziekanMemberOctavio –
Yes, I did read through this, but the problem is that this only gives a result of a single value from 0 to 360 (359.99) degrees.
The compass is a sensor that detects the direction or heading that the device is pointed. It measures the heading in degrees from 0 to 359.99.
What I am looking for is the X, Y, and Z axis data from the magnetometer, and not the single heading value.
Can you tell me how to access the raw X, Y, Z axis data from the iPhone magnetometer? I will be happy with only the iPhone 5S for now, but I hope to expand it.
Mike
MichaelDziekanMemberOctavio –
By the way, I did find this related to the iOS Developer Library (CMMotionManager), but I don’t know how to apply this using Mobione. I think this is xcode related, so I am unsure how to utilize this.
Mike
support-octavioMemberHi Mike,
I have consulted the dev team and I learned that MobiOne does not provide the lower level of api support you are seeking.
-
AuthorPosts