Jump to content

Dave Nottage

Members
  • Content Count

    1297
  • Joined

  • Last visited

  • Days Won

    29

Posts posted by Dave Nottage


  1. From Atanas' message:

     

    "We realize this is a change to previous operations and to reduce the impact to development projects, we issued a one-time registration limit increase for all customers who are close to hitting their registration count limit. This should address issues with re-installs of your licensed software on existing or new machines. Further, we will continue to look for options to make this more seamless through automation."

     

    That means you should have received a bump. If you haven't received one, please contact EMBT. Unfortunately I don't have a direct contact point at the moment for this issue.


  2. I've been successfully (up until now) using the .NET COM interop:

     

      https://raw.githubusercontent.com/project-jedi/jcl/master/jcl/source/windows/mscorlib_TLB.pas

     

    (as part of JCL) however I'm having trouble invoking a method that is declared with a number of overloads in an assembly. It raises an error "Method xxxx not found", and I'm assuming it is because it does not know which method to use.  Regardless, I'd like to be able to use one of the GetMethod calls to find the right overloaded method, probably using GetMethod_5, since I just want to find the method by the name and the parameter types.

     

    The question is: how do I go about passing the correct values for the types parameter? If it were using reflection in C#, it would use typeof, so what might be the equivalent in Delphi?


  3. 1 hour ago, ertank said:

    I am not sure If I follow instructions right

    You followed the instructions, however you followed them literally, i.e. you added the CoreBluetooth framework instead of the SystemConfiguration framework.

     

     


  4. 4 hours ago, Zero3K said:

    Their reward would be people being glad that there's another way to watch Twitch Streams in an external media player.

    I think you'd need to sell it better than that. Why would those people be glad? e.g.: what advantages (if any) does TardsPlaya give over other players? How many people are using it now, and give reasons (other than being "glad") as to why people might want to shift to, or start using, TardsPlaya?


  5. Make a copy of (bds)\source\fmx\FMX.Media.Android.pas, and put it in your project folder. Modify this routine:

      function CreateJBitmapFromYuvBuffer: JBitmap;
      var
        Image: JYuvImage;
        Rect: JRect;
        Stream: JByteArrayOutputStream;
        LoadOptions: JBitmapFactory_Options;
      begin
        SurfaceSection.Acquire;
        try
          Image := TJYuvImage.JavaClass.init(SharedBuffer, SharedBufferFormat, PreviewBufferSize.X, PreviewBufferSize.Y,
            nil);
        finally
          SurfaceSection.Release;
        end;

    Replacing the SurfaceSection references with QueueSection

    • Like 1

  6. You might have to provide a reproducible test case, because I'm unable to reproduce the problem.

     

    I deployed a couple of example PDF files in the app, using the default remote path of /Contents/MacOS/Startup, and used this code to load them:

     

    procedure TForm1.OpenPDF(const AFileName: string);
    var
      LSourceName, LDestName: string;
    begin
      // Bit of a "hack" to get the exact paths of the pdf files deployed to /Contents/Resources/Startup
      LSourceName := TPath.GetDirectoryName(ParamStr(0));
      LSourceName := TPath.Combine(StringReplace(LSourceName, '/MacOS', '', []), 'Resources/Startup/' + AFileName);
      LDestName := TPath.Combine(TPath.GetTempPath, 'open.pdf');
      // Delete any existing temp file
      TFile.Delete(LDestName);
      // Copy from resources to common location
      TFile.Copy(LSourceName, LDestName);
      WebBrowser1.Navigate('file://' + LDestName);
    end;

    Works every time. My guess is that the problem is with your file retrieval/copy, rather than it being a WebBrowser issue


  7. Given one of the answers in the SO link, it sounds (pun intended) like AudioServicesPlaySystemSound is your best bet to ensure it works on all devices. You just need to import the function, something like this:

     

    uses
      iOSapi.CoreFoundation;
    
    const
      libAudioToolbox = '/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox';
    
    procedure AudioServicesPlaySystemSound(inSystemSoundID: UInt32); cdecl;
      external libAudioToolbox name _PU + 'AudioServicesPlaySystemSound';

     

×