Note that there are some explanatory texts on larger screens.

plurals
  1. POFlash inside Android WebView — How do I set fullscreen automatically?
    text
    copied!<p>I am loading Flash SWFs into an Android WebView.</p> <p>I want the SWF to be instantly fullscreen and focused.</p> <p>The class name that handles flash is <code>com.adobe.flashplayer.FlashPaintSurface</code>. Watching the log, when I fullscreen the flash manually, it calls <code>com.adobe.flashplayer.FlashPaintSurface.toggleFullScreen()</code>.</p> <p>The first part of my question is: How can I call that method manually for my Flash SWF? </p> <p>Note that with a webview with a flash embedded, the only way I seem to be able to fullscreen it properly (to have Flash's <code>surfaceview</code> fullscreen instead of the flash being displayed over top of the <code>webview view</code>) is by touching the screen with two fingers until an interface pops up at the top of the screen, and doesn't happen reliably.</p> <p>For focus, inside my webview class I call:</p> <pre><code>@Override protected boolean drawChild (Canvas canvas, View child, long drawingTime) { if (child.getClass().getName().equals("com.adobe.flashplayer.FlashPaintSurface")) { child.requestFocus(); } return super.drawChild(canvas, child, drawingTime); } </code></pre> <p>This doesn't set the focus as I thought it would. Although I assume, if fullscreened properly, the FlashPaintSurface should give itself focus. But if the first part is not doable, I would wonder at least to not have to give focus to the SWF by clicking on it on startup.</p> <p>Please note I am doing this dynamically, not calling my own SWFs that I make myself, so I cannot solve this with Actionscript.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload