Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to play flash file (SWF) in in android but i can't i use this code to show it in WebView but it not work for me.
Java
mWebView = (WebView) findViewById(R.id.webview);
       mWebView.getSettings().setJavaScriptEnabled(true);
       mWebView.getSettings().setPluginsEnabled(true);
       mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
       mWebView.setBackgroundColor(Color.parseColor("#00FF00"));
       mWebView.loadUrl("file:///android_asset/game.swf");
Posted
Updated 3-Jul-16 8:55am
Comments
Sergey Alexandrovich Kryukov 29-Apr-15 16:45pm    
My advice could be: get rid of .swf games. There are much better and legitimate approaches. This format is way too proprietary, not commonly accepted, not a part of W3 standard, will hardly be ever accepted.
—SA

Don't bother. Shockwave is a dead platform on mobile and soon to be dead on desktop machines too.
 
Share this answer
 
setPluginState method was deprecated in API level 18.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900