Delphi Tokyo
Delphi Tokyo
Where can I find changes brings to Android platform ?
I cannot compile my project anymore :
PAndroid_app type is unknown
GetAndroidApp^ is unknown
I've search through the help but din't see anything on this...
FWIW I used this unit to capture Android keystrokes
https://pastebin.com/jpRpTCzx
TIA
Where can I find changes brings to Android platform ?
I cannot compile my project anymore :
PAndroid_app type is unknown
GetAndroidApp^ is unknown
I've search through the help but din't see anything on this...
FWIW I used this unit to capture Android keystrokes
https://pastebin.com/jpRpTCzx
TIA
In Tokyo help you will see about "Unification of Delphi and Java threads on Android"
ReplyDeleteAnd I suppose that as a result Androidapi.AppGlue unit was rewritten and TAndroid_app has gone.
TAndroid_app was not in the documentation. You can only search in the sources to understand what's going on.
If you are searching for GetAndroidApp^.onInputEvent
ReplyDeleteI think you should change with:
TAndroidApplicationGlue.Current.OnInputEvent
Thank you Cristian Peța , I've already found the TAndroidApplicationGlue but missed it's "Current" property.
ReplyDeleteI've adapted my code, it is compiling but my app is now crashing with 'Can not activate current context' exception... could be related to TFrameStand (digging this right now)
I've updated that code. It's now Delphi Tokyo compatible and it is well working on my barcode scanner
ReplyDeletepastebin.com - [Delphi] Delphi Tokyo - Android special key handler - Pastebin.com
Hi Stéphane Wierzbicki , i'm using your solution for barcode scanner, but with some honeywell devices , very often i log an ANR , with this error :
ReplyDeleteInput dispatching timed out (Waiting to send key event because the focused window has not finished processing all of the input events that were previously delivered to it. Outbound queue length: 0. Wait queue length: 1.) ;
have you same issue?
thanks
Diego Rigoni for what I recall I've never seen this before. Is your code running from a worker thread or from the main ui ?
ReplyDeletemain thread. but nothing strange.... a "dataset append" and "editCode.setfocus" , just to receive incoming code in the right control.
ReplyDeletenow error is changed in :
Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 47. Wait queue head age: 5506.1ms.)
i'll try soon with 10.2.2
Diego Rigoni I'm still using Delphi Berlin. I had too much trouble with Tokyo. You should check 10.2.2
ReplyDelete