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