

Rollo62
Members-
Content Count
1909 -
Joined
-
Last visited
-
Days Won
23
Everything posted by Rollo62
-
How do I terminate a thread that doesn't have an Execute method ?
Rollo62 replied to dormky's topic in Algorithms, Data Structures and Class Design
Yes, but why hiding TEvent information, when this was made especially suited for Threads, not the Sleep method. This might avoid that someone, who is new to threads, that he is stepping into the wrong direction from the first step. I personally like to lay all info on the table, with all pro's and con's, where the user can decide well on his own. I think, to refine a wrong, too early decision later on can be a lot harder than necessary. -
Are you able to run a simple Xcode app? If so, the system should be ok and you could try a simple, new and empty Delphi app.
-
Copy the original FMX.Platform.iOS to your project folder, under the project directory, that directory where the *.dproj file sits. Perhaps you need to unlock the write protection of that file. Make the changes. Additionally, add this copied, edited file to the project tree itself. That should replace the original file by your edited, copy of that file, and should use that from now on for linking.
-
https://en.delphipraxis.net/topic/10768-iphone-1721-an-xcode-152-issue/?tab=comments#comment-85705
-
Perhaps a case of flooding, I would protect this like that: procedure TForm1.Timer1Timer(Sender: TObject); begin Timer1.Enabled := False; sndPlaySound('C:\Windows\Media\Tada.wav', SND_NODEFAULT Or SND_ASYNC); Timer1.Enabled := True; end; But I think you can run several sounds anyway in parallel, which may of course run in a new thread each. The end of a sound can also be delayed, so that maybe the audio is not yet cleared, before the next requests starts. Edit: Sorry - Below was FMX related, not VCL Have you tried with MediaPlayer instead? https://docwiki.embarcadero.com/RADStudio/Athens/en/Playing_Audio_Files For this I'm pretty sure that this will play several parallel sounds in the background, without problems. -------------------------------------------------------- But there were options for VCL as well https://docwiki.embarcadero.com/RADStudio/Sydney/de/Einer_Anwendung_Audio-_oder_Videoclips_hinzufügen
-
funny error message; [DCC Error] E2597 arm-linux-androideabi-ld.exe: error: cannot find -lgnustl_static
Rollo62 replied to gil's topic in Cross-platform
I had high hope in some of the Grijjy tools as well, unfortunately I must say that they mostly turn out to be proof-of-concept only. I can see not much roadmap, improvements or long-term support ( CloudLogger 5yr old ) . Maybe someone can proof me wrong, I hope so For a logger I can recommend Dave's DeviceLens for Android, which works nicely and is well-supported. -
Advice needed: Maintaining a Delphi application on the Google Play Store
Rollo62 replied to Yaron's topic in Cross-platform
Good question. I have the feeling that Androids policies changes more fast than you can write a line of code. Of course other IDE (Android Studio) might be better supported, but I think in general all developer face the same problems nowadays: A code running today, probably is outdated tomorrow. I think this is not dependent much on the IDE's or frameworks you use, but it's an Apple and Google policy, to keep developers under permanent stress level. -
Convert Lat:Lon to LKS-92
Rollo62 replied to Janex72's topic in Algorithms, Data Structures and Class Design
Untested: This is a proposal from ChatGPT regarding such conversion: This is quite complex, and I've tried to double-check against Wolfram-Alpha, but it seems to stay with this standard approach. Would be interesting to know if this works and is correct for you. As it tells below: Better test deeply and against some known positions, before using this productive. unit LKS92Conversion; interface uses System.SysUtils, System.Math; type TCoordinate = record Easting: Double; Northing: Double; end; function LatLonToLKS92(Lat, Lon: Double): TCoordinate; implementation const // WGS84 Ellipsoid constants a = 6378137.0; // Semi-major axis f = 1 / 298.257223563; // Flattening e = sqrt(2 * f - f * f); // First eccentricity // LKS-92 constants n0 = -6000000.0; e0 = 500000.0; k0 = 0.9996; lambda0 = 24; // Central meridian in degrees function DegToRad(Degree: Double): Double; begin Result := Degree * (Pi / 180); end; function LatLonToLKS92(Lat, Lon: Double): TCoordinate; var LatRad, LonRad, N, T, C, A, M, x, y: Double; begin LatRad := DegToRad(Lat); LonRad := DegToRad(Lon - lambda0); N := a / sqrt(1 - e * e * sqr(sin(LatRad))); T := sqr(tan(LatRad)); C := (e * e / (1 - e * e)) * sqr(cos(LatRad)); A := cos(LatRad) * LonRad; M := a * ((1 - e * e / 4 - 3 * e * e * e * e / 64 - 5 * e * e * e * e * e * e / 256) * LatRad - (3 * e * e / 8 + 3 * e * e * e * e / 32 + 45 * e * e * e * e * e * e / 1024) * sin(2 * LatRad) + (15 * e * e * e * e / 256 + 45 * e * e * e * e * e * e / 1024) * sin(4 * LatRad) - (35 * e * e * e * e * e * e / 3072) * sin(6 * LatRad)); // Calculate Easting and Northing x := k0 * N * (A + (1 - T + C) * A * A * A / 6 + (5 - 18 * T + T * T + 72 * C - 58 * e * e / (1 - e * e)) * A * A * A * A * A / 120); y := k0 * (M + N * tan(LatRad) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24 + (61 - 58 * T + T * T + 600 * C - 330 * e * e / (1 - e * e)) * A * A * A * A * A * A / 720)); Result.Easting := e0 + x; Result.Northing := n0 + y; end; end. ------------------------------------------------------------ With Wolfram Alpha: uses SysUtils, Math; type TLatLon = record Latitude: Double; Longitude: Double; end; TUTMCoordinates = record Easting: Double; Northing: Double; Zone: Integer; end; function LatLonToUTM(LatLon: TLatLon): TUTMCoordinates; const WGS84_A = 6378137.0; // Major semiaxis [m] WGS84_B = 6356752.314245; // Minor semiaxis [m] WGS84_F = 1/298.257223563; // Flattening WGS84_E = 0.081819190842622; // First eccentricity K0 = 0.9996; // Scale factor var Lat, Lon, N, T, C, A, M: Double; Zone: Integer; begin Lat := DegToRad(LatLon.Latitude); Lon := DegToRad(LatLon.Longitude); Zone := Floor((LatLon.Longitude + 180) / 6) + 1; N := WGS84_A / Sqrt(1 - WGS84_E * WGS84_E * Sin(Lat) * Sin(Lat)); T := Tan(Lat) * Tan(Lat); C := WGS84_E * WGS84_E * Cos(Lat) * Cos(Lat) / (1 - WGS84_E * WGS84_E); A := Cos(Lat) * (Lon - DegToRad((Zone - 1) * 6 - 180 + 3)); M := Lat * (1 - WGS84_E * WGS84_E / 4 - 3 * WGS84_E * WGS84_E * WGS84_E * WGS84_E / 64 - 5 * WGS84_E * WGS84_E * WGS84_E * WGS84_E / 256) - Sin(2 * Lat) * (3 * WGS84_E * WGS84_E / 8 + 3 * WGS84_E * WGS84_E * WGS84_E * WGS84_E / 32 + 45 * WGS84_E * WGS84_E * WGS84_E * WGS84_E / 1024) + Sin(4 * Lat) * (15 * WGS84_E * WGS84_E * WGS84_E * WGS84_E / 256 + 45 * WGS84_E * WGS84_E * WGS84_E * WGS84_E / 1024) - Sin(6 * Lat) * (35 * WGS84_E * WGS84_E * WGS84_E * WGS84_E / 3072); Result.Easting := (K0 * N * (A + (1 - T + C) * A * A * A / 6 + (5 - 18 * T + T * T + 72 * C - 58 * WGS84_E * WGS84_E) * A * A * A * A * A / 120) + 500000.0); Result.Northing := (K0 * (M + N * Tan(Lat) * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * A * A * A * A / 24 + (61 - 58 * T + T * T + 600 * C - 330 * WGS84_E * WGS84_E) * A * A * A * A * A * A / 720))); if LatLon.Latitude < 0 then Result.Northing := Result.Northing + 10000000.0; // Add offset for southern hemisphere Result.Zone := Zone; end; ------------------------------------------------------------------- The same task to Bard, comes up with this, more simple solution: function ConvertLatLonToLKS92(Latitude: Extended; Longitude: Extended): Extended; var DeltaX, DeltaY: Extended; SinLatitude: Extended; begin SinLatitude := Sin(Latitude * Pi / 180); DeltaX := 268.3383 * Cos(Longitude * Pi / 180) * SinLatitude; DeltaY := 614.6800 * SinLatitude - 511.000 * Cos(Longitude * Pi / 180) * SinLatitude; Result := Latitude * 100000 + Longitude * 1000 + (DeltaX + DeltaY) / 100; end; I think GPT is too complex and Bard is too simple, or is any working for you? -
You are not alone, even the so much hyped Flutter may show this: https://github.com/flutter/flutter/issues/137895 Have you checked the App Bundle support for 32-Bit and 64-Bit? https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Submitting_Your_Android_App_to_Google_Play#Android_App_Bundle_Support or are you uploading APK, instead of AAB to the PlayStore? Nevertheless, on my Samsung S23 this works nicely, no matter if D11.3 or D12. Do you have any more details, logs or the like?
-
Have you experimented with Skia already, does it help to get faster and smoother repaints?
-
How to read an .ini file of unknown encoding a FormatSettings?
Rollo62 replied to Tom F's topic in FMX
Maybe this is also interesting background info: https://www.ionos.com/digitalguide/websites/web-development/iso-8601/ https://wiert.me/2020/10/21/delphi-get-timestamp-as-iso8601-string-for-use-in-filenames/ https://wiert.me/2011/08/18/iso-8601-date-time-and-datetime-in-delphi-was-simple-example-to-show-datetime-now-in-iso-8601-format-on-ideone-com-online-c-compiler-debugging-tool/ -
Hi there, I've got suspicious log messages, with an Android App under Rx11.3. I am not using any 3rd Party frameworks, nor can I imagine what could cause this warning. When I check, these fieds seems to be deprecated since Android 10, related to accessing screen contents. https://developer.android.com/about/versions/10/privacy/changes#screen-contents In the sources under FMX.Platform.Screen.Android, there seems to be a possible relation to DisplayManager, maybe this is doing something with the display. https://developer.android.com/reference/kotlin/android/hardware/display/DisplayManager#virtual_display_flag_auto_mirror https://developer.android.com/reference/kotlin/android/hardware/display/DisplayManager#virtual_display_flag_secure or maybe RestrictedScreenReading has to do with it ... https://source.android.com/docs/core/permissions/restricted-screen-reading?hl=en FMX.Platform.Screen.Android: TAndroidScreenServices = class(TInterfacedObject, IFMXMultiDisplayService, IFMXScreenService, IFMXDeviceMetricsService, IFMXFullScreenWindowService) ... public property DisplayManager: JDisplayManager read FDisplayManager; property IsPrimaryDisplayDefined: Boolean read FIsPrimaryDisplayDefined; property PrimaryDisplay: TDisplay read FPrimaryDisplay; end; But that is a rough guess. The app seems to behave normally, but I wonder if that might cause probems in the future. I'm testing under Android 14 now. If anyone knows how to get rid of these warnings, or at least a hint where this could be related to, please let me know.
-
<OT> From where do you get that impression? You are right, TMS FixInsight seems a little outdated https://www.tmssoftware.com/site/fixinsight.asp?s=history but I'm waiting for the coming D12 update anytime soon. Do you have other informations, regarding TMS Insights future? </OT>
-
What could cause access of CAPTURE_SECURE_VIDEO_OUTPUT, CAPTURE_VIDEO_OUTPUT, READ_FRAME_BUFFER ?
Rollo62 replied to Rollo62's topic in Cross-platform
Oh my, I wanted to make an urgent update, before porting to D12. I expect many new issues in apps, under D12, probably 1-2 weeks to get it stable again. How is your experience, is it more or less smooth to migrate, for mobile stuff? Ok, it seems I have to look into D12 sooner than I hoped. -
Like with all Cloud services, before diving deeper into whats their technical details and purposes, I ALWAYS check their pricing terms first. In most cases, this is a real showstopper for me and this early pricing evaluation saves a lot of my time. Regarding SonarCube, they have the worst terms I have seen since many years, clearly a winner for the golden lemon
-
Sorry, I was a millisecond too late
-
Here he is, himself https://www.youtube.com/watch?v=izI0Vah2CRs&t=3s accompanied by Nick Hodges https://www.google.com/search?client=firefox-b-d&q=spring4d+tutorial#fpstate=ive&vld=cid:910b8dff,vid:j9qvJiDz7ME,st:0
-
Are there current issues with QualityPortal?
Rollo62 posted a topic in Software Testing and Quality Assurance
Hi there, since several days I cannot log in here https://quality.embarcadero.com/login.jsp The username and password was not changed and this seems not to be an "wrong password or unkown user" message. Maybe I've tried too often meanwhile, but the message was always the same, not that I've made too many attempty to login. Is there anything wrong with the QualityPortal, or is this probably only on my account? -
Are there current issues with QualityPortal?
Rollo62 replied to Rollo62's topic in Software Testing and Quality Assurance
Currently Quality Prortal works again for me, maybe asking a few times helps -
Are there current issues with QualityPortal?
Rollo62 replied to Rollo62's topic in Software Testing and Quality Assurance
Ahhh, yes. I hope Jira gets up soon in this critical times. Sorry, I was lagging in reading the former posts, this was answered already before https://en.delphipraxis.net/topic/10470-quality-portal-access-gone-for-me/?tab=comments#comment-83330 -
I remember the last time when I did this, that was in the age where performant VM's where not yet everywhere available.
-
D11.3: Android: Create KeyStore, seems changed to former process, missing SHA1withRSA
Rollo62 posted a topic in Cross-platform
Hi there, I wanted to create an new keystore file, still under RadStudio 11.3, which works. But I haven't used that quite some time, and I must find out that the "Alias Password" is no more available or possible to set. In the dialog, there is still the option, but that seems not really get activated and longer. The first step looks quite normal but the 2nd step, never shows the Alias password It is possible to create a keystore still but of course without the alias password, also here The Alias Info looks OK, but missing password Commandline After some evaluation on commandline, it seems that the former keytool parameters seems to be changed. 1.) From something before, with -genkey keytool -genkey -v -keystore %ks_file% -alias %ks_alias% -keyalg RSA -sigalg SHA1withRSA -keysize 2048 -validity 9132 2.) to something new, with -genkeypair keytool -genkeypair -v -keypass "%ks_pass%" -keystore %ks_file% -alias %ks_alias% -keyalg RSA -keysize 2048 -validity 9132 This works quite similar and looks like the proper replacement, unfortunately I cannot find since when this might have changed. I am working on the pre-installed JDK from the D11.3 IDE, which should be untouched and OK: Possible changes, with maybe sideeffects in the PlayStore, GCM or elsewhere: 1.) old method : This used the -sigalg SHA1withRSA, while 2,) new method: This used the -sigalg SHA256withRSA Yes, that make perfectly sense, since SHA1 is quite banned everywhere. Though, my questions are still: - Is this change officially documented anywhere? (probably not really for Delphi, but for Android, GCM or Firebase would be great) for example https://stackoverflow.com/questions/65920211/warning-sha1-algorithm-and-sha1withrsa-algorithm-specified-will-be-disabled-in https://www.ibm.com/docs/en/semeru-runtime-ce-z/17?topic=jcecca-sha1withrsa https://stackoverflow.com/questions/70419377/how-to-update-the-android-keystore-signature-algorithm-name-sha1withrsa-weak https://github.com/italia/cie-ideaapp/issues/4 But not much really related directly to Android Apps, PlayStore and Google Cloud Services. - Are there any further known requirements, or known sideeffects, for that alias password or SHA1withRSA algorithm? ( I can remember darkly, that I have read about such requirement somewhere, some years ago, but probably those procedures have changed meanwhile ). - What would be the right way to create Keystore in 2023 then, the usual IDE way, without alias password, or probably using a commandline option, either similar or different as 2.) ? I assume that the new D12.0 might also clarify about that process, but I still have to use my beloved D11.3 for a short while 🙂 -
Hi there, I'm a little unsure about the PlatformStatus, cite note what this line really means: Does that mean, that the new Delphi 12.0 Athens officially is NOT able to fully support Android 13 and iOS 16 ( 32 and 64 Bit ) ? But neither is RadStudio 11.3. I cannot believe this, since we are waiting urgently to receive version 12.0 to exactly support the newest Android, iOS and Macos versions, of course in a backwards compatible manner. How would I have to support 32-Bit, older platforms then? New versions of the IDE will force me to have newer code, and it will break into two branches of source codes then. How to handle that in practice? Perhaps, I just misread the intention of this line somehow. Please clarify, if anybody has deeper insights. Edit: Maybe a note from ChatGPT can help to clarify here. It has the opinion that "requires RAD Studio 11.3 or later" is missing, same as I do: Finally, these requirements can clarify this question too. https://docwiki.embarcadero.com/RADStudio/Athens/e/index.php/Installation_Notes#Requirements_for_Supported_Target_Platforms
-
Yes, you're right. This statement is a little more clear, but still missing the clear explanation of what implications to expect for Delphi. Maybe there is another DocWiki-Page, showing this, I still haven't found it yet. Is this a C++ only issue and no changes on the Delphi side?
-
Python for Delphi: Recent new features and enhancements
Rollo62 replied to pyscripter's topic in Python4Delphi
Support for python 12 Did I miss a few years in a coma I assume you mean 3.12, right ?