I get the accelerometer values in iOS as follows
if (motionManager.accelerometerAvailable) {
NSLog(@"Accelerometer avaliable");
[motionManager startAccelerometerUpdatesToQueue:[NSOperationQueue currentQueue] withHandler:^(CMAccelerometerData *accelerometerData, NSError *error) {
if (!error) {
NSLog(@"raw_accel_X==%f,date=%@",accelerometerData.acceleration.x,[NSDate date]);
NSLog(@"raw_accel_Y==%f,date=%@",accelerometerData.acceleration.y,[NSDate date]);
NSLog(@"raw_accel_Z==%f,date=%@",accelerometerData.acceleration.z,[NSDate date]);
}];
If I do not move Iphone, I get data between -1 and 1, if I do not move my Android device. I get values around 9. What should I do to match the values of the original accelerometer in iOS for Android? Any update on this?
source
share