5

I am making my flash game into an Android app with the following code. It works just fine but the compiler gives the error

The method setPluginState(WebSettings.PluginState) from the type WebSettings is deprecated

Here is the code.

webview.getSettings().setJavaScriptEnabled(true);

webview.getSettings().setPluginState(PluginState.ON);

webview.loadUrl("file:///android_asset/myflashgame.swf");

This code works but not for long. How can I achive the same effect? I read that WebView plugins will not be supported in the future. Is there another way to make an app of my flash game?

I heard about Adobe AIR. Is that still supported? Will it still work in the future?

Murat Kaya
  • 193
  • 1
  • 18

1 Answers1

-3

Yes, you should use AIR to compile your game to an Android app. It is doable using just the SDK. Google for examples if the ones provided with the SDK are not sufficient.

If you are just starting out it is probably easier to build the app directly from Flash Builder by choosing New > ActionScript Mobile Project and select Android as the target.

Simon Groenewolt
  • 10,607
  • 1
  • 36
  • 64
  • But I only have the .swf file. Can I still do this? Also does AIR apps use flash? Will my app run on every device? – Murat Kaya Jan 29 '14 at 13:42
  • If you only have the SWF you are out of luck - you need to have the source to create an Android app using AIR. The Android app will not be dependent on the flash runtime on the phone itself - all dependencies will be packaged with the app. – Simon Groenewolt Jan 29 '14 at 14:11