Jump to content

ToddFrankson

Members
  • Content Count

    80
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ToddFrankson

  1. ToddFrankson

    Android and services...

  2. ToddFrankson

    Android and services...

    @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
  3. ToddFrankson

    How do I create an Android simulator under Delphi 11.3 ?

    Yup
  4. ToddFrankson

    Looking but not finding...

    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.
  5. ToddFrankson

    Question about FDQuery

    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??
  6. ToddFrankson

    Question about FDQuery

    Dooouh! I feel like an idiot for having a brain fart! Thanks for the reminder!!!!
  7. ToddFrankson

    Looking but not finding...

    I am, I don't have the funding to hire anyone, Yet.........
  8. ToddFrankson

    Does anyone know a delphi component that can play videos from a stream

    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).
  9. ToddFrankson

    Does anyone know a delphi component that can play videos from a stream

    Do you have it available somewhere so I can at least take a look?
  10. ToddFrankson

    Recommended devices android testing

    Yup. android is huge worldwide.
  11. ToddFrankson

    Does anyone know a delphi component that can play videos from a stream

    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
  12. ToddFrankson

    Does anyone know a delphi component that can play videos from a stream

    I was attempting to lure people in with curiosity....
  13. ToddFrankson

    Recommended devices android testing

    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.
  14. ToddFrankson

    Android/IOS push notifications...

    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?
  15. ToddFrankson

    Android/IOS push notifications...

    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?
  16. ToddFrankson

    Android/IOS push notifications...

    So what does PushService.StartupNotifications contain when the App cold starts?
  17. ToddFrankson

    Android/IOS push notifications...

    @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??
  18. ToddFrankson

    Android/IOS push notifications...

    I was looking to keep track of notifications for the user to be able to look back at them.
  19. ToddFrankson

    Android/IOS push notifications...

    If the App isn't running, and receives the notification, can I, for example, add it to a text file at that point?
  20. ToddFrankson

    Uploading photos to a web host.

    I expect you don't have an SSLHandler, which is required if you are using SSL by setting TLS to Explicit.
  21. ToddFrankson

    Meta-Delphi question about web hosting..

    Not true. most Windows servers run Plesk, which is far better than cpanel.
  22. ToddFrankson

    How to solve System Out of Resources in TScrollBox

    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
  23. ToddFrankson

    MACOS "setDesktopImageURL"

    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.
  24. ToddFrankson

    MACOS "setDesktopImageURL"

    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.....
×