InfinioPlus / developers-talk

Wanna talk with other team developers? Wanna talk about current working projects? this is the right place to you
1 stars 0 forks source link

trackme #3

Open jrg96 opened 9 years ago

jrg96 commented 9 years ago

Track Me!

Track location of your friends at real time!!

jrg96 commented 9 years ago

@royalharsh now that I think maybe could be convenient that in the start_conn.php script I send you the current lat/lng coords of the user, so in the start connection you can create the row of the specific user that is gonna be updated o,o , so you will have to modify the script:

  1. basically using mysqli , crate the row of the user (having in mind that I'm gonna give you the lat/lng pos in the get params)
  2. you will have to change the database table, because If I'm not wrong, you treat in the DB the id as an int, and like you saw in the GUID function you made, basically id is a string, so change the column type in the database to varchar of length ... 100 I think will be enough.

any questions tell me o,o

jrg96 commented 9 years ago

@royalharsh I made som little changes to the backend of trackme, now I added to the start_conn.php and in the database the concept of room (the "virtual place" where you will be sharing your location information to others that are on the same room) so please:

  1. Start the update_pos.php script, as GET params you will expect:

    a) phone_id: the GUID I received previosly b) lat: new Latitude number c) lng: new Longitude number

So what you will be doing in update_pos.php is basically update my lat/lng coords and also the last_update field (with NOW(), you know that.....) please do that first task today and upload your work o,o

hvardhanx commented 9 years ago

@GhostAlgorithm Added update_pos.php with update queries in trackme-backend

jrg96 commented 9 years ago

@royalharsh does the code work well? I mean, y see that in the WHERE clause you didn't typed ' ' surrounding the variable that's why I ask o,o (remember it's a string for the DB not a number)

hvardhanx commented 9 years ago

@GhostAlgorithm Fixed...that was a typo :laughing: I tested the code and it worked! :astonished:

hvardhanx commented 9 years ago

@GhostAlgorithm I think trackme doesn't work on cross browser while testing. I mean when I try sharing my location on a particular room using firefox and then I try sharing my location using IE on same room. I cannot find myself :scream: When I try in same browser, it works fine. It can track me.

jrg96 commented 9 years ago

@royalharsh

https://drive.google.com/file/d/0B1E5b7R8U4O7YW42anpRRnVUQTg/view

The way that IE gets user location coords seems wrong, I don't think there is a way to fix that because if the GPS coords obtained by the browser are wrong since the geolocation get user position, there's no way to fix that, as you see, it shows I'm in two different positions.

Maybe that's why you can't find yourself, if not, show a screenshot of the stracktrace in IE to see that an error is happening.

hvardhanx commented 9 years ago

@GhostAlgorithm https://www.dropbox.com/s/332lsmsines8uct/fafa.png?dl=0 I tried it using firefox and IE, but its not able to get my location from firefox. It show different locations.

jrg96 commented 9 years ago

@royalharsh , basically that's no code problem, the problem is the way each browser deals with get user location, the same happens with me, but in different hours in the day, no matter what you change in the code, the problem is still with the browser and the way it gets the coords.

jrg96 commented 9 years ago

@royalharsh http://stackoverflow.com/questions/7452215/geolocation-showing-wrong-location-in-google-map

hvardhanx commented 9 years ago

@GhostAlgorithm I think then we should assume that it would show the correct place on mobile phones.

jrg96 commented 9 years ago

@royalharsh made a little update, don't think this will fix the problem, but is the only thing we can do, it is supposed if you enable high acccuracy, at least in mobile devices, will use the GPS, the params explanation is here:

https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions