Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] AIR app selected as launcher show black screen on home button press #1194

Closed
itlancer opened this issue Sep 24, 2021 · 2 comments
Closed
Labels

Comments

@itlancer
Copy link

Problem Description

AIR app selected as Android launcher show black screen on home button press.
It blocks application usage at all.

It has been tested with multiple AIR versions (even with latest AIR 33.1.1.620) with multiple Android devices with different OS versions with different AIR applications with different architectures.
Same problem in all cases almost every time.

Related issues (not the same):
#1003
#1002
#698
#6

Steps to Reproduce

  1. Package AIR application (even "empty") for Android with ability to be as launcher (set up with manifest).
  2. Install application to any Android device.
  3. Launch application. You will see red stage color in attached example.
  4. Press home button.

Application example with sources and application XML attached.
android_launcher_black_screen_bug.zip

AIR application code:

package {
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class AndroidLauncherBlackScreenBug extends Sprite {
		
		public function AndroidLauncherBlackScreenBug() {
			addEventListener(Event.ADDED_TO_STAGE, addedToStage);
		}
		
		private function addedToStage(e:Event):void {
			stage.color = 0xff0000;
			trace("addedToStage");
		}
	}
}

Application XML:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<application xmlns="http://ns.adobe.com/air/application/33.1">
    <id>android.launcher.black.screen.bug</id>
    <versionNumber>1.0</versionNumber>
    <filename>android_launcher_black_screen_bug</filename>
    <description/>
    <name>android_launcher_black_screen_bug</name>
    <copyright/>
    <initialWindow>
        <content>android_launcher_black_screen_bug.swf</content>
        <systemChrome>standard</systemChrome>
        <transparent>false</transparent>
        <visible>true</visible>
        <fullScreen>true</fullScreen>
        <renderMode>direct</renderMode>
        <autoOrients>true</autoOrients>
        <maximizable>true</maximizable>
        <minimizable>true</minimizable>
        <resizable>true</resizable>
	<requestedDisplayResolution>high</requestedDisplayResolution>
    </initialWindow>
    <icon/>
    <customUpdateUI>false</customUpdateUI>
    <allowBrowserInvocation>false</allowBrowserInvocation>
    <android>
        <containsVideo>true</containsVideo>
		  <manifestAdditions><![CDATA[<manifest android:installLocation="auto">
		uses-sdk android:targetSdkVersion="30" />
		
		<application android:hardwareAccelerated="true">
			<meta-data android:name="android.max_aspect" android:value="4.0" />
			<activity>
				<intent-filter>
					<action android:name="android.intent.action.MAIN" />
					<category android:name="android.intent.category.LAUNCHER" />
					<category android:name="android.intent.category.HOME" />
					<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
					<category android:name="android.intent.category.DEFAULT" />
				</intent-filter>
			</activity>
			
	</application>
</manifest>]]></manifestAdditions>
        <disableMediaCodec>true</disableMediaCodec>
    </android>
    <versionLabel></versionLabel>
</application>

Actual Result:
Application goes to black screen.
Video demonstration:

android_launcher_black_screen_bug.mp4

Expected Result:
Visually nothing happens cause application activity already launched.
Also KeyboardEvent will be dispatched with Keyboard.HOME keyCode.
And may be InvokeEvent will be dispatched if needed.

Known Workarounds

none
Some time ago For some other Android devices worked but not 100% times (with AIR 33 now seems it doesn't work at all):

@itlancer
Copy link
Author

itlancer commented Nov 8, 2023

Issue still exists with latest AIR 50.2.3.8 and can be reproduced using steps:

  1. Set the launcher to a default normal one.
  2. Uninstall the sample AIR application (if it being installed).
  3. Install sample application.
  4. Open sample application directly.
  5. Pull down the top bar to go to Settings, and change the launcher to use this sample application.

@itlancer
Copy link
Author

Fixed with latest AIR 50.2.4.1.
Thanks!

But there are still exists related issues:
#2396
#2017
#151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant