언어 설정

Menu
Sites
Language
How to Bring your App to foreground ID in ServiceNative?

version 2.3 rev3.

I make hybrid app in nativeService sample.

when I start another application, I want to catch activated application ID in nativeApp.

I can't find any reference about foreground(), state;

Can I ask you a question How to Bring Activated foreground Application ID?

 

Edited by: heejae Goo on 22 7월, 2015

Responses

10 댓글
colin Rao

Hi,

I don't face such api to get current top foreground application info.

As below the application's states list from IDE help doc, 

READY       Application is launched. 
CREATED     Application starts the main loop. 
RUNNING     Application is running and visible to the user. 
PAUSED      Application is running but invisible to the user. 
TERMINATED  Application is terminated. 

So, I am just thinking, possible the application manager API(#include <app_manager.h>) can solve this issue, but from the header file, I dont find such API to get the running application status. :(

 

Carsten Haitzler

elm_win_activate(win);

within the app itself will activate its own window.

heejae Goo

Can I ask you some more detail?

 

Carsten Haitzler

then ask. :) unless uou wanted more details from me... and i am not sure what more details are needed there...

Carsten Haitzler

oops . uou -> you. :)

Alex Dem

Hi,
AFAIK there is no way to detect which application is on top. I did not find any listener (callback) to detect what app has been launched just , but as I remember such useful api was in old Tizen 2.2.1.
p.s. fyi: you could detect that some app with some appId is running with app_manager_is_running. Also you could get list of contexts of all running apps with app_manager_foreach_app_context and extract all appIds inside with app_context_get_app_id.
Alexey.

Carsten Haitzler

"on top" isn't really a state you need to know. what you likely want is if the window is FOCUSED. for that there are focused and unfcused callbacks on the window (see elm_win documentation for a list of callback signal names). there also is "normal" - which means the window has now been managed by the wm after first being shown by the app (it may not be visible to the user though, but is at least logically visible).

Alex Dem

Hi,
Maybe I have missed something. I hope we could get some clarification from topic's author.
Per my understanding preconditions are next:
1) Some device(emulator) with some other app (code of any such app is closed)
2) Hybrid app (Native service App + Web UI App)
The goal is:
1) To get AppId of any App that has been launched (just now) inside Native service .
Am I right?
Thank you.
Alexey.

Carsten Haitzler

i don't know about the web side - but on the native side you can if you are controlling the window from the native api.

pius lee

If you just want app id of the application that made by you.

You can use app_get_id() in native Application.

Or you can use tizen.application.getCurrentApplication().appInfo.id in web application.

and If you want send it to service that made by you.

You can use IPC or App Control in native application or can use MessagePort in web application.

 

But if you want to detect some other applications starting, No way yet.