Android simulator produces graphic garble on screen

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Android simulator produces graphic garble on screen

Post by SWEdeAndy » Tue Oct 12, 2021 4:18 pm

I've managed to setup Android Studio with api level 29 and stuff, and produced a working app deployed to a physical device (an old Galaxy 5, running Android 6).

But when I try to use virtual devices with Android 10, I get very strange graphic artefacts on screen (here a Pixel 3XL):
Screenshot_1634050378.png
This happens with a virtual Nexus 5 as well. The app works, but every card gets this smearing effect.

Is this a known effect in the Android Simulator (Android Studio 3.6.1, macOS 11.6 Big Sur), or am I to expect this happens on real devices too?
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: Android simulator produces graphic garble on screen

Post by LCMark » Tue Oct 12, 2021 4:39 pm

@SWEdeAndy: Do you have acceleratedRendering enabled? If so, that will be the culprit - the problem doesn't occur on real devices. (FWIW, in LC10 we will be updating acceleratedRendering to use OpenGL ES 3.0+ on mobile - and IIRC, this does not show the problem).

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Android simulator produces graphic garble on screen

Post by SWEdeAndy » Tue Oct 12, 2021 4:46 pm

LCMark wrote:
Tue Oct 12, 2021 4:39 pm
Do you have acceleratedRendering enabled? If so, that will be the culprit - the problem doesn't occur on real devices.
Indeed, I do. :D
I'll make sure to set it to false when machine() includes "SDK", or something, then.

Thanks for the quick reply, Mark!
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
Joined: Sat Aug 16, 2008 9:48 am
Location: Stockholm, Sweden
Contact:

Re: Android simulator produces graphic garble on screen

Post by SWEdeAndy » Tue Oct 12, 2021 5:41 pm

Interestingly though, the simulator screen goes black the moment acceleratedRendering is turned off! :shock:

I even tried putting a button in that turns it off, to make sure the app loads correctly first (with acceleratedRendering on).
As soon as the button is clicked, the screen goes black.

I see now a number of tickets in QC about Android, acceleratedRendering and black screens. However, most seem to get the problem with acceleratedRendering turned on, while here it's the opposite (or, problems both ways actually)...

Anyway, if it doesn't happen on real devices then I'm happy and don't really need to dig deeper into this. Makes testing on virtual Androids quite annoying though. But that's Android for you - annoying... Way more so than iOS. :)
Andreas Bergendal
Independent app and system developer
WhenInSpace: https://wheninspace.se

Post Reply

Return to “Android Deployment”