Jump to content

Dave Nottage

Members
  • Content Count

    1568
  • Joined

  • Last visited

  • Days Won

    36

Dave Nottage last won the day on January 17

Dave Nottage had the most liked content!

Community Reputation

610 Excellent

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Dave Nottage

    Alignment of group of controls

    For FMX controls, it's the Y value of the Position property
  2. No such element as "date" here - it should be: data. Is this a typo or what you actually have in your manifest? Are both of these your apps, or is application B a third-party app? I'm assuming the latter, since you do not appear to have included any code for it, and your example still is not complete enough to determine what the problem is. Regardless, I suggest you use a logcat viewer to determine exactly why app A is "restarting"
  3. Dave Nottage

    D12.3 Error when closing

    Could be a 3rd party component package or expert. Start by disabling/removing the latest ones you've installed.
  4. You appear to be trying to do something different from the OP. Save what? Yes: please describe what it is you are actually trying to achieve, preferably with a more complete example.
  5. Dave Nottage

    iOS Selectors in Delphi

    OK, so after a bit of wailing and gnashing of teeth, I've come up with something more simplified - hopefully as much as possible. The attached code is just for iOS, however hopefully it meets these basic requirements: Requests permissions that allow creation of an album that can be accessed by the app If permissions are too limited, or denied, prompts the user to change the app settings, which is the only way to make subsequent changes if the permissions are not granted. If the prompt is declined, a value is set in the user defaults, so that the user is not prompted again. If they wanted to grant access again later, either this would need to be coded in the app, or they would need to do a manual change Once permissions are granted, the Create/Find Album button becomes enabled, and clicking that either locates the existing album, or fires off a change request to add the album Once the album has been created or found, the Save Image button becomes enabled. Tapping it fires off a request to save the image in the TImage component to the album Notes: The attached demo does not have any dependencies other than what comes with Delphi, and the units provided with it. It contains a "re-import" of the Photos framework with the newer classes, methods etc. It assumes that the device has iOS 14+, so the code would need to be modified to support older versions Feel free to ask about whatever I may have missed 🙂 The plan is to eventually update Kastri with the new import, and include some of the code in the demo as well. SaveImageDemo.zip
  6. Dave Nottage

    iOS Selectors in Delphi

    Thanks for the heads up. As you might gather, that import has not been updated to include newer APIs in a while. I'm planning on updating it, as well as look at those methods you mentioned.
  7. Dave Nottage

    iOS Selectors in Delphi

    If you indeed needed to do this, an issue should be filed in the Quality Portal. Kudos for working that one out - it had me stumped. In which case, you may be interested in this demo which uses an implementation of the PHPhotoLibrary framework. I had been considering creating a kind of "lite" version just for saving images to a nominated collection, because the entire implementation might be considered "overkill" when that's all that is being used.
  8. Dave Nottage

    alarm clock play sound for 10 seconds

    Probably best to schedule local notifications and associate them with a sound (that lasts for 10 seconds). There's documentation about it here. Note: Notification sounds on Android (since version 6) are associated with a channel, rather than a notification. The trick of course is that you would need to schedule the notifications a fair way in advance, in case the user does not open the app for some time. I doubt there's any other way of reliably firing off an alarm at exact times - Android and iOS have made that kind of thing increasingly difficult to implement. I'm happy to be proven wrong 🙂
  9. Dave Nottage

    TMemo no longer scrolls on iOS when set to Platform on iOS 18

    I've added a comment to the report, however I'm repeating it here: It appears the UIPanGestureRecognizer being used in the parent "native" implementation (TiOSScrollBox) is interfering with the scrolling - I'm yet to find exactly why. Making a copy of FMX.ScrollBox.iOS and commenting out this line: View.addGestureRecognizer(FPanRecognizer); seems to fix it, but I expect any pan gestures supported by Delphi will be lost, and this would also apply to TStringGrid, for example.
  10. You do not have that. Please provide a complete example, that has the correct spelling of implementation, and the declaration for TFooBase, e.g. unit Unit2; interface type TFooBase = class; TFooBaseClass = class of TFooBase; TFooBase = class end; TFooA = class(TFooBase) end; TFooB = class(TFooBase) end; //Then in another class type TBar = class public function FindFooByClass(AFooClass: TFooBaseClass): TFooBase; end; implementation function TBar.FindFooByClass(AFooClass: TFooBaseClass): TFooBase; begin end; end. Which incidentally, compiles. Also, please just ask your question in one group.
  11. Given the content of the links, to create Delphi code for what you want to do does not seem trivial.
  12. Can you provide links to the code and information you're referring to?
  13. Dave Nottage

    Adroid WRITE_EXTERNAL_STORAGE Delphi 12.3

    I expect it's not Delphi 12.3 that's the problem, but the version of Android on the device that you're running the app on. See here. It would help to know the location of the folder you're trying to create.
  14. Actually, there is more to this. If you need access to files other than audio, images and video that are not created by your app, you would need to use the relevant action(s), as described here. This kind of thing is implemented in the FilesSelector feature in Kastri.
  15. It depends on the folder. If it's private to the app (e.g. via TPath.GetDocumentsPath) then TDirectory.GetFiles will work. If the folder is shared (as are those that you listed), then a method similar to what is in the demo could be used, i.e. via ContentResolver.
×