Page 1 of 1
GetDisplayModes() dont work in APK Compiler 4.4 Pro
Posted: Tue Jul 23, 2024 1:27 pm
by P_B
Hello,
With hollywood 10, when running On Nokia 3.1 Android 9 and 10, I get the message : no display mode found
Current line 6 in function Getdisplaymodes
With APK Compiler 3 Pro, I got only one result 720 x 1154.
The CanonizePath function also returns an error in APK.
Could you check, please.
Thank you.
Re: GetDisplayModes() dont work in APK Compiler 4.4 Pro
Posted: Wed Jul 24, 2024 9:56 pm
by airsoftsoftwair
P_B wrote: ↑Tue Jul 23, 2024 1:27 pm
With hollywood 10, when running On Nokia 3.1 Android 9 and 10, I get the message : no display mode found
True, this is a bug. Fixed now.
Code: Select all
- Fix [Android]: GetDisplayModes() didn't return the display's screen mode
P_B wrote: ↑Tue Jul 23, 2024 1:27 pm
With APK Compiler 3 Pro, I got only one result 720 x 1154.
That is correct because mobile devices only have one physical resolution (unlike monitors) so
GetDisplayModes() will only ever return a single display mode.
P_B wrote: ↑Tue Jul 23, 2024 1:27 pm
The CanonizePath function also returns an error in APK.
Need more details here. What exactly do you get and what do you expect?
Re: GetDisplayModes() dont work in APK Compiler 4.4 Pro
Posted: Thu Jul 25, 2024 8:00 pm
by P_B
Thank you for fixing
GetDisplayModes() for APK.
CanonizePath is not protected against empty strings for all versions.
Code: Select all
directory$=GetProgramDirectory()
directory$=""
p$ = CanonizePath(directory$)
GetProgramDirectory() on APK returns an empty string, and therefore CanonizePath interrupts the execution of the current program, only on Android.
Thank you.
Re: GetDisplayModes() dont work in APK Compiler 4.4 Pro
Posted: Thu Jul 25, 2024 10:49 pm
by airsoftsoftwair
P_B wrote: ↑Thu Jul 25, 2024 8:00 pm
GetProgramDirectory() on APK returns an empty string, and therefore CanonizePath interrupts the execution of the current program, only on Android.
Yeah, on Android everything is heavily sandboxed so it's not really possible to get the program directory as on desktop operating systems. Just make sure you don't call
GetProgramDirectory() when on Android because it doesn't make any sense anyway

Re: GetDisplayModes() dont work in APK Compiler 4.4 Pro
Posted: Fri Jul 26, 2024 4:48 pm
by P_B
It was to test the portability of the programs in Hollywood.
Thank you for your help.