How to design a location tracking App using GPS in Android Studio - source code?

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • This video shows the steps to create an App which uses Google Map to give the precise location of your phone. This app can be used to track your current position. In the initial part of the video it shows how to create API Key to have the access of the google Map.
    This custom app works offline based on GPS and you do not need internet connection to get your current location.
    For 2nd part of this tutorial please refer to the below video: • How to track your loca...
    Complete Source code is available at:
    programmerworl...
    We will be glad to hear from you regarding any query, suggestions or appreciations at: programmerworld1990@gmail.com
    I am pasting the main method code below (for complete class please contact):
    public void onMapReady(GoogleMap googleMap) {
    mMap = googleMap;
    // Add a marker in Sydney and move the camera
    LatLng sydney = new LatLng(-34, 151);
    mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
    locationListener = new LocationListener() {
    @Override
    public void onLocationChanged(Location location) {
    try {
    latLng = new LatLng(location.getLatitude(), location.getLongitude());
    mMap.addMarker(new MarkerOptions().position(latLng).title("My Current Position"));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
    }
    catch (SecurityException e){
    e.printStackTrace();
    }
    }
    @Override
    public void onStatusChanged(String s, int i, Bundle bundle) {
    }
    @Override
    public void onProviderEnabled(String s) {
    }
    @Override
    public void onProviderDisabled(String s) {
    }
    };
    locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
    try {
    locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_UPDATE_TIME, MIN_UPDATES_DISTANCE, locationListener);
    }
    catch (SecurityException e){
    e.printStackTrace();
    }
    }
    }

Комментарии • 307

  • @dita9760
    @dita9760 Год назад +1

    Sir, you really save my life. God bless you and your family

  • @YSNR.25
    @YSNR.25 4 года назад +1

    The marker shows up but not the actual google map. Just shows a red marker on an empty page.

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      That is because your maps has not been downloaded in your App. This usually happens when there is network issues and internet is not accessible or it is very slow. The marker shows up because it is independent of network. It uses phone's gps to get the coarse location.
      I will recommend to check your mobile data or wifi in your phone. If you are trying on the emulator then please check if other Apps, such as Play Store, is able to access the internet. For emulator sometimes you may have to do proxy settings if you are in a LAN environment. You can do the proxy settings from the Android Studio->Settings window. Just search for http in the settings window.
      Hope above details helps in resolving the issue.
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @YSNR.25
      @YSNR.25 4 года назад

      @@ProgrammerWorld The map and marker are now showing but the marker is in GooglePlex , USA. Is this because I am using an emulator and not a real phone?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      @@YSNR.25 Yes, exactly. It shows California USA, because you are using emulator. Emulator can't access your location information from your laptop as GPS functionality is not available and Network location information is not shared by the laptop's OS. So, it takes the default location to be at Google center in US.
      In real phone it should work as the App will have access to both GPS (Coarse) location and Network (Fine) Location.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @Ken_Shao
    @Ken_Shao 4 года назад +6

    10:01 Once I start to type the exact same code in line 29 & 30, it show ActivityCompat is not cannot be resolved. Could you help me?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +3

      For ActivityCompat, you may have to import the following package in your java code:
      import android.support.v4.app.ActivityCompat;
      In Android Studio, it should automatically import the packages used in the code. However if it is not doing then you can try adding it manually. You can also refer to the below page where I have shared complete source code shown in this tutorial:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Hope it helps. Good luck!

  • @matthewfeatherston8982
    @matthewfeatherston8982 5 лет назад +3

    Hi thanks for the video works awersome!!! Hi just comment out the following lines your code to get the Sydney pointer off the map
    // Add a marker in Sydney and move the camera
    //LatLng sydney = new LatLng(-34, 151);
    //mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
    //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));

  • @sj5558
    @sj5558 4 года назад +6

    sir i would like to know can we make it run in background always so that we can register a number in it and we should be able to send the location every 1 hr that's 24 hrs a day 24 messages per day..
    it would be useful right??

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +5

      Yes, sure that is possible. You should watch my below videos to get the steps on creating foreground services which keeps on running in background even when the App is closed.
      ruclips.net/video/MRm6NgZlmDc/видео.html
      ruclips.net/video/xxC4-BLNSSc/видео.html
      Cheers
      programmerworld.co/

    • @mridulakulkarni4846
      @mridulakulkarni4846 3 года назад

      @@ProgrammerWorld mlmmmmmmkmmmm knkkknkknkkkkknkn kknnkkkmkm.. Mmkm mmmmmmm n

    • @mridulakulkarni4846
      @mridulakulkarni4846 3 года назад

      @@ProgrammerWorld kknnkokkokkkokokknkk nnkk kk kn knn jonkokoknkokoknjoo kioki

    • @mridulakulkarni4846
      @mridulakulkarni4846 3 года назад

      @@ProgrammerWorld ookkkkok kk

  • @austingeorge5827
    @austingeorge5827 4 года назад +1

    I am getting error in a statment
    locationManager=(LocationManager) getSystemService(LOCATION_SERVICE);
    Can you help me out??plz

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      What is the error? Can you please give more details?
      Cheers
      Programmer World
      programmerworld.co
      -

    • @austingeorge5827
      @austingeorge5827 4 года назад

      @@ProgrammerWorld its ok, i fixed it

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Great 👍👍
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @eggwarrior5630
    @eggwarrior5630 3 года назад +2

    Sir could you do a project for one tap emergency SMS which will trigger the alarm sound as well as the video camera. I'm doing this for my FYP and im struggling cuz im not familiar with android studio and don't know where should i start. It will be great if you can help me. Thanks in advance

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      Thanks for the suggestion. Will try to create some material as you suggested. However, some of the things are already available in my below videos:
      ruclips.net/video/pajvuBZc2WA/видео.html
      ruclips.net/video/KAKn6XdMaxM/видео.html
      Cheers
      Programmer World
      programmerworld.co
      -

  • @esthermwangi5093
    @esthermwangi5093 3 года назад +1

    Great work done by this guy

  • @gandeevpotnuru4815
    @gandeevpotnuru4815 3 года назад +2

    according to you how we could be good in making apps from beginners to expert. what are the sources you recommend us to understand the complexity of making the apps and sites

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      This is very subjective question. However, in simple words:
      1. Take a basic tutorial from some trainer.
      2. Ensure you know the programming (any language: C/C++, Java).
      3. Then practice - you can refer to my channel for practice exercise.
      Also, you can refer to my below webpage for lots of practice exercise on Android App development:
      programmerworld.co/android/
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @smokinamby
    @smokinamby Год назад

    This works, if it's in the main activity, but if I put the same code into a service it starts bugging out after restarting the phone when the service is set boot with the device. Any ideas? If the code is in the main activity, it will call on status changed then I have 1 toast to confirm this happened then it will gather location every now and then. If it's in the service the location gets gathered, it will show the toast MULTIPLE times, then it gathers the location? I'm expecting 1 toast then gathering location. It can toast everytime after it polls the location, but it shouldn't be giving more than 1 toast per location grab. As stated, when the code is in the main activity it works as expected 1 toast per 1 location grab. I need ideas.

    • @ProgrammerWorld
      @ProgrammerWorld  Год назад

      Most likely, when the code is in the service class, it is repeatedly getting called due to frequent call to service class by the Android OS. Now, since there is no way for the class to know whether the Location has changed from the previous known location, so probably it calls onLocationChanged every time the service class is called.
      Probably, one way to avoid this would be by updating the last location information in the app using the FusedLocationProviderClient API. Below webpages may help:
      programmerworld.co/android/how-to-get-the-device-last-location-using-gps-network-without-using-map-layout-in-your-android-app/
      programmerworld.co/android/how-to-requestlocationupdates-if-locationservices-getfusedlocationproviderclient-getlastlocation-always-return-null-value-in-your-android-app/
      For reference, details shown in this video is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @princeama1419
    @princeama1419 2 года назад

    hi, can you please do a tutorial how to know the distance from a phone to a laptop using Bluetooth tracking please please . I
    need your help by using java if I may .

  • @prasanths4469
    @prasanths4469 Год назад

    i am not able to find google maps api file what to do?

  • @housseinibocoum6844
    @housseinibocoum6844 2 года назад

    hello sir how are You ? THNAKS for this video it was very helpul .i wanna make an app which will search a place location and i need help

  • @ashaelizabeth9296
    @ashaelizabeth9296 4 года назад +1

    Sir can you please share me the link for next video that you mentioned in the Location Tracking video

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      You can watch next videos in this series using below links:
      1. How to send location coordinates offline without internet over SMS: ruclips.net/video/FknRti6n_F8/видео.html
      2. How to send location information using Firebase database: ruclips.net/video/hyi4dLyPtpI/видео.html
      3. How to get exact location information and address using the latitude and longitude coordinates: ruclips.net/video/Nsl99WWDFxM/видео.html
      I hope above tutorials helps you.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @delacruzneiltyronev.7849
    @delacruzneiltyronev.7849 2 года назад

    I just one question sir how can I show the marker quicker because sometime when i open the app it takes time to show the marker on the map thankyou for this tutorial

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад +1

      mMap.addMarker method call is responsible to add the markers in the maps. Now, once the Map is loaded and ready in the App (calls onMapReady method) then only the marker can be added. To speed up the loading, you can check for this method in the onCreate method of your App. It may help.
      For reference, the complete source code shown in this tutorial is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

    • @delacruzneiltyronev.7849
      @delacruzneiltyronev.7849 2 года назад

      @@ProgrammerWorld thankyou man I will try and I'll be back here

  • @abeerai4107
    @abeerai4107 5 лет назад +1

    I'm a newbie to Unity and App development. I want to create an AR navigation app in Unity using the Mapbox SDK and I've been told that it's possible by combining the world scale AR example with the Traffic and Directions example but I can't figure out how. Any ideas?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Yes, you are right. It is possible to create AR navigation App in unity using world scale AR example with Mapbox SDK. I do not have video tutorial to explain how to do it, but you can refer to below link which gives further details on how it can be done. I hope it helps:
      docs.mapbox.com/unity/maps/examples/world-scale-ar/
      Right now I am focusing on creating Android tutorial. I need support from my audience by subscribing to my channel so that I can create more tutorials to help my audience.

  • @kempi2807
    @kempi2807 2 года назад +1

    Hi. I'm just starting to write programs in the android studio and I have already found one of your videos for which thank you very much. I have a question. is it possible to set the default distance from the marker of our position in this script? do you have to zoom in from the continent and countries each time? I would like to enter the location in my future application, but I would like it to immediately show my position in the area, e.g. 50km from me. will it be difficult to implement? Regards.

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад +1

      In the moveCamera method's parameter, please use either CameraUpdateFactory.newLatLngBounds or CameraUpdateFactory.newLatLngZoom to set the camera view at a particular zoom level.
      In the code shown in this video, below line is used which takes default zoom level at the given lat and lng:
      mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
      For reference, the complete source code shown in this video is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

    • @kempi2807
      @kempi2807 2 года назад

      @@ProgrammerWorld thx man ! Program work but in my position i have many markers. Every 1 second app create new one. Maybe i can change some code, and new Mark show when i change my position , but not than 1 second. Have you some advice for that? What do you think, maybe i can add Button , and when i click on it , program refresh position? Or maybe its possible on your code and i dont know how 😁

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад +1

      Change below variables in your code:
      private final long MIN_TIME = 1000; // 1 second
      private final long MIN_DIST = 5; // 5 Meters
      The markers is placed when either of above is true. That is, either every 1 second or every 5 meters distance change.
      For reference, the complete source code shown in this video is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @olaahmadfuad451
    @olaahmadfuad451 4 года назад +1

    Can I do the same technique but with some changes for indoor by BLE beacon ?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Conceptually it should work as the tracking mechanism remains same. However, I have never tried myself to map the location based on Bluetooth beacon sensor data.

  • @raphii5952
    @raphii5952 2 месяца назад +1

    Nice

  • @kratikamundra6077
    @kratikamundra6077 2 года назад

    Hii sir, I have used the same code to create this app but it keeps stopping as soon as I open it.......please help me why is it happening?

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад

      Try to debug and check for the reason of crash. Most likely the onCreate method is crashing. Better put a try-catch for smooth handling. Also, crashes during the start is most of the times due to null pointer exceptions. Please debug and check.
      For reference, the complete source code shown in this tutorial is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @meghashivwanshi7291
    @meghashivwanshi7291 4 года назад

    hello sir... my location showing Sydney...my current location not showing...

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Sydney is the default location. If your current location is not getting updated, then it means either the location services (GPS or network) is not working in your phone or in your App's code it is not reaching the location listener part of the code. I will suggest to debug the code and check the flow of your code.
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @misfit963
    @misfit963 2 года назад

    Hi sir thankyou for this, i wanted to know how can we make a login and register thing so that we can integrated it with this and keep the data base also

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад

      You will need a database to store user credentials and then match it against the login page. So, the login page will depend on the db. There are many videos on various database, such as Firebase and MS SQL, on my website:
      programmerworld.co/android/
      Also, below page can help to design multiple pages/ layout in your App:
      programmerworld.co/android/how-to-create-multiple-layouts-and-menu-items-in-your-android-app-switch-layout-and-exit-menu-options/
      Hope above helps. For reference, the complete source code shown in this tutorial is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @eunhaklee5760
    @eunhaklee5760 4 года назад

    sir the app is running fine but it is not showing my position and only shows marker in sydney

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      It may take sometime in the first run, so wait for 4-5 mins if it is first run. Also, please ensure that internet is available during the first run (to download the map) and GPS satellites is accessible for getting updated location (go outdoors is possible).
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @eunhaklee5760
      @eunhaklee5760 4 года назад

      @@ProgrammerWorld thank you

  • @farahfekih6802
    @farahfekih6802 Год назад

    It works !! Thank you !

  • @praweenkumar8090
    @praweenkumar8090 3 года назад +1

    hello sir, i m doing women safty security with GPS project
    but sir i don't how to connect GPS system in my project
    so plz sir can u suggested me sir plz
    i m learner
    i saw your vedio sir ,its very interesting sir
    so plz help me sir

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад +1

      I think this video should have helped in learning the connection to GPS in your App. Also, you can watch my below videos for further information on location tracking applications:
      ruclips.net/video/hyi4dLyPtpI/видео.html
      ruclips.net/video/FknRti6n_F8/видео.html
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @praweenkumar8090
      @praweenkumar8090 3 года назад

      @@ProgrammerWorld okk sir thank you

    • @praweenkumar8090
      @praweenkumar8090 3 года назад

      Sir can u give me whatsApp no.
      Plz send me no. On Gmail plz

  • @danielravichandran3266
    @danielravichandran3266 4 года назад +2

    Hello Sir. I am using your tutorial to make a system which tracks the movement of a vehicle. In your tutorial, you have used marker to show the path right? What can I do to make it a straight line?
    Also, I would like to use external GPS coordinates that are received to my phone by bluetooth. How can I do this?
    Your help is highly appreciated.
    Regards.

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +1

      For getting it in straight continuous line you can put the marker more frequently however it may not appear very nice. Will check on how to get aesthetically appealing tracking in map.
      For 2nd question, you should watch my below video which shows steps on how to pass/send the latitude and longitude coordinates to another phone through SMS. Of course, you will have to adapt it for transfer of data over Bluetooth:
      ruclips.net/video/FknRti6n_F8/видео.html
      If interested you can watch my below video which shows steps to convert latitude and longitude coordinates into an actual address:
      ruclips.net/video/Nsl99WWDFxM/видео.html
      Cheers
      programmerworld.co

    • @danielravichandran3266
      @danielravichandran3266 4 года назад +1

      @@ProgrammerWorld Thank you sir for your response. I am a beginner and hence have limited knowledge. As far as I checked, it is possible by using Polylines. Could you please have a look into this? My idea was to include a polyline function and call it in place of marker.
      I did try the sms tutorial. While the location tracking worked, the sms part did not. The initial request for sms permission also did not work. I tried both in emulator and phone. And then I copied the code from your site too. It still did not work. Could you please help me out here?
      Thank you

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      I will check Polylines command as mentioned by you. Regarding the SMS communication, did you try the source code in my below webpage:
      programmerworld.co/android/how-to-send-sms-automatically-from-your-phone-by-programming-in-android-studio-java-code/
      If yes then can you please let me know the error you are getting? Can you please share your complete code so that I can try at my end.
      Cheers
      programmerworld.co

    • @danielravichandran3266
      @danielravichandran3266 4 года назад

      @@ProgrammerWorld Thank you for your response. Please do let me know when you are done with polylines.
      I had copied from your link. The problem is that it is compiling but showing no error. But the sms part doesnt work. I have given my code below:
      package com.example.locationtracker;
      import androidx.core.app.ActivityCompat;
      import androidx.fragment.app.FragmentActivity;
      import android.Manifest;
      import android.content.pm.PackageManager;
      import android.location.Location;
      import android.location.LocationListener;
      import android.location.LocationManager;
      import android.os.Bundle;
      import android.telephony.SmsManager;
      import com.google.android.gms.maps.CameraUpdateFactory;
      import com.google.android.gms.maps.GoogleMap;
      import com.google.android.gms.maps.OnMapReadyCallback;
      import com.google.android.gms.maps.SupportMapFragment;
      import com.google.android.gms.maps.model.LatLng;
      import com.google.android.gms.maps.model.MarkerOptions;
      public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
      private GoogleMap mMap;
      private LocationManager locationManager;
      private LocationListener locationListener;
      private final long MIN_TIME = 1000;
      private final long MIN_DIST = 5;
      private LatLng latLng;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_maps);
      // Obtain the SupportMapFragment and get notified when the map is ready to be used.
      SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
      .findFragmentById(R.id.map);
      mapFragment.getMapAsync(this);
      ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.SEND_SMS}, PackageManager.PERMISSION_GRANTED);
      ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}, PackageManager.PERMISSION_GRANTED);
      ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.INTERNET}, PackageManager.PERMISSION_GRANTED);
      }
      /**
      * Manipulates the map once available.
      * This callback is triggered when the map is ready to be used.
      * This is where we can add markers or lines, add listeners or move the camera. In this case,
      * we just add a marker near Sydney, Australia.
      * If Google Play services is not installed on the device, the user will be prompted to install
      * it inside the SupportMapFragment. This method will only be triggered once the user has
      * installed Google Play services and returned to the app.
      */
      @Override
      public void onMapReady(GoogleMap googleMap) {
      mMap = googleMap;
      // Add a marker in Sydney and move the camera
      LatLng sydney = new LatLng(-34, 151);
      mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
      mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
      locationListener = new LocationListener() {
      @Override
      public void onLocationChanged(Location location) {
      try {
      latLng = new LatLng(location.getLatitude(), location.getLongitude());
      mMap.addMarker(new MarkerOptions().position(latLng).title("My position"));
      mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
      String phoneNumber = "9999";
      String myLatitude = String.valueOf(location.getLatitude());
      String myLongitude = String.valueOf(location.getLongitude());
      String message = "Latitude = " + myLatitude + "Longitude=" + myLongitude;
      SmsManager smsManager = SmsManager.getDefault();
      smsManager.sendTextMessage(phoneNumber,null,message,null,null);
      }
      catch (Exception e){
      e.printStackTrace();
      }
      }
      @Override
      public void onStatusChanged(String provider, int status, Bundle extras) {
      }
      @Override
      public void onProviderEnabled(String provider) {
      }
      @Override
      public void onProviderDisabled(String provider) {
      }
      };
      locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
      try {
      locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, MIN_TIME,MIN_DIST,locationListener);
      locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,MIN_TIME,MIN_DIST,locationListener);
      }
      catch (SecurityException e){
      e.printStackTrace();
      }
      }
      }

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Your code looks good and it should work at your end as well. Just a quick question, have you defined the required permission (Access to coarse and fine location) in your App's manifest file? I think that could be the reason for your SMS sending and reading permission issue. If possible, can you please share your manifest file as well?

  • @avijnasharma5121
    @avijnasharma5121 3 года назад +1

    Hello sir could you please do android studio app on my journey tracker thank you ☺

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      I think project shown in the below link will help to create a journey tracker App and keep a log of locations visited using a database (Firebase database):
      programmerworld.co/android/create-location-tracking-android-app-by-exchanging-location-information-over-firebase-database/
      Cheers
      Programmer World
      programmerworld.co/
      -

  • @Abcdfftjjjj13
    @Abcdfftjjjj13 4 года назад

    hello sir great video
    I have qustione I am trying to develop and app that is linked to smartwatch the app should track the smartwatch location..,should I develop app for the wear also to get the location or should I develop a watch face and get lotion form or is their another solutions
    thank you

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      I will suggest the best option is to develop an App for smartwatch wear.
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @surenderthyagarajan4770
    @surenderthyagarajan4770 5 лет назад

    umm..... for me it doesnt get updated on my mobile phone the marker is still in sydney no matter i give location access or i reinstall the app.PS: my internet connections are good

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Then please debug the code and check where it is failing.
      Concept of this App is very simple. You get your position based on gps data and network access to your App. That translates to latitude and longitude values. And finally, marker is moved based on these updated values.

  • @ezefiol
    @ezefiol 3 года назад

    Please can you help me? I do everything and it doesn't trigger the app, it crashes.

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      Debug your code, put a break point and see where the App crashes. Also try to wrap the part of the code using try-catch to better handle the exceptions thrown. Let us know the exception the App is throwing (when it crashes) and we will look into the issue.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @dim12-be-evolution
    @dim12-be-evolution 2 года назад

    maybe monitoring the logcat(bottom of AS window) might be a good idea from time to time :)

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад

      Hey … yes, nice suggestion.
      Thanks
      Programmer World
      programmerworld.co
      -

  • @rangaswamy2136
    @rangaswamy2136 4 года назад

    Hi I installed the app and it is working , but there is one problme if I am zoom in I am getting many locations not only one location of mine....can you help me out with that.

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +1

      Because in the code, I have just shown to add markers. I am not clearing them up for every location update. So, whichever points you move to, those will show on the map as static markers.
      To refresh it, you will have to clear the map on the update of location listener before adding the marker. This way the map will just show your live location with the marker.
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @rangaswamy2136
      @rangaswamy2136 4 года назад

      @@ProgrammerWorld okay know I shared my app by apk extracting the app installed in other mobile through apk is not showing the map and location ..pls can u help me.

  • @RaviPatilUASDharwad
    @RaviPatilUASDharwad 4 года назад

    package is transferred in the emulator device . then it saying that "com.example...." has stopped , if i click again then it says keeps stopping

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Basically, your App is crashing in the onCreate method itself. I will suggest you debug the code and check the reason for the crash.
      If required, you can refer to my below video for steps on debugging:
      ruclips.net/video/Y_y2jR1GSC8/видео.html
      Also, if needed, you can refer to the complete source code of this tutorial at the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @duffkelvinnavarro1910
    @duffkelvinnavarro1910 3 года назад

    hello sir the application is working but whenever it changes the location new pinpoint appear then the previous pinpoints will remain. how can i remove those previous pinpoints and only have the newest one. The other problem is, we tried this on 4 different phones, for the 2 phones it run smoothly it can locate the exact location no problem at all (just the pinpoint) but for the other 2 it cant locate its location. and for the last one, is it possible to draw an object in the map? for example a circle with a pin point located at the center. Thank you!!!!!

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      - how can i remove those previous pinpoints and only have the newest one.
      Just add mMap.clear() to remove all the markers before adding the new marker.
      - The other problem is, we tried this on 4 different phones, for the 2 phones it run smoothly it can locate the exact location no problem at all (just the pinpoint) but for the other 2 it cant locate its location. and for the last one
      Just ensure that GPS and Data network is ON and location access permissions (Coarse and Fine) both are granted to the App in the phone. Also, sometimes in some phones there may be restriction on using certain permissions for the user Apps. Just check that by going to Settings->Apps->Permission. A quick fix for this will be to just reinstall the App after removing the App (including the App data).
      - is it possible to draw an object in the map? for example a circle with the pin location in the center of the circle.
      There are lots of properties of markers which allows to customize the shape, color, size, etc. of the marker. As of now we do not have a video to show this but below page will help you with this:
      developers.google.com/maps/documentation/android-sdk/marker
      Hope above details helps.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @Ak_ak2024
    @Ak_ak2024 2 года назад

    Hi bro, I want to trace the geolocation of some devices which are locally connected via ethernet mode. Is there any free API to embed this feature?

  • @Vrushasena
    @Vrushasena 5 лет назад +1

    Sir how can we retrieve location from firebase ....
    Which is already sent to firebase through raspberry pi using GPS module

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Hi,
      It can be simply done by getting the instance of the Firebase database and then reading the data. It has been explained in the below article with source code (though a bit complex). I will try to make a simple video on this topic and post it here when I get time.
      www.androidauthority.com/create-a-gps-tracking-application-with-firebase-realtime-databse-844343/

  • @singay653
    @singay653 5 лет назад

    its not showing my current location instead showing marker in sydney

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      If your code is correct, it should work. However, in emulator it may show your position as California irrespective of your current position.
      But in real phone it will work. Though it may take some time on first time run as it will need to download the map.
      Also, please ensure that the access to coarse and fine location (GPS and network data location) is granted as it will be used to update your location.

  • @kennedychinangwaii4849
    @kennedychinangwaii4849 4 года назад

    i am getting a blank page with the word google at the bottom and no map

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Please ensure that network access is there on the phone which is needed to download the map in the first time.
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @rafaiyarushdhaoishi8935
    @rafaiyarushdhaoishi8935 4 года назад

    Is it possible to add a schedule of locations where the person goes and get the notification if the person is out of that routine location?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +1

      Yes, it will be possible.
      Based on the latitude and longitude information, you can keep a check. The moment the current location of device goes out of bound of the allowed latitude and longitude, then trigger the alarm.
      Cheers
      Programmer World
      programmerworld.co
      -

    • @rafaiyarushdhaoishi8935
      @rafaiyarushdhaoishi8935 4 года назад

      @@ProgrammerWorld thank you...but i want the alarm automatically...

  • @Engycation
    @Engycation 3 года назад +1

    very nice video

  • @china2298
    @china2298 3 года назад

    Hello , to actually see the change in Location would I just have to move to a different location with my laptop and then re-run the app? Also i dont know why it automatically shows california location when I run the app, any reason for that ? Thank you

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад +1

      This App cannot be tested on the laptop (Emulator) because the location sensors such as GPS is not emulated in the emulator. To test it please use a real phone or device.
      The location in an emulator shows California because by default emulator takes the Google's headquarter as the location of the AVD.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @chandanathummaluru9630
    @chandanathummaluru9630 5 лет назад

    Hello sir I have doubt that if we want to track other phone number to help then whether the person should need tracking app or the one who want to help need the app

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Dear Chandana,
      The person who wants to share his location will need this App installed on his phone and not the one who wants to help.
      Along with the location tracking App, you can see my other video (link below) which shows how you can send automatic SMSes to the another person. So, the person whose phone needs to be tracked should have location App with SMS functionality so that he can send the latitude and longtitude information to another person who wants to help.
      ruclips.net/video/pajvuBZc2WA/видео.html

  • @safna4634
    @safna4634 5 лет назад +1

    Its working on the avd,bt it not showing location on the mobile.why?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Check if your App has access to location information from your phone. It should have access to both GPS info and precise location based on your mobile signal.
      You can check this by going to Apps permissions in your Android phone setting.
      Let me know if you continue to face issues.

  • @kristiankelij7924
    @kristiankelij7924 5 лет назад

    Is it possible to make gps car's vector and track at random point of a drive their statistics like app ?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Yes, it is possible. In the App code what I have shown is that you will get latitude and longitude of the position of your GPS device (Android phone). You can collect these information like latitude and longitude at different time stamps and then create a statistics out of it.
      In the video I have shown to update latitude and longitude information on the map. But for your requirement please store them in variables and then various statistics can be drawn from them.

  • @ayushisinghal553
    @ayushisinghal553 4 года назад

    I want to get the crime record for the particular location, how can we code for that so we can get the crime data for that individual location while we enter

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      For your requirement, the crime record for the locations should be stored in a database. Then that database values should be accessed and plotted on the map. Something similar to what is shown in the below link:
      ruclips.net/video/hyi4dLyPtpI/видео.html
      Cheers
      Programmer World
      programmerworld.co
      -

  • @widcoshop
    @widcoshop 5 лет назад +1

    hi bro how are you?can we use offline google map for get current location?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Yes, I think you can work in offline mode if you have used the location tracking based on GPS also along with network in your App code.
      However, for the first launch of your App network would be needed to get the Maps configured in your custom App. Accessing pre-saved google maps may not be possible as your custom maps will not have access to the google map App data on your Android phone.

  • @sgupta519
    @sgupta519 4 года назад

    Hiii i want to update location even when app is in background ???? So hw cn i do it

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      You can use the foreground or background process to run it in the background.
      I do not have any video for background process yet.
      However, for foreground process you can refer to the below videos:
      ruclips.net/video/MRm6NgZlmDc/видео.html
      ruclips.net/video/xxC4-BLNSSc/видео.html
      Cheers
      Programmer World
      programmerworld.co
      -

  • @diabig5296
    @diabig5296 5 лет назад +2

    my application keeps "stop work" what can i do

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад +5

      There are 2 options:
      Either debug your code and check at which line the code is breaking. To debug you should start the emulator in debug mode and put break point at the start of your Java code file.
      Else 2nd option is encapsulate your code in various try catch and check the exception thrown in the catch part. Then you can program the code to take appropriate action in case of exceptions thrown.
      In general my guess is in your code it is not able to get the GPS reading and hence while reading latitude and longitude it is failing. However, of course I can't be sure unless we debug the code.

  • @agr87
    @agr87 4 года назад

    Hello i cant run app, the first time i run it into the emulator i getting an error trouble with google play services

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Then it implies that in emulator, it has issues to reach Google. Either due to network issues or your Google login account issues (incorrect login details). This App may be requesting for Google services to access Google Maps, though I am not sure. In my phone/emulator, Google Play services are logged in so I have not observed such issues.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @sureshperuri6497
    @sureshperuri6497 5 лет назад

    sir when i started the app for the first tym it just showing the white screen with google icon on left bottom my internet speed is 6-7 mbps what should i do
    and how much it will take to download the map

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      It should not take more than 2-3 minutes. If it is taking more than 5 minutes then something is wrong. Your App is not able to connect to the Google Map over internet. Don't wait further.

    • @sureshperuri6497
      @sureshperuri6497 5 лет назад

      @@ProgrammerWorld Tq for the reply sir

  • @KeenT97
    @KeenT97 3 года назад

    Hi , I typed the exactly same code , but when I run it , it just didn't show my location.. why?

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      I assume all the necessary permissions are defined in Manifest file and your Java code. If yes, then let us know if you are getting any error. If no error is thrown then request you to debug the code to check for the issue.
      By the way for reference the complete source code shown in this video is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co/
      -

    • @KeenT97
      @KeenT97 3 года назад

      @@ProgrammerWorld the only difference is that when I do the locationListener = new LocationListener() , it creates just the onLocationChanged(@NonNull Location location) and the other 3 are not created.

    • @KeenT97
      @KeenT97 3 года назад

      @@ProgrammerWorld Update : I resolved it. My phone was the problem , I have an Huaweii and I don't know exactly why it doesn't work on it.
      One question: Do you have a project where I can see how to implement another location and show me how to get there from my location?

  • @dishugupta5549
    @dishugupta5549 5 лет назад +1

    Sir how to create api key. .I have try many tyms but not generated please help me..

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      To create API key, you will have to login to your Google account using the link which you get in the google_maps_api.xml file. Then follow the steps through the google page. This is shown in video from 2:22 min to 03:36 min.
      Also I hope you have selected Google maps activity while selecting the activity for your App. This is shown at 1:20 min in the video.
      If the above information doesn't resolve your issue, then let me know what specific problem you are facing. I will try to help you.

  • @supriyjinturkar7477
    @supriyjinturkar7477 4 года назад

    Sir , I am not getting accurate loaction
    Location shown on map is 300m away from my actual location
    Pls help

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Try to use Fine location in conjunction with Coarse location access. It should solve your problem. If required, the complete source code has been shared at the below link. Please refer to it:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      -

  • @kkfxt
    @kkfxt 2 года назад

    Hi, is there a program one can run on their laptop to bring up video file based on GPS location?

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад

      There are lots of Apps now for laptops also. By the way which OS you are using and if you can give example of any specific use-case then it will help us to understand you query better.
      For reference, the complete source code shown in this tutorial is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @nehaljathar3691
    @nehaljathar3691 5 лет назад +1

    same problem sir marker not showing in my location

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      What is the minimum SDK version you are using? Is it SDK 26? And what is the SDK version of your emulator or smartphone?

    • @nehaljathar3691
      @nehaljathar3691 5 лет назад

      API Level 27

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      For API 27, it should work because that is what I also used. So, the only suggestions I can offer is to try debugging the code.

    • @nehaljathar3691
      @nehaljathar3691 5 лет назад

      ok sir thanks ...

    • @manrajsingh5861
      @manrajsingh5861 5 лет назад

      @@nehaljathar3691 did it work? same problem

  • @subairsm2015
    @subairsm2015 5 лет назад

    Hello brother I had a doubt that how we can track the location when the user doesn't accept our request.... If the user accepts the location doesn't share.... If the user doesn't accept the location need to be share..... Kindly tell how would to be create this....

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Hi Subair,
      If the user does not accepts the request to share the location to your App, then there is no way to get that information. Of course there are ways you can get the developer rights of the phone and then hack the phone to get the location information. But google is very sensitive to these approaches and it is is highly discouraged to try such approaches. Also, it is beyond the scope of this video tutorial.
      If the user accepts to share the location info of his phone to your custom App, then voila you have all the information. Please watch 2nd edition of this tutorial at: ruclips.net/video/FknRti6n_F8/видео.html . Here, I have also shown that once you have the location information how you can send it or share it with someone else over SMS.

  • @mariarusso1986
    @mariarusso1986 5 лет назад

    I followed this code, but it is still stating that I am in the location provided on the video whereas I am based in Maryland.

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      So, does your location shows Sydney or California? .... If it is Sydney then it means your location listener is not working (either gps and network is not providing updated location or your App is not getting location updates from these sensors due to issues like permission not granted for the location access).
      Else if your location is showing California then it means that you running your App on the emulator. On emulator, as I have explained in another comment, sometimes the location information is not passed to emulator from your PC network.

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      See my reply to Saish Sawant's comment around 2 weeks back for details on this.

  • @stha_blog9192
    @stha_blog9192 4 года назад

    can you please teach how to develop wireless vehicles tracking application please

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Apart from this current video tutorial, you should refer to my below tutorials which covers the topic of wireless tracking of a vehicle either in online (using internet) or offline mode (using SMS):
      programmerworld.co/android/create-location-tracking-android-app-by-exchanging-location-information-over-firebase-database/
      programmerworld.co/android/how-to-track-your-location-using-gps-and-send-it-over-sms-in-your-andoid-app-complete-source-code/
      programmerworld.co/android/how-to-convert-latitude-and-longitude-location-to-an-actual-address-and-show-on-map-in-android-app/
      Good Luck
      Programmer World
      -

  • @TudorStanciulescu
    @TudorStanciulescu 5 лет назад

    hello, what i need to do to update my marker when i move and remove the last marker in real time?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Hi,
      I did not show in my code to remove the previous markers because I liked the trail mark it showed for all the points my phone has reached.
      However, if you want to remove the markers in your map, you can easily use the CLEAR method for your google map object. Try the below command in your Java code just before adding the new Marker. It should clean up all your previous Markers from the Map:
      mMap.clear();

    • @TudorStanciulescu
      @TudorStanciulescu 5 лет назад +2

      @@ProgrammerWorld it s working, thx

  • @rajendrapal1985
    @rajendrapal1985 3 года назад

    Some person are using fake gps app in mobile , can we stop or authorized our app to take only right location.
    Send me code plese

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      If you are getting the location service from the system then no other App can manipulate the data provided by the Android OS (system). So, please use below line of code to define your location manager. This will ensure the accurate location information (GPS values) are retrieved.
      locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
      Complete source code for these Apps can be found in the below links:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      programmerworld.co/android/create-location-tracking-android-app-by-exchanging-location-information-over-firebase-database/
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @thinyanantzaw1023
    @thinyanantzaw1023 4 года назад

    Hi!Can you show how to build family locator app with kotlin language? I already searched gps tracker with koltlin language but I didn't find anything.

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Java code can be converted to Kotlin using the Android Studio itself. So, one can inter-change between Java and Kotlin code in the Android Studio environment.
      Moreover, for family locator you can also refer to my below videos also (Though these are also in Java):
      ruclips.net/video/hyi4dLyPtpI/видео.html
      ruclips.net/video/FknRti6n_F8/видео.html
      Cheers
      Programmer World
      programmerworld.co
      -

    • @Sonofgod626
      @Sonofgod626 4 года назад

      Dear bro please contact me.. I need one project from u... Thanks
      8794423709
      My watsapp no

  • @PandazHub
    @PandazHub 4 года назад +1

    Every time I open the activity, I get a blank map. Any help?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      For the first run, App will download the map. So, if you are getting blank map, it may be due to network connection issues. Please check whether the network is working on your device (emulator or actual phone).

    • @slobodannesic9175
      @slobodannesic9175 4 года назад

      @@ProgrammerWorld getting blank map too, Internet connection is fine.

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      @@slobodannesic9175 Then please check your API Key.

    • @slobodannesic9175
      @slobodannesic9175 4 года назад

      @@ProgrammerWorld Yeah I fixed it. Just had to enable Maps API in console. Had the key.

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      @@slobodannesic9175 Great 👍

  • @praneeth_amigo
    @praneeth_amigo 5 лет назад

    I have gps device .... But i dont have application to track it... Can u help me please

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Yes, sure. What kind of assistance do you need? Please let me know. By the way what kind of GPS device do you have? Is it Android based?
      You can also watch my another video on this topic which shows sending location coordinates using SMS: ruclips.net/video/FknRti6n_F8/видео.html
      Also, if needed you can contact me at our email ID: programmerworld1990 at gmail dot com

  • @anujkhare7782
    @anujkhare7782 4 года назад +2

    Sir we connect drone with this app through a camera

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Yes, you can use this App for drone also by connecting any Android device connected with your drone and running this App on that device. However, I didn't completely understand the utility of camera. Can you please explain how you are harnessing camera utility with this App.
      Further, I would suggest you to watch my next videos on this topic which can be used to track the drones location remotely.
      In the below link it explains the steps to use Firebase database to store location information:
      ruclips.net/video/hyi4dLyPtpI/видео.html
      In the below it explains the steps to send location cordinates without internet over SMS:
      ruclips.net/video/FknRti6n_F8/видео.html
      Cheers
      Programmer World
      programmerworld.co
      -

  • @sivaranjinisivaraman7385
    @sivaranjinisivaraman7385 3 года назад

    hi sir, can u do a video how to do a android application that can track pets with gps

  • @alliswell9436
    @alliswell9436 4 года назад

    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

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      4GB RAM should be fine for Android Studio. It should work. But I think you will face issues while running emulator. So, I will suggest if you want to use Studio and emulator both simultaneously then please upgrade to at least 8GB RAM. In 16GB RAM, the performance will be best. But check your budget. Try to upgrade to at least 8GB RAM.
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @durga_br
    @durga_br 5 лет назад

    How can we send the location of the person to the registered phone number without internet

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад +1

      Hi,
      I think the only other way (without internet) to share your location details would be through sms. Get the latitude and longitude information using GPS in the map and send it through SMS to other person. Of course for this one will need access to SMS service in the location app. This can be done by updating manifest file.
      Will try to make a video on this concept when I get time and share it on my channel.

  • @JEBJOSH
    @JEBJOSH 5 лет назад

    Hello Everyone i had the same error. of the marker not showing my location change LocationManager.GPS_PROVIDER to LocationManager.NETWORK_PROVIDER

    • @TudorStanciulescu
      @TudorStanciulescu 5 лет назад +1

      first time, the app didn t show me my real location, it was only the sydney mark, but now with NETWORK_PROVIDER it s working. u re a life saver. thx!

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад +1

      You can try both NETWORK_PROVIDER and GPS_PROVIDER in your code by implementing it as below:
      locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, MIN_TIME, MIN_DIST, locationListener);
      locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME, MIN_DIST, locationListener);
      This will increase the chance of getting the exact location from both the sources - GPS and Network.
      However, just using GPS_PROVIDER should have worked on your phone. The only caveat is that you will have to ensure that GPS Satellite is clearly visible to your phone. For that you may have to go in open area for few minutes.

  • @dugyalavigneshkumar4201
    @dugyalavigneshkumar4201 4 года назад

    i had a doubt that how can i connect a tracker to this app to track the vehicle which was integrated with a tracker.do we have any special key to connect with it?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +1

      I am not sure what you mean tracker here. If you mean that you want to track a device then you can do so by transferring the location info from tracked device to another device. You can watch my below videos for steps on passing the location info either through database or over SMS:
      ruclips.net/video/hyi4dLyPtpI/видео.html
      ruclips.net/video/FknRti6n_F8/видео.html
      Good luck
      Programmer World
      programmerworld.co
      -

    • @dugyalavigneshkumar4201
      @dugyalavigneshkumar4201 4 года назад

      @@ProgrammerWorld Tq very much. But can you please tell me how to make an app which can receive lat and long from a tracker. Here tracker means I mean a GPS tracker SIM card included init .

    • @dugyalavigneshkumar4201
      @dugyalavigneshkumar4201 4 года назад

      And also will there be any kind of connection between a tracker and our app to connect

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      @@dugyalavigneshkumar4201 To receive information from tracker in your Android App then it is important to understand the channel used by tracker to send the information. Is it through SMS/ other messaging app (WhatsApp, etc.) or through any database such as Firebase? Based on communication channel you can design your Android App to receive the information.
      I have video on most of these concepts. You can browse through my channel to refer to the respective video. Else please let me know the communication channel your tracker uses.
      Good luck
      Programmer World
      programmerworld.co
      -

  • @ajaysanthosh918
    @ajaysanthosh918 4 года назад

    hello . My requirement is to create an ambulance tracking app using GPS device. Could you please help me.

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Sure, please tell me what kind of help you need. However, you should watch my below video in which it is shown how to share the tracked location over SMS:
      ruclips.net/video/FknRti6n_F8/видео.html

  • @fundaavci7
    @fundaavci7 2 года назад

    hello how do i connect this app to arduino?

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад

      Can you elaborate a bit more on your use case? It will help us to understand the issue better. However, this App is for running on Android device. So, to exchange the data with the Arduino device, one will need to do it over the Arduino interface for Android.
      For reference, the complete source code shown in this tutorial is also shared in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @sonisonia9410
    @sonisonia9410 5 лет назад

    sir...It us possible to locate car parking area using gps...How can we do this sir??

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад +1

      In my tutorial I have shown how to get the location using GPS and store it in your local phone.
      For tracking, the other part is to send this information to some server and receive it on another device (smartphone). You can use Firebase database provided by Google for free. Otherwise you can have your custom servers where you can store your location details and read it from 2nd phone. I will try to make a video on this and publish it when I get time.
      Good Luck!

  • @juegosdepc9355
    @juegosdepc9355 5 лет назад

    Hello Master and greetings! I have a question: you may give me a example about how get location two devices movil in a maps? thanks.

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад +2

      Create the location tracking App as shown in this video. Then capture the latitude and longitude of the phone's location during live movement.
      Then Transfer the latitude and longitude information through another App or SMS facility or store it in some database which can be accessed from another device. This part of concept is not shown in my video. We will try to do it if we get time.

    • @lowjl6046
      @lowjl6046 5 лет назад

      I'm interested in this too !

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      @@lowjl6046 Hello,
      You can refer to the below video in which I have shown how to send SMS pro-grammatically directly from your App.
      ruclips.net/video/pajvuBZc2WA/видео.html
      This concept can be used to send the the details of you location like latitude and longitude to another phone and a log can be created. Of course SMS charges can be applied by your service provider.
      In the receiving phone, create an App which reads the SMS messages as shown in my below video:
      ruclips.net/video/K9IloJ_66WI/видео.html
      Once you have that data in another phone through SMS then plot those points on the Map. And voila, you will see the location of first phone in 2nd phone.
      Good Luck!

  • @sikandarali2731
    @sikandarali2731 3 года назад

    I Wanna to get my order and customer place by cart item by customer

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      I think you are looking for an e-commerce App. Combinations of below App may help to create the App with different layouts (cart layout) and databases:
      programmerworld.co/android/create-a-simple-business-app-using-sql-lite-database-in-android-studio-for-beginners/
      programmerworld.co/android/how-to-develop-an-android-app-for-your-retail-business-b2c-using-firebase-database-source-code/
      programmerworld.co/android/how-to-insert-floating-pop-up-window-layout-on-top-of-the-main-layout-in-your-android-app/
      programmerworld.co/android/how-to-create-multiple-layouts-and-menu-items-in-your-android-app-switch-layout-and-exit-menu-options/
      Cheers
      Programmer World
      programmerworld.co/
      -

    • @sikandarali2731
      @sikandarali2731 3 года назад

      @@ProgrammerWorld thnx

  • @saurabhbhoite3464
    @saurabhbhoite3464 3 года назад

    which language it is ? java / kotlin ?

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      This is Java. If you want to convert the code to Kotlin then you can refer to the steps shown in my below video:
      ruclips.net/video/6uaxKrvy-JE/видео.html
      Cheers
      Programmer World
      programmerworld.co
      -

  • @shrashtipurohit7042
    @shrashtipurohit7042 2 года назад

    If I want to buy this project can I?

    • @ProgrammerWorld
      @ProgrammerWorld  2 года назад

      Yes, you can.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @tyw97
    @tyw97 5 лет назад

    Hi thanks for your video. How to make it as tracking ETA not only location?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Will try to make a tutorial to show how to get ETA from your custom location App. Once created I will post the link here. Thanks!

  • @exortedwex
    @exortedwex 4 года назад

    Can I get a google API key if i dont have abilling account?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Yes, you can. You don't have to pay anything if you are using the maps for non-commercial purpose. So, google doesn't requires a billing account for the same. Steps for the same is shown in the initial part of this video tutorial.
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @mervinlee450
    @mervinlee450 4 года назад

    How can you add a gps to any place such as airport or storeS?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      GPS is global position system information provided by satellite (specific GPS satellites). So, it is almost available everywhere though signal may be a bit weak within buildings or basement.
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @mervinlee450
      @mervinlee450 4 года назад

      ​@@ProgrammerWorld How can we add a background image of a map? Let's say a shopping map ? Can we overlap with a bitmap image? I thought it should be showing the gps, so that it can track our movement?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Yes, you can overlay other widgets, including imageview, on top of the map in the layout. My below video may help you in knowing how to add other widgets in the maps layout:
      ruclips.net/video/Nsl99WWDFxM/видео.html
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @saranyai930
    @saranyai930 4 года назад

    Which language based on this coding

  • @1khawer
    @1khawer 4 года назад

    Hello sir can I use this code to locate my bike ??

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Yes, it can be used to keep a track of your bike. Just fix a device in your bike which can transmit the location GPS to the tracker device.
      You can use either SMS (offline) concept or Firebase database (online) concept to transfer the data. You can refer to the below pages for the same:
      programmerworld.co/android/how-to-track-your-location-using-gps-and-send-it-over-sms-in-your-andoid-app-complete-source-code/
      programmerworld.co/android/create-location-tracking-android-app-by-exchanging-location-information-over-firebase-database/
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @lonelytraveler2878
    @lonelytraveler2878 5 лет назад

    Hello, I realy like your videos, I have the same project but tracking GPS modules on a Bus using GSM to send the location of the Bus by the GPS by SMS to my Appication, Can you help me or at least refer me some good infos ?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      As I have explained in one of my other comments that you can do this by storing the coordinates (Latitude and longitude) in a variable in your code. And then use the SMS service to send these values to the recipient. For this you will have to modify your manifest file in order to access the SMS service of the phone.
      Due to my other engagements, I am not getting time to make this tutorial. If I make one I will let you know. I don't know if there is any other tutorial on similar concept. I am a freelancer programmer and does mostly independent development.
      Thanks for your questions however.

    • @SahibzadaInstitute
      @SahibzadaInstitute 5 лет назад

      same project. did you collect requirements for the project? like diagrams and APIs etc...
      please must reply to me
      thank you

  • @drewpitbull
    @drewpitbull 4 года назад

    can it track the location of other devices?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Yes, it can track other devices.
      You can watch my below videos which shows detailed steps on passing the location information to another device:
      ruclips.net/video/FknRti6n_F8/видео.html
      ruclips.net/video/hyi4dLyPtpI/видео.html
      Cheers
      Programmer World
      programmerworld.co
      -

  • @pusongmanhid
    @pusongmanhid 5 лет назад

    hi may i know what are the specific specs of the phone needed?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      There is no specific requirement of the phone. Only thing you should ensure is that minimum API level selected in your phone is supported by your Android OS. For example: for API 26, Android 8.0 (Oreo) and above is needed as shown in my video at 1.01 min. Similarly, for API 21, Android 5.0 (Lollipop) and above is needed.

    • @pusongmanhid
      @pusongmanhid 5 лет назад

      @@ProgrammerWorld sorry this is my first time creating this,i am still confused and I only have a budget for a phone that has 2gb ram, 16rom and kitkat android. will that be ok?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Hi Kyra,
      For the location tracking App, you do not need very high specification phone. I think the phone specification which you have mentioned should suffice for this App. Regarding the OS, Android kitkat is Android version 4.4 which support minimum API level 19. So, please make sure that you select the API level 19 while creating your App in the Android Studio's initial setup page for the App. The only difference is that with each API level change some the commands and APIs is modified by google team. So, minor adaptation of code is required with the change in API level.
      Moreover, if interested you can watch my 2nd version of location tracking App using the below link: ruclips.net/video/FknRti6n_F8/видео.html. This video also covers how you can send your location info automatically over SMS to another phone.

  • @mayankagrawal2257
    @mayankagrawal2257 4 года назад

    sir when i try to run this on my device the application is stopped showing on my device

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Does it works on your emulator? If no, then can you please debug your code or send me a copy of your code and I will check?
      If it is working in emulator and giving issues only in actual device then please check for permission of your App in the setting of your Android phone. Also please let me know the exact error message you are getting.
      Cheers
      Programmer World
      programmerworld.co
      -

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Also complete source code shown in this tutorial is available at the below url:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      You may copy paste part of the codes in case needed.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @vaibhavpallod1023
    @vaibhavpallod1023 4 года назад

    i am not geting current location in mobile when i installed it in my mobile

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Please check whether your App has the permission to access the Location in your Phone. You can check this in your phone by going to Setting->Apps->Permission->Location Permissions.
      If the location permissions are not provided please enable it. Also, there are 2 types of location access - Fine and Coarse location info.
      Coarse uses only GPS data to get the location info so the location coordinates (latitude and longitude) may not be very precise.
      Fine will use combination of GPS and Network data and will, hence, provide more precise and accurate location information of your phone. Both of these are explained in the source code provided in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/

      I will suggest you should use Fine location access which give you better and more precise location information.
      Good Luck
      Programmer World!
      programmerworld.co
      -

    • @vaibhavpallod1023
      @vaibhavpallod1023 4 года назад

      @@ProgrammerWorld yes it has permission

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      @@vaibhavpallod1023 Then it should work. There is no other reason for the App to not work. I assume that your map is showing up in the App. The other reason when it fails is if you have incorrect Google Maps API key registered in your App. But as long as your App is working on the emulator or the Map is showing up that possibility is ruled out.
      Cheers
      Programmer World!
      programmerworld.co
      -

  • @valerie7894
    @valerie7894 4 года назад

    Hi Sir, when the app is launched, it does not show me my location (Singapore), instead it gave me the location you shown in the video. May I know what must i change in order for the device to retrieve my location?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +1

      Are you running it on emulator?
      For actual location, you need to run it on your real phone and ensure GPS satellite is accessible during the first run. (Be in open area).
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @valerie7894
      @valerie7894 4 года назад

      Programmer World ah i see, thank you. can i ask if it is possible to add icons(for navigation to other pages) on the maps page ?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +1

      Of course it is possible. Just create your layouts and then use setconntentview to switch to that specific layout in Java code. You can add buttons as icons in main maps layout to call/trigger these commands.
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @valerie7894
      @valerie7894 4 года назад

      Programmer World thanks for the information!

    • @valerie7894
      @valerie7894 4 года назад

      Programmer World Hi Sir, is it possible to track where my friends are through adding their phone number to the app?

  • @saishsawant7831
    @saishsawant7831 5 лет назад

    Can anyone help me? Why does it shows my location in USA as I live in India??

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад +1

      Location shows USA because you are running the App on emulator. If you run it on your phone it will show precise location. In emulator, though there is gps and network options but those information are not available to emulator phone from your computer. So, emulator just imitates a pre-set location point on your map which is USA.

    • @saishsawant7831
      @saishsawant7831 5 лет назад +1

      @@ProgrammerWorld Thankyou so much. It worked.

  • @vadakkanchottanikara
    @vadakkanchottanikara 3 года назад

    Bro.... this same it now 2020

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      I think overall the concept is still same. It should still work in 2020 also. Let me know if you have different observation.
      Cheers
      Programmer World
      programmerworld.co
      -

  • @uuujjwalsquare8991
    @uuujjwalsquare8991 6 лет назад +2

    So good sir

  • @aguykof287
    @aguykof287 3 года назад

    hi please i can get the source code

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      Complete Source code is available on my website:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @rhul0017
    @rhul0017 4 года назад

    guys please help, my project consist of 2 users,admin and user,the need to know the location of the user,how can i implement this in my app!!my teachers suck!!

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +1

      Hi Rahul,
      In this video it shows the steps of how to fetch the position (latitude and longitude) of the user. Now, once you have the location information, you can pass it to the Admin using any channel such as through chat App, updating to a database such as Firebase or over SMS.
      The steps to send the location info over SMS is shown in below link:
      ruclips.net/video/FknRti6n_F8/видео.html
      The steps to create a chat App with End to end encryption is shown in below link:
      ruclips.net/video/bVXT_AkHIEQ/видео.html
      The steps to create a Firebase database is shown in below link:
      ruclips.net/video/52pQU6S66S0/видео.html
      Hope the above are useful.

  • @preetamk5041
    @preetamk5041 4 года назад

    R.Id is coming error
    Please help me

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Just check if the Objects are created in the layout XML file. If an ID is assigned to any object/ widget in the layout file then it will be accessible through R.id.....
      If the object is already defined and still not appearing in the R.id then restart the Android studio and check. Sometime restarting IDE also solves this kind of issues.
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @bhavikmaradiya2083
    @bhavikmaradiya2083 5 лет назад

    Marker is not showing on map please help me!

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Hi,
      I hope you have given location access permission in the manifest file. Also, I hope following lines of code have been added in your java code to seek permission from your user for the location access.
      ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, PackageManager.PERMISSION_GRANTED);
      ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PackageManager.PERMISSION_GRANTED);
      If above is done, then please check you have got the access to the location system service using below code in your method:
      locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
      Lastly, you should ensure that you are using Map.moveCamera method call to move the map so that your marker is visible and map points to the correct location.
      If all the above looks good to you, then please share your code here and I will try to debug it check it.
      Good Luck!
      Programmer World

    • @currentissues7956
      @currentissues7956 5 лет назад

      @@ProgrammerWorld same problem is for me

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Will it be possible to share your code? I can have a look.

    • @bhavikmaradiya2083
      @bhavikmaradiya2083 5 лет назад

      @@ProgrammerWorld I wrote code as you written..

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      If the code is exactly the same then it should work. If I could have got your code then I could have debugged and verified the same. I hope you have tried it on both emulator and smartphone. Also, I hope you have checked if Internet connection is available on your device.

  • @adnanhayat8968
    @adnanhayat8968 4 года назад

    Bro can i store this location in firebase

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Please watch my below video for the same:
      ruclips.net/video/hyi4dLyPtpI/видео.html
      Good Luck
      Programmer World
      programmerworld.co
      -

  • @lam1457
    @lam1457 5 лет назад

    hi bro this application can be used to track the Freight Transport ?

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      Yes, sure. You should watch my next version of tutorial at below link to know how to do it:
      ruclips.net/video/FknRti6n_F8/видео.html

    • @ProgrammerWorld
      @ProgrammerWorld  5 лет назад

      One other approach for your use case could be to keep storing the current location information in some sort of database (say Firebase) and the broad cast the location info (latitude and longitude) from the database to all the receiver stations or Apps.

    • @lam1457
      @lam1457 5 лет назад +1

      Programmer World hey , i’m not very good in programming mostly android so I will try to follow the next version tutorial if it is to track down ! (my project is making an application to know the carrier's location)

  • @shubhm_agarwal
    @shubhm_agarwal 3 года назад

    Not working on device

    • @ProgrammerWorld
      @ProgrammerWorld  3 года назад

      Is it giving any error? OR is the App crashing?
      I hope all the required permissions, such as location and internet, is declared in the manifest file.
      Cheers
      Programmer World
      programmerworld.co/
      -

    • @shubhm_agarwal
      @shubhm_agarwal 3 года назад

      @@ProgrammerWorld its not displaying any locations on the map.

  • @paulsambath9693
    @paulsambath9693 4 года назад

    Where's part 2 of this series?

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад +1

      I think you should watch my below videos which shows further concepts in this series:
      Location tracking by exchanging location information over Firebase database:
      ruclips.net/video/hyi4dLyPtpI/видео.html
      Track location in offline mode and send it over SMS:
      ruclips.net/video/FknRti6n_F8/видео.html
      Convert Latitude and Longitude to an actual address on the map:
      ruclips.net/video/Nsl99WWDFxM/видео.html
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @paulsambath9693
      @paulsambath9693 4 года назад

      @@ProgrammerWorld Thanks for sharing. I will do that.

  • @1khawer
    @1khawer 4 года назад

    Hey buddy I need tracking device to locate and lock the access of my app

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      One can use the concept shown in this video to track the device and lock the device remotely from the App.
      The source code for these concepts is available in the below links:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      programmerworld.co/android/create-location-tracking-android-app-by-exchanging-location-information-over-firebase-database/
      Good Luck
      Programmer World
      programmerworld.co
      -

    • @1khawer
      @1khawer 4 года назад

      Hey buddy can I use the same code to locate my bike ???

    • @ayushisinghal553
      @ayushisinghal553 4 года назад

      I want to get the crime record of the particulation location how can we code that for particular location so that we can get the crime record of that location

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      @@ayushisinghal553 For your requirement, the crime record for the locations should be stored in a database. Then that database values should be accessed and plotted on the map. Something similar to what is shown in the below link:
      ruclips.net/video/hyi4dLyPtpI/видео.html
      Cheers
      Programmer World
      programmerworld.co
      -

  • @shreyasuniquestories27
    @shreyasuniquestories27 4 года назад

    What is the api link

    • @ProgrammerWorld
      @ProgrammerWorld  4 года назад

      Hi,
      From API link, if you referring to Google Maps API key, then it is the link to the encryption key used to sign the APK for Google Maps based APIs. Also, You need a different API key for each encryption key, including the release key that is used to sign the APK for publishing.
      You can define the keys for the debug and release targets in src/debug/ and src/release/.
      I hope the above answers your query. However, if you meant something else then please let me know. Also, the complete source of this tutorial can be found in the below link:
      programmerworld.co/android/design-a-location-tracking-app-using-gps-in-android-studio/
      Good Luck
      programmerworld.co/