Android Question LOOKING FOR ADVICE - VEHICLE TRACKING

Intelemarketing

Active Member
Licensed User
Longtime User
I was looking for some advice on developing an app which allows a company to track their vehicles, using Google Maps.
I understand from the Google maps examples how to present a map with a pointer showing a particular location.
The issue is that there may be 1, 10, 100, or even 1000 vehicles that need to be tracked, which presents the problem of how the vehicle's location is to be reported back to base.
A permanent connection back to base from each vehicle/phone is out of the question as there could be too many connections running at the same time, I would think.
I was looking at alternatives - eg, Using FTP to send the location points from each vehicle every few minutes. (Then be monitored by an app at the base which can process each vehicle's location). The downside of this approach is that literally thousands of FTP uploads/downloads will take place every day.

That's the best I can come up with - Just wondering if there may be a better way to do this.

Thanks
 

Star-Dust

Expert
Licensed User
Longtime User
so the devices send the information to the DB or line, and from the office or from a mobile device it will be possible to follow step by step the position of the vehicle
 
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
It sounds like the answer to my original question is to use HTTP (Post) to a Server. (Post GPS Co-ordinates to the server)
Doing this instead of sending the GPS Co-Ordinates via FTP will probably be better, as some websites get very excited when they see many FTP attempts happening - they are sometimes considered as attempts to break into a website - so the website gets shut down.

I'll try the HTTP Post approach first and see how well it works

Thanks very much to everyone for your interest and suggestions !
George
 
Upvote 1

amorosik

Expert
Licensed User
so the devices send the information to the DB or line, and from the office or from a mobile device it will be possible to follow step by step the position of the vehicle

The same if you send to in-house db, but with complete control, no cost, privacy, etc...
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
you can avoid keeping the server running with a free service. I prefer Altervista with PHP code and I store the data
 
Upvote 0

amorosik

Expert
Licensed User
It sounds like the answer to my original question is to use HTTP (Post) to a Server. (Post GPS Co-ordinates to the server)
Doing this instead of sending the GPS Co-Ordinates via FTP will probably be better, as some websites get very excited when they see many FTP attempts happening - they are sometimes considered as attempts to break into a website - so the website gets shut down.

I'll try the HTTP Post approach first and see how well it works

Thanks very much to everyone for your interest and suggestions !
George

Ftp, http, mqtt, is all the same for this application
The real problem is how to communicate from office to the phone, what to do if app is not responding/running
From phone to pc all the way is fine
Not so easy with pc to phone communication
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
It sounds like the answer to my original question is to use HTTP (Post) to a Server. (Post GPS Co-ordinates to the server)
Doing this instead of sending the GPS Co-Ordinates via FTP will probably be better, as some websites get very excited when they see many FTP attempts happening - they are sometimes considered as attempts to break into a website - so the website gets shut down.

I'll try the HTTP Post approach first and see how well it works

Thanks very much to everyone for your interest and suggestions !
George
With a free service as described above, you can use http with a post command or even get to send the coordinates to the DB.

I did a similar thing for a client who wanted to track the technicians' vans as they made the interventions
 
Upvote 0

amorosik

Expert
Licensed User
you can avoid keeping the server running with a free service. I prefer Altervista with PHP code and I store the data

Yes, I see
Are you saying that an activity that has to monitor 10, 100 or 1000 vehicles has difficulty in having one or more dedicated computers to keep the db locally?
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
I want to use the driver's mobile phone to determine their location - using an app which will send back the phone's location on a periodic basis
If you wish, I can help you, as we have several vehicle tracking and logistics projects.

You can tell me internally what your project is about.
 
Upvote 0

amorosik

Expert
Licensed User
I have experience with GPS in a mining company, over 500+ vehicles, we were showing the trucks and buses in "real time", every 10sec.. on google map (year 2011 :p and not using b4x)

In your case, just send your location to your server using your b4x-app, then the server will do the processing

What system do you use (ftp, http, mqtt, firebase, sms, fcm, etc ..) to send information from the central system to phones, and vice versa?
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
Clarification:

It is always commented or said "in real time", I wonder if a vehicle is moving at a speed of 60 kph and the GPS reports the location every 10 seconds.

1. Are you sending the server the last actual position the vehicle is in?

2. After processing the location data, will the app show the actual position of the vehicle?
 
Upvote 0

tigrot

Well-Known Member
Licensed User
Longtime User
Clarification:

It is always commented or said "in real time", I wonder if a vehicle is moving at a speed of 60 kph and the GPS reports the location every 10 seconds.

1. Are you sending the server the last actual position the vehicle is in?

2. After processing the location data, will the app show the actual position of the vehicle?
Of course, you can see the trip. I used opengts a package to be installed on a web server.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
I was looking for some advice on developing an app which allows a company to track their vehicles, using Google Maps.
I understand from the Google maps examples how to present a map with a pointer showing a particular location.
The issue is that there may be 1, 10, 100, or even 1000 vehicles that need to be tracked, which presents the problem of how the vehicle's location is to be reported back to base.
A permanent connection back to base from each vehicle/phone is out of the question as there could be too many connections running at the same time, I would think.
I was looking at alternatives - eg, Using FTP to send the location points from each vehicle every few minutes. (Then be monitored by an app at the base which can process each vehicle's location). The downside of this approach is that literally thousands of FTP uploads/downloads will take place every day.

That's the best I can come up with - Just wondering if there may be a better way to do this.

Thanks

why not run a webserver? run a background service on your android device that performs every x seconds a HttpJob "post" command with the GPS location of the phone to the weserver. then present the map by getting the locations from the server on your phone/desktop (as you wish)
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
What system do you use (ftp, http, mqtt, firebase, sms, fcm, etc ..) to send information from the central system to phones, and vice versa?
in that project is used GPRS/GSM in both directions (it's an in house GPS that include many others peripherals including offline backup when the vehicle is underground) but you can do the same with a smartphone, your Smartphone will need internet to send the data to your server.

project developed 10+years ago, this basic test-demo is showing just the locations/moving on google earth
 
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
If you wish, I can help you, as we have several vehicle tracking and logistics projects.

You can tell me internally what your project is about.
I have been able to get the phone (with the truck driver) to send a text file using FTP to a website. That works perfectly. The server then interogates the website, downloading the various text files (again using FTP), and matching them with each vehicle (using the phone number).
I would prefer to not use FTP as I have had the experience of websites shutting down if too many FTP calls are made.
This then leads me to use either HTTP/PHP or use an on-line database to record the vehicle movements.
I am committed to using a mobile phone for the application.
The record layout would be something like - PhoneNumber, GPS Co-Ordinate1, GPS Co-Ordinate2, Date/Time Stamp
The phone would upload the data only if the GPS Co-Ordinates change significantly.
I have found that repeatedly transmitting the co-ordinates from a stationary location can fluctuate slightly.

So, I guess I need to try updating an on-line database from the phone - then later download the records for processing by the server.

This is new ground for me so I will hunt the forums for examples on how to do this.
Thank you all for your keen interest and depth of experience in this subject.

Any help, and suggestions with this is greatly appreciated !
 
Upvote 0

Intelemarketing

Active Member
Licensed User
Longtime User
in that project is used GPRS/GSM in both directions (it's an in house GPS that include many others peripherals including offline backup when the vehicle is underground) but you can do the same with a smartphone, your Smartphone will need internet to send the data to your server.

project developed 10+years ago, this basic test-demo is showing just the locations/moving on google earth
This is absolutely stunning ! Uber, Uber Eats, Menulog, Domino Delivery, etc would be so impressed with what you have created here. Very impressive !
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
I have been able to get the phone (with the truck driver) to send a text file using FTP to a website. That works perfectly. The server then interogates the website, downloading the various text files (again using FTP), and matching them with each vehicle (using the phone number).
I would prefer to not use FTP as I have had the experience of websites shutting down if too many FTP calls are made.
This then leads me to use either HTTP/PHP or use an on-line database to record the vehicle movements.
I am committed to using a mobile phone for the application.
The record layout would be something like - PhoneNumber, GPS Co-Ordinate1, GPS Co-Ordinate2, Date/Time Stamp
The phone would upload the data only if the GPS Co-Ordinates change significantly.
I have found that repeatedly transmitting the co-ordinates from a stationary location can fluctuate slightly.

So, I guess I need to try updating an on-line database from the phone - then later download the records for processing by the server.

This is new ground for me so I will hunt the forums for examples on how to do this.
Thank you all for your keen interest and depth of experience in this subject.

Any help, and suggestions with this is greatly appreciated !
yes, the only "job" of the Smartphone (B4X APP) is send its location to your database using for example HTTP/PHP.
then from that database you will read and show the information wherever you want in "real-time" or for historic reports.
 
Last edited:
Upvote 0

amorosik

Expert
Licensed User
in that project is used GPRS/GSM in both directions (it's an in house GPS that include many others peripherals including offline backup when the vehicle is underground) but you can do the same with a smartphone, your Smartphone will need internet to send the data to your server.

project developed 10+years ago, this basic test-demo is showing just the locations/moving on google earth

The direction of the arrow is also interesting
Is the gps sending information about the direction (hdt ...) or is the direction taken as a sequence of points?
How often are the GPS points sent from the device to the central system?
And to send commands / requests from the central system to the device which system is used?
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
I have been able to get the phone (with the truck driver) to send a text file using FTP to a website. That works perfectly. The server then interogates the website, downloading the various text files (again using FTP), and matching them with each vehicle (using the phone number).
I would prefer to not use FTP as I have had the experience of websites shutting down if too many FTP calls are made.
This then leads me to use either HTTP/PHP or use an on-line database to record the vehicle movements.
I am committed to using a mobile phone for the application.
The record layout would be something like - PhoneNumber, GPS Co-Ordinate1, GPS Co-Ordinate2, Date/Time Stamp
The phone would upload the data only if the GPS Co-Ordinates change significantly.
I have found that repeatedly transmitting the co-ordinates from a stationary location can fluctuate slightly.

So, I guess I need to try updating an on-line database from the phone - then later download the records for processing by the server.

This is new ground for me so I will hunt the forums for examples on how to do this.
Thank you all for your keen interest and depth of experience in this subject.

Any help, and suggestions with this is greatly appreciated !
Steps:

1.- create the PHP web api services (restfull api)

you can use:

what you find in the PHP API services forum:


or use a framework to create the API services:



2.- Install the PHP API web services on your hosting via FTP or another method.

3.- Create the Mobile APP that sends its location to the server through the web API (HTTP)

You can modify this APP:


Adding data sending through HTTP:

 
Upvote 0
Top