Capturing your neighborhood
Delphi has made it very simple to take pictures regardless of which platform you're on. This capability is provided in one of the standard actions. Double-click on a TActionList
and click on the little arrow to the right of the New Action list to drop down the menu of new action types, select New Standard Action... and scroll to the Media Library section, where you'll find TTakePhotoFromCameraAction
. Click to add this new action to your action list, set its name to something appropriate, and leave all the properties at their default. The one thing you want to do with this is create an event handler for the OnDidFinishTaking
event. In here, you'll add the code to do something with the image returned by the camera-taking action.
Before you hook up this new action to a button, remember that the camera can only be accessed if it's been granted permissions. What I like to do is create a custom action that will be linked to a button or menu...