Comments (28)
- Can you confirm that you are using
<fullScreen>false</fullScreen>
andstage.displayState = StageDisplayState.NORMAL
? (Setting these incorrectly is the usual cause of black strips/bars) - Does this issue only affect Android 6 Marshmallow?
- Which AIR SDK are you using?
- If you're using AIR SDK 19, can you try using AIR SDK 20 Beta, or vice versa?
from air-ane-fullscreen.
Yes, false and stage.displayState = StageDisplayState.NORMAL.
Can not test on another OS for now, will check later. But I guess this is Android 6 only issue.
Same behavior on air 18, 19 and 20 beta sdk
http://www.youtube.com/watch?v=l6NKgqYJ2SM
from air-ane-fullscreen.
I've implemented the new Window
callback methods, added in the latest Android SDK, and rebuilt the ANE to target 23.
This is working consistently here using the Flex example with AIR SDK 19 and 20 on the same device config you're using, so can you grab the latest ANE from the dev
branch and give it a go?
from air-ane-fullscreen.
Thank you for the reply. I've tried to replace existing extension with the one from dev branch, but it does not work :(
I've spent half a day struggling with this issue... First, I had tried to run fla from examples and it worked well, then I created a new IDEA project, copied all the app-config.xml content from working example there - it did not help.
Then I decided to make some changes in fla, removed button changed stage size.. and it stopped to work well showing the bug as for version in IDEA. Then I reverted all the changes in fla and it didn't returned the app back to working state.
Seems this bug does not depend on config.xml params, compilation args etc. Some internal device delays during opening the app seems makes it working.
Switching on power saver mode makes it always working
from air-ane-fullscreen.
Here are sources for IDEA and Flash pro versions which bugs on my device https://www.dropbox.com/sh/wh4d2j7kxc00pcd/AAAm9woBx8GYzgdzI0-ClA7ta?dl=0
from air-ane-fullscreen.
It looks like the issue is limited to leanMode()
(non-interactive, temporary full screen) on Android 6, so my suggestion would be to use immersiveMode()
(interactive, permanent full screen) where it's available, and fall back to leanMode()
when it's not, assuming you are actually intending to use lean mode, rather than immersive mode.
This could be achieved like this:
if (AndroidFullScreen.immersiveMode())
{
// Virtual lean mode workaround for Marshmallow
var f:Function = function(e:MouseEvent):void
{
stage.mouseChildren = true;
stage.removeEventListener(MouseEvent.MOUSE_DOWN, f);
AndroidFullScreen.showSystemUI();
};
stage.mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_DOWN, f);
}
else if (AndroidFullScreen.leanMode())
{
// Real lean mode
}
else
{
var f:Function = function(e:MouseEvent):void
{
stage.mouseChildren = true;
stage.displayState = StageDisplayState.NORMAL;
};
stage.mouseChildren = false;
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
stage.addEventListener(MouseEvent.MOUSE_DOWN, f);
}
The issue with the FLA was an invalid link to the ANE, which had .ane.ane
at the end in Flash. Once that was fixed, it worked as expected.
from air-ane-fullscreen.
As for fla file I also had .ane.ane
after ran it from example. It might be CS6 CC incompatibility or some other reasons, I removed and added ane again to fix, so it is not a problem.
It doesn't matter what I use leanMode()
or immersiveMode()
it behaves the same as I showed on video before.
One thing is that when I click on rectangle button (the most right button on Nexus) and then getting back to the application - black strip is disappearing. We might need some events to be dispatched to AIR to let it update stage height (seems like the strip appears because of AIR stage height not updated, but I might be wrong)
from air-ane-fullscreen.
I can't replicate the issue using immersiveMode()
, only after leanMode()
has been called, and we're already following the Android developer guidelines for maintaining immersive mode.
Assuming this is basically a variation on #3, the black bars are caused by Adobe AIR rendering the screen incorrectly to leave space for the navigation bar (the content is the correct size), usually caused by FULL_SCREEN
display state, and we haven't found a way to tell AIR to sort itself out, so I'm open to suggestions.
from air-ane-fullscreen.
I have no idea
Setting Transition Animation to OFF resolves the issue, it might bring you to some idea...
http://take.ms/HiuMq
from air-ane-fullscreen.
Can you try this? https://github.com/mesmotronic/air-ane-immersivemode/releases
from air-ane-fullscreen.
Still does not work. I might forgot to say I'm using 'direct' mode and Starling. But splashscreen is a flash.display.DisplayObject and both Staling and flash objects are cropped.
Try to increase Transition animation time if it works on your device
from air-ane-fullscreen.
While we search for a solution, please support the feature request on Adobe Bugbase to have Adobe AIR's full screen states use immersive mode by default.
from air-ane-fullscreen.
I know this was opened a while back but i'm having this problem as well. Is there a fix for it yet?
from air-ane-fullscreen.
Not yet, but if you can post any related errors you see in DDMS while running your app (if any), it might help us diagnose the cause as I'm finding it difficult to replicate.
from air-ane-fullscreen.
@Jamiielewis Can you let me know if you see the same issue with the Immersive Mode ANE?
from air-ane-fullscreen.
@neilrackett - This issue is the same in the Immersive Mode ANE too. It seems to definitely be specific to Android 6 Marshmallow and only happens when you launch from icon. Everything works fine if you relaunch from the "Recents" menu.
from air-ane-fullscreen.
I'm experiencing the same problem with Android 6.0
from air-ane-fullscreen.
Is anyone that's experiencing this issue able to take a look at the DDMS output with their phone connected to see if there are any errors listed? (DDMS should be available as part of ADT or Android Studio)
from air-ane-fullscreen.
Can you try your app with battery saver mode enabled (Settings > Battery > [three dots] > Battery saver) or transitions disabled (as suggested by @oleg3000, above)?
If that consistently resolves the issue, I'll take another look to see if there's anything we can add to the ANE or manifest that might help, like disabling animations.
from air-ane-fullscreen.
I tried both saver mode enabled and transitions disables and the problem disappeared.
I'm developing with Flash Developt, not sure what DDMS is.
from air-ane-fullscreen.
A courious thing: My starling buttons that are behind the black strip, are still touchable when you touch the black strip, so it is just a visual thing.
If you minimize the app and open it again, the black strip disappears too.
from air-ane-fullscreen.
DDMS is the Android equivalent of the ActionScript output window, showing all the errors, warnings and other information generated by everything that's currently running on your phone.
It's definitely looking like the issue is somehow related to system transitions. Perhaps AIR is rendering the stage before the main activity is ready?
Interesting discovery about your Startling content. Is it only Startling content that's cropped?
Can you post the source for the simplest possible app that you can use to reproduce this issue on your device?
from air-ane-fullscreen.
I've added a style resource to the ANE that will remove system animations by adding the following line to your app.xml
<manifestAdditions>
after the last <uses-permission />
statement:
<application android:theme="@style/noAnimTheme" />
If you already have <application>
, just add the new theme attribute to that and/or the main <activity>
.
The updated ANE is in the build
folder of the repo and requires AIR 22.
I can't replicate the issue here, so if someone who's seeing this issue can give it a try, that would be appreciated.
from air-ane-fullscreen.
@neilrackett - Thank you for your help resolving this. Unfortunately it's still happening. Using the lastest ANE and AIR22. What's interesting though is if "Auto orientation" is set to true and you rotate the phone, the black bar will disappear. Also, AndroidFullScreen.fullScreenHeight is retrieving the correct fullscreen height, it's just overlaying the black bar...
from air-ane-fullscreen.
Apparently it's a bug in 6 and someone in the following thread suggested it was fixed in 6.0.1.
libgdx/libgdx#3500
https://www.reddit.com/r/Unity3D/comments/3pcixa/android_60_marshmallow_creates_black_bar_along/
My HTC One M8 is still on 6.0, so I can't test this theory.
BUT! Setting screen orientation in AIR seems to fix it.
Using the following:
AndroidFullScreen.stage = stage;
AndroidFullScreen.immersiveMode();
stage.setOrientation( StageOrientation.ROTATED_RIGHT );
stage.setOrientation( StageOrientation.ROTATED_LEFT );
from air-ane-fullscreen.
Good spot, and that would explain why we can't replicate it here.
I'll roll back my changes to the repo and add your workaround to the release notes.
from air-ane-fullscreen.
Even better:
AndroidFullScreen.stage = stage;
AndroidFullScreen.immersiveMode();
stage.setOrientation( StageOrientation.UPSIDE_DOWN );
stage.setOrientation( StageOrientation.UPSIDE_DOWN );
from air-ane-fullscreen.
Those orientations didn't work for my portrait game, i used:
stage.setOrientation( StageOrientation.ROTATED_RIGHT );
stage.setOrientation( StageOrientation.DEFAULT );
And it worked!
Thanks a lot! You are both genius!
from air-ane-fullscreen.
Related Issues (20)
- Some devices crash HOT 8
- Crash on Nexus 7 HOT 1
- Error #3500: The extension context does not have a method with the name init. HOT 11
- Version 1.3.3 works, version 1.4.3 doesn't work for me HOT 7
- Remove navbar while keep transparent topbar. HOT 6
- Event for displaying system UI in immersive mode HOT 5
- ContextLoss on touch HOT 10
- This ANE is now deprecated HOT 21
- Version 1.5.0 quits right after launch HOT 13
- Viewport size incorrect on Simulator HOT 13
- Adobe Air 64 bit support for Android HOT 3
- Xiaomi Note 7 with Android 9 - still black bands on top and bottom HOT 2
- I couldn't open my application with 64 bit.
- does this ane support google 64 bit requirement? HOT 1
- You can give a simple example about this explanation. HOT 2
- Can this ANE fix black bar caused by the notch/cutout? HOT 5
- Seeing black area in system ui
- Android 11 not supported
- Can you show an example of how to use it with the Starling framework? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from air-ane-fullscreen.