How to upload the image to a server in Android PhoneGap?

How can I use an Android phone as a realtime MJPEG video server?

  • I'm trying to use my phone as a realtime MJPEG video source.  So far, capturing frames and converting them into JPEGs is no big deal.  My real issue is sending the multipart response properly. There's tons  of documentation about sending multipart responses out there, but the  issue with them is that they all expect that all of the images are  available at the time the HTTP request comes in (such as would be used  for a multi-image upload). In order to stream in realtime, of course, I  need to be able to begin to send the multipart response while  continually adding jpegs in the body. I'm by no means a HTTP buff, so  it's not desirable for me be required to roll my own HTTP response and  write directly to a socket. Is there a library out there that supports  this kind of behavior? I've scoured the internet for solutions, but I  really don't see anything useful out there. Any ideas? Worst case scenario, I'd be willing to look at  human-readable documentation of how to write a multipart response by  hand, but I'd really just rather use a library if that's possible. Thanks in advance.

  • Answer:

    I dont think that you want to send images via http to play video. What you want is create/record a video, comvert it to a streamable format and then send it across a UDP connection. Use multicast if you want to send same video to different devices.

Sidhu Jagdeep at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.