Help!
code code code, playing a video from file.. using the "video view"
widget. not at all successful. the developers page claims this is
easy.. i beg to differ... for first time coders, very frutstrating..
if you can help., please do.
package info.shouraig.com;
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.VideoView;
public class XSO3 extends Activity {
private static final String TAG = "XSO3";
VideoView videoXSO3;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.d(TAG,"onCreate started");
VideoView video = (VideoView) this.findViewById
(R.id.VideoXSO3); my title
Uri uri = Uri.parse("//info.shouraig.com/" + R.raw.C:/
XSCycling2.mp4); my video
video.setVideoURI(uri);
video.setMediaController(new VideoView(this));
video.requestFocus();
video.setOnCompletionListener(this);
video.start();
}AssetFileDescriptor afd = getResources().openRawResourceFd
(R.raw.video);
// Create a new media player and set the listeners
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setDataSource(afd.getFileDescriptor(),
afd.getStartOffset(), afd.getLength());
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en