Android – Play flash files in Android Jelly Bean

androidflash

We are using WebView to play local SWF files in our Android app.

WebView webview=(WebView)findViewById(R.id.web_play);
File decfile = new File("/mnt/sdcard/flashplay/temp/test.swf");
Uri uri = Uri.fromFile(decfile);

if(decfile.exists()){
    webview.getSettings().setJavaScriptEnabled(true);
    webview.getSettings().setPluginsEnabled(true);
    webview.getSettings().setAllowFileAccess(true);
    webview.loadUrl(uri.toString());
}

The code does not work in Jelly Bean, we have the flash plugin installed and able to play flash videos in Browser. But no luck in getting it played within our app in a WebView in Jelly bean.

Best Answer

First: Flash is no longer supported in since Android 4
Second: Chrome does not support the flash player
Third: You can install (with no guarantee) older flash versions on Android 4 manually and use it in the standard Browser.

Get old versions of flash from adobe here: http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html

just download the apk and open it. make sure you are trusting apks from other sources.

edit: on my device (samsung galaxy nexus with android 4.1.2) it works just fine.

alternatively there are a dozen other local flash players in the market. you can try to integrate them.