I am not sure if it is has been stated before, Being able to utilize the phone or tablet camera and render objects in the foreground, and using gps location.

There’s already a free webcam AR solution available

GPS location services will be in 4.15.

How about magnetometer? I need the direction of N or S to determine any mobile device’s tilt in addition to the direction of the gravity and gyroscope.

HandleSensorEvents() in LaunchAndroid.cpp already samples the magnetometer if available, but doesn’t forward on the results. The value is in current_magnetometer and only used to work out the rotation matrix for the orientation.

I can’t find the current_magnetometer value in LaunchAndroid.cpp. Do you know how to get the magnetometer values in 4.18? I would like to calculate the absolute orientation of mobile devices (for both Android and IOS) relative to earth’s gravity and magnetic north.

This is in in 4.18. Look in onSensorChanged().

Thanks for the information. Is this only for Android, or does it also work for IOS? What would be an easy way to forward the magnetometer values? It seems like it requires JNI or UPL, both of which aren’t that well documented. I’m considering just editing the nativeHandleSensorEvents function in the file to pass along the current_magnetometer value, and then edit the corresponding AndroidJNI.cpp and AndroidInputInterface.cpp files to be able to handle the extra values. Or is there an easier way (like AR or VR plugins)?

Hello and sorry to dig up this old post! For the future readers looking to simply leverage GPS and magnetometer data I would like to suggest the Location Toolkit and the Magnetic Field Toolkit, respectively, as complementary answers to the queries in this thread. The objective of these packs is to simplify the access and usage of the GPS/magnetic field data for all users. No code to write, with examples.

Thank you! sorry for the late reply, I got busy.