Languages

Menu
Sites
Language
how to determine last used date and time for any app

i want to develop a process that can identify the last used date and time for all installed apps and then present it to the user in a time sorted manner.

i want to know if there is any method or support to do so in tizen.

Edited by: lakhbir singh on 26 Aug, 2014

Responses

5 Replies
Alex Dem

Hi,
I did not face ready api which could detect last launch.
Tizen::App::Package::PackageInfo class provides installation time of package only , see Tizen::App::Package::PackageInfo::GetInstallationTime()

I think you should monitor the launch time by himself.
Per my opinion these items should be implemented , approximately :
1. You should create 'native service app' which should be launched on boot automatically (but some apps could be launched on boot before your service :-( ).
2. At first launch you should create Tizen::App::Package::PackageManager::GetPackageInfoListN and mark all apps as not launched. On every next reboot you should create list of apps again and fill some saved data about previous launches for every app.
3. You should add 'active app was changed' event listener Tizen::App::AppManager::AddActiveApp EventListener (see Tizen::App::IActiveAppEventListener)
and get current time inside OnActiveAppChanged() using Tizen::System::SystemTime.
4. You should save time (replace previous launch time with current time) associated with launched app in some manner.

But maybe someone else could propose better idea.

Alexey.

Alex Dem

fyi:
Also you may need obtain partner (or platform) privilege level for some api during development:
https://developer.tizen.org/dev-guide/2.2.1/org.tizen.gettingstarted/html/tizen_overview/privilege.htm
Alexey.

lakhbir singh

Thanks for the replys. I am pretty new to tizen development. Here is what i found out:

While browsing articles i came across one where it was stated that AIL library can be used to retrieve the list of all applications installed on the device  and then there is this RUA that logs the application use history with details such as package name, launch-time, application path and application launch argument. When an application is launched, the history gets updated by Launch PAD and the application data is stored in the application DB. Task manager gets the updated history. Sort of device and app history mechanism of Android.

So isn't it possible to retrieve this information from these library and logs and store them with our app that is allways monitoring these  in the backend and modifies its list when any app is launched with its latest launch time.

Consider privilege level not to be a problem(assume platform level)

 

 

lakhbir singh

Also can the native Application API provide info on currently running apps to other apps on request??  :)

 

 

Alex Dem

Hi,
If you mean how to get running apps list inside your application, you could use:
Tizen::Base::Collection::IList* Tizen::App::AppManager::GetRunningAppListN
Alexey.