Similar to Android
and Ios
I want to move my application to background and move foreground without losing progress on opening again. How can we achieve that in Tizen
. The hardware home
button is doing the same how can I do that through code.
Asked
Active
Viewed 579 times
0

rene
- 41,474
- 78
- 114
- 152

Viswanath Lekshmanan
- 9,945
- 1
- 40
- 64
3 Answers
1
You can do it by making the home app to the foreground. e.g. on the emulator:
Tizen::App::AppManager::GetInstance()->LaunchApplication("org.tizen.menu-screen");
A problem is that the app id of the home app may vary each device. I have a dev phone which has 'com.samsung.cluster-home' as a home app. If we got other devices from other vendors, they may have different home apps.

Takashi Oguma
- 744
- 1
- 6
- 7
-
So then how can we specify it? commonly for all phones – Viswanath Lekshmanan Dec 02 '13 at 04:13
-
You might be using `Tizen::App::Package::PackageManager::GetInstance()->GetPackageAppInfoListN()` to find which app is the home app. On my device it's retured 3 apps though... – Takashi Oguma Dec 02 '13 at 07:11
1
How about this:
Tizen::App::UiApp::GetInstance()->GetAppFrame()->GetFrame()->SetShowState(false);
Edited:
You can reenable the form by placing the following code in your app's OnBackground():
Tizen::App::UiApp::GetInstance()->GetAppFrame()->GetFrame()->SetShowState(true);
Tizen::App::UiApp::GetInstance()->GetAppFrame()->GetFrame()->Show();

Takashi Oguma
- 744
- 1
- 6
- 7
-
Once you set the showstate false , it will suddenly call onBackground .is nt it? – Viswanath Lekshmanan Dec 02 '13 at 06:30
-
When you set ShowState to false, your app goes to the background. The platform gets control. Then OnBackground() event is called. Your app is not going to be shown even if you call SetShowStatus(true) and Show() because it's already on the background state. If you tap your app's icon on the home menu then your app is coming to the foreground. I have confirmed this way worked on my device. – Takashi Oguma Dec 02 '13 at 06:42
0
Since 2.1 you can do as following:
Tizen::App::UiApp::GetInstance()->GetAppFrame()->GetFrame()->SetShowMode(Tizen::Ui::Controls::FRAME_SHOW_MODE_MINIMIZED);
After this call OS sends application's active frame to the background and calls Tizen::App::UiApp::OnBackground() handler.

Dmitry
- 1