Android GPS, Location Manager and Google Map – Tutorial


This Step by Step Tutorial teach you how to get user current location using GPS or Network in android app. And how to add a new Google API Key.

You can get source code of this tutorial from

GPS or Global Positioning System is a network of orbiting satellites that send precise details of their position in space back to earth.

LocationManger class provides access to the system location services. These services allow applications to obtain periodic updates of the device’s geographical location, or to fire an application-specified Intent when the device enters the proximity of a given geographical location.

  1. taybaaslam rani says

    Dell laptop generation 6 with RAM 4 GB ,

    processor Intel core i5 6200U CPU 2.30GHZ to2.40GHZ,

    OS 32BIT, x64-based processor

    it's speed so much slow .and i want to increase the speed of laptop by increasing RAM @t tell me what changes i will make so that android stdio software work very friendly manner and speedy way.?????

    should i buy new laptop for android stdio Software

    sir g recommended me you opinion

    i am waiting your reply
    plz reply me

  2. Parth Desai says

    best one, thanks a lot

  3. Максим Громский says

    Nice dude, you help me.

  4. Linuxuser1234 says

    can you do a altitude app tutoral

  5. low jl says

    Hi, is it possible to save the location into Firebase database ?

  6. misaelmelchia says

    Great tutorial, helps me a lot!

  7. Krishan Pratap Singh says

    i want to open map in fragment activity but i face some problem like gpsTracker =new GPSTracker(getApplicationContext); this code show error help me to solve this problem…

  8. Njoud Almutairi says

    I want to ask about this code Does the code update location ? This code identified my location but when changed my location he did not specify it

  9. wannassi rahma says

    i have no error ,but the map dont show my location ,just google and black interface showed up ???? any help

  10. Shakila Naz says

    how to get the current location lat and lng and store n firebase database????……………

  11. Rohit Menon says

    App is crashing, even after enabling GPS and adding permission. disappointed after doing all this coding.

  12. AB ED says

    Tnx , Brother keep going ..

  13. Mustafa Samancı says

    If your app crashes after run in your phone, try open manually location info on your phone settings.

  14. Saidur Rahman says

    When I tried it, the app crashed even though location was on and the app had permission to access location. When I manually opened the app, it opened. However, it is showing my current location as Googleplex, California and I am in another country altogether. If I give specific latitude and longitudes at LatLng mylocation = new LatLng(latitude1, longitude1); under, it shows the location correctly. But for some reason, it is not being able to get my current location. Any solutions for this?

  15. Harshita Kalsi says

    All the permissions are provided as well as the GPS is On
    The App Is Crashing On Phone 🙁

  16. Thallam Mahesh says

    Hi I am got the unforunately stoped the app.why this like getting error…..

  17. DarkGrisen says

    If you dont wanna talk, make a textbased tutorial with pictures.

  18. Victor M says

    isProviderEnabled <—— cannot resolve symbol. Help anyone?

  19. Manel Hkiri says

    thank you so much but how can I do if I want to show this location in a fragment in Navigation Drawer ???

  20. Mr. B.N. TEWARI says

    App crashed due to nullPointerException at "mlocation.getLatitude()", Unable to understand the reason.

Leave A Reply

Your email address will not be published.