D dboggs411 New Member Licensed User Longtime User Mar 28, 2011 #1 I can play flash movies on the regular browser after installing the adobe flash app. However, this doesn't work for the Webview. A response on another discussion group said this could be enabled with the following code in Java: WebView mWebView = (WebView) findViewById(R.id.WebView01); mWebView.getSettings().setPluginsEnabled(true); How would I do this in B4A? Along the same lines, how can I enable the YouTube player in B4A?
I can play flash movies on the regular browser after installing the adobe flash app. However, this doesn't work for the Webview. A response on another discussion group said this could be enabled with the following code in Java: WebView mWebView = (WebView) findViewById(R.id.WebView01); mWebView.getSettings().setPluginsEnabled(true); How would I do this in B4A? Along the same lines, how can I enable the YouTube player in B4A?
Erel B4X founder Staff member Licensed User Longtime User Mar 29, 2011 #2 You can do it with agraham's Reflection library: Code: Sub Globals Dim wv As WebView End Sub Sub Activity_Create(FirstTime As Boolean) wv.Initialize("wv") Dim r As Reflector r.Target = wv r.Target = r.RunMethod("getSettings") r.RunMethod2("setPluginsEnabled", True, "java.lang.boolean") End Sub What do you mean with enabling the YouTube player? Upvote 0
You can do it with agraham's Reflection library: Code: Sub Globals Dim wv As WebView End Sub Sub Activity_Create(FirstTime As Boolean) wv.Initialize("wv") Dim r As Reflector r.Target = wv r.Target = r.RunMethod("getSettings") r.RunMethod2("setPluginsEnabled", True, "java.lang.boolean") End Sub What do you mean with enabling the YouTube player?
alfcen Well-Known Member Licensed User Longtime User Jun 12, 2011 #3 Found this thread after encountering the same problem. Will future versions of the webview handle this without Reflector? To agraham: no disrespect intended. :sign0089: Upvote 0
Found this thread after encountering the same problem. Will future versions of the webview handle this without Reflector? To agraham: no disrespect intended. :sign0089:
Erel B4X founder Staff member Licensed User Longtime User Jun 12, 2011 #4 Plugins are now enabled by default (since v1.5). Upvote 0
alfcen Well-Known Member Licensed User Longtime User Jun 12, 2011 #5 I am running Ver 1.50. Without Reflector the webview shows nothing but an "Get Adobe Flash Player" icon. With reflector (and Flash Player 10.3) this page comes up just fine: Live NASA TV In Webview auto-complete I can see JavaScriptEnabled (by default), though. Upvote 0
I am running Ver 1.50. Without Reflector the webview shows nothing but an "Get Adobe Flash Player" icon. With reflector (and Flash Player 10.3) this page comes up just fine: Live NASA TV In Webview auto-complete I can see JavaScriptEnabled (by default), though.
Erel B4X founder Staff member Licensed User Longtime User Jun 12, 2011 #6 You are correct. There was a bug with WebViews created with the designer where the PluginsEnabled was set to false. It is fixed for the next update. Upvote 0
You are correct. There was a bug with WebViews created with the designer where the PluginsEnabled was set to false. It is fixed for the next update.
alfcen Well-Known Member Licensed User Longtime User Jun 12, 2011 #7 Great. Looking forward to the next update. No rush on that, thanks to agraham's Reflector the problem can be worked around very easily. Upvote 0
Great. Looking forward to the next update. No rush on that, thanks to agraham's Reflector the problem can be worked around very easily.
margret Well-Known Member Licensed User Longtime User Jun 28, 2011 #8 Flash Plugins I removed the message. Found the Answer. Thanks. Last edited: Jun 28, 2011 Upvote 0