我正在使用新的Embarcadero AppMethod 1.14为安卓设备(在C++中)做一些开发,但我终生无法弄清楚如何访问生命周期事件(doPAuse、doResume等)。如果有人有任何关于这个主题的how-to链接、提示或代码可以分享?
发布于 2014-08-23 09:50:16
这是我最终想出的代码:
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/
https://stackoverflow.com/questions/25411357
复制相似问题