开发者

How to open my custom video player when i click a you-tube link in android?

I have installed a video player in my Android box. Currently i am not able to play the you-tube videos in my browser. So i would like to open my player when the u开发者_如何学Pythonser clicks a you-tube link. Then the video will be played in my browser.

Please guide me with some pointers on how i can do this?


You can use this code on your click on code:

  Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(url));// url is your URL for YouTube video
                        view.getContext().startActivity(intent);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜