How to send media from server to android app? - java

I am working on an Android app. I want to send images and videos from my server to my Android app. GCM allows only 4kb of data to be sent, but media files are generally of larger size so how to do this?

You don't send it over to your client using gcm. You use gcm to inform the client about new stuff to fetch from your server / the cloud.
Read the gcm-docs and the "send-to-sync" idea under advanced topics.
Check the Google IO web-api video (~ minute 30) for the big picture Google I/O 2012 and the files in android-sdk/extras/google/gcm/samples

I actually wrote two blogs posts on this. The first one shows how to send a link in the payload and then download the files using the URL.
The second shows how to send small images as part of the 4K payload.

Store the media (images, video etc.) on your server & send link of them through GCM to android app.

Related

How to upload videos to JWplayer server from android programmatically

I am using JW player in my Android application. Is there any way to upload videos from my client side(Android app) to JWplayer Server? I gone through
your site https://developer.jwplayer.com/jw-platform/docs/developer-guide/management-api/uploading-videos/ to upload videos but its not clear that the code given is to upload the videos from android app or from a intermediate server.
Any clarifications on this would be greatly appreciated.
What we tried from our android app side is to upload the videos using below,
POST URL : http://upload.jwplatform.com/v1/videos/upload?api_format=json&key=vtQmcboj&token=e2bbad0fd889d5d2e30047596cfe3789778257d2
The params i sent,
api_key
api_secret
local_video_path
You cannot upload videos directly to JW player since its a Two tier process.
I have been workign in a java application where the user can upload videos, watch it and download it.
You will have to send the key and the token for the auth request, which JWplayer thinks is not safe from their end so they just will not allow you to upload the videos to their server.
To acheive the scenario, you must be running your own server which instead upload the video to the JW platform. All the error responses will have to be handled in your server side if the upload gets failed.
Also, JW player handles resumable upload process. So, once you sent the data to your server, your server can send the data in small units and the interruption in connection will be handled in JWplayer end.
In my own scenario, my server will be handling the resumable uploads from client(since its not possible to resume uploads from client without having valid protocols embedded in Server side) and my it indeeds send the data's to the JW player for encoding.
To be more precise,
Client ----> Your server ----> JW player server.
The POST method URI which you tried is for server side coding and not meant for client side. You can refer their support team for more details, since i came to know these details after reaching out them.
As #DeadSpider answered,
It is not possible from client side. Go for a server and once you get it work, cheers!
Yesterday i got a demo project from JWplayer and it is absolutely possible now to upload videos to your dashboad from client side.
http://qa.jwplayer.com.s3.amazonaws.com/~george/BishopQA.zip
Check the above project and in upload activity you will have the code. Its working for both android and ios platforms.

Audio conference using jsp servlet

I want a make a setup where each client send their audio stream to a server. Now server mix up different audio stream and broadcast to every client and client play that sound. I tried webrtc to grab the microphone now I faced the problem how I send the data to server. Some how websocket send the blob to the server I got another issue how I mix them up and maintain synchronization. I am planing to do this using java. Most importantly I have to store the entire audio communication to server for later use.

How to send large attachments?

Say I have an account on Yahoo. They limit the attachment size I can send, although they don't limit the size of the mails I can get. How do I send large attachments?
I successfully sent (via java or c#) emails, and used google-drive (web) to send large attachments (174M), but how do I combine it? I haven't found anything that says how to add to google drive and send it.
I saw some sites that enable you to send large files, but the problem is I want the files in the email server (Yahoo/GMAIL ), not on anonymous site (and I haven't found a sites that send email, only sites that store themselves). How do I do it?
Can I send the mails via telnet somehow?
As an option, use Google Drive SDK in your application.
Before sending email, upload your file to Google Drive and send the link to the uploaded file.

Push to talk over cellular(PoC) client and server

Is there any open source PoC server and client software(Framework) for java to manage SIP and support RTP and RTCP with App Packet messages preferebly support TBCP?
Our project is to send and receive realtime voice and video over cell phones and manage sessions which created for participants and one of them can send his voice and images(his video) at the time and other participants can only receive his voice and video at the same time (exactly like Walkie Talkie with voice and video). i just know PoC servers can manage these conditions but i couldnt find any framework or server to handle it.
is there any idea.
I don't think there's anything like this out there. I work with VOIP and mobile devices for a living, and have never found a framework like this.

Check File in the server is change or not

I am trying to make an app that connect to the server.
The app is used by some devices.
If one of the devices upload something to the server, I would like other devices receive the notification about the server has something new.
My question is, how to check the server is change or not? How often we must check the server?
I wonder how the Online Messaging work, because someone send something, we receive the message ASAP
Is the concept can be use with my app?
Sounds like you want to take advantage of Google Could Messaging or GCM for short.
http://developer.android.com/guide/google/gcm/index.html
This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly).
GCM is the standard for how your apps "talk" to your servers. Either for a message in it's entirety or just a message to go check the server because it's been updated.

Categories

Resources