I tried many code snippets but all the example takes too much time to provide latitude and longitude .
I want to get current latitude in every 5 seconds .
you can check and integrate this library which is a wrapper for google play services location which also handles permissions.
google location
In this lib you can find various methods to set param