Play .SWF files from internal storage in android webview in nexus 7 android

ぃ、小莉子 提交于 2019-12-08 01:32:24

问题


Cant play .swf(flash files) files from internal storage in android webview on jellybean installed devices (for eg:-nexus7) but i can play .swf(flash files) on android honeycomb devices... Also i figured this out as jellybean onwards android stopped supporting flash files plugin and even adobe stopped developing for the same in android.

Here is some code snippets that i tried with no results----

wv = (WebView) findViewById(R.id.webView1);
    String url =Environment.getExternalStorageDirectory()+"/FolderName/Filename.swf";
    wv.setWebChromeClient(new WebChromeClient());//also tried WebViewClient
    wv.getSettings().setJavaScriptEnabled(true);
    wv.getSettings().setPluginState(PluginState.ON);
    wv.getSettings().setAllowFileAccess(true);
    wv.getSettings().setUseWideViewPort(true);
    wv.loadUrl(url);

only a small icon is shown at the centre of webview. [Note- i have even tried to load using html file but nothing worked]


回答1:


I found a workable solution...dont know how feasible it is but this solution works for me follow this steps..

Step1->Download flash player apk from this

Link to download Flash Player apk

Step2->After downloading go to settings--->security---->Check "Unkown sources option".

Step3->install the apk that you downloaded+

Now your webview code will work and .swf files can be played inside webview

[note-download flashplayer apk for android 4.0 devices for ics and above].




回答2:


It is not possible.

Android no longer supports Flash files.



来源:https://stackoverflow.com/questions/14280648/play-swf-files-from-internal-storage-in-android-webview-in-nexus-7-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!