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

No Android app functionality in the background (Xperia X / Sailfish 3.3.0.16)

asked 2020-05-23 20:12:37 +0200

sailaway gravatar image

updated 2020-05-23 20:16:23 +0200

Dear sailors, in our family we have three Sailfish devices in use. One of them is an Xperia X. And this creates problems.

WhatsApp messages are no longer received in the background. (Mobile connection and WiFi). The messages are only received when the app is started.

In this context, I noticed that the app settings can no longer be opened. (Settings > Apps > e.g. WhatsApp) Message: Settings are not responding (please wait / close). This applies to all installed Android apps. (No error message for native apps). So the "Starting background services when switching on" cannot be checked for individual Android apps.

Since I suspect that there is a problem with aliendalvik, I uninstalled the Android support and then reinstalled it. I also stopped and restarted the Android support several times and rebooted the device. However, this was unsuccessful. Android support at boot is activated. I think the Android apps are not running in the background for some reason. If you start the Android apps they work without problems. I would like to avoid resetting or reinstalling the system. (Xperia X / single, Sailfish Version: 3.3.0.16)

image description

Does anyone have similar problems or a solution? I thank you in advance for any help or tip.

Kind regards, Sailaway

edit retag flag offensive close delete

Comments

1

I have bugs like this years ago with my Jolla 1 and now with Xperia X too... i need to enter to telegram/whatsapp to receive new messages, after a new update still the same bug/error or whatever.

strobovalo ( 2020-05-23 22:37:12 +0200 )edit
1

It haven't worked at least since 3.0.3. Even with apps in cover mode I still had missed sip calls and had to reopen whatsapp to get new massages. I think 3.3 should let apps run in cover mode but I'm not the one willing to give it a second chance (and it's annoying to have 3-5 extra apps on desktop). Basic apps (vlc, book readers, file browsers, newpipe, calculator, firefox) work well enough, but you can forget about any service apps (whatsapp, telegram, voip, navigators etc). My old meizu with 4-th android had similar behavior but you could lock apps from closing. Looks like some code from old dalvic is still knocking around. My "work around" is to carry a second phone with android... sorry.

Nerevareeeeeeee ( 2020-05-23 23:52:20 +0200 )edit
2

Thank you for the quick response and the explanations. Of course it makes me a little sad that there is no solution in sight. As a result, we will have to live with the situation first. I'm not a big WhatsApp friend. The app is only installed because, unfortunately, a large number of friends and colleagues use Android and of course also use WhatsApp. My missionary work in the area has had only modest success, since it is too difficult for most people to deal with an alternative operating system. The Xperia X is a decent size and we would love to continue using it. The Xperia Xa2 is just about acceptable for us and the two devices we own work well. We will probably also replace the Xperia X with an Xa2 (... the Xperia 10 is just too big) because we definitely don't want an Android or IOs device. So we live with the small bugs as a price for using a generally good and alternative operating system. (I will continue to hope ..... ;) )

Greetings,

Sailaway

sailaway ( 2020-05-24 00:30:03 +0200 )edit
1

Is not a phone model problem I think

strobovalo ( 2020-05-24 04:50:56 +0200 )edit

You may be right, but I have no idea how to solve the problem. I tried everything within my skills. I am surprised that the "App Settings" cannot be opened for any Android app. This problem doesn't just apply to WhatsApp. As far as I remember this error was not always present. The last option is of course a reset or reinstallation. I'm just afraid my wife will make me suffer for it - she loves her device! :) When using "Crest" the process "com.whatsapp" is displayed on my Xa2. This does not run on the Xperia X. But various other Android processes. Therefore I suspect that not all processes are loaded in the background.

sailaway ( 2020-05-24 10:48:26 +0200 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2020-05-26 18:06:03 +0200

DrYak gravatar image

I haven't been using an Android-4 / JIT based aliendalvik for a while (Jolla 1, Xperia X, etc.)

But I would suspect it's basically the problem of apps not closing / starting in background, but in reverse.

To make sure that you don't miss any WhatsApp messages:

  • You need to have "start at boot up" turned on.
  • You need to have "notifications" turned on.
  • You need to have some implementation of the Google Play Services (either MicroG opensource alternative, or the original Google Play Service), and have the cloud push notifications turned on, WhatsApp authorised to register for push notification, and the app auto-starting to process the notifications upon receiving them.

    (Note that, as explained in the microG help text, you might need to re-install WhatsApp in order to force registering to the cloud push notification. Remember to backup your messages before re-installing).

It might help to have the keep the window open, running in the background.

It might also help to make sure Android won't have a reason to shut down the process: make sure to have enough swap (preferably on a "High Endurance" or "Industrial" external SD card, to avoir killing flash), and make sure that as much as possible of ther other process are prevented from running in the background. Otherwise Android might decide to kill the WhatsApp process to save RAM.

edit flag offensive delete publish link more

Comments

Can you explain why is a "random" error? I can receive notifications a minute after or hours after.

strobovalo ( 2020-05-26 18:51:46 +0200 )edit

@DrYak: First of all, thank you very much for the very detailed explanations. I will try the recommendations as soon as possible. Neither MicroG nor the Google Play service is installed on our Sailfish devices. With the Xa2 this does not seem to be necessary, because the Android apps work without any problems in the background (the only Android apps that I use regularly are WhatsApp and Opera). I will soon install and test MicroG on the Xperia X. (However, MicroG is a new territory for me, so I have to read a little bit first). So far I have tried to stay away from Google as much as possible. In this case, I'll try MicroG to persuade the Android apps to work. I also have to find out more about the swap size. Again: Thank you for the very detailed information. Kind regards!

sailaway ( 2020-05-26 22:00:59 +0200 )edit
1

@strobovalo : because wihtout a cloud push notification subscription, WhatsApp will only get message when it is running and when it is it self checking the servers.

e.g.: the Sailfish OS might be sleep (android apps themselves have no way to request getting out of sleep state, afaik. Only android it self can periodically wake the smartphone to receive the push notification and dispatch them to application). Or the app might be killed to make room in the RAM, etc. (du to how android works this will not neccessarily remove the window, only the background service might not be running).

Having a push handler is a necessity to get messages immediately. But that require at least some implementation of com.google.android.gms API, either microG (that's what I am using on my XA2) or the original proprietary Google Play Service (I use that back on Jolla 1 and X).

DrYak ( 2020-05-26 22:52:11 +0200 )edit
2

@sailaway:

There is some old explanations on how to get microG on AlienDalvik JIT iwht AOSP 4.x devices, but because they have full read-write access it seems rather tirivial (just install [url=https://f-droid.org/]F-Droid[/url], then add the microG repository, then add the services).

I have written an extensive explanation, but saddly that one is for devices that run the new AlienDalvik in LXC with AOSP 8.x.

The signature spoofing is probably LXC 8.x-specific, but the installation part and the Google Cloud Messaging part are probably relevant here too.

For the Swap I have an SD Card that has been partitionned in multiple partitions:

# fdisk -l /dev/mmcblk1
Disk /dev/mmcblk1: 119.3 GiB, 128043712512 bytes, 250085376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6081EB6C-CD84-5D49-93B0-EE35A8A29752

Device             Start       End   Sectors  Size Type
/dev/mmcblk1p1     32768 232816639 232783872  111G Linux filesystem
/dev/mmcblk1p2 232816640 241205247   8388608    4G Linux reserved
/dev/mmcblk1p3 241205248 249593855   8388608    4G Linux swap

And I have added the following line at the bottom of my fstab file:

# tail -n 2 /etc/fstab 

LABEL=SDSwap    swap    swap    defaults,user,auto,nofail       0 0

(note the "auto,nofail" options so the smartphone doesn't crash if the SD card is missing at boot time).

DrYak ( 2020-05-26 23:09:19 +0200 )edit

@DrYak Thank you for the explanation, but with my short knowledge... I need some king of tutorial for install MicroG .

strobovalo ( 2020-05-27 05:42:42 +0200 )edit
2

answered 2020-05-31 01:29:40 +0200

sailaway gravatar image

updated 2020-06-03 07:40:28 +0200

The solution (... but no real one)! After I reset the Xperia X to Hossa, the Android apps settings were accessible again. These can still be opened even after an update to Torronsuo. With the update to Rokua, access is no longer possible. The same applies to the WhatsApp functionality in the background. Hossa - yes, Torronsuo - yes, Rokua - no function. After going through all of these options, I come to the conclusion that there is a bug in Sailfish version 3.3.0.16 (possibly even a version before ...) that makes background functionality of Android apps impossible. MicroG is not required for the background functionality of WhatsApp. "Crest" also confirms the background functionality of WhatsApp, which was not the case under Rokua. So Jolla should have to take care of this. The Xperia X will remain on Toronsuo until further notice, as functionality is still guaranteed here.

image description

Edit 03.06.2020: After everything seemed to work under Torronsuo I had to find out that there was a time zone error (after reset to Hossa and update to Torronsuo). This seems to be an known issue. Various attempts to fix this have been unsuccessful. Then I flashed the Xperia X again - this time with version 3.2.1.20 / Nuuksio. Up to now everything really seems to be working, including the Android functions in the background, the Xperia remains on this version. I am afraid of an update to the current version, since this has started the problems and reinstalling the current version did not help. However, I can add that the Android apps, including WhatsApp, do not cause any problems even under Nuuksio (3.2.1) and the notifications work in the background. Daily use of the Xperia X seems to be possible again.

edit flag offensive delete publish link more

Comments

Android apps and access to their settings work with Sailfish 3.3.0.16, too. This has been tested a lot. CHecked it again today and everything works.

If this fails then there is a reason that we do not know yet.

jovirkku ( 2020-06-09 14:26:05 +0200 )edit

@jovirkku: Thank you for this information and the hint. I was surprised that the problem repeated itself after I reset the device and then brought it back up to 3.3.0.16. The problem occurred regularly under the current version (two tries). Nevertheless, I will try it again and update the device again to the current version. I hope I can do this in the coming days. Then I will post a feedback.

Thanks for all the support and efforts.

sailaway ( 2020-06-09 21:51:22 +0200 )edit

@sailaway: After you had reset your phone back to Hossa and further to Torronsuo, did you thereafter and before going back to Rokua, install MicroG or Aliendalvik Control, or some other apps that might affect?

There must be a reason for this problem as with pure clean Sailfish it does not happen even with Rokua.

jovirkku ( 2020-06-11 18:38:51 +0200 )edit

@jovirkku: I tried again today. After I recently flashed the Xperia X to version 3.2.1.20, I updated 3.2.1.20 again today. Unfortunately, I have to report that the problem persists. With 3.3.0.16 I have no access to the Android app settings (see first picture). I have never used MicroG except for an attempt to solve this problem. I always installed Aliendalvik Control. Since I have to flash the device again anyway, I will choose directly the current version this time. Feedback follows!

sailaway ( 2020-06-11 19:56:38 +0200 )edit

@sailaway: I believe that if you reset the phone, upgrade it to 3.3.0.16 and do not install Aliendalvik Control, it works then! If this was the case then we would at least know the culprit. There were some other OS update problems (3.3.0.16) that turned out to be caused by a conflict with A.C. This would also explain why we have not seen this problem in our tests.

jovirkku ( 2020-06-11 20:03:06 +0200 )edit
Login/Signup to Answer

Question tools

Follow
9 followers

Stats

Asked: 2020-05-23 20:12:37 +0200

Seen: 1,125 times

Last updated: Jun 03 '20