Android :: Showing Image While Video Buffering?
Jun 4, 2010
I have an app that displays a video using VideoView. The layout consists of a Clock and a VideoView laid out in a simple vertical LinearLayout. Here's my code snippet that I use:
VideoView mVideoView = new VideoView(this);
mVideoView.setVideoPath(myVideoURL);
mVideoView.requestFocus();
mVideoView.start();
Since the buffering of the video takes about 8-10 seconds, the layout comes up with the Clock, but the VideoView stays blank. What I want to achieve is this:
- Display an ImageView for the 10s while the video is buffering
- Detect when the video is ready to be played (onPrepared?)
- Show the Clock and VideoView and start the Video
View 1 Replies
Mar 28, 2009
I am unsure of the jargon so please bear with me, I am seeking advice on the best way to go about drawing the graphics for an app I am developing. Imagine you are creating a game of checkers, where you can drag/drop one piece at a time to a blank space on the board. When the piece is being moved, it seems to me that you should not need to redraw all of the pieces that are not being moved. Using the LunarLander example, is there a way to store the background image and only draw the piece being moved over it? I have been trying to figure out a way to capture the canvas as an bitmap that is occasionally refreshed.
View 5 Replies
View Related
Aug 6, 2010
Is there a way to change the buffer size in the media player on Android? I'm trying to stream video to mobile devices over rtsp. It works fine, but on android v1.6+ the buffer overflows leading to degraded video quality. Is there any way to configure the media player to use a bigger buffer, or take any other measures to prevent overflow?
View 3 Replies
View Related
Oct 14, 2010
I'm playing video on Android using media player via RTSP. The player takes about 12s to buffer before it starts playing. Anyone know how I can convince the player to buffer less? I have full control over the RTSP server and the SDP it returns.
View 1 Replies
View Related
Dec 14, 2009
I have a problem streaming live video files. When I stream a file say of duration 5 minutes, it stops after streaming 2 to 3 minutes and enters in to endless buffering state. The VideoViews's OnBufferingListener is endlessly executed, however it shows that the buffering is not progressing anymore : MediaPlayer's buffer says it has buffered for example 90% whereas when I call videoView.getBufferPercentage(), I get something very low, like 1% or 5% ... After a while in the buffering state, the application crashes. It seems like the buffering is taking all the memory.
View 2 Replies
View Related
Oct 13, 2010
I'm developing an application on Android 2.2. This application have to read some h264 videos using HTTP protocol. To read a video, I'm using following methods :
// INIT PART mMediaPlayer = new MediaPlayer(); mMediaPlayer.reset();
mMediaPlayer.setOnErrorListener(this); mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setOnSeekCompleteListener(this);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
// SET DATASOURCE mMediaPlayer.reset(); mMediaPlayer.setDataSource(url);
mMediaPlayer.prepareAsync();
In prepareAsync callback : public void onPrepared(MediaPlayer mediaplayer) { mMediaPlayer.start();
}
View 2 Replies
View Related
Apr 1, 2013
I can start streaming a video perefectly. However, if i pause it to go do something, or to let it pre-buffer, and i play it again, it will play for a little then stop. I look at the seekbar and it says its fully buffered. However, its not and it doesnt play anything and just sits their saying its buffering.
My guessing, well first attempt and finding the culprit, is that the service that is processing the video gets prematurely terminated and restarted thus returning that the buffer is complete.
View 3 Replies
View Related
Jun 6, 2013
I know the zeiki TB782B is cheap decent tablet but the video buffering from streaming websites is just a killer some sites are better than others Its not my internet speed that's good,but is there anyway I can improve this issue by downloading an app or some kind of hack or update?
View 1 Replies
View Related
Oct 12, 2010
There is an online stream that is 512Kb MPEG4 and total size of 312mb online and if I'm correct after looking over docs in order to play the movie I just simply put:
CODE:..................
It is triggered to play after a button press which after a few seconds after pressing the button it plays the audio BUT doesn't show the video, why not? Do I have to use a surface view or something for visual playback of the stream.
View 2 Replies
View Related
Feb 6, 2010
i want to display an image from URL,i found one example from forum .but it doing nothing. i m sending the code plz suggest me what to do package com.example.urlImage;
View 3 Replies
View Related
Nov 19, 2009
when the application is run, the image1 is displayed, expected. but when i press the button image2 is not displayed ! where am I going wrong ?
View 4 Replies
View Related
Nov 18, 2010
I'm trying to show all images from a selected category on screen. Which is the best way to accomplish this? because the drawable folder won't allow me to create subfolders i will be using a database but i don't want to save the whole image in it, can this be done?
View 1 Replies
View Related
Aug 10, 2010
I have an Android application that allows the user to select a photo that has already been taken. Once the user selects a photo, I grab the URI information for that photo, use that information to create a bitmap, and then I set the bitmap in an ImageView. This all works perfectly fine.I then give the user the option to select the picture for viewing. When the user chooses to view the picture, I launch an ACTION_VIEW intent, passing the URI data. Intent intent = new Intent(Intent.ACTION_VIEW, pictureUri);startActivity(intent);As you can see, this is very simple code, nothing special going on. The problem is that, when I run this code on my Droid running Android 2.1, about 6 or 7 times out of 10, the application will display the correct picture. But the other 3 or 4 times, I get shown the wrong picture. Also, each time the wrong picture is shown, its always the same incorrect picture being shown. The fact that I see the right picture the majority of the time leads me to believe everything I'm doing in code is fine, so can anyone tell me if you have seen this problem before, and better yet, is there a solution? Here is the exact sequence that I observe on my Droid when I run this (Note: Image URI is already saved before I start the Activity):
- I choose "View Photo" in the Activity
- When things work, I get taken to the gallery and shown image 74
- Each time things do not work, I get shown image 82
Keep in mind that when I start the Activity with the URI already saved (retrieved from database), I set an ImageView based on the URI data in onCreate(), and the Image being shown in the ImageView is ALWAYS the correct image. It's not until I actually decide to view the image using ACTION_VIEW that I see odd behavior. And I know it's not something specific about these 2 photos. I observed this behavior using other photos in the past, and got the same behavior.
View 1 Replies
View Related
Feb 3, 2010
I have to display 10 images(which will be taken form url) and related Text Both imageUrl and text will come from XML parsing.My Question is how we can display image into scrollable format
View 2 Replies
View Related
Mar 30, 2010
My app shows a list of items, where each line is an item title with its image asides, the line reserves 70% of space for text and 30% for image. Imagine what iphone app store looks like. Which view/layout combo is recommended for this purpose? I googled and find this article
View 2 Replies
View Related
Nov 17, 2010
i'm having the above problem when switching my activity. In the first activity i have a GalleryView showing all my images and an ImageView show the selected image from the gallery. Now i want to switch to the next activity and keep the same image from the ImageView on screen in the second activity. Here is how i show my images:Is there like an id or something saying what's on screen at the moment of the switch? How can i accomplish this?
View 2 Replies
View Related
Oct 29, 2010
I'd like to use a 1x1 size Nine-patch image from Android drawable resources. When I'm trying to display it with <ImageView> in my layout xml file, this one is never showing up on the Android emulator device. Here's the xml code below. Code...
View 1 Replies
View Related
Jan 14, 2013
In all of the screen shots showing off Google Now, there is always an image of a card showing meeting with someone at a particular location, the time it takes to arrive at that location, and a map of the meeting location. I have not been able to figure out how to get Google now to do this.
Presumably, that is a function that arises from a Google Calendar appointment. I've created meeting appointments and used specific addresses for the meeting location, but when Google Now displays that appointment, it displays the name of the meeting and the address only - no travel time and no map. In contrast, for places that I visit regularly, Google Now does display a map and travel time to those locations. But those are not regular appointments.
SCH-I535
View 3 Replies
View Related
Sep 21, 2010
I do like sense, but would love to know what the differences are. I think id like to see a video if possible
View 3 Replies
View Related
Sep 12, 2010
I made this video to show the difference between a stock Evo and one that has the FPS uncap via a custom kernel, in this case, netarchy-toastmod 4.1.7. See my sig for the kernel download link. I shot this at 60fps and 1080p in order to try to capture the difference in framerate before and after. 720p max on youtube. I believe it's the sharpest video out there showing off the difference. Look for two things: scrolling smoothness, and finger tracking. Tracking is the ability of the phone to keep the screen "stuck" to the finger. The better it does this, the better the tracking, and it makes the phone feel very responsive to your commands.
To many people, the difference is night and day. To some, they don't see/feel the difference. I find that hard to believe, which is why I made this video. The truth is out there.
TIP: Click on the video below and watch it from youtube. It's larger and sharper there.
YouTube - HTC EVO: 30FPS uncapped w/ custom kernel - comparison w/ stock
View 1 Replies
View Related
Jan 29, 2009
I want to get thumbnail from a video. So I need to extract first frame in the video. let me know how can I do that in Android.
View 2 Replies
View Related
Jul 6, 2010
I believe this is pretty trivial but I can't get it to work. I want to display a default image in gallery elements (ImageViews) while their actual image is being fetched from the net. Right now, nothing is shown for an ImageView which its image has yet to arrive. Once it arrives it is immediately shown. What I tried is right after the instantiation of the ImageView to call its setImageResource function like so:
final ImageView i = new ImageView(mContext);
i.setImageResource(R.drawable.loading);
But it doesn't seem to work. Below is the full getView() function.
public View getView(int position, View convertView, ViewGroup parent) {
final ImageView i = new ImageView(mContext);
i.setImageResource(R.drawable.loading);
// if the drawbale is in the buffer - fetch it from there
Drawable bufferedImage = DataManager.getInstance().getImagesBuffer()[position];
if (bufferedImage != null){ i.setImageDrawable(bufferedImage);
BitmapDrawable drawable = (BitmapDrawable) i.getDrawable();
drawable.setAntiAlias(true);
} // if drawable is not in buffer - fetch it from the net via AsyncImageLoader
else { String imageUrl = DataManager.getInstance().getImageBufferInstance().getImageUrl(position);
Drawable downloadedImage = AsyncImageLoader.getInstance().loadDrawable(imageUrl, new ImageCallback() {
public void imageLoaded(Drawable imageDrawable, String imageUrl) {
if (imageDrawable == null) { imageDrawable = getResources().getDrawable(R.drawable.icon);
} i.setImageDrawable(imageDrawable); BitmapDrawable drawable = (BitmapDrawable) i.getDrawable();
drawable.setAntiAlias(true);
} } ); i.setImageDrawable(downloadedImage);
} i.setLayoutParams(new CoverFlow.LayoutParams(Utils.getInstance().getScreenWidth() / 2, Utils.getInstance().getScreenHeight() / 2));
i.setScaleType(ImageView.ScaleType.CENTER_INSIDE); return i;
View 1 Replies
View Related
Feb 20, 2009
I am using the latest git code to play with. I wanna know how can I play with GALLERY, it always complain "NO MEDIA FOUND", I do wanna know where and how can I put some JPG, BMP or something other media stuff into the emulator/Real device to make the GALLERY app display them.
View 2 Replies
View Related
Oct 15, 2010
Is it possible to get notified every time a new image,video is inserted on the sd card of your android device and how? I have looked at the Media Scanner class which indexes files but I can't find how to do get notified from that only how to notify Media Scanner of a new image I have created.
View 1 Replies
View Related
Apr 11, 2010
When I use the VideoView to play the RTSP streaming, the VideoView will buffering some cache buffer. Is there any method to tell the VideoView DON'T buffer? My code:
String VideoUri = "rtsp://192.168.5.121:6666/live/h264"; mVideoView = (VideoView) findViewById(R.id.video_view); mVideoView.setVideoURI(Uri.parse(VideoUri)); mVideoView.start();
View 5 Replies
View Related
Jun 3, 2010
I am using VideoView to display a video in my app. The problem is that, once the layout gets created there is lag of almost 10-30 seconds before which the video starts to play. I can see in LogCat that the video is buffering during the lag. Is there a way I can minimize this lag, or tell MediaPlayer to play the video sooner?
View 1 Replies
View Related
Oct 19, 2010
Is double buffering makes any sense on android? Can it be implemented?
View 1 Replies
View Related
Sep 18, 2009
Hi,
Is there any api on android which generates a Thumbnail image from an inputstream which is a video file?
Thank you.
View 1 Replies
View Related
Sep 1, 2010
If you click on the top left corner, on the logo of whatever channel you are listening to, it gives you an options menu for buffering. But I really don't know what all these numbers and settings actually mean. You click on a "Start Buffer" and there are just 5 numbers to choose from. Can anyone explain what all these settings are?
View 1 Replies
View Related
Jun 9, 2009
Do anyone here having experience of applying double-buffering in Android 2D animation/ games? I'm sure this is a pretty basic functionality people will discuss about when writing games on Android, but seems like the source I found on web was pretty little. The only one I found is using OpenGL blit (intro by Chris Pruett in Google IO 2009 session). If I want only a 2D, how do I do that?
View 14 Replies
View Related