Video Preview in Android - android

I just want to know after uploading the video in Video view.After clicking on the Button,the user picks the video from sd card and then he uploades in the Video View.And everything is working fine but I want to show the preview before the user clicks on the View.Can anyone please help me to sort this issue.
Thank you

here
is a good example regarding this I guess
and to create thumbnail here is the code
Bitmap bmThumbnail = ThumbnailUtils.createVideoThumbnail(filepath, MediaStore.Images.Thumbnails.MINI_KIND);
yourimageview.setImageBitmap(bmThumbnail);

Related

setting or getting uri of captured image

I'm creating an image filter app in Android studio. first, the user selects an image from gallery or captures image using camera and it will be displayed in imageview. Then the user clicks edit button and that image is displayed in imageview of next activity where we can add filters... It works fine with low resolution images but when I select any high resolution image or click a high resolution image it is shown in first imageview but when I click edit button either the app crashes or the last image I had selected is displayed. So instead of passing bitmap I thought of passing image uri.I found the solution for image selected from gallery but I want the uri of captured image. I searched for the solution but couldn't find it. If anyone knows how to solve this problem please help me. THANKS
Could you post the code of what you have tried. A quick google search gave me this answer: How to get Image Path just captured from camera . hope it helps

Appcelerator take video screenshot for android environment return black image

I am trying to get video screenshot as image for my image view. Below are my codes:
Ti.Media.takeScreenshot(function(e) {
thisClass.Parent.VideoPlayer.Player.toImage();
Ti.Media.saveToPhotoGallery(thisClass.Parent.VideoPlayer.Player.toImage());
thisClass.AnimationVideoWrapper.setImage(thisClass.Parent.VideoPlayer.Player.toImage());
});
The problem is whenever I check my photo gallery and see from the image view, it turns out to be an image with black background color and not the video image. It supposed to capture the current playing video as thumbnail.
Any help is highly appreciated.
There is no way to take a screenshot from a video on device

How to capture image with camera and store it in a seperate folder

scene 1: I am having a task in android to capture image from its camera and store the captured image it in a separate folder,
scene1 i am now able to do now(means captured image is storing in my
customized folder(example folder name john)).
scene 2: Next task is to show all the captured image of my app in a
grid format having check box for selection of a images(just like
whats app does for image selection)
scene 2 i am able to do this from a good example to image in a grid
view like a android album gallery ,with a check box , but the thing
is that , the gallery is not showing my customized image folder and
its images where i have captured all the images from the app
please help me regarding this issue
Thanks in advance

Take a picture in android using android camera

I have a surface view, 3 buttons one each for capture, use(invisible) and retake(invisible). I am using the Camera to take a picture. On image capture, use and retake buttons become visible and capture goes invisible. How to save the image in SD card on clicking the use button. Can anyone help with any example code. ??
Inshort I dont want to skip retake and skip option after capturing a pic in android !!! No use of intents !! only using android camera
How to skip 'retake and use' option after captureing photo from camera
Here is a nice tutorial on taking picture in Android: http://www.vogella.com/tutorials/AndroidCamera/article.html
In the nutshell, after you call Camera.takePicture(), a onPictureTaken() callback is called with jpeg image in byte[]. You convert this image to bitmap (preferably scaled down) for display, and you can write this byte[] as is to a .jpg file if the user likes it.

Android - VideoView shows thumbnail of previous video

I made a video player based on VideoView widget. The videos are loaded from internet.
Everything works fine, except one little thing.
I open a video, and while it is playing I click the "Next" button to advance to the next video. And the issue is that while the next video is loading, it shows me the thumbnail of previous video.
I would like to not display any thumbnail, or at least the thumbnail of currently loading video, but deffinetly NOT the thumbnail of previous video.
So, is there a method like "flush()", or something like this to clear the videovideo and not show the thumbn. of previous video? Or at least why does it happen?
To get rid off that thumbnail, it was necessary to re-creating the VideoView when clicking Next/Prev buttons. Maybe not one of the best solution, but at least it solved the issue.

Categories

Resources