I\'m working on an augmented reality application in which I have a camera preview screen on which I draw some markers which moves with respect to device movement.
I resolved the issue. It was with my SensorManager. The SensorManager was null when onStart() is executed.I initialized it inside the onStart() and resolved it.