2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
24 //application must inherit from Application class
25 //which provides basic features necessary to define an application.
28 : public Tizen::App::Application
29 , public Tizen::System::IScreenEventListener
32 //[HelloWorld] application must have a factory method that creates an instance of itself.
33 static Tizen::App::Application* CreateInstance(void);
37 virtual ~BasicApp(void);
39 // Called when the application is initializing.
40 virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
42 //Called when the application is terminating.
43 virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
45 //Called when the application's frame moves to the top of the screen.
46 virtual void OnForeground(void);
48 //Called when this application's frame is moved from top of the screen to the background.
49 virtual void OnBackground(void);
51 //Called when the system memory is not sufficient to run the application any further.
52 virtual void OnLowMemory(void);
54 // Called when the battery level changes.
55 virtual void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
57 // Called when the screen turns on.
58 virtual void OnScreenOn (void);
60 // Called when the screen turns off.
61 virtual void OnScreenOff (void);