Seperated the sensor event lisner tasks form the Main Activity into a
new class.
Solved the saving to file issue.