-------------------------------------------------------------
그냥 Tizen SDK document를 보며 정리함.
[Tizen Architecture]
: https://developer.tizen.org/dev-guide/2.2.1/org.tizen.gettingstarted/html/tizen_overview/tizen_architecture.htm
뭐.. Web API, Native API 있다고 보면.. 될듯
[Tizen Native Application Programming]
: https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.appprogramming/html/cover_page.htm
[API reference]
: https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.apireference/index.html
[Features]
: Base
. database, internatioalization, XML parsing 등
> Tizen::Base, Tizen::Io, and Tizen::Locales namespaces, and in the Libxml2 library.
. sensors, display, vibrator, power management, device monitoring and event receiving, device analysis
> Tizen::System
: Appliation Framework
. application management (system services, dialer, notification 등 - Tizen::App)
. Application type
> 안드로이드와 비슷하게 UI application(UIApp), service applications(ServiceApp) 을 지원함.
. 소스는 보지 않았지만 아마도 실행 시 life cycle 관리를 위해서 App class에서 자신의 app ID를 넘겨 AppManager에 등록하여 관리하게 하는 것 같음.
: User Interface (UI controls, accessbility- Tizen::Ui, Tizen::Uix)
Figure: Tizen native application UI
// Creates an instance of Form Form* pForm = new Form(); pForm->Construct(FORM_STYLE_NORMAL| FORM_STYLE_HEADER| FORM_STYLE_FOOTER); // Gets a pointer of the frame Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame(); pFrame->AddControl(pForm); pFrame->SetCurrentForm(pForm); // Implements MyActionEventListener IActionEventListener* pListener = new MyActionEventListener(); // Adds a header Header * pHeader = GetHeader(); pHeader->SetTitleText(L"FormSample"); // Adds a footer Footer * pFooter = GetFooter(); pFooter->SetStyle(FOOTER_STYLE_TAB); pFooter->AddActionEventListener(*this); // Calls Invalidate() to display the form pForm->Invalidate(true)
. Scene Management
> 너무 많다.. 모르겠다..
> https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.appprogramming/html/guide/ui/scene_management.htm
: Communication (3G, Wi-Fi, BT, HTTP, NFC - Tizen::Net, SMS, MMS, email - Tizen::Messaging , Tizen::Telephony)
: Web Tizen::Web
: Service features (PIMS- Tizen::Social , content management-Tizen::Content)
: Security Tizen::Security
: Graphics Tizen::Graphics
> 나머지들은 일반적인 거라....
[Two-phase Construction]
: Tizen이 C++에서 제공하는 exception mechanism을 제공하지 않고 생성자에서 exception을 발생시킬 수 없으므로 class 생성 시 제대로 생성되었는지 확인하기 위한 approach
: 초기화를 한뒤 Construct()를 호출하여 결과값을 확인
// Example 3: Create CallManager CallType callType = TYPE_UNDEFINED_CALL; CallStatus callStatus = CALL_STATUS_UNDEFINED; CallManager* pCallManager = new CallManager(); // Second-phase of construction must be called once right after instantiation result r = pCallManager->Construct(*this); if (IsFailed(r)) { delete pCallManager; return r; }
[Application life-cycle]
Figure: Application life-cycle
virtual bool | OnAppInitialized (void) |
virtual bool | OnAppInitializing (AppRegistry &appRegistry)=0 |
virtual bool | OnAppTerminating (AppRegistry &appRegistry, bool urgentTermination=false)=0 |
virtual bool | OnAppWillTerminate (void) |
: OnAppInitializing()에서 Frame을 추가, OnAppTerminating()에서 Frame 제거
. 근데 Tizen SDK의 UI application에서는 OnAppInitialized()에서 Frame을 등록하고 있음..
: Application 실행은 Process Manager가 필요한 library와 app executable을 메모리에 등록하고 OspMain()을 호출한다.
[App Control]
: 다른 Application에서 특정 operation을 요청하는 방법, android intent의 목적과 유사.
using namespace Tizen::App; void MyAppClass::AppControlDialSample(void) { String telUri = L"tel:12345678900"; AppControl* pAc = AppManager::FindAppControlN(L"tizen.phone", L"http://tizen.org/appcontrol/operation/dial"); if(pAc) { pAc->Start(&telUri, null, null, null); delete pAc; } }: App Control을 사용하기 위해서는 target application의 Application ID와 operation ID가 필요
: app control 시작과 결과 전달은 IAppControlResponseListener interface 사용
: Tizen paltform application의 app control
> https://developer.tizen.org/dev-guide/2.2.1/org.tizen.native.appprogramming/html/guide/app/platform_appcontrols.htm
[UI application's frame]
: UI application은 top-level main window인 frame이라는 것을 가지고 있음
: 아래는 frame의 state transition chart.
: 당연한 거지만 Deactivated라던지 Minimized될 경우는 resource management 필요
Figure: Frame state transition
[메모리 부족 시]
: OnAppCheckpointing (AppRegistry &appRegistry) 호출 후 아래 우선 순위로 종료 시킴
- Background UI applications
- Service applications
- Background media players
- Foreground UI application
- Foreground media player
- Application launcher
- Voice or video call, or other system applications
[기타 참고링크]
Tizen App development : Troubleshooting by mygony
: http://mygony.com/archives/4276
댓글 없음:
댓글 쓰기