Update GPS function

This is the version 2 of GPS function. I created another java file instead putting all the codes on mainactivity.java