Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

1 solution

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.
 
Share this answer
 
Comments
kalkwarf 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 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 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 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900