Problem with textBox / Keyboard positions.. HELP PLEASE

Hello

I created a sort of Chat:  at the bottom of the display there’s a textBox but when I click on it, the keyboard of my phone hides the textBox.

I tried to solve this problem in this way:

local textBox = native.newTextBox( 5, 480, 310, 30 ) textBox.isEditable = true screenGroup:insert(textBox) function inputListener( event ) if event.phase == "began" then textBox.height = 45 textBox.y = 270 print( event.text ) end if event.phase == "ended" then textBox.height = 30 textBox.y = 500 end if event.phase == "editing" then print( event.newCharacters ) print( event.oldText ) print( event.startPosition ) print( event.text ) end end textBox:addEventListener( "userInput", inputListener )

But in this way I don’t consider the fact that the phones have different yCoordinates of the keyboard and the textBox can result too High or too Short. 

To be more precise I would like to copy the same mechanism of whatsapp textBox:

when you click on the textBox , it skips perfectly over the keyboard and when the keyboard disappear (clicking on the “back” button on the phone) the textBox returns at the start Position.

Can someone help me??

until corona gives us a keyboard.height variable you can only guessamate the position or research the height of keyboards for most devices then detect which device your app is on.
another option is you can use my keyboard.lua module free at j-STRAHAN.com but you will loses one features of using a textbox.

I tought that I could detect the keyboard height but I don’t know if there is any method to get the keyboard infos of the phone in some way ( for example exploring some android folders or files)??

More info regarding this topic can be found at this thread. Rob Miracle goes into depth on why this little problem is bigger than it seems.

until corona gives us a keyboard.height variable you can only guessamate the position or research the height of keyboards for most devices then detect which device your app is on.
another option is you can use my keyboard.lua module free at j-STRAHAN.com but you will loses one features of using a textbox.

I tought that I could detect the keyboard height but I don’t know if there is any method to get the keyboard infos of the phone in some way ( for example exploring some android folders or files)??

More info regarding this topic can be found at this thread. Rob Miracle goes into depth on why this little problem is bigger than it seems.