首页 > 技术文章 > Delphi XE6 Android拨号函数

westsoft 2016-10-08 23:10 原文

http://blog.sina.com.cn/s/blog_44fa172f0101rpex.html

红鱼儿的博客

 //引用单元:FMX.PlatForm, FMX.PhoneDialer
procedure TForm1.Call(ANum: String);
var
  PhoneDialerService: IFMXPhoneDialerService;
begin

  if TPlatformServices.Current.SupportsPlatformService(IFMXPhoneDialerService,
    IInterface(PhoneDialerService)) then
    if ANum <> '' then
      PhoneDialerService.Call(ANum);

end;
    这里使用的SupportsPlatFormService会返回PhoneDialerService实例!

推荐阅读