I know this is an old question, but if someone is looking for something like this, the following is now available:
http://developer.android.com/guide/google/gcm/index.html
This, in fact, allows you to send a message from the server to the application on the Android device (it replaces C2DM, which did a similar thing).
Update
Currently, Google GCM is being replaced by Google Firebase Cloud Messaging:
Using a message-based service based on such applications, complete the following steps:
- Add a message subscription service to the application (e.g. Firebase)
- Application is registered using the cloud messaging service at startup
- When the server wants video from the phone (as indicated above), the server sends a message to the application
- The application opens connections to the streaming server and starts transmitting video to the server.
Note Below is a comment on how this approach prevents an inbound connection from the server to the Android phone.
This, in fact, is not how phone streaming usually works. The phone actually creates an βoutboundβ connection to the streaming server, which then streams the video. Other devices that want to see the video then stream it here.
There are several reasons why this is the preferred approach, one of the key of which is the support of the quality streaming service, which will be played on most common devices, browsers, OS, etc., requires a few bit-bit transcoding and even encoding in in some cases, as well as packaging and servicing in an appropriate streaming packaging format. Doing all of this on a mobile device would be very complex and intense.
source share