← All extensions

Native extension

KlugBlackScreen

com.klug.blackscreen

Restores the display on Android after a system window, such as a permission prompt, a dialog or the keyboard, has closed.

Android In development

Overview

On some Android devices the screen of an app can stay black after a system window has closed on top of it: a permission prompt, a dialog or the on-screen keyboard. The app is still running, but nothing is drawn until the next change.

KlugBlackScreen redraws the app's view as soon as such a window closes. Switched on once at start, it works automatically in the background. For special cases it can also be triggered directly.

KlugBlackScreen is in development and is currently being tested on more devices.

Features

  • Automatic mode: switch on once, it redraws after every system window
  • Manual redraw for special cases
  • A gentle redraw without flicker, and a stronger one for stubborn cases
  • Does nothing on other platforms, so the code can stay in a cross-platform app

Supported platforms

Android arm64 · armv7

Getting started

Add the extension to your application descriptor:

app.xml
<extensions>
    <extensionID>com.klug.blackscreen</extensionID>
</extensions>

Quick example

Main.as
import com.klug.blackscreen.BlackScreen;

// once at start: redraw automatically after every system window
BlackScreen.getInstance().startAuto();

// after a specific dialog, if needed
BlackScreen.getInstance().fix();

API overview

BlackScreen.getInstance()Returns the single instance.
isSupportedTrue on Android.
startAuto()Redraws automatically whenever a system window closes.
stopAuto()Stops the automatic mode.
fix()Redraws the view once, without flicker.
fixHard()Stronger redraw for stubborn cases, with a short flicker.

Requirements

AIR SDK51.x (HARMAN)
AndroidAndroid 6.0 (API 23) or later
PermissionsNone