1

I have seen at least 20-30 posts on SO regarding this but still haven't got the answer. Can we load an swf file in Android webview or not? I have an HTML page with swf object embedded in it. All HTML content loads except the swf file. I have also installed the Flash Player from Adobe archives on Android device(2.3) but it doesn't work.

In this post, it doesn't work. But the same method is working on this post. Why?

My aim is to run a sencha app on Android device containing the above HTML file, but first I'm unable to load that HTML file with swf content using a native app.

Community
  • 1
  • 1
Diffy
  • 2,339
  • 3
  • 25
  • 47
  • @CommonsWare you can help please. – Diffy Apr 27 '14 at 18:47
  • Given this SO question: http://stackoverflow.com/questions/19362049/setpluginsenabled-not-exist-for-webview what is your build and target SDK for your project. You do realize that your app won't run on newer devices since plugins support has been removed? – Morrison Chang Apr 27 '14 at 19:08
  • @MorrisonChang yes i know.Even there is no Flash Player in adobe archives for Android 4.0+. But i have some animated content( swf object) embedded in an HTML file. Now is there a way to load the content in webview or i cant do that with Android? – Diffy Apr 27 '14 at 19:13
  • I am asking webview because my ultimate aim is a sencha app for that which runs in a webview in Android – Diffy Apr 27 '14 at 19:15
  • 1
    The answer is Android did in the past for older API, not newer ones. If you are limiting this project to older versions of Android AND are targeting the correct API level then it should work. It may help to answer a few more questions: 1) What device are you testing on, 2) have you confirmed that the plugin works for your swf file by using the stock browser. 3) What is your target SDK for your project. – Morrison Chang Apr 27 '14 at 19:33
  • @MorrisonChang of course i wanted to target majority of the phones but if it doesnt support the newer versions, i wont go for it. – Diffy Apr 27 '14 at 19:34

1 Answers1

3

Short answer: when Flash was supported on Android, it required to enable plugins support on the WebView. But it's not supported anymore since Android 4.1 (Jellybean). And Android 4.4 devices use a new WebView implementation which is garanteed to not support any plugin.

If you want this to work, you have to install Flash on an older device with Android 4 or lower.

BladeCoder
  • 12,779
  • 3
  • 59
  • 51
  • Ok @BladeCoder. I will accept the answer as its correct. But i have some animated content( swf object) embedded in an HTML file. Now is there a way to load the content in webview or i cant do that with Android? – Diffy Apr 27 '14 at 19:35
  • 1
    I think there is a way only on older devices, yes, and only if the flash plugin is installed. – BladeCoder Apr 27 '14 at 19:39