We have moved to a new Sailfish OS Forum. Please start new discussions there.
6

Can application Android services run in the background? [released]

asked 2015-01-12 23:46:35 +0300

Jolly-Jo gravatar image

updated 2015-07-15 15:03:50 +0300

r0kk3rz gravatar image

From some threads here I get the idea that in some versions of Sailfish, Android services could run in the background without any android app actually being open. E.g. https://together.jolla.com/question/61368/android-service-autostoptimer/ , https://together.jolla.com/question/21496/android-background-processes-always-running/

However, I don't see any android activity in the background at all. No processes open, no notifications, no nothing without me starting the actual corresponding android app. Examples include K9 and Whatsapp.

I'm not sure it's a good idea to allow android services in the background, but I'm just somewhat confused by the evidence. Therefore my question: Can Android services run in the background in Jolla?

EDIT: Removed references to Vaarainjärvi, since this question still holds in Yliaavanlampi and probably in many more releases to come.

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by raketti
close date 2015-12-02 13:34:16.479005

5 Answers

Sort by » oldest newest most voted
2

answered 2015-03-27 12:02:18 +0300

Jolly-Jo gravatar image

I'll answer my own question here to get those up-to-date who are looking for the answer to this. The truth is: Nobody knows. Some apps' services run in the background (skype, aptoide), and others don't (whatsapp, k9). Some apps' background processes are killed when the app is closed by swiping down, but not when the app is exited via the android back button. For other apps this does not seem to hold. No official docs on this subject, please continue walking, there's nothing to see here. :-/

edit flag offensive delete publish link more
1

answered 2015-01-13 09:09:57 +0300

Upp15 gravatar image

When looking user processes (with Crest), I always have at least 8 Android (background) processes running.

edit flag offensive delete publish link more

Comments

1

Yes, I can see some services (probably from the Android support package?) running. But I cannot see a single service from an app I installed separately, for example K-9 or aptiode.

EDIT: Or was your answer supposed to mean that those threads I found only talk about standard Android support package services? Anyhow, my original question remains..

Jolly-Jo ( 2015-01-13 09:43:36 +0300 )edit
1

answered 2015-01-13 13:03:06 +0300

Sthocs gravatar image

Hi. Indeed, the threads you pointed talk only about the services running for the Android Support.

Services launched by Android applications will stop when you close the application, and it has always been the case. This is confirmed by Jolla here (last sentence of section 3 just before "4 Troubleshooting"):

Note: notifications will not come through unless you have WhatsApp minimized to the Home screen

edit flag offensive delete publish link more

Comments

1

Ok, thanks for your answer. This behaviour would actually also be quite acceptable, if that OOM killer guy hadn't become so oversensitive, but that is a different story I suppose...

Jolly-Jo ( 2015-01-13 13:14:27 +0300 )edit

I unaccepted the answer, because in comments further down, as well as comments to the question Why not shutdown aliendalvik after closing last Android app? people report getting notifications with no app being visibly open.

Jolly-Jo ( 2015-01-18 15:08:04 +0300 )edit

re-accepting your answer because it looks like that is how things _should_ go. For the fact that it doesn't always go like that I created a bug: [bug] Android app processes sometimes running without app open

Jolly-Jo ( 2015-01-20 12:16:34 +0300 )edit

Ok interesting, thanks for the investigation, it's good to know that for now it's better to manually shut down Alien Dalvik from the Utilities tools to avoid extra battery consumption.

Sthocs ( 2015-01-21 12:31:26 +0300 )edit

Unaccepting once more :-/ In the comments to bug [bug] Android app processes sometimes running without app open it was pointed out that e.g. skype is expected to run in the background when 'exited' via the back button. In this case the service is running even though the UI is completely gone. So it would be nice to get some official statement on what the expected behavior is.

Jolly-Jo ( 2015-01-21 16:06:26 +0300 )edit
0

answered 2015-01-13 17:02:46 +0300

dillihifi gravatar image

Recently after the update sometimes i am able to get notification without having whatsapp minimized, maybe opening another android app or I actually do not know how this is so but I find this to be the case

edit flag offensive delete publish link more

Comments

Yes, I can confirm. The notification comes, when doing something with sailfish in foreground. Strange enough, after opening whatsapp and closing again no more notification will be raised, so I guess, it's only functional after first start. Android is started automatically after reboot on my device, no idea why. Maybe that's the point when the background services starts.

Robomike ( 2015-01-13 20:03:23 +0300 )edit

You might want to look into installing Lighthouse or Crest from the Jolla store. This will allow you to see all the stuff running in the background in a nice UI. Not saying this is the solution but if you want to understand the workings of Alien better it's worth having a look.

cjp ( 2015-01-14 08:19:31 +0300 )edit

Apparently it's not only needed to understand Alien, but someone should fix it. I mean if application services are really started without the actual application open, this sounds like a bug. (Give the approved answer still holds.) But yes, would be nice to know what processes are running when those "ghost notifications" come around.

Jolly-Jo ( 2015-01-14 08:54:39 +0300 )edit

I have noticed with Viber that if I press the back button in the android layout, the backround process remains running and I get notifications without having the app in the home screen. If I open the app from the notification screen and then close the app by swiping from the top the notifications don't come through and the background process is killed - though this behaviour is not consistent. Sometimes the background process remains.

raketti ( 2015-01-19 11:42:40 +0300 )edit

@raketti: Thanks for the description. I suspect that is not how it should go. Half of the users would like to have an android service running in the background and are told that they cannot. And the other half is relying on the info that all app-specific android services are stopped when the app is not visible on the screen. Turns out both groups are fooled :-) Do you care to file a bug?

Jolly-Jo ( 2015-01-19 12:53:53 +0300 )edit
0

answered 2015-07-15 14:58:16 +0300

r0kk3rz gravatar image

Updated information about background services with Alien-Dalvik.

With Upgrade 1.1.7 / Björnträsket we now have settings to control android services, including allowing background operation.

Added a settings page for Android applications in Settings > App from where you can control how the installed >application works on your Jolla device (Force stop, Clear cache, Clear data, and running the app on background)

Having the option to run Android applications on background enables receiving notifications for Android messaging apps >even when the app is closed.

edit flag offensive delete publish link more

Question tools

Follow
3 followers

Stats

Asked: 2015-01-12 23:46:35 +0300

Seen: 3,482 times

Last updated: Jul 15 '15