I'm developing an app in Android Studio that takes the location of the device and returns me in latitude and longitude, I use it later to make a bookmark. However, if I install the application on my Smartphone in one neighborhood and go to another the Application does not open any more, it is giving execution error. I believe it only runs the code only once, so I would like to know a command for the Application to always update the code every 2 seconds or anyone who knows another solution to my problem would appreciate the help.