- Delphi Programming Projects
- William Duarte
- 275字
- 2021-06-24 14:27:08
Sharing photos
FireMonkey's basic sharing service does not differ from the way we interact to take a photo; that is, we can use a standard action in our ActionList1 to create a new event where we share the photo you just took.
Now that our application is responsive and is properly recording the most important moments through photographs, let's share! Using the same example from previous recipes, we will now develop the button event we created with the SVG icon.
The following steps will show you how to share the photos using FireMonkey:
- Create a new action in the ActionList1, in the Media Library category, to display the share center. Select the ShowShareSheetAction1 action:

- The event is now different; in order to share, it is necessary to assign what you want to share. In our project, we will share a photo. For this, we must program the OnBeforeExecute event of this action:

The following is the code for the OnBeforeExecute event:
procedure TForm1.ShowShareSheetAction1BeforeExecute(Sender: TObject);
begin
ShowShareSheetAction1.Bitmap.Assign(ImgInsta.Bitmap);
end;
- Now, to finish, just assign the newly coded action the Action property of our button. You can use Structure pane and select the TSpeedButton (which has the TPath component is inside it) component with the Instagram logo. With everything ready, when taking a photo it will be filled through the TImage component that can be shared.
The following screenshot shows the form view at development time:

The following screenshot shows the form view running on an Android mobile:

Finally, the application images are still at design time in Delphi and are already running on an Android device.
- Windows Server 2019 Cookbook
- 精解Windows 8
- Linux Shell編程從入門到精通(第2版)
- Linux網絡內核分析與開發
- RESS Essentials
- Java EE 8 Design Patterns and Best Practices
- 無蘋果不生活 The New iPad隨身寶典
- Python UNIX和Linux系統管理指南
- 從實踐中學習Windows滲透測試
- μC/OS-III內核實現與應用開發實戰指南:基于STM32
- iOS 10快速開發:18天零基礎開發一個商業應用
- VMware Horizon Mirage Essentials
- 電腦辦公(Windows10+Office2016)從新手到高手
- 數字系統設計與VHDL
- Windows 10從入門到精通