Problem with webview and youtube

Russo

Member
Licensed User
Longtime User
Solved: Problem with webview and youtube

Hi all, i have a problema with webview and youtube.
My app show a video list, and when clicked, show another activity that only have a webview.
The Webview data:
WebView1.JavaScriptEnabled = True
WebView1.ZoomEnabled = False
WebView1.LoadUrl("http://www.youtube.com/embed/7vdk80F05Bs")

If open this url from Navigator, it show correctly, when launch my app, in my Galaxy S (2.3.3) show correctly, but in all other devices i try (tablet with android 3, tablet with android 4, galaxy SII with andoid 3, galaxy SII with android 4), the screen are black. With android emulator, the video play ok.

App don't crash, only black screen. Same times, if tap several times in tablet screen, the video chage to full screen and the video is show.

I try to play youtube videos from youtube intent, but i can't control several paramteres (full screen, automatic play after load, etc)

There is other way to play youtube videos ?
 
Last edited:

Russo

Member
Licensed User
Longtime User
Two weeks modifying code, two weeks try several options and ...... the solution are .... Erel !!!!! ( from now .... Erel "Android Master" ):sign0142:


THX, THX and THX
 

adamioan

Member
Licensed User
Longtime User
Try to add this code to the manifest editor:
B4X:
SetActivityAttribute(main, android:hardwareAccelerated, "true")

Hi Erel, I did put this line in the Manifest editor but the project cannot be compiled.
No resource identifier found for attribute 'hardwareAccelerated' in package 'android'
I use
android:minSdkVersion="4"
android:targetSdkVersion="11"

Any ideas?
 
Last edited:
Top