Does Android support videos played when downloading?

by quill » Thu, 13 May 2010 17:01:31 GMT

Sponsored Links
 Hi all,
When I am  downloading a video from internet,  I want to play the
video, does Android support this? How can I do it?


Does Android support videos played when downloading?

by quill » Fri, 14 May 2010 09:28:54 GMT

 Anybody help?


Sponsored Links

Does Android support videos played when downloading?

by Mark Murphy » Fri, 14 May 2010 09:35:22 GMT


Yes, Android supports streaming video. You "do it" by writing an Android
activity that uses either VideoView or a combination of MediaPlayer and
a SurfaceView. Your video has to be in one of the supported formats: 

and, at least for MP4 files, they have to be "safe for streaming":

Other Threads

1. Custom Compound Control

I'm trying to learn how to build my own custom compound control
component by reading:

I created my own view class and inherited it from RelativeLayout like

public class MyCompoundView extends RelativeLayout

I also wrote a constructor like so:

// Constructor version for instantiation from XML layout file.

public MyCompoundView(Context context, AttributeSet attrs)
        super(context, attrs);

and created an main.xml file that uses it:


Everything works fine.  What I can't figure out is how to get access
to the attributes in the xml to read the hello string so I can display
it.  I can't find an example of someone doing this that works for

The LabelView from the ApiDemos does something that looks good:

But when I try to modify this for my program as shown here:

text_ = new TextView(context);

TypedArray a = context.obtainStyledAttributes(attrs,

CharSequence s = a.getString(R.styleable.MyCompoundView_text);
if (s != null) {

I get the compiler error:  R.styleable cannot be resolved.

So I tried to use this instead:

// see:

LayoutInflater inflater = (LayoutInflater) context.getSystemService
inflater.inflate(R.layout.my_layout, this);

I get the compiler error:  R.layout cannot be resolved.

I'd like to be able to share my composite control with others, so I'd
want it to be flexible in that I can define my own attributes.  Also,
it should allow users to declare the control in XML and not just
instantiate it in Java code.

Any hints on how to do this?




2. Creating mutable Bitmap directly from a File - performance?

Hi there!

I am using the Canvas class to draw things onto existing images.
Right now I am using the following code:

// File is a JPG file, e.g. "example.jpg"
Bitmap immutableBitmap = BitmapFactory.decodeFile(file.getAbsolutePath
Bitmap b = immutableBitmap.copy(Bitmap.Config.ARGB_8888, true);
immutableBitmap = null;

Canvas c = new Canvas(b);
Paint p = new Paint();
// drawing starts here

As you can see I first read a bitmap from a file, just to create a
mutable copy of it in the next step. But isn't this a huge lack of
performance? Wouldn't it be better to create a mutable bitmap
directly? And how may I achieve this, if possible?

Thanks in advance & regards

Marc Reichelt   ||


3. Chess Walk

4. Googlewave-Bos Wilber

5. does XT9 keyboard support in Android 2.0?

6. Managing receiving/making calls with MediaPlayer

7. Join here