1

I am working on android project.i need to get location details of remote mobile phone.for example,Manager will be in office and sales person will be roaming a city to sell products.

By how can i get the current location details of sales person and Manager able to see sales person location.please suggest any idea related to this topic.?

Prabakaran G
  • 83
  • 1
  • 13

1 Answers1

1

From a high level perspective, you need to get the location in Android which you can find the answer to here

Then, you'd send this data to a web service hosted at the "manager" location using either SOAP or REST. You'd need to send this location data and I assume some sort of salesPersonId to this web service intermittently to keep track of the sales persons movements. You'd also need to fail gracefully if the sales person was out of range so they couldn't send the location.

You might want to store the locations in the SQL database on the devices so when you get signal again you can queue up the location messages to be sent to the web service.

Community
  • 1
  • 1
David
  • 19,577
  • 28
  • 108
  • 128
  • 1
    to avoid location lag, u can also save lat and long in local database and then send all records which are not synced with the server when network is available. – Vicky Gonsalves Oct 30 '13 at 12:58
  • As @Vicky Gonsalves points out. It's important to have a backup strategy for network outtage etc. We use this in our app, which records/sends location and business critical data updates while out in the field. Sometimes, quite literally out in fields, with no coverage. A small local DB, and a background process to keep track of the last sync helps a lot! – laminatefish Oct 30 '13 at 13:06
  • @david99world : thanks a lot for answering.ya i am using web API for storing location Details to database.i am facing worst case as you mentioned.if sales person in out of range Manager unable to see location details.for that can u suggest any idea. – Prabakaran G Oct 30 '13 at 13:07
  • 1
    I'd do exactly as @LokiSinclair suggested and store up the locations in the SQLLite database that comes with Android, then send the messages to the web service intermittently so you have a full history of the sales persons locations. However, this does depend on the sales person turning on GPS tracking throughout their journey. – David Oct 30 '13 at 13:51
  • Is it possible to get and store location details(latitude and longitude) of sales person in local DB while net connection is not available for sales person and how.? – Prabakaran G Oct 30 '13 at 14:49
  • Yeah of course, you can just insert into the tables in the android app, then wait till you get a connection. Just google inserting into android database or something like that. – David Oct 30 '13 at 15:23