Android Question API 36 Problem - Activity_Keypress event does not fire.

RichardN

Well-Known Member
Licensed User
Longtime User
I have a simple legacy calculator app (pre-B4X pages) that is sold the Play store. Google tell me that it needs to be updated to API36 before the end of August. It all seems to work aside from one glaring problem.... The Activity_Keypress event does not fire at all. The code is simple:

Activity_Keypress:
Sub Activity_KeyPress (KeyCode As Int) As Boolean     'Return True to consume the event
   
    Log("Some key is pressed...")
   
    If KeyCode = KeyCodes.KEYCODE_BACK Then
   
        If pnlResults.Visible = True Then
            pnlResults.Visible = False
            Return True
        End If
   
    End If
   
    Return False
           
End Sub

This all works fine with TargetSDK 35 compiling under that Javac but switching to Javac/SDK 36 the problem is immediately obvious. The log reports no activity from that Sub and the program exits as if the keystroke has not been handled. Any ideas?
 

DonManfred

Expert
Licensed User
Longtime User
You should NOT USE target sdk 36 until we got a B4A Version which is build for this SDK. The recommendet targetSDK ist still 35
Erel is working on it.
 
Last edited:
Upvote 0
Top