That's not a valid URL. It needs to be something like .mp4.
On Friday, August 24, 2012 3:35:04 AM UTC-5, sree wrote: > > hi friends i would like to play video from url (you tube video) in my > app,t tried it but it cant play,any one help me. > this is my code > > > > package com.aiss; > > import android.app.Activity; > import android.net.Uri; > import android.os.Bundle; > import android.widget.MediaController; > import android.widget.VideoView; > > public class KakadAarathiActivity extends Activity { > /** Called when the activity is first created. */ > String srcPath="http://youtu.be/dhCdd9RKMcw"; > @Override > public void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.main); > > VideoView vv=(VideoView)findViewById(R.id.kakadvideo); > vv.setMediaController(new MediaController(this)); > vv.setVideoURI(Uri.parse(srcPath)); > vv.start(); > } > } > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en