物联网技术
直播中

陈兵

11年用户 82经验值
擅长:95724
私信 关注
[资料]

Android webView播放flash的问题

Java代码
  public class BrowserTest extends Activity {
  private WebView mWebView;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mWebView = new WebView(this);
  mWebView.getSettings().setJavaScriptEnabled(true);
  mWebView.getSettings().setPluginsEnabled(true);
  mWebView.loadUrl("http://m.kongregate.com/games/Jiggmin/the-game-of-disorientation-mobile");
  setContentView(mWebView);
  }
  @Override
  protected void onPause(){
  super.onPause();
  mWebView.pauseTimers();
  if(isFinishing()){
  mWebView.loadUrl("about:blank");
  setContentView(new FrameLayout(this));
  }
  }
  @Override
  protected void onResume(){
  super.onResume();
  mWebView.resumeTimers();
  }
  }
  public class BrowserTest extends Activity {
  private WebView mWebView;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  mWebView = new WebView(this);
  mWebView.getSettings().setJavaScriptEnabled(true);
  mWebView.getSettings().setPluginsEnabled(true);
  mWebView.loadUrl("http://m.kongregate.com/games/Jiggmin/the-game-of-disorientation-mobile");
  setContentView(mWebView);
  }
  @Override
  protected void onPause(){
  super.onPause();
  mWebView.pauseTimers();
  if(isFinishing()){
  mWebView.loadUrl("about:blank");
  setContentView(new FrameLayout(this));
  }
  }
  @Override
  protected void onResume(){
  super.onResume();
  mWebView.resumeTimers();
  }
  }


回帖(1)

dfa f ff

2016-12-30 09:50:14
问题是什么?
举报

更多回帖

发帖
×
20
完善资料,
赚取积分