I am developing chat application. Currently i have implemented all functionality in chat screen. For sending image , video and text. I can able to download image.
Now i want to download videos like whatsapp does. For eg, when click on download video and navigate to other screen and back to chat screen that video downloading.
My question is that what functionality whatsApp uses for downloading videos?
I can able to download video simply using BroadcastReceiver. But i need same functionality same as whatsApp.
Advanced help would be appreciated !
You can write separate DownloadManager class. It should be singleton.
All the work related to downloading any file will be done by this Manager. It will also hold state of the downloading file.
So next time user come into that chat screen, You will need to ask DownloadManager about state of that and it will return that.
Related
I am developing an application where downloaded video can not be accessed by user outside the app. I want to know how to make it possible that user can not accessed video outside the app and only play it in the app. thanks.
Yes it's possible to do so infact popular apps like youtube do it when you download a video for offline loading. you have to encrypt the video and delete the original. After doing that decode it back when you want to play
Which approach is the best for the video downloader app? Download manager or url.openConnection. I want the user to be able to download as many files as he wants simultaneously and also enable him to abort the download of any individual file wenever he wants.
Yes ,it's possible if you have url of photo, video, song or whatever... Take a look this theme on stack overflow :
How to download and save an image in Android
Is it possible to get a video thumbnail from a video that is private to your app? (thats probably the best way to explain it)
I have an app which runs exclusively on a 4.3 device of which the user has no control over. Therefore, the standard getvideothumbnail() function doesn't work as the function requires the user to actually look at the file before creating a thumbnail accessible to other apps.
So, if an app autonomously downloads a video, and the user has no interaction to make android create a thumbnail, how can I obtain a thumbnail?
thank you for any help.
The requirement is to list a Videos thumbnails and on clicking it should play related video into Application. i am able to play url where video is located using Video View. But now i want to implement this thing in a better ways like Watsapp and instagram. If anybody have a good experience in this reference please share with me. I want to play around caching video and playing videos from cache without buffering (Video view is showing buffering bar and very slow in performance user have to wait a lot for starting a Video). Any kind of help will be appreciated. thanks.
I did it own my own. It's very simple to implement What i do is to download the video with async task along with a progressing seek bar. Once it's downloaded i'll save it in a Folder in my sdcard. We should create a Folder named as Application name so easy to identify and also always available videos with out opening application as well and next time however when i want to watch video again in my application it just check weather it is available in sdcard if yes then play immediately if not then download it. I am happy.
I want to download a video content on the click of the sync button. By clicking it, a background service is started to download the content. How do I go for it? Meaning what is the procedure or the best practice or methodologies generally the applications follow to start a service in the bg? Also do I need to use AsyncTask for performing the bg operations?
If so how? Any sample code or tutorial is available? Please help me.
If your video is hosted so that just by hitting the url in the browser, video starts downloading instead of streaming, you can use a webview and load it with that url.What will happen next is that the web view will be diminshed by itself as the download will be started and the video will be saved in the default download folder in the hard disk of your phone.This way you are by passing the headache of managing any thread created by your own to download the video as the andorid itself will take care of the download then.