4

In a small WebView app I wrote, I am able to load YouTube and see the picture the represents a video clip, with the familiar right-pointing arrow that is supposed to start playing the video:

enter image description here

But... when I touch that arrow, nothing happens (the video is NOT played).

I did enable the plugins setting in WebView, but that didn't help:

mWebView.getSettings().setPluginsEnabled(true);

So, I searched for more clues about how to make Flash (YouTube) run embedded in my WebView and I found the following hint:

I think you also need Flash to be installed, like in Android 2.2 and above.

I am OK with the requirement for Android 2.2 but what I don't understand is what "install Flash plugin" means: YouTube plays fine in Android's default browser (which is based on WebView AFAIK) and also in the YouTube app that's also installed in my device. Doesn't that mean that the Flash plugin is already installed?

If the answer is "no", what do I need to do to install it?

Community
  • 1
  • 1
uTubeFan
  • 6,664
  • 12
  • 41
  • 65

3 Answers3

2

The Adobe Flash plugin is available from the Android Market for Android 2.2+ devices. It may come pre-installed on a few devices, but on most it does not.

Search for "Adobe Flash" in the Android market to download it, then try running your app again.

Joseph Earl
  • 23,351
  • 11
  • 76
  • 89
1

Youtube got a HTML5 version, which means you can watch their videos without having flash installed. So better check flash suppport on a site where you can be sure that only flash is being used, eg http://www.adobe.com/software/flash/about/ which also tells you what version of flash you got installed.

Malte Köhrer
  • 1,577
  • 10
  • 19
  • Thanks for the tip and for the link. I just checked with Android's default browser the link you provided and I was surprised to see that... NO Flash is installed. Wow! Does that mean that I can play YouTube videos in my WebView **without** installing Flash? – uTubeFan Apr 26 '11 at 19:12
  • Sorry, holidays made me miss your question. Check out http://www.youtube.com/html5 – Malte Köhrer May 07 '11 at 10:12
  • Hi I have one small doubt i.e I am playing a youtube video in a web view without installing flash player.I added this code mWebView.getSettings().setPluginState(PluginState.ON_DEMAND); but that video displays with down arrow, when i click that one then only that video is playing but I don't want to display down arrow. when I call that video should play automatically. Pls help me its urgent for me. thanks in advance –  May 31 '12 at 05:29
0

Could it be a problem related to Javascript not being enabled on the webview?

  myWebView.getSettings().setJavaScriptEnabled(true);
  • 1
    No. I did that too (was too obvious for me so I forgot to mention it). Can you answer the two questions at the end of my post? Thanks. – uTubeFan Apr 26 '11 at 13:59
  • 1
    To the best of my knowledge, once you install flash on the phone and you call setPluginsEnabled(true) on your webview's settings you should be able to use flash without installing anything else. – Luca Viola Apr 26 '11 at 14:31
  • Thanks for the clue I have been looking for. I thought like you, too, but apparently there is something else I am missing. Perhaps the YouTube app and the default browser are using HTML5 and Flash **isn't** installed in my phone? How do I check whether Flash is installed? How do I install it? Thanks. – uTubeFan Apr 26 '11 at 19:08