首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用AppMethod访问应用程序生命周期接口

使用AppMethod访问应用程序生命周期接口
EN

Stack Overflow用户
提问于 2014-08-21 01:53:14
回答 1查看 179关注 0票数 0

我正在使用新的Embarcadero AppMethod 1.14为安卓设备(在C++中)做一些开发,但我终生无法弄清楚如何访问生命周期事件(doPAuse、doResume等)。如果有人有任何关于这个主题的how-to链接、提示或代码可以分享?

EN

回答 1

Stack Overflow用户

发布于 2014-08-23 09:50:16

这是我最终想出的代码:

代码语言:javascript
复制
TGUID guid = StringToGUID("{F3AAF11A-1678-4CC6-A5BF-721A24A676FD}");  // GUID for ApplicationEventService interface
IInterface *AEventSvc;
  if (TPlatformServices::Current->SupportsPlatformService(guid)) {
    AEventSvc = TPlatformServices::Current->GetPlatformService(guid);
     IFMXApplicationEventService *EventSvc;
     AEventSvc->QueryInterface(guid,(void**)(&EventSvc));
     EventSvc->SetApplicationEventHandler(SysEventHandler);
     EventSvc->Release();
  }

感谢Pawel Glowaki,他的博客给了我答案的关键细节:http://blogs.embarcadero.com/pawelglowacki/2013/09/30/40067/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25411357

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档