Bug Issue: The Navigation Bar area is an out-of-screen zone


Pages: 1 2

Ogiul

  • Level 3 Stencyler
September 27, 2015, 01:59:47 pm
Stencyl does not include the Android navigation bar in the screen dimensions.
That means, if in your setting you have ticked “Scale to fit (full screen)”, your app will scale to fit the dimension of screen minus navigation bar; if you compiles with api 19, when the bar disappears the background remains empty. You can fill this under-the-navigation-bar space only with actors (not with backgrounds) but anyway in the navigation area you can not put any interaction, because Stencyl considers this area as an out-of-screen zone.

In my case I calculated the position of many interface elements depending on the screen ratio. On many Android devices, like on Samsung devices, which have no navigation bar by default, I can see my app as perfect working/looking, with everything at the expected position.

The problem is on many other devices like LGs and Nexus:  there, my blue navigation arrows (you can find some pictures attached to my original post here: http://community.stencyl.com/index.php/topic,43939.0/topicseen.html) should be moved down, but I don’t know how I can know whether the device has a navigation bar and what are its dimensions, so I don’t know what kind of attribute (variable) I should use to move my arrows down.  Anyway I can not move the blue arrows down to the navigation-bar area also because this is actually an out-of-screen area where it is impossible any interaction;

Furthermore my game camera move to the center of the screen depending of accelerometer motion and so also the camera position is affected from the unpredictable screen dimensions; as a result, on devices without a navigation bar, everything seems to need to be moved down because stencyl does not calculates the actual center of the screen, but it calculates the center of the screen minus navigation bar instead.

I have tried to compile with api 16 and there my app looks a bit better as the bar is always visible and so users do not expect to use that zone, but I do not think to compile with a such old api is a good solution and neither esthetically it is an optimal solution.
(By the way, I can not understand whether the fixes to the problems reported here http://community.stencyl.com/index.php/topic,41328.0.html were included in the new builds or I really should include them manually every time I am installing a new build…  )

Stencyl, if compiling with api >= 19, should not include the navigation bar in the screen dimensions, as the bar is the most of the time hidden and users expect to be able to interact also on that area.
If the bar is hidden, I need to show my blue arrow, and have them working, in the bar area.

At least we should be able to select in the Stencyl setting a not immersive mode or a different kind of full immersive mode if needed in our games: https://developer.android.com/training/system-ui/immersive.html

These problems were already reported many times long time ago (i.e. http://community.stencyl.com/index.php/topic,39970.msg225136.html#msg225136   
http://community.stencyl.com/index.php/topic,41136.msg231670.html#msg231670    ).

Please fix them, they can potentially create a huge mess in our apps.

Many thanks for you attention and work!
« Last Edit: October 02, 2015, 02:55:51 pm by Ogiul »


Ogiul

  • Level 3 Stencyler
October 28, 2015, 03:41:24 pm
My  subscription is expired,  I paid it yesterday again but I am still waiting. 
I can not test this GameActivity.java because -as I wrote  to Robin in pm- I have only a samsung, so I need to export my game  and send it to  testers, but I can not export it until my subscription is active again.. In the meantime I can not read customers only posts, so I can not read new answers to my old topic... It is a strange situation  really....    :(
« Last Edit: October 28, 2015, 03:55:19 pm by Ogiul »


robinschaafsma

  • Master Stencyler
  • *
October 30, 2015, 12:04:05 pm
Hipapatuk confirms that his recode GameActivity.java file works.
http://community.stencyl.com/index.php/index.php?topic=44882.msg250328#msg250328

Hope other users can test it out and confirm if its also working for them.

Download GameActivity.java from above post or download it here: https://www.dropbox.com/s/okh8f17unp7fihr/GameActivity.java?dl=0

Replace it with the old one.

Code: [Select]
../Stencyl-full/plaf/haxe/lib/lime/lime/legacy/templates/android/template/src/org/haxe/lime/GameActivity.java
If more users can confirm that this resolve the bug, we can replace this by default.

For now i 'll set this on Resolved
  • Status changed from Assigned to Resolved
« Last Edit: October 30, 2015, 12:07:17 pm by robinschaafsma »


Ogiul

  • Level 3 Stencyler
November 05, 2015, 08:01:36 am
Hi,
I eventually was able to test my game.
I can confirm that with your GameActivity.java actors/regions in the navigation bar area are clickable, but unfortunately not all the problems reported here above are solved.

 Stencyl still does not draw tiles and background colors in the navigation bar area (only actors), and if you ask for writing the high and wide of the screen you get not the actual screen dimensions, but screen minus navigation bar dimensions.
This is a problem in my case as I have behaviors related to screen ratio and I calculate it screen high: screen wide.

My Stencyl version
I used build 8734 and put your GameActivity.java at its place and and exported with Android minimum version 19 - 4.4 and Android Target version 19 - 4.4
Please note also that
- I am also using a tools.n modified by Justin (downloaded here http://community.stencyl.com/index.php/topic,43462.15.html)
- I modified AndroidManifest.xml to prevent the auto-rotation as suggested by Jon http://community.stencyl.com/index.php?issue=47.0)

My device:
Motorola x Play with Android 5.1
« Last Edit: November 05, 2015, 08:50:16 am by Ogiul »


robinschaafsma

  • Master Stencyler
  • *
November 06, 2015, 02:18:39 pm
Ok Thanks i need to investigate it same more...
  • Status changed from Resolved to Assigned


robinschaafsma

  • Master Stencyler
  • *
« Last Edit: November 07, 2015, 12:25:24 am by robinschaafsma »


robinschaafsma

  • Master Stencyler
  • *
November 07, 2015, 03:09:59 pm
This extension enabled immersive mode, no blocks are used, just enable the extension.

https://www.dropbox.com/s/s1jbfbrmt7p2x1m/android-immersive.zip?dl=0

Ogiul is testing the extension, because i don't have the right devices to test immersive.

If i have the test restult i can investigate it more.
  • Version changed from Stencyl 3.3, 3.3.2 to Stencyl 3.3, 3.3.2, Stencyl 3.4, 3.4.0 beta
« Last Edit: November 07, 2015, 11:37:46 pm by robinschaafsma »


Ogiul

  • Level 3 Stencyler
November 07, 2015, 04:57:15 pm
Hi Robin,
it works!!! :D :D :D :D
I could non spot any difference with your extension enabled. So I have uninstalled the newJava file... And again no difference at all... And so I decided to re-download and test again your Java file for the last time... and it worked either with and without the extension enabled!

So I can confirm your Java file fix the problem. Probably the first time I have not put the file in the right folder... I don't know.

 :-[ I am really sorry for having wasted your time and I am definitely grateful for your help. Thank you so much!


robinschaafsma

  • Master Stencyler
  • *
November 07, 2015, 11:40:06 pm
no problem good to here that it works.
  • Status changed from Assigned to Resolved


tigerteeth

  • Level 4 Stencyler
January 14, 2016, 02:51:13 am
Can I just ask if this has been fixed and all you have to do is download the extension at the following link and then enable it?
https://www.dropbox.com/s/s1jbfbrmt7p2x1m/android-immersive.zip?dl=0



tigerteeth

  • Level 4 Stencyler
February 19, 2016, 02:04:21 am
Can I just ask what's happening here. The link doesn't work for me !


behdad

  • Level 1 Stencyler
February 19, 2016, 12:11:19 pm
Hi.this GameActiviy.java works well on tablet and phones with 4.4 version above but it works bad with low end devices with android version 2.3 for example. the notification center area  forced the scene size to go down and some part of game goes bottom of screen...


ZettianJuggernaut

  • Junior Stencyler
May 09, 2016, 07:37:53 am
I can confirm that that GameActivity works for the Nexus 7 (2012).


halshing

  • Junior Stencyler
September 08, 2016, 05:54:06 pm
Using @robinschaafsma's GameActivity.java does fix the issue with the soft key navigation button bar not hiding when in full screen. I confirmed this using API 20 target version on an LG V10.



rodolfovs

  • Subscriber - Stencyl Studio
  • *
September 15, 2016, 09:08:13 am
Hello, dropbox with the extension is no longer available. What is working is only GameActivity.java from robinschaafsma?


Ogiul

  • Level 3 Stencyler
April 12, 2017, 08:03:23 am
Hi,
the @robinschaafsma GameActivity.java does not work anymore.

Is there any other fix?

I downloaded the old fix from this link:

Hipapatuk confirms that his recode GameActivity.java file works.
http://community.stencyl.com/index.php/index.php?topic=44882.msg250328#msg250328

Hope other users can test it out and confirm if its also working for them.

Download GameActivity.java from above post or download it here: https://www.dropbox.com/s/okh8f17unp7fihr/GameActivity.java?dl=0

Replace it with the old one.

Code: [Select]
../Stencyl-full/plaf/haxe/lib/lime/lime/legacy/templates/android/template/src/org/haxe/lime/GameActivity.java


rodolfovs

  • Subscriber - Stencyl Studio
  • *
October 23, 2017, 11:43:28 am
Hello

I used the latest GameActivity.java file and it worked for me. For that I had to change in Stencyl the Android version used for API 19 - 4.4 and manually updated the android SDK for my Stencyl.

But I identified a bug. When the game is open and the phone goes into standby mode, when you activate the phone again the game is not in immersive mode and the game screen does not fit the screen without immersive mode, this way the game is cut.

Any suggestions on how we solve this?

If you need I can make a demonstration video of the bug.

Kind regards.


Ogiul

  • Level 3 Stencyler
November 29, 2017, 08:52:19 am
Thanks Rodolfovs!
I hope somebody will take charge of this problem.

Hello

I used the latest GameActivity.java file and it worked for me. For that I had to change in Stencyl the Android version used for API 19 - 4.4 and manually updated the android SDK for my Stencyl.

But I identified a bug. When the game is open and the phone goes into standby mode, when you activate the phone again the game is not in immersive mode and the game screen does not fit the screen without immersive mode, this way the game is cut.

Any suggestions on how we solve this?

If you need I can make a demonstration video of the bug.

Kind regards.
« Last Edit: November 29, 2017, 09:04:39 am by Ogiul »


Pages: 1 2

Details

  • Reported
    September 27, 2015, 01:59:47 pm
  • Updated
    November 29, 2017, 08:52:19 am

  • View Status
    Public
  • Type
    Bug
  • Status
    Resolved
  • Priority
    Normal
  • Version
    Stencyl 3.3, 3.3.2, Stencyl 3.4, 3.4.0 beta
  • Fixed in
    (none)
  • Assigned to
    robinschaafsma
  • Category
    Game Scaling

Tags