我正在使用新的 Embarcadero AppMethod 1.14 为 Android 设备(在 C++ 中)进行一些开发,但我终其一生都无法弄清楚如何访问生命周期事件(doPAuse、doResume 等)。如果有人有任何操作方法的链接、提示或代码,他们可以在这个主题上分享吗?
问问题
179 次
1 回答
0
这是我最终想出的代码:
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/
于 2014-08-23T01:50:15.587 回答