Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Android 10 soft navigation key problem
Started by ansteysimon Sep 30 2019 01:13 PM

25 replies to this topic
android navigation softkey
[TOPIC CONTROLS]
Page 1 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ansteysimon

[GLOBAL: userInfoPane.html]
ansteysimon
  • Observer

  • 3 posts
  • Corona SDK

Has anyone else had issues with Android 10 soft key navigation?

 

It seems that on Android 10 the tab bar I place at the bottom of the screen using display.contentHeight - display.screenOriginY is now over the top of the system navigation buttons. Pressing the navigation bar now generates system navigation making the app unusable...

 

How can I fix this other than hiding the system soft keys?

 

Thanks

Simon.



[TOPIC: post.html]
#2

lmgualandi

[GLOBAL: userInfoPane.html]
lmgualandi
  • Enthusiast

  • 92 posts
  • Corona SDK

Indeed I had a user complaint about buttons on the bottom of the screen not working. It was on Android 10 on a Pixel 3 Google phone, which is not so common. Couldn't figure out why or reproduce it in my devices, but I imagined it was something with the navigation buttons

[TOPIC: post.html]
#3

ansteysimon

[GLOBAL: userInfoPane.html]
ansteysimon
  • Observer

  • 3 posts
  • Corona SDK

yes this was Pixel 2, Android version 10. The soft keys overlay the tab bar at the bottom and get events first....



[TOPIC: post.html]
#4

lmgualandi

[GLOBAL: userInfoPane.html]
lmgualandi
  • Enthusiast

  • 92 posts
  • Corona SDK

Makes sense.
I forgot to mention but she said the problem started only after my first 64 bit update.
Any comments from the Corona team?

[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,683 posts
  • Enterprise

This is the first we've heard of this. Please create a simple sample app that demonstrates the issue. It should be a complete project (main.lua, config.lua, build.settings, any assets needed to build, install and run) and put it in a .zip file and use the Report A Bug link at the top of the page and submit a bug report.

 

Rob



[TOPIC: post.html]
#6

ansteysimon

[GLOBAL: userInfoPane.html]
ansteysimon
  • Observer

  • 3 posts
  • Corona SDK

https://drive.google.com/open?id=1g0_3JL9jG-LKMXB9NIKVepTe67GOIDP2



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,683 posts
  • Enterprise

Hi. The .zip file is just a screenshot (which you can post directly here). It's not a demo project that can download, build and run on a device. 

 

Rob



[TOPIC: post.html]
#8

naveen_pcs

[GLOBAL: userInfoPane.html]
naveen_pcs
  • Contributor

  • 268 posts
  • Corona SDK

Any update on this? Same thing in my app with users running Android 10. Can't tap the bottom part of the screen because that's where the soft buttons would usually be (even though I have them hidden).



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,683 posts
  • Enterprise

I'm still waiting on a demo project that shows the issues.

 

Rob



[TOPIC: post.html]
#10

lmgualandi

[GLOBAL: userInfoPane.html]
lmgualandi
  • Enthusiast

  • 92 posts
  • Corona SDK

@naveenpcs what device did you experience the issue?

In my case I there's no point on a demo project since I couldn't replicate the bug, but I can share my build.settings

https://pastebin.com/FXcLiSJq



[TOPIC: post.html]
#11

tneilgardner

[GLOBAL: userInfoPane.html]
tneilgardner
  • Observer

  • 6 posts
  • Corona SDK

Have you tried describing your working area of display using the following.

 

local safeArea = display.newRect(
    display.safeScreenOriginX,
    display.safeScreenOriginY,
    display.safeActualContentWidth,
    display.safeActualContentHeight


[TOPIC: post.html]
#12

lmgualandi

[GLOBAL: userInfoPane.html]
lmgualandi
  • Enthusiast

  • 92 posts
  • Corona SDK

Yes, I already use the safe areas since iPhone X was released

[TOPIC: post.html]
#13

lmgualandi

[GLOBAL: userInfoPane.html]
lmgualandi
  • Enthusiast

  • 92 posts
  • Corona SDK

Hi,
Anybody still having this issue?

I didn't update my main game yet, which has literally 100x more downloads from the one that's giving the reports.

I can make a sample, but I just need someone with the devices to collaborate, as this is clearly happening in just specific Android 10 phones. At least Pixel Google phones.
@naveen_pcs, @ansteysimon ?

[TOPIC: post.html]
#14

egarayblas

[GLOBAL: userInfoPane.html]
egarayblas
  • Contributor

  • 110 posts
  • Corona SDK

I'm getting more and more reports on this issue as well. Seems to happen mostly on Google Pixel phones. Anyone find a fix yet?



[TOPIC: post.html]
#15

ernst3

[GLOBAL: userInfoPane.html]
ernst3
  • Observer

  • 2 posts
  • Corona SDK

I have been experiencing a very similar problem with two Samsung devices using Android 9.

After writing an app to get more information I found that the problem is most likely related to use of the StatusBar modes "LightTransparentStatusBar" and "DarkTransparentStatusBar" (see display.setStatusBar) as can be seen in the attached screen dump. 

 

Attached File  merge_snapshot.jpg   142.83KB   3 downloads

 

 



[TOPIC: post.html]
#16

egarayblas

[GLOBAL: userInfoPane.html]
egarayblas
  • Contributor

  • 110 posts
  • Corona SDK

Does that mean display.HiddenStatusBar is not working or ignoring these settings?



[TOPIC: post.html]
#17

ernst3

[GLOBAL: userInfoPane.html]
ernst3
  • Observer

  • 2 posts
  • Corona SDK

Does that mean display.HiddenStatusBar is not working or ignoring these settings?

 

The answer to your question is a definitive "maybe",

display.HiddenStatusBar is working as can be seen in the first (left most) screenshot but is does not hide the navigation bar.

The difference between the status bar settings can be noticed in "display.safeActualContentHeight", the transparent options show a larger content height.



[TOPIC: post.html]
#18

egarayblas

[GLOBAL: userInfoPane.html]
egarayblas
  • Contributor

  • 110 posts
  • Corona SDK

I hope someone from Corona can shed some light on this.



[TOPIC: post.html]
#19

yosu

[GLOBAL: userInfoPane.html]
yosu
  • Contributor

  • 554 posts
  • Corona SDK

Hi,

 

After upgrading my samsung to Android 10, I notice this with the navigation bar too. It is now translucent and there is no way to make it default (solid white, similar to other apps like gmail, gmaps). Here is a sample :

 

 

Attached File  navbar corona android 10.png   89.48KB   2 downloads

 

 

I also tested how the setStatusBar will affect it, but it does not affect it (see attached image).

 

Attached File  corona status bar android 10.png   211.36KB   3 downloads

 

Snippet of code :


local currentStatusBarIndex = 1
local statusBarOptions = {
	{ display.HiddenStatusBar, 'display.HiddenStatusBar' },
	{ display.DefaultStatusBar, 'display.DefaultStatusBar' },
	{ display.TranslucentStatusBar, 'display.TranslucentStatusBar' },
	{ display.DarkStatusBar, 'display.DarkStatusBar' },
	{ display.LightTransparentStatusBar, 'display.LightTransparentStatusBar' },
	{ display.DarkTransparentStatusBar, 'display.DarkTransparentStatusBar' },
}
local myText = display.newText( 'setStatusBar', display.contentCenterX, display.contentCenterY, native.systemFont, 26 )
myText:setFillColor( 1, 1, 1 )

local function updateBar1()

	if system.getInfo( "platformName" ) == "Android" then
		display.setStatusBar( statusBarOptions[currentStatusBarIndex][1]  )
		currentStatusBarIndex = currentStatusBarIndex + 1
		if currentStatusBarIndex > #statusBarOptions then currentStatusBarIndex = 1 end
		
		myText.text = statusBarOptions[currentStatusBarIndex][2]

	end

	native.setProperty( "androidSystemUiVisibility", "default" )		
		
end
	
local barTimer = timer.performWithDelay( 3000, updateBar1, 0 )
native.setProperty( "androidSystemUiVisibility", "default" )		

.

 

Is there a way to make the android bottom navigation bar solid-white ?

 

 

thanks

Attached Files



[TOPIC: post.html]
#20

runewinse

[GLOBAL: userInfoPane.html]
runewinse
  • Contributor

  • 513 posts
  • Corona SDK

Unfortunately, after upgrading my Galaxy S9 to Android 10 I also get this problem with my app!

 

C'mon Corona guys!



[TOPIC: post.html]
#21

stalxerhd

[GLOBAL: userInfoPane.html]
stalxerhd
  • Enthusiast

  • 44 posts
  • Corona SDK

Damn! I see this on Pixel 2@Android 10 AVD back in November and didn't think it is such a problem. Indeed, these commands do not seem to work.

 

Attached File  55.jpg   145.74KB   1 downloads

 

Here is a project:

 

Attached File  TestA10.zip   83.75KB   1 downloads



[TOPIC: post.html]
#22

runewinse

[GLOBAL: userInfoPane.html]
runewinse
  • Contributor

  • 513 posts
  • Corona SDK

Maybe not a solution for everybody, but these lines solved my problem:

-- Removes bottom bar on Android
if system.getInfo( "androidApiLevel" ) and system.getInfo( "androidApiLevel" ) < 19 then
    native.setProperty( "androidSystemUiVisibility", "lowProfile" )
else
    native.setProperty( "androidSystemUiVisibility", "immersiveSticky" )
end
This hides the Android bar alltogether making it possible to hit "my" bottom buttons. A swipe-up brings up the Android bar.

  • stalxerhd likes this

[TOPIC: post.html]
#23

stalxerhd

[GLOBAL: userInfoPane.html]
stalxerhd
  • Enthusiast

  • 44 posts
  • Corona SDK

That's help!



[TOPIC: post.html]
#24

apps30

[GLOBAL: userInfoPane.html]
apps30
  • Enthusiast

  • 91 posts
  • Corona SDK

I had exact the same as "stalxerhd" show. The Android virtual button blocked the navigator button or the bottom part of the app. Any idea on how to fix it? How can I detect if there is a virtual button or if it is possible to show / hide the virtual button? If it allows to hide the virtual button, it must have some way to show it again to exit the app anyway.



[TOPIC: post.html]
#25

runewinse

[GLOBAL: userInfoPane.html]
runewinse
  • Contributor

  • 513 posts
  • Corona SDK

I had exact the same as "stalxerhd" show. The Android virtual button blocked the navigator button or the bottom part of the app. Any idea on how to fix it? How can I detect if there is a virtual button or if it is possible to show / hide the virtual button? If it allows to hide the virtual button, it must have some way to show it again to exit the app anyway.

 

Maybe the last sentence in my post will help you?




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]

Also tagged with one or more of these keywords: android, navigation, softkey