Guest Posted October 15, 2019 All, have anyone encounter issue with OpenGL on Android devices after upgrading to Delphi 10.3.2 with API28. I have built application with Tokyo (API26) and later migrated to Rio 10.3.2 with API 28, after that all supported devices (API level 23 to level 26) stopped working throwing an error "Cannot create OpenGL context for eglMakeCurrent". After changes in the FMX.Context.GLES.Android (adding Multisamples:=4 in line 633 of the original file) it started to work on my test devices Samsung Galaxy with Android 7, 8, 9, and Huawei P20 with Android 9.1. However, many of my customers, still reports the same error on Android 9 devices. Interestingly, when I remove this changes and run my test devices in debug mode, it works OK. Any clues? Let me know if need more info. Many thanks! Share this post Link to post
Guest Posted October 15, 2019 I reply to myself, but maybe usefull to others 🙂 After implementing fixes from this GitHub repo (unofficial, mostly targeted 10.3.1 so re-check and adjust for 10.3.2), it resolved my issues: http://git.kngstr.com/KngStr/delphi-fixes/src/master/10.3.1/Fixes Share this post Link to post
Dave Nottage 557 Posted October 15, 2019 I wouldn't rely too much on a repo that infringes Delphi source copyright Share this post Link to post
Guest Posted October 19, 2019 (edited) On 10/16/2019 at 12:46 AM, Dave Nottage said: I wouldn't rely too much on a repo that infringes Delphi source copyright Yep, you are probably right 🙂 After digging in this subject, my final conclusion is not to use hardware acceleration by default, so in the Android manifest it is better to turn it off and use System Default for Form Quality - always, then if necessary/or justified by the app, turn it on at the run-time, then even if crashes, user will be able to recover and still use the app. This why I think I can guarantee that the app runs on even very cheap Chinese phones 🙂 And while I do not develop game, I do not need GPU acceleration, fortunately, tests shows that without gpu acceleration, my app runs smoothly on cheap Samsung and Xiaomi. The only downside is TMapView - on Android 7 fails to bootup, and Android 8, 9 and 10 it always stay on top, even if you hide/close it 🙂 The solution is to turn GPU acceleration on, or if cannot be handled by the device, replace with WebView with rendered map, it works for me 🙂 Edited October 19, 2019 by Guest Share this post Link to post