Screen events are handled through the Tizen::System::IScreenEventListener interface.
Batrery Events
Memory Events
Checkpoint Events
Screen Events
使用Tizen::App::AppResource来本地化。
AppResource::GetString()获取字符串值
使用Tizen::App::AppManager来注册启动条件并启动其他的application。
1)一个application可以通过 AppManager::LaunchApplication()来启动其他的applications,同时需要http://tizen.org/privilege/application.launch权限;
2)被启动者需要使用Tizen::App::AppControlProviderManager的SetAppControlProviderEventListener()方法来注册Tizen::App::IAppControlProviderEventListener,当被启动时将调用IAppControlProviderEventListener::OnappControlRequestReceivedN();
3)调用流程如下:
如果该应用已经启动,那么会调用IAppControlProviderEventListener,然后调用UiApp::OnForeground()。
i.e.
caller:
AppId calleeAppId = L"1234567890"; AppManager* pAppManager = AppManager::GetInstance(); ArrayList* pArgList = new ArrayList(); pArgList->Construct(); String* aArg = new String(L"yourdata"); pArgList->Add(*aArg); r = pAppManager->LaunchApplication(calleeAppId, pArgList, AppManager::LAUNCH_OPTION_DEFAULT);
void CalleeApp::OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList* pArgs) { if (requestId == AppLaunchRequestId) // If launch arguments come { if (pArgs) { for (int i = 0; i < pArgs->GetCount(); i++) AppLog("pData[%d]=%ls", i, ((String*)(pArgs->GetAt(i)))->GetPointer()); // pArgs[0] is the launch type (for example, APP_LAUNCH_NORMAL value) // pArgs[1] is the operation of the launch (default is OPERATION_DEFAULT) // pAgrs[>=2] has the actual arguments from the caller (such as "yourdata") } else { // Handling user events } } }6. Application controls