Android Question Help finding a phone GPS Position

Discussion in 'Android Questions' started by jaraiza, Jul 5, 2015.

  1. jaraiza

    jaraiza Active Member Licensed User

    Hi,

    I need to create a WebPage capable of showing the position on the phones on demand. How can I send a 'push' or something from a webpage, or should I keep the phones constantly sending its position?

    I'm really confused about the best way to implement this...

    Thanks a lot!
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Why do you need a push solution? Does the server send any data to the devices?

    Instead create a web service that receives the devices position every x seconds.
     
  3. jaraiza

    jaraiza Active Member Licensed User

    Hi Erel!

    Creating the WebService is the easy part, what I can't fully understand is how I can keep updating the devices position, how can I ask the device's position.

    The theory is what I don't fully understand.

    The computer asks the position? How the device knows I'm asking so can I reply (that's why I asked about a push)? Or all the devices keeps sending its position constantly to the WebService (which maybe a shared hosting account cannot support, you know, "fair use practices")?

    Thank you so much for enlightening me about this.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    The server doesn't ask the position (this is push it is much more complicated).

    Let the devices send their position every few minutes if the location change is significant.
     
  5. jaraiza

    jaraiza Active Member Licensed User

    Ok, and what method would you use if you're required to follow a phone in real time? Like checking a company's shipping bus?

    Let's say, the client want to check where a bus (of many buses) is located, so he enters a WebPage, select the user/phone to check, and follow the trail using (I guess) Google Maps.

    I'm planning using Maps once I have loc positions, but the "following" on demand part is what I'm missing in my understanding.

    Thanks!
     
    Last edited: Jul 6, 2015
  6. Erel

    Erel Administrator Staff Member Licensed User

    Search the site for custom push framework. This allows you to maintain a connection. However it will not work with a shared hosting.
     
  7. jaraiza

    jaraiza Active Member Licensed User

    Thanks Erel! That framework seems to be what I'm looking for. I'll give it a try.

    Greets!
     
Loading...