3

I've been googling it for days and I still can't find anything, I've already tried some codes, but I'm also really noob at java so every single code I've been trying, it fails...

Well, I'm going to try to explain.

I'm coding an app which uses 3 activities. The first one has a button that opens the 2nd activity, and in the second activity I wanted to play an animation, but once I can't make it play a video, nor a .gif, I've converted the gif to .swf, and I still can't make it work.

Then I noticed that the problem must be mine :P

It's the first question I'm making, and I swear I've already looking at the others but I really can't find a solution... But as far as I know you're a pretty good community that like to help the others, and I really appreciate it.

Can you guys help me putting my .swf working when I launch the second activity? I'd be very grateful. Btw, if you don't understand something that I said, just let me know, I know my english isn't the best :p

Best regards, xickoh

xickoh
  • 304
  • 3
  • 10
  • Hello! We really need to see some code snippits to understand what you're attempting to do since your description is vague. Please [edit] in and format the relevant bits (_not_ the entire files!) and hopefully someone can help. – Edward Oct 03 '13 at 22:12

2 Answers2

1

Android version higher than Gingerbread(2.3) does not support Flash. For Android version below ICS(4.~), you can insert a swf file to webview.

WebView wv = (WebView) findViewById(your id);
WebSettings ws = wv.getSettings();
ws.setPluginState(PluginState.ON);
ws.setJavaScriptEnabled(true);
wv.loadUrl(SWF FilePath);

Hope this helps.

sam
  • 2,780
  • 1
  • 17
  • 30
  • Hey guys, thank you for your support. Well, once it's a bit hard to insert swf/flash into my android app, is it possible to play an animation file? For example, files such as .mp4, .gif, .3gp, etc... If it is possible can you guys tell me how? Best regards – xickoh Oct 04 '13 at 12:46
  • Hmm,,you are not accepting any answer here. Anyway, for playing gif file, I haven't tried by myself but you can check this out: http://stackoverflow.com/questions/3660209/display-animated-gif. For mp4, I found a tutorial that uses a videoview to play it: http://asmncl.blogspot.in/2012/04/android-live-streaming-using-video-view.html – sam Oct 04 '13 at 16:06
  • Hi dunamis, do you still following this "topic"? I'm very grateful for the mp4 tutorial, but I'm having other problems, can you help me? best regards. – xickoh Oct 07 '13 at 23:00
0

I'm not 100% sure that android supports flash. Unless I'm missing some part of your questions then I would go back to trying to play it as a video. You could probably use a MediaPlayer to accomplish this. I believe this is what I used when I was working on a internet video search service application.

  • Hey guys, thank you for your support. Well, once it's a bit hard to insert swf/flash into my android app, is it possible to play an animation file? For example, files such as .mp4, .gif, .3gp, etc... If it is possible can you guys tell me how? Best regards – xickoh Oct 04 '13 at 12:44