Jump to content

Dave Nottage

Members
  • Content Count

    1607
  • Joined

  • Last visited

  • Days Won

    36

Posts posted by Dave Nottage


  1. 3 hours ago, KMarb said:

    Project JCMTime.apk raised exception class EJNIException with message 'java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority com.zunna.JCMTime.fileprovider'

    Sorry.. missed a step. Delete AndroidManifest.template.xml in the project folder. The IDE will recreate this. If you have made any customisations to it, you will need to ensure you reinstate those after it is recreated.


  2. 9 minutes ago, KMarb said:

    Intent.setDataAndType(TJnet_Uri.JavaClass.fromFile(F), StringToJString('application/vnd.android.package-archive'));

    This should be:

        Intent.setDataAndType(JFileToJURI(F)), StringToJString('application/vnd.android.package-archive'));

    JFileToJURI uses the FileProvider class to create the correct URI

    12 minutes ago, KMarb said:

    I've tried adding the below to manifest file:

    You won't need to do that if you check the Secure File Sharing option in the Entitlements List in the Project Options. This also creates and deploys the required xml file.


  3. You do not indicate what library you are using. Is it this one (or similar)? https://github.com/jimmckeeth/FireMonkey-Android-Voice

     

    Where you have "impossible to do something", you do not indicate exactly what it is your code is doing. Nor do you show what it is doing in the timer handler. Given that code executes, it's quite possible that the SpeechRecognition1Recognition event is executing outside of the main thread, which may account for the other issues you are seeing. If that is the case, you could use a construct like this:

    procedure TForm1.SpeechRecognition1Recognition(Sender: TObject; Guess: string);
    begin
      TThread.Synchronize(nil, 
        procedure
        begin
          G_Heard := Guess;
          // Execute your other code, here
        end
      );
    end;

     

    • Like 1

  4. 1 hour ago, Nicolò Blunda said:

    It is possible to adapt code above to get it?

    It seems it is not included by default in macOS apps produced by Delphi. When it is included, you could use the following code:

    Value := NSStrToStr(TNSString.Wrap(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle, StringToID('NSHumanReadableCopyright'))));

     

     


  5. 8 hours ago, vladvash said:

    I understand that there is something with the folder settings, SDK, NDK, but I don’t understand where and how to look

    It looks like a JDK compatibility issue. Start with showing what your Java settings are in Delphi, i.e. Tools | Options, Deployment > SDK Manager, select the relevant Android SDK, and select the Java tab. Mine looks like this:

    image.thumb.png.d4b1c13d18adba43bf5410782c97a375.png


  6. On 7/11/2022 at 8:54 PM, Alexander Halser said:

    Delphi tells me that when deploying the app, there are ambiguous certificate matches.

    As ginnix suggests, this is because the ambiguous certificates are in the Keychain on your machine. In the Applications/Utilities folder there is an application called Keychain Access. Run that, select the "login" keychain on the left hand side, and select the "My Certificates" tab. Delete all the ambiguous Developer ID certificates except for the one with the latest expiry date, by right-clicking each one and clicking "Delete"


  7. 1 hour ago, Jolubaro said:

    So, with FMX there is not solution for my problem

    There can be solutions; just that there isn't any included with Delphi. This is a potential starting point: https://developer.android.com/training/printing, though you will need knowledge of Java, and how to convert the code to Delphi.

    1 hour ago, Jolubaro said:

    What about other platforms of programming

    If you mean development tools other than Delphi, there could be solutions using those, however it may still require writing the same code as per the link mentioned above, i.e. it would be unlikely to be included with the development tool itself.


  8. 12 hours ago, Andy1234 said:

    But Apple didn't accept it due to SDK 14.
    Only need SDK 15, as I wrote in the first message

    Even if you were to obtain the iOS 15.x SDK, Apple will still reject your app because you're not using Xcode 13, which has been a requirement since April 25th.


  9. Why do you want to revert to an older Xcode when Delphi works with the current version? Also, if your intention is to deploy apps to the App Store, you're going to need Xcode 13 anyway.


  10. 9 hours ago, TurboMagic said:

    Can you got a bit more into details about what work it would need?

    Take a look at the issues towards the bottom of this list: https://github.com/DelphiWorlds/Kastri/issues

    Most are prefixed with [Camera]

    9 hours ago, TurboMagic said:

    Does Camera API 2 have a setting for the exposure time?

    Yes

    9 hours ago, TurboMagic said:

    Have you surfaced that one

    Not as yet

    9 hours ago, TurboMagic said:

    would it be easy to add it?

    It's not trivial, but also not rocket science 🙂

    9 hours ago, TurboMagic said:

    And why, oh why, does Android need so many different takes on a camera API?

    Camera X appears to be just a "convenience" layer over Camera 2, so there's really still only 2 "takes". For "lower level" stuff like controlling exposure they recommend Camera 2, so I may be sticking with that for now anyway.


  11. 2 hours ago, TurboMagic said:

    Which Android camera API does TCameraComponent use?

    Camera 1 API, which has been deprecated for years. I have support for Camera 2 here: 

     

    https://github.com/DelphiWorlds/Kastri/tree/master/Demos/Camera, but it sorely needs work.

     

    I was hoping to use Camera X (part of Android X), but have hit issues with that:

     

    https://github.com/DelphiWorlds/Playground/tree/main/Demos/CameraX

     

    Continuous capture like you speak of is part of my goal, however it's low priority for me at the moment.

×