Delphi 如何从ProfileResourceReceived事件中的远程资源获取TTetheringProfileInfo?

Delphi 如何从ProfileResourceReceived事件中的远程资源获取TTetheringProfileInfo?,delphi,firemonkey,tethering,delphi-xe6,Delphi,Firemonkey,Tethering,Delphi Xe6,我在谷歌上搜索了一整天,一直看到FireMonkey、apptethering和Delphi XE6的10个示例。我不熟悉XE6和应用程序绑定。谢谢你给我的任何帮助 我的故事 我有Delphi XE6。我正在尝试为android平台创建一个固定的FireMonkey应用程序。我有一个将在服务器上运行的VCL应用程序。将有许多android平板电脑同时连接到服务器应用程序 用户按下平板电脑上的按钮,将使用TTetheringAppProfile的SendString方法向服务器发送唯一id。服务器

我在谷歌上搜索了一整天,一直看到FireMonkey、apptethering和Delphi XE6的10个示例。我不熟悉XE6和应用程序绑定。谢谢你给我的任何帮助

我的故事 我有Delphi XE6。我正在尝试为android平台创建一个固定的FireMonkey应用程序。我有一个将在服务器上运行的VCL应用程序。将有许多android平板电脑同时连接到服务器应用程序

用户按下平板电脑上的按钮,将使用TTetheringAppProfile的SendString方法向服务器发送唯一id。服务器有一个TetherProfileResourceReceived事件,并从arSource.Value获取唯一id。服务器查询数据库并获取记录。这一切都很好

现在,我需要将记录发送回发送请求的配置文件。我看到的每个示例都使用item索引来获取发送字符串(TetherProfile.Resources.Items[0].Value)的TTetheringProfileInfo。我想我不能依赖索引,因为我会有多个连接。我想将响应字符串发送回请求配置文件

我失败的尝试

procedure TfrmTabletServer.POSTetherProfileResourceReceived(
  const Sender: TObject; const AResource: TRemoteResource);
var
  RequestID : Integer;
  SendRec := String;
  Requester : String;
begin

Requester := AResource.Name;
if AResource.ResType = TRemoteResourceType.Data then begin     
    RequestID := AResource.Value.AsInteger;
    SendRec := GetRecord(RequestID);
//this works but I cant rely on index name due to multiple connections
//POSTetherProfile.Resources.Items[0].Value = SendRec;

    //I would prefer to use SendString to keep the requests temporary 
    //I can't figure out how to get the TTetheringProfileInfo from the AResource
    POSTetherProfile.SendString('TTetheringProfileInfo from AResource?','Response ' +            ID.AsString, SendRec);
end; 
我的资源

尝试获取工作后,我仍然找不到从发送到
OnResourceReceived
事件的参数中获取配置文件标识符的方法

我解决这个问题的方法是将概要文件标识符附加到
AResource.Hint
字符串中,使提示看起来像

"{OriginalHint};{ProfileID}"
这样,我可以通过查看提示字符串始终找到概要文件标识符


这并不理想,但在我们将配置文件标识符作为
AResource

的一部分传递之前,它是有效的。在柏林,我可以访问AResource.profile.identifier。这就是你要找的吗?