Rollo62
Members-
Content Count
1668 -
Joined
-
Last visited
-
Days Won
22
Everything posted by Rollo62
-
LocationSensor returns NaN as Longitude and Latitude at the first calling
Rollo62 replied to at3s's topic in FMX
Yes, the location is called asynchronously. I also would not stress the system directly in FormCreate, with the activation of Location, where it is still loading and initializating. Better to do that at a later time, maybe FormShow, or even better, manually controlled on demand by your own code only. I'm not sure if you asked for PermissionRequest correctly, because I cannot see something similar like this in your code. The result should be in mainUI thread, but to ensure that this is true you can use ForceQueue, to protect this against mysterious situations. I know that Android systems might forgive many of such issues in debug mode, but clearly is at high risk to fail in release and PlayStore. procedure Tfrm.FormShow(Sender: TObject); begin DoLocationActivate; end; procedure Tfrm.DoLocationActivate; begin TPermissionsService.DefaultService.RequestPermissions( [LPermissionLocationF, LPermissionLocationC] // PermissionResult , procedure ( const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray ) begin if ( ( Length( AGrantResults ) <> 2 ) or ( ( AGrantResults[0] <> TPermissionStatus.Granted ) ) or ( ( AGrantResults[1] <> TPermissionStatus.Granted ) ) ) then begin exit; //user doesnt grant access end; TThread.ForceQueue( // this should not be necessary, but just to ensure that Active := True is really called in the main thread only procedure begin LocationSensor.Active := True; end ); end ); end;- 7 replies
-
- locationsensor
- android
-
(and 1 more)
Tagged with:
-
LocationSensor returns NaN as Longitude and Latitude at the first calling
Rollo62 replied to at3s's topic in FMX
Have you performed a PermissionRequest before?- 7 replies
-
- locationsensor
- android
-
(and 1 more)
Tagged with:
-
iOS Upgrade from Xcode 14.3.1 to XCode 15.2: Yes or No ?
Rollo62 replied to Rollo62's topic in Cross-platform
It stays strange, the tip in the link works partly: When unzipped and copied XCode to /Applications ( about 24 GB ), then I used this command "open /Applications/Xcode.app/Contents/MacOS/Xcode" first time This looks promising, starting a UI asking which components to install, I kept the checked Macos and iOS frameworks Then it prepared something but seemed to crash. When I started a second time, it give output like this in the terminal, but doesn't start really in normal mode. The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. username$ /Applications/Xcode.app/Contents/MacOS/Xcode ; exit; 2024-02-20 13:16:59.811 Xcode[5677:87640] Regex scanner "(null)" shouldn't have a Tokenizer. Ignoring it. 2024-02-20 13:16:59.940 Xcode[5677:87640] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. 2024-02-20 13:17:00.246 Xcode[5677:87640] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled) 2024-02-20 13:17:00.256 Xcode[5677:87704] CoreSimulator detected version change. Framework version (885.2) does not match existing job version (857.14). Attempting to remove the stale service in order to add the expected version. objc[5677]: Class _EntryGenericToGL is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsServices.framework/Versions/A/GPUToolsServices (0x14e59ce28) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GPUToolsAdvancedUI.framework/Versions/A/GPUToolsAdvancedUI (0x14d3a83c0). One of the two will be used. Which one is undefined. objc[5677]: Class _EntryGLToGeneric is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsServices.framework/Versions/A/GPUToolsServices (0x14e59ce78) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GPUToolsAdvancedUI.framework/Versions/A/GPUToolsAdvancedUI (0x14d3a8410). One of the two will be used. Which one is undefined. objc[5677]: Class DYPixelFormatConverter is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsServices.framework/Versions/A/GPUToolsServices (0x14e59cec8) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GPUToolsAdvancedUI.framework/Versions/A/GPUToolsAdvancedUI (0x14d3a8460). One of the two will be used. Which one is undefined. objc[5677]: Class ASVError is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsCore.framework/Versions/A/GPUToolsCore (0x13c111268) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GPUToolsASVC.framework/Versions/A/GPUToolsASVC (0x13c0177c8). One of the two will be used. Which one is undefined. objc[5677]: Class DYGPUDerivedEncoderCounterInfo is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsShaderProfiler.framework/Versions/A/GPUToolsShaderProfiler (0x13c184098) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91c7c8). One of the two will be used. Which one is undefined. objc[5677]: Class DYGPUTimelineInfo is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsShaderProfiler.framework/Versions/A/GPUToolsShaderProfiler (0x13c1840e8) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91c818). One of the two will be used. Which one is undefined. objc[5677]: Class DYTimelineCounterGroup is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsShaderProfiler.framework/Versions/A/GPUToolsShaderProfiler (0x13c184138) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91c868). One of the two will be used. Which one is undefined. objc[5677]: Class DYWorkloadGPUTimelineInfo is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsShaderProfiler.framework/Versions/A/GPUToolsShaderProfiler (0x13c184188) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91c8b8). One of the two will be used. Which one is undefined. objc[5677]: Class GRCPerFrameDataClass is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/MTLToolsShaderProfiler.framework/Versions/A/MTLToolsShaderProfiler (0x14e17b858) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91ccc8). One of the two will be used. Which one is undefined. objc[5677]: Class DYShaderAnalyzerNextGPU is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/MTLToolsShaderProfiler.framework/Versions/A/MTLToolsShaderProfiler (0x14e17b808) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/GPUTools/PlugIns/GLToolsShaderProfilerMobileSupport.gtplugin/Contents/MacOS/GLToolsShaderProfilerMobileSupport (0x150fd8610). One of the two will be used. Which one is undefined. Looking through more of the comments, I see something like this: Where I don't really see how this might help the VisualStudio, probably this will only use the commandline tools, ad not the UI. It seems to work maybe from a different location: The latst hint seems to work, after using a PList editor. I used "JSON PList Buddy" for that, here is what I have done. At least XCode is back for the moment, but I'm looking towards the next showstoppers soon. If Apple really doesn't want us to use XCode, they will finally win. -
iOS Upgrade from Xcode 14.3.1 to XCode 15.2: Yes or No ?
Rollo62 replied to Rollo62's topic in Cross-platform
It stays strange, the tip in the link works partly: When unzipped and copied XCode to /Applications ( about 24 GB ), then I used this command "open /Applications/Xcode.app/Contents/MacOS/Xcode" first time This looks promising, starting a UI asking which components to install, I kept the checked Macos and iOS frameworks Then it prepared something but seemed to crash. When I started a second time, it give output like this in the terminal, but doesn't start really in normal mode. The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. username$ /Applications/Xcode.app/Contents/MacOS/Xcode ; exit; 2024-02-20 13:16:59.811 Xcode[5677:87640] Regex scanner "(null)" shouldn't have a Tokenizer. Ignoring it. 2024-02-20 13:16:59.940 Xcode[5677:87640] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. 2024-02-20 13:17:00.246 Xcode[5677:87640] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled) 2024-02-20 13:17:00.256 Xcode[5677:87704] CoreSimulator detected version change. Framework version (885.2) does not match existing job version (857.14). Attempting to remove the stale service in order to add the expected version. objc[5677]: Class _EntryGenericToGL is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsServices.framework/Versions/A/GPUToolsServices (0x14e59ce28) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GPUToolsAdvancedUI.framework/Versions/A/GPUToolsAdvancedUI (0x14d3a83c0). One of the two will be used. Which one is undefined. objc[5677]: Class _EntryGLToGeneric is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsServices.framework/Versions/A/GPUToolsServices (0x14e59ce78) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GPUToolsAdvancedUI.framework/Versions/A/GPUToolsAdvancedUI (0x14d3a8410). One of the two will be used. Which one is undefined. objc[5677]: Class DYPixelFormatConverter is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsServices.framework/Versions/A/GPUToolsServices (0x14e59cec8) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GPUToolsAdvancedUI.framework/Versions/A/GPUToolsAdvancedUI (0x14d3a8460). One of the two will be used. Which one is undefined. objc[5677]: Class ASVError is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsCore.framework/Versions/A/GPUToolsCore (0x13c111268) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GPUToolsASVC.framework/Versions/A/GPUToolsASVC (0x13c0177c8). One of the two will be used. Which one is undefined. objc[5677]: Class DYGPUDerivedEncoderCounterInfo is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsShaderProfiler.framework/Versions/A/GPUToolsShaderProfiler (0x13c184098) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91c7c8). One of the two will be used. Which one is undefined. objc[5677]: Class DYGPUTimelineInfo is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsShaderProfiler.framework/Versions/A/GPUToolsShaderProfiler (0x13c1840e8) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91c818). One of the two will be used. Which one is undefined. objc[5677]: Class DYTimelineCounterGroup is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsShaderProfiler.framework/Versions/A/GPUToolsShaderProfiler (0x13c184138) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91c868). One of the two will be used. Which one is undefined. objc[5677]: Class DYWorkloadGPUTimelineInfo is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/GPUToolsShaderProfiler.framework/Versions/A/GPUToolsShaderProfiler (0x13c184188) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91c8b8). One of the two will be used. Which one is undefined. objc[5677]: Class GRCPerFrameDataClass is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/MTLToolsShaderProfiler.framework/Versions/A/MTLToolsShaderProfiler (0x14e17b858) and /Applications/Xcode.app/Contents/PlugIns/GPUDebugger.ideplugin/Contents/Frameworks/GTShaderProfiler.framework/Versions/A/GTShaderProfiler (0x14f91ccc8). One of the two will be used. Which one is undefined. objc[5677]: Class DYShaderAnalyzerNextGPU is implemented in both /Applications/Xcode.app/Contents/SharedFrameworks/MTLToolsShaderProfiler.framework/Versions/A/MTLToolsShaderProfiler (0x14e17b808) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/GPUTools/PlugIns/GLToolsShaderProfilerMobileSupport.gtplugin/Contents/MacOS/GLToolsShaderProfilerMobileSupport (0x150fd8610). One of the two will be used. Which one is undefined. Looking through more of the comments, I see something like this: Where I don't really see how this might help the VisualStudio, probably this will only use the commandline tools, ad not the UI. It seems to work maybe from a different location: There seems another way, described later on, by changing the CFBundleVersion, but I can't get this running also Any ideas? Maybe I should purchase a plist-editor, to get this done, with the existing tools. -
iOS Upgrade from Xcode 14.3.1 to XCode 15.2: Yes or No ?
Rollo62 replied to Rollo62's topic in Cross-platform
OMG: It's worse. It seems XCode 14.3.1 is not running on Sonoma anymore, why . https://forums.developer.apple.com/forums/thread/731005 Is this the case, or is there any hack how this can be done? Updating Apple products is always a pain in the a**, but this time it really seems to break my workflow completely. So do I have to upgrade to XCode 15.2, or is there any way out? -
iOS: Strange exception "Invalid Thread ID: -1" during debugging, with VCL relation
Rollo62 posted a topic in Cross-platform
Hi there, from a very early startup of an iOS project, I've got the following exception, when stepping over simple variables. ( RadStudio Rx11.3 ) These are same stuff for a bunch of similar sets, just several similar Excludes() like this, so nothing fancy: Exclude( LFeatCurr.States.State, Grant_FG ); Exclude( LFeatCurr.States.State, Granting_FG ); Exclude( LFeatCurr.States.State, Grant_BG ); Exclude( LFeatCurr.States.State, Granting_BG ); All variables and other stuff is tested and seems OK so far, where the exceptions seem to be thrown mostly at the last-before position, but maybe also at other positions randomly. The same project worked fine so far during debugging. Message: "Invalid Thread ID: -1" [6C6C1392]{dbkdebugide280.bpl} Debug.TProcess.GetThreadFromId (Line 8835, "Debug.pas" + 7) + $1C [6C6B31A1]{dbkdebugide280.bpl} Debug.TDbkBreakpoint.DoHandleWhenOccurs (Line 2384, "Debug.pas" + 10) + $9 [6A529962]{gdbdebugide280.bpl} GdbDbkWrapper.TDbkBkptWrapper.BreakpointHits (Line 1181, "GdbDbkWrapper.pas" + 2) + $B [6A6765CE]{gdbdebugcore280.bpl} GDBProcess.TGDBProcess.NotifyBreakpointOccurred$ActRec.$0$Body (Line 2338, "GDBProcess.pas" + 8) + $1A [71E015BF]{rtl280.bpl } System.Classes.CheckSynchronize (Line 15785, "System.Classes.pas" + 34) + $A [6BCF6E97]{fmx280.bpl } FMX.Platform.Win.TPlatformWin.ThreadSync (Line 3503, "FMX.Platform.Win.pas" + 3) + $2 [71E05C1C]{rtl280.bpl } System.Classes.StdWndProc (Line 18517, "System.Classes.pas" + 8) + $0 [717D5263]{vcl280.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 11488, "Vcl.Forms.pas" + 23) + $1 [717D52A6]{vcl280.bpl } Vcl.Forms.TApplication.HandleMessage (Line 11518, "Vcl.Forms.pas" + 1) + $4 [717D55E5]{vcl280.bpl } Vcl.Forms.TApplication.Run (Line 11657, "Vcl.Forms.pas" + 27) + $3 [00DB80A2]{bds.exe } bds.bds (Line 227, "" + 16) + $2 At that time, only 5 threads were active in the debugger, and they look pretty much OK too. What puzzles me is the relation to VCL in the exception data above. Maybe that means the exception is caused by the IDE or debugger himself, or there is anything else running terribly wrong. I will try to restart & retry, but would like to ask with these data inspection first, to clarify if this is maybe a known behavior and to identify the culprit here. So far I see this kind of "external" debugger exception for the first time. -
Group a collection of drawn objects to have a single opacity
Rollo62 replied to XylemFlow's topic in FMX
All objects under same layout and managing layers and groups with TLayout: Yes, definitively. Not sure what kind of "opacity" you need, but you could also put finally a TRectangle as cover over all, with Align := Contents, and set HitTest := False, Stroke.Kind := None, File.Color := White (or Black depending on your design), and set Opacity as you desire. This will "grey out" the underlying objects, while they are still active. -
PAClient error: unable to package .aab file
Rollo62 replied to Khari25's topic in Delphi IDE and APIs
You o ly can use APK for Debugger, Switch from Project Relese to Debug, that should Do it. -
FYI - Several Embarcadero services are currently unavailable
Rollo62 replied to Keesver's topic in General Help
Why, this is a typical problem for young start-ups that have developed brand new and fancy products that have suddenly and unexpectedly gone incredibly viral, but unfortunately, they have not 100% stable infrastructure and business processes yet. Their main goal would be to stabilize all processes and infrastructures as quickly as possible so that they do not disrupt and hinder the delivery processes created by the hype surrounding their fancy products. -
FYI - Several Embarcadero services are currently unavailable
Rollo62 replied to Keesver's topic in General Help
At least, DocWiki looks OK to me. Praise the Lord, it's back again -
iOS: Certificate not found in provisioning profile
Rollo62 replied to bcvs's topic in Cross-platform
You should cleanup the expired certificates in keychain. Apple dislikes ambiguent certificates there. -
Have you checked the right 32/64 bitness of APK and Phone OS ? Oh, no, it could be this one https://en.delphipraxis.net/topic/10704-delphi-12-and-android-14/
-
FYI - Several Embarcadero services are currently unavailable
Rollo62 replied to Keesver's topic in General Help
Good to hear that D12 is so successful that datacenters starts boiling Move on like that -
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
That might be the case, but I see another typical problem on the horizon. I call it the "case solved" problem, where one might think a case is solved once for all, never considering that there may lie any hidden problems inside. Especially with threads, this might lead to long and painful problem searches, if you are too sure about your initial solution. But you'right, depends on the case, which we don't really have seen right now. -
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/