2 * Name : $(projectName)
9 #include "$(projectName).h"
10 #include "$(projectName)Frame.h"
12 using namespace Osp::App;
13 using namespace Osp::Base;
14 using namespace Osp::System;
15 using namespace Osp::Ui;
16 using namespace Osp::Ui::Controls;
18 $(projectName)App::$(projectName)App(void)
22 $(projectName)App::~$(projectName)App(void)
27 $(projectName)App::CreateInstance(void)
29 // Create the instance through the constructor.
30 return new $(projectName)App();
34 $(projectName)App::OnAppInitializing(AppRegistry& appRegistry)
37 // Initialize Frame and App specific data.
38 // The App's permanent data and context can be obtained from the appRegistry.
40 // If this method is successful, return true; otherwise, return false.
41 // If this method returns false, the App will be terminated.
43 // Uncomment the following statement to listen to the screen on/off events.
44 //PowerManager::SetScreenEventListener(*this);
47 // Add your initialization code here
52 $(projectName)App::OnAppInitialized(void)
58 $(projectName)Frame* p$(projectName)Frame = new $(projectName)Frame();
59 p$(projectName)Frame->Construct();
60 p$(projectName)Frame->SetName(L"$(projectName)");
61 AddFrame(*p$(projectName)Frame);
67 $(projectName)App::OnAppWillTerminate(void)
76 $(projectName)App::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
79 // Deallocate resources allocated by this App for termination.
80 // The App's permanent data and context can be saved via appRegistry.
85 $(projectName)App::OnForeground(void)
88 // Start or resume drawing when the application is moved to the foreground.
92 $(projectName)App::OnBackground(void)
95 // Stop drawing when the application is moved to the background.
99 $(projectName)App::OnLowMemory(void)
102 // Free unused resources or close the application.
106 $(projectName)App::OnBatteryLevelChanged(BatteryLevel batteryLevel)
109 // Handle any changes in battery level here.
110 // Stop using multimedia features(camera, mp3 etc.) if the battery level is CRITICAL.
114 $(projectName)App::OnScreenOn(void)
117 // Get the released resources or resume the operations that were paused or stopped in OnScreenOff().
121 $(projectName)App::OnScreenOff(void)
124 // Unless there is a strong reason to do otherwise, release resources (such as 3D, media, and sensors) to allow the device
125 // to enter the sleep mode to save the battery.
126 // Invoking a lengthy asynchronous method within this listener method can be risky, because it is not guaranteed to invoke a
127 // callback before the device enters the sleep mode.
128 // Similarly, do not perform lengthy operations in this listener method. Any operation must be a quick one.