YouTube的意图开始在浏览器的Andr​​oid [英] Youtube intent starts in browser android

查看:135
本文介绍了YouTube的意图开始在浏览器的Andr​​oid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照有关如何使用YouTube GDATA的教程。填充与YouTube和一的onclick视频列表视图。该人士$ ​​C $ c是从该网站availeable:的 http://blog.blundell-apps.com/click-item-in-a-listview-to-show-youtube-video/

I have followed a tutorial on how to use the youtube gdata. Populating a listview with videos from youtube and a onclick. The source code is availeable from this site: http://blog.blundell-apps.com/click-item-in-a-listview-to-show-youtube-video/

在的onclick出头似乎出问题。它应该启动视频的网址,但只到webrowser和youtube.com

On the onclick somethings seems to go wrong. It should start the url of the video, but it only goes to the webrowser and youtube.com

有人可以来看看吗?

编辑:

一切工作了。这似乎是使用JSON播放/默认,而不是播放器/手机正常启动的目的。

推荐答案

这好像选在你连接的示例源的URL不是一个很好的用于这个目的。如果你通过 GetYoutubeUserVideosTask 的来源,你会发现,他们拉出JSON的 URL值播放器 - >默认播放器 - >移动值从每个对象中的项目阵列,它不只是加载网页,如果你点击它。

It seems as though the URL chosen in the example source you linked isn't a good one to use for this purpose. If you look through the source of GetYoutubeUserVideosTask, you'll notice that the value they pull out of the JSON for url is the player->default or player->mobile value from each object in the items array, which does just load a web page if you click on it.

您可以尝试修改例子拉出内容之一网​​址从JSON对象,而不是,它应该直接加载到视频播放器。

You might try modifying the example to pull out one of the content urls from that JSON object instead, which should load the video player directly.

心连心

这篇关于YouTube的意图开始在浏览器的Andr​​oid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆