Monday, 15 June 2015

Android Eclipse- how to add a youtube video -



Android Eclipse- how to add a youtube video -

i want add together youtube video page. downloaded video , added res-> raw folder. video marked minecraft_trailer.mp4. getting error in javascript page , cant figure out is. please help.

package com.treacheryofimages.www; import android.app.activity; import android.os.bundle; import android.widget.videoview; public class otheractivity7 extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.other7); } videoview vv = (videoview)this.findviewbyid(r.id.videoview1); string filename = "android.resource://" + getpackagename() + "/" + r.raw.minecraft_trailer; vv.setvideouri(uri.parse(minecraft_trailer)); vv.start(); } }

the error coming vv.setvideouri(uri.parse(minecraft_trailer)); line

i cant tell is. perchance whats within (). also, supposed go within ()

you passing wrong variable minecraft_trailer when calling vv.setvideouri();

it should vv.setvideouri(uri.parse(filename ));

android

No comments:

Post a Comment