[SOLVED]How to check if android app run in this moment ?

asked 2014-06-23 01:49:01 +0300

Schturman gravatar image

updated 2014-07-30 17:42:39 +0300

jiit gravatar image

Hi Can someone tell me, how I can check if any of my installed android apps run in this moment ? I want to create a small scrip that will check every 30-40 min if app running or not. And if not, it will stop aliendalvik.service to get a little bit more ram.. After last update my phone almost always on 80+% of ram with only Mitakuuluu, browser (3-4 tabs) and mail app... and aliendalvik active :( Many times my phone is really laggy and not useful :( Thanks

edit retag flag offensive close delete

Comments

1

Hi, is really 80% of your ram in use or do tools like lighthouse tell that? Linux usually tries to use as much ram as possible (for ex. caching etc) as completely unused ram is wasting ram. Lighthouse tells imho the ram usage with caching, which does not reflect the real used ram by applications. But on your question - sorry, can't answer that...

masmrlar ( 2014-06-23 02:35:28 +0300 )edit

yep, most of the time checking with lighthouse, but also with top and it almost similar. To fix this lags help me closing some apps, a specially browser and Mitakuuluu, also stopping aliandalvik. Another way is reboot every 1-2 day, really not convenient...

Schturman ( 2014-06-23 07:48:38 +0300 )edit

App KillDroid tells you whether AlienDalvik is running. Is AlienDalvik telling Sailfish whether any Adnroid app is running? (What exactly is an app, it may for example not have a user interface active? In addition, is an Android app being pushed into the background a running app? As you know, an Adnroid app "closed" by the user usually is just pushed to background but not closed. For example, I remember having received voice commands from a navigation app in the background while a foreground mp3 player played music.)

You may have to apply a divided approach:

  • Check within AlienDalvik whether any of your Android apps is running in foreground/background (i.e. you know, for which apps to check and whether you can accept to close it if it is currently in background). Communicate this result to Sailfish (e.g. via a file accessible by both systems).
  • Check that report file from Sailfish.
jgr ( 2014-06-23 11:45:14 +0300 )edit

I know how to check if aliendalvik active or not, I also can check for specific app, for example Waze: ps aux|grep com.waze But I don't want to check for specific app, I want to know if any of my installed app running now (opened or on multitasking screen), something like with waze. I wanted a one simple command if it possibe...

Edit: someone know if Jolla save somewhere the list of installed android apps ?

Schturman ( 2014-06-23 12:29:14 +0300 )edit

I found how to do this for my needs...

Schturman ( 2014-07-16 02:46:32 +0300 )edit