

ToddFrankson
Members-
Content Count
80 -
Joined
-
Last visited
-
Days Won
1
Everything posted by ToddFrankson
-
@Dave Nottage I got away from this for a bit, but I am now looking back at it. It Seems the 64 bit version doesn't compile. I have tried to add the dw-kastri-base-3.0.0.jar to the 64 bit version but it doesn't "Add". I can compile the libforegroundservice.o just fine. I get the following errors when I try to run it: [PAClient Error] Error: E7688 Error in .\Android64\Debug\ForegroundService-dexed.jar:classes.dex: [PAClient Error] Error: E7688 Type com.embarcadero.services.ForegroundService$LocalBinder is defined multiple times: .\Android64\Debug\ForegroundService-dexed.jar:classes.dex, .\Android64\Debug\ForegroundService-dexed.jar:classes.dex [PAClient Error] Error: E7688 com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: .\Android64\Debug\ForegroundService-dexed.jar:classes.dex [PAClient Error] Error: E7688 at Version.fakeStackEntry(Version_8.2.33.java:0) [PAClient Error] Error: E7688 at com.android.tools.r8.T.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:5) [PAClient Error] Error: E7688 at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:82) [PAClient Error] Error: E7688 at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:32) [PAClient Error] Error: E7688 at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:31) [PAClient Error] Error: E7688 at com.android.tools.r8.utils.S0.b(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:2) [PAClient Error] Error: E7688 at com.android.tools.r8.D8.run(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:6) [PAClient Error] Error: E7688 at com.embarcadero.dexer.DexerCommand$MergeCommand.run(DexerCommand.kt:41) [PAClient Error] Error: E7688 at picocli.CommandLine.executeUserObject(CommandLine.java:2026) [PAClient Error] Error: E7688 at picocli.CommandLine.access$1500(CommandLine.java:148) [PAClient Error] Error: E7688 at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) [PAClient Error] Error: E7688 at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) [PAClient Error] Error: E7688 at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) [PAClient Error] Error: E7688 at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) [PAClient Error] Error: E7688 at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) [PAClient Error] Error: E7688 at picocli.CommandLine.execute(CommandLine.java:2170) [PAClient Error] Error: E7688 at com.embarcadero.dexer.Main.main(Main.kt:10) [PAClient Error] Error: E7688 Caused by: com.android.tools.r8.utils.b: Type com.embarcadero.services.ForegroundService$LocalBinder is defined multiple times: .\Android64\Debug\ForegroundService-dexed.jar:classes.dex, .\Android64\Debug\ForegroundService-dexed.jar:classes.dex [PAClient Error] Error: E7688 at com.android.tools.r8.utils.Q2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:21) [PAClient Error] Error: E7688 at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:54) [PAClient Error] Error: E7688 at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:10) [PAClient Error] Error: E7688 at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056) [PAClient Error] Error: E7688 at com.android.tools.r8.utils.D2.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:6) [PAClient Error] Error: E7688 at com.android.tools.r8.graph.m4$a.d(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:6) [PAClient Error] Error: E7688 at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:61) [PAClient Error] Error: E7688 at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:12) [PAClient Error] Error: E7688 at com.android.tools.r8.dex.c.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:9) [PAClient Error] Error: E7688 at com.android.tools.r8.D8.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:45) [PAClient Error] Error: E7688 at com.android.tools.r8.D8.d(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:17) [PAClient Error] Error: E7688 at com.android.tools.r8.D8.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:35) [PAClient Error] Error: E7688 at com.android.tools.r8.utils.S0.a(R8_8.2.33_429c93fd24a535127db6f4e2628eb18f2f978e02f99f55740728d6b22bef16dd:28) [PAClient Error] Error: E7688 ... 12 more
-
How do I create an Android simulator under Delphi 11.3 ?
ToddFrankson replied to FreeDelphiPascal's topic in FMX
Yup -
How to NOT save changes when compiling?
ToddFrankson replied to Squall_FF8's topic in Delphi IDE and APIs
-
Looking but not finding...
ToddFrankson replied to Rick_Delphi's topic in Job Opportunities / Coder for Hire
Not really. I use Delphi to supplement my income on the side, have had several business before, and now. But through it all I have come up with something on the side that could be extremely lucrative. With some luck, a launch will occur later this year. Next year at the latest. -
I have a Firedac connection to a mysql database. In design time, I connect using the 32 bit connection, Get the fields.... Run in 32 bit....everything is great. Switch to 64bit, setup the 64 bit driver, connect and Boom- The field I pulled in in 32 bit (Comes in as TStringField-due to 32bitness), gives a mismatched type error complaining it should be TWideStringField.... How can I have my cake and eat it too? I can't get the 64 bit fields while connected in 32 bit design time. What am I overlooking??
-
Dooouh! I feel like an idiot for having a brain fart! Thanks for the reminder!!!!
-
Looking but not finding...
ToddFrankson replied to Rick_Delphi's topic in Job Opportunities / Coder for Hire
I am, I don't have the funding to hire anyone, Yet......... -
Does anyone know a delphi component that can play videos from a stream
ToddFrankson replied to ToddFrankson's topic in VCL
I broke down and went with http://www.delphiffmpeg.com/ Awesome stuff, even though its got a few minor bugs and some older code (Also compatible back to D7). -
Does anyone know a delphi component that can play videos from a stream
ToddFrankson replied to ToddFrankson's topic in VCL
Do you have it available somewhere so I can at least take a look? -
Yup. android is huge worldwide.
-
Does anyone know a delphi component that can play videos from a stream
ToddFrankson replied to ToddFrankson's topic in VCL
Neither currently allows a stream outside of a server side video..... I need the ability to do this locally, without any file. For example, the same way you can load an image from a stream. The videos are small and are stored as proprietary objects. They are extracted to a MemoryStream. To play them I currently have to write them to a file (Memorystream.savetofile) and then load them in a player (WindowsMediaPlayer.URL). I'm looking for something to cut out the write to file -
Does anyone know a delphi component that can play videos from a stream
ToddFrankson replied to ToddFrankson's topic in VCL
I was attempting to lure people in with curiosity.... -
Considering when an app is submitted to the Play Store, Google will give you a list of 18,000+ androids your app will work with. I recommend something that's an average size screen for UI.
-
I have Push Notifications working just fine....... What I want to do now is the following: When the user taps the notification and the App is closed, I want the App to open and display the Notification within the app(in a TText for example). My problem seems to be that when the notification is tapped, and the app launches, the notification is cleared before the app can open. Is there a way to do what I want?
-
I'm confused now....The Docs say there's no title and body, but you are saying there is, or did you just type the JSON up? Or was this sent thru FCMRebooted?
-
So what does PushService.StartupNotifications contain when the App cold starts?
-
@Dave Nottage I noticed this in the documentation: Note: The push notification title and body are not available in DataObject when the application is launched (coldstart) by tapping the notification in the Notification Center. So there is no way to display the notification, on a cold start, within the App??
-
I was looking to keep track of notifications for the user to be able to look back at them.
-
If the App isn't running, and receives the notification, can I, for example, add it to a text file at that point?
-
I expect you don't have an SSLHandler, which is required if you are using SSL by setting TLS to Explicit.
-
Meta-Delphi question about web hosting..
ToddFrankson replied to jglosz's topic in Network, Cloud and Web
Not true. most Windows servers run Plesk, which is far better than cpanel. -
How to solve System Out of Resources in TScrollBox
ToddFrankson replied to araujoarthur's topic in VCL
I use an In memory table (TFDMemtable) for somethings I am working on, assigning only the records that will be visible on the screen at any given time. So if I will see 20 -30 items, I reuse the controls, just change the data in them as someone "scrolls" . It's an illusion, but visually it seems extremely fast, and low memory overhead due to only a set number of visual components -
So I have the ability to set the MACOS wallpaper on the current screen using this code (I believe Dave Nottage posted it). procedure SetDesktopBackground(const ImagePath: string; const FillColor: TAlphaColor); var NSFileURL: NSURL; NSWorkspace1: NSWorkspace; MainScreen: NSScreen; Error: NSError; begin try // Convert Delphi file path to NSURL NSFileURL := TNSURL.Wrap(TNSURL.OCClass.fileURLWithPath(StrToNSStr(ImagePath))); NSWorkspace1 := TNSWorkspace.Wrap(TNSWorkspace.OCClass.sharedWorkspace); MainScreen := TNSScreen.Wrap(TNSScreen.OCClass.mainScreen); // Set the desktop image for the main screen if not NSWorkspace1.setDesktopImageURL(NSFileURL, MainScreen, nil, @Error) then begin ShowMessage('Failed to set desktop image: ' + NSStrToStr(Error.localizedDescription)); end; except on E: Exception do begin ShowMessage('Error setting desktop image: ' + E.Message); end; end; end; My problem has been the 3rd parameter in SetDesktopImageURL..... Evidently it takes an NSDictionary. I have spent 3 days attempting to get this part to work with various attempts at translating ObjectiveC and swift code, using my brain and even several AI coding websites. Nothing I seem to do actually builds the dictionary. Can anyone lend me a hand? I have managed to find the following constants (Not defined in Delphi BTW): const NSImageScaleNone = 0; NSImageScaleAxesIndependently = 1; NSImageScaleProportionallyUpOrDown = 2; NSImageScaleProportionallyDown = 3; Here's the Dictionary documentation : https://developer.apple.com/documentation/foundation/nsdictionary?language=objc And the Documentation on the keys in the dictionary(Defined in the constants above): https://developer.apple.com/documentation/appkit/nsworkspace/desktopimageoptionkey?language=objc Thanks If someone could help me understand this, so I can get past it, I'd appreciate it.
-
I think you posted it....I may be mistaken. Here is 1 variation: procedure SetDesktopBackground(const ImagePath: string; const FillColor: TAlphaColor); var Err: NSError; Options: NSMutableDictionary; ImageURL: NSURL; FillColorObj: NSColor; begin // Convert the image file path to NSURL ImageURL := TNSURL.Wrap(TNSURL.OCClass.fileURLWithPath(NSStr(ImagePath))); if ImageURL = nil then begin Showmessage('Failed to create NSURL for the image file.'); Exit; end; // Create a dictionary for desktop image options Options := TNSMutableDictionary.Wrap(TNSMutableDictionary.OCClass.dictionary); // Set the desktop image fill color FillColorObj := TNSColor.Wrap(TNSColor.OCClass.colorWithCalibratedRed( TAlphaColorRec(FillColor).R / 255, TAlphaColorRec(FillColor).G / 255, TAlphaColorRec(FillColor).B / 255, TAlphaColorRec(FillColor).A / 255)); Options.setObject(FillColorObj, NSWorkspaceDesktopImageFillColorKey); // Set the desktop image scaling to none Options.setObject(TNSNumber.Wrap(TNSNumber.OCClass.numberWithInt(NSImageScaleProportionallyUpOrDown)), NSWorkspaceDesktopImageScalingKey); // Set the desktop image for the main screen if not TNSWorkspace.Wrap(TNSWorkspace.OCClass.sharedWorkspace).setDesktopImageURL(ImageURL, TNSScreen.Wrap(TNSScreen.OCClass.mainScreen), Options, @Err) then begin if Err <> nil then Writeln(Format('Error setting desktop background: %s', [NSStrToStr(Err.localizedDescription)])); end; end; It hangs here: Options.setObject(FillColorObj, NSWorkspaceDesktopImageFillColorKey); Here is another: procedure SetDesktopColor(const Color: TAlphaColor); var Err: NSError; Options: NSMutableDictionary; URL: NSURL; TempFile: string; begin // Create a temporary file path for the color image TempFile := TPath.Combine(TPath.GetTempPath, 'SolidColorDesktop.png'); // Create a solid color image CreateSolidColorImage(Color, TempFile); // Load the image as an NSURL URL := TNSURL.Wrap(TNSURL.OCClass.fileURLWithPath(NSStr(TempFile))); if URL = nil then begin Showmessage('Failed to create NSURL for the temporary file.'); Exit; end; // Create a mutable dictionary for desktop image options Options := TNSMutableDictionary.Wrap(TNSMutableDictionary.OCClass.dictionary); // Set the desktop image fill color (not used in this case) Options.setObject(TNSColor.Wrap(TNSColor.OCClass.whiteColor), NSWorkspaceDesktopImageFillColorKey); // Set the desktop image scaling Options.setObject(TNSNumber.Wrap(TNSNumber.OCClass.numberWithInt(NSImageScaleNone)), NSWorkspaceDesktopImageScalingKey); // Set the desktop image for the main screen if not TNSWorkspace.Wrap(TNSWorkspace.OCClass.sharedWorkspace).setDesktopImageURL(URL, TNSScreen.Wrap(TNSScreen.OCClass.mainScreen), Options, @Err) then begin if Err <> nil then Showmessage(Format('Error setting desktop color: %s', [NSStrToStr(Err.localizedDescription)])); end; end; I have tried using NSDictionary in place of NSMutableDictionary, and used the SetValue method. That gives me an Exception in the onButtonUp event deep in FMX code. I tried this to get the current settings: function GetCurrentDesktopImageOptions: TDictionary<string, string>; var Options: NSDictionary; KeyEnumerator: NSEnumerator; Key: Pointer; OptionKey: string; OptionValue: string; ResultDict: TDictionary<string, string>; begin ResultDict := TDictionary<string, string>.Create; try Options := TNSWorkspace.Wrap(TNSWorkspace.OCClass.sharedWorkspace) .desktopImageOptionsForScreen(TNSScreen.Wrap(TNSScreen.OCClass.mainScreen)); if Options <> nil then begin KeyEnumerator := Options.keyEnumerator; while True do begin Key := KeyEnumerator.nextObject; if Key = nil then Break; OptionKey := NSStrToStr(TNSString.Wrap(Key)); OptionValue := NSStrToStr(TNSString.Wrap(Options.objectForKey(Key))); ResultDict.Add(OptionKey, OptionValue); end; end; Result := ResultDict; except ResultDict.Free; raise; end; end; This returns absolutely nothing. What am I doing wrong? I'd love to pass the dictionary with the Scaled image, and background color in the dictionary. Apple documentation gives me a headache. I'm surprised I got this far.....