oldX is not a defined variable and throws errors in Android WebView. I think...

... it's referring to self.accelerometer.oldX