Languages

Menu
Sites
Language
Programatically bring a native application to foreground from background

Hi All,

I am looking for a way to bring a native application running in the background to foreground? Is there a way to do it programatically? Any API?

Also, is there a way to send it back to background? I know we can do it by launching another application. But is there a way to do it without launching another application?

I have observed something and would like to clarify it. As per my understanding, an application running in the background means, it will be running but in the background without having the current focus. However, in Tizen emulator what I have observed is, it will get terminated as soon as it looses the focus. I had launched the app and then pressed back button in the emulator. To confirm this behvaior, I had put a log in OnTerminating event handler and got the log printed. Is this how it behaves in Tizen? Or is my understanding wrong?

Please do the needful.

Thanks in advance.

Responses

5 Replies
Alex Ashirov

Hi,

It seems that there is no such API. There was a similar topic recently. Please see for more details:

https://developer.tizen.org/forums/native-application-development/how-send-native-app-background-state

Halli Kumar

Hi Alex,

Thanks for the information. What about the below observation?

I have observed something and would like to clarify it. As per my understanding, an application running in the background means, it will be running but in the background without having the current focus. However, in Tizen emulator what I have observed is, it will get terminated as soon as it looses the focus. I had launched the app and then pressed back button in the emulator. To confirm this behvaior, I had put a log in OnTerminating event handler and got the log printed. Is this how it behaves in Tizen? Or is my understanding wrong?

Any pointers to understand this behavior will be really helpful.

 

Alex Ashirov

Hi,

In order to move an application to the background you can do the following:

  1. Run the application
  2. Press Home button in order to switch to the Home screen
  3. Run another application.

Now you have 2 running applications (1 in the background and 1 in the foreground). You can use the Task Switcher (long press on the Home button) in order to switch between them.

Manish Kaushik

Hello Halli,

 

If you press back button, the application will terminate. As Alex mentioned you should use Home key to push application to background.

Alex Dem

Hi,
Just FYI:
There is such api for Web apps:
var currApp = tizen.application.getCurrentApplication();
currApp.hide();
p.s. But I did not find required api for Native.
Alexey.