Delphi直接实现分享图片功能


本文整理自网络,侵删。

 
procedure TCustomCameraViewDoc.ShareTextClick(Sender: TObject);
var
    FSharingService: IFMXShareSheetActionsService;
begin
  inherited;
  //分享照片
 
  TPlatformServices.Current.SupportsPlatformService(IFMXShareSheetActionsService, FSharingService);
  if FSharingService<>nil then
  begin
     FSharingService.Share(nil, '', ImageViewer1.Bitmap);
  end;
 
end;

先上代码,Delphi 支持跨平台开发app,早就实现了标准的Action,用于拍照、分享等功能实现,如果不用这标准的Action,那怎么办呢?

按上面的代码即可,直接取得IFMXShareSheetActionsService实例,并调用Share方法。

相关阅读 >>

Delphi richedit文字背景色的处理

Delphi mainmenu控件 checkde属性用法

Delphi listview排序

Delphi 解析系统环境变量

Delphi 图像识别技术(逐行扫描识别)

Delphi读取一个access数据库中的表名

Delphi 获取打印机纸型的例子

Delphi 减小程序的尺寸(关闭rtti反射机制)

Delphi firemonkey 绘图

Delphi最简化异步选择tcp服务器

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...