Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Web Automation GPS
I am working on a fun web site that will show the progress of someone taking a cross-country trip. I wish to update their progress in real-time and display it on a map. Also, I will receive pictures from the person and create a simple gallery. The person taking the trip has an Android phone with GPS and a camera.
 
My question is: How can I automate the receipt of locations and pictures from the phone and keep the site up to date? I wish to avoid manually shuffling files and updating the site multiple times a day.
 
How can the person on the road send me locations and pictures? Will they need a special app? How do I receive the pictures and locations and automatically include them in the map and gallery? What is waiting for the information?
 
I am new to web programming, but am a long-time applications programmer becoming acquainted with web capabilities. Therefore, a few hints regarding technologies is usually enough to get me going.
 
Any help is appreciated.
Posted 16-Dec-12 7:23am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You need an app on the phone that sends location data through a web service to your database. This app would let you upload pics as well.
 
A web service is your way to get your phone app able to pass data through the web to your DB.
  Permalink  
Comments
kalkwarf at 17-Dec-12 14:13pm
   
Christian, thanks for the reply.
 
I guess I'll have to start looking at Android development.
 
I wonder how an ISP would react if I wanted to install a service(?).
Christian Graus at 17-Dec-12 14:39pm
   
A web service is not a service. It's part of your web site. Nowadays they tend to be RESTful, which just means they pass data through normal HTTP calls, often with JSON.
kalkwarf at 18-Dec-12 21:22pm
   
Once again, thanks for the help, Christian.
 
I've been doing some reading, but haven't concluded much. If I could impose once more for some advice...
 
Note, I am writing my web site using ASP.NET MVC.
 
Web Services seems reasonably easy to create. It appears that the latest technology is WCF (?).
 
My biggest question is what would the service interface look like? What I need is something like this:
 
UploadImageInfo(string caption, string description, string timestamp, byte[] image)
 
In particular, what should be the type of the last arg (image)? The examples I found seem to either use byte[] or an encoding (Base64...). The flip side is that I will likely be writing an Android app to send the data to my service. Is there a preferred method for sending binary files? Is one way or another simpler for an Android app?
 
I am beginning to think that a web service might be overkill. It seems like it may just be as simple to create an admin page and provide the means to do an old-style upload.
 
I understand that these are newbie questions and greatly appreciate any help you can offer.
Christian Graus at 18-Dec-12 22:57pm
   
WCF is dead and gone. RESTful services are the way to go. VS2012 has lots of support, but it's easy to do in 2010. I've done it.
 
One way to send images is to send a URL to an image. A byte[] is pretty vanilla, then you'd need to convert it in to a known format.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 16 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100