Coder Social home page Coder Social logo

Comments (28)

neilrackett avatar neilrackett commented on August 20, 2024
  1. Can you confirm that you are using <fullScreen>false</fullScreen> and stage.displayState = StageDisplayState.NORMAL? (Setting these incorrectly is the usual cause of black strips/bars)
  2. Does this issue only affect Android 6 Marshmallow?
  3. Which AIR SDK are you using?
  4. If you're using AIR SDK 19, can you try using AIR SDK 20 Beta, or vice versa?

from air-ane-fullscreen.

oleg3000 avatar oleg3000 commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

oleg3000 avatar oleg3000 commented on August 20, 2024

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.

oleg3000 avatar oleg3000 commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

oleg3000 avatar oleg3000 commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

oleg3000 avatar oleg3000 commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

Can you try this? https://github.com/mesmotronic/air-ane-immersivemode/releases

from air-ane-fullscreen.

oleg3000 avatar oleg3000 commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

Jamiielewis avatar Jamiielewis commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

@Jamiielewis Can you let me know if you see the same issue with the Immersive Mode ANE?

from air-ane-fullscreen.

marc-squarewave avatar marc-squarewave commented on August 20, 2024

@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.

Jacowaco avatar Jacowaco commented on August 20, 2024

I'm experiencing the same problem with Android 6.0

from air-ane-fullscreen.

neilrackett avatar neilrackett commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

Jacowaco avatar Jacowaco commented on August 20, 2024

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.

Jacowaco avatar Jacowaco commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

marc-squarewave avatar marc-squarewave commented on August 20, 2024

@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.

marc-squarewave avatar marc-squarewave commented on August 20, 2024

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.

neilrackett avatar neilrackett commented on August 20, 2024

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.

marc-squarewave avatar marc-squarewave commented on August 20, 2024

Even better:
AndroidFullScreen.stage = stage;
AndroidFullScreen.immersiveMode();
stage.setOrientation( StageOrientation.UPSIDE_DOWN );
stage.setOrientation( StageOrientation.UPSIDE_DOWN );

from air-ane-fullscreen.

Jacowaco avatar Jacowaco commented on August 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.