Android status bar behavior

Hi.

Looking for some guidance here.

It appears to me that Corona by default hides the status bar on Android, is that right?

So, I am calling display.setStatusBar( display.TranslucentStatusBar ) on the main file, but I can still see the status bar being hidden and then showing back.  Is anyone seeing that behavior as well?

If the above is true, is there a way to make Corona not hide the status bar at app launch? (something similar to the iOS plist entry that we use on iOS)

Thanks

Is it just me seeing that behavior?

anyone?

We do not encounter this behavior with our app on Android device.

@nmichaud,  does your Android have the status bar visible?

Yes

@Renato, I just tested your workflow and I do see the Android status bar hiding, then being shown once more when the app appears. 

Thanks @Alex@Panc.  Now I am just confused how @nmichaud is not seeing that behavior…

Maybe they are calling it outside of main.lua?

Which version of Corona are you on? Are you setting any other global device vars at the same time?

@Renato, I think I understand what you means now. I have try it again on my S6 and yes the status bar is drawn from to top to bottom (very quick animation) when I start the app. I’ve compare by launching other apps with transparent status bar and they don’t have this behavior. 

Is this the problem you mention ?

Nick

This is actually Corona’s default behavior on Android.  It launches without a status bar (ie: the Android activity launches in fullscreen mode) since that is how most Corona built apps in our experience launches.  We’ve never considered it a big deal since when you navigate back to your app while suspended from an app that has a different status bar show setting will still show this pop-in/out animation.  And that’s out of our control.  The Android OS animates and transitions the status bar in/out on the app it is resuming.  So, even if we did offer the ability to change the launch behavior of the status bar, you would still run into this same pop-in/out effect on suspend/resume and there’s nothing you can do about it.  So, I don’t really consider it a problem.  It’s just a nuance of the Android OS.

Yes @Nick, that is what I am seeing.

@Joshua, from you input, I understand that this is a behavior that I could change on the AndroidManifest.xml, is that right? Would mind elaborating what would I need to change?

That behavior on Android, for business apps that uses status bar, is not very pleasant. Different from iOS, which the status bar is on top of the Corona View and it does not interfere with Corona View size, the Android status bar actually changes the Corona View height.

So, if you have an image as the background, you can see its height changing, making it very unprofessional.

>>  I understand that this is a behavior that I could change on the AndroidManifest.xml, is that right?

No.  You cannot change the behavior via the AndroidManifest.xml.  The fullscreen setting is coded within our CoronaActivity.  You can’t change the behavior via Corona Enterprise.

>> That behavior on Android, for business apps that uses status bar, is not very pleasant.

I think you missed my point up above.  While it’s possible for us to change our code on “launch” to default the status bar setting to what you want, you can’t stop this pop-in/out behavior when your app has been suspended/resumed.  There’s nothing you can do as a native developer to stop that.  So, this is kind of makes this a moot point.

>> Different from iOS, which the status bar is on top of the Corona View and it does not interfere with Corona View size, the Android status bar actually changes the Corona View height.

By default, the top status bar does *not* change the height of your view on Android because it is overlaid on top of your app like iOS… *unless* you are using our “coronaWindowMovesWhenKeyboardAppears” build setting which changes the status bar from being overlaid to resizing the height of your app.  I’m guessing you are using this setting then?  If so, then even if you changed the launch behavior of the status bar, you’ll still run into the same resize problem after a suspend/resume.

@Joshua.

Indeed that was the problem. I was using the  coronaWindowMovesWhenKeyboardAppears. I removed it and now the status bar does not interfere any more with the screen height. Much much better…

Thanks for the help.

Is it just me seeing that behavior?

anyone?

We do not encounter this behavior with our app on Android device.

@nmichaud,  does your Android have the status bar visible?

Yes

@Renato, I just tested your workflow and I do see the Android status bar hiding, then being shown once more when the app appears.