Jump to content

Background downloads not always working


Bazzu85

Recommended Posts

Bazzu85

The app is running in background..

Check the screens..but download are not starting automatically..

Only opening the app..

 

Screenshot_2021-07-07-00-13-18-64.jpg

Screenshot_2021-07-07-00-13-31-28.jpg

Screenshot_2021-07-07-00-13-39-15.jpg

Screenshot_2021-07-07-00-14-11-62.jpg

Screenshot_2021-07-07-00-14-21-39.jpg

Screenshot_2021-07-07-00-15-19-00.jpg

Link to comment
Share on other sites

Can you try the beta version of the app and see how that compares? Thanks.

Link to comment
Share on other sites

Bazzu85
On 07/07/2021 at 19:07, Luke said:

Can you try the beta version of the app and see how that compares? Thanks.

I don't notice differences.. 

Emby for Android 3.2.03

I found this about background services..

https://stackoverflow.com/questions/59442078/background-services-are-restricted-in-xiaomi-and-oppo

can you give it a check? I have a oppo find x2 lite

btw where is the correct session to check if the app is still running in background?  is the memory usage section the right one?

Edited by Bazzu85
Link to comment
Share on other sites

  • 2 weeks later...
On 7/9/2021 at 11:15 AM, Bazzu85 said:

I don't notice differences.. 

Emby for Android 3.2.03

I found this about background services..

https://stackoverflow.com/questions/59442078/background-services-are-restricted-in-xiaomi-and-oppo

can you give it a check? I have a oppo find x2 lite

btw where is the correct session to check if the app is still running in background?  is the memory usage section the right one?

I would take a look at this: https://dontkillmyapp.com/oppo

Link to comment
Share on other sites

Bazzu85
13 hours ago, Luke said:

I would take a look at this: https://dontkillmyapp.com/oppo

H,

I checked the suggestions but the link is 3 years old (at least)

1. Pin your app to the recent apps screen. 

done. check the lock icon on top:

Screenshot_2021-07-07-00-13-18-64.jpg

2. Enable your app in the app list inside the security app’s “startup manager” and “floating app list” (com.coloros.safecenter / com.coloros.safecenter.permission.Permission).

These are section not yet in ColorOs 11 settings. The only related section is this:

image.thumb.png.9c2b4d4a122eca6a19448348733a90e9.png

and as you see I already enabled the exeption for emby. Additionally I checked the blocking records section that list the blocked app over time and emby is not recorded

3. Turn off battery optimizations.

done:

image.thumb.png.adc006d2622c5c95212e6d18940918bb.png

4. Give the service a persistent notification to remain in the foreground.

this is not something a user can do if the app doesn't permit it.

at this point I ask you..

how can I debug if the app as this background service is running?

I have to search some particular setting on the phone? I have to search some record on the server logs?

Link to comment
Share on other sites

Bazzu85
50 minutes ago, Luke said:

Are you still having an issue with this?

Yes. Right now I'm waiting for some sync from the server from yesterday (when I last opened the app manually).

Here's some screens about the app being in background:

Screenshot_2021-07-25-06-33-18-14.thumb.jpg.933bb21de484f43cdf14b1a598978e06.jpg

Screenshot_20210725_063354.thumb.jpg.cb0ac593310a7457bf113a835868926e.jpg

Screenshot_20210725_063423.thumb.jpg.ddbf9bceddf7e7c7e6f9a447cab182d7.jpg

 

Link to comment
Share on other sites

Bazzu85

@Luke I don't know where to turn...

I don't open the app from yesterday

image.png.b9ebd0c4244d5b44229128fdb6dc1ebc.png

and many episodes need to be transfered to the phone..

check this screens showing the actual status: https://imgur.com/a/TsF0Zos

If now I open the app the sync starts.. how can I debug if the background service is running or is blocked?

Link to comment
Share on other sites

  • 2 weeks later...
Bazzu85

@Luke can you please follow my reasoning?

The actual situation is that both my device has the "simpson" job setted to download the latest x unwatched episodes.

In both if I don't open manually the app the sync doesn't occurs.

Both devices have the app in background and unopened from x hours/days:

1. Tablet, Huawei MediaPad T5 10, Android 8

image.png.cc38fdc33baef19939fdf575f4d79ae1.png

2. Phone Oppo Find X-2 Lite, Android 11

image.png.a3a54a356a40ba7dab79800ab122385d.png

Checking the server the status is always: "Downloaded" for both entries.

1. Tablet

image.png.ab9e118552ecb2a79af7556468953371.png

image.png.aea32d3b9b07af366c8d737ae0987213.png

2. Phone

image.png.9d409f585a40ca44a4e021a3a28abf8b.png

image.png.c95f7920284e413f998e772f38428c7a.png

image.png.58c7e059f631e857033032e56daa5af9.png

The next episode that need to be transfered is from S28E06. So

1. Tablet: 2 episodes

2 Phone 2 new episode removing S28E05

image.thumb.png.376ba58ff4ed345ca86f4050466509b3.png

Here's some test to show you that the problem ISN'T the android app not running in background. This test are exectuted on the server web page without touching both android devices

Test1: Modified the tablet entry to sync 4 unwatched episode

Screens of job modification: https://imgur.com/a/ho8KowQ

Edit:

Test failed. Not all tweak were done as suggested here https://dontkillmyapp.com/huawei

Made all necessary tweaks and waiting for tests after some hours of idle. For this device the tests results in: all work flawlessly. Waiting some minutes/hours the sync occurs automatically.

Screens after job modification after 20 hours of no signal from the android app: https://imgur.com/a/YwWrsPt

Waiting the sync.

Test2: Modified the phone entry to sync 5 unwatched episode

Screens of job modification: https://imgur.com/a/QNlYoAA
After a while the downloads start without touching the phone: https://imgur.com/a/u5APffE

I repeat: NO PHONE INTERACTION.

Test3: Created a new sync of a serie

Screen after job creation: https://imgur.com/a/56fwJXn

After a while the downloads start without touching the phonehttps://imgur.com/a/lYUJFaL

Again: NO PHONE INTERACTION

Test4: Watched an episode with google tv and after hours of no sync, restarted the server

Screens of sync required: https://imgur.com/a/cnYF1MM

Waited 5+ hours. No sync from phone

Restarted the server: waiting for changes or sync jobs.. https://imgur.com/a/QFWlDcU

edit: no sync after the restart

 

Final thoughts: for me and my test the problem is that the server is not updating automatically the sync jobs. They remain in "Dowloaded" status until there's something that trigger the update (AKA modify the sync). The app on phone is running well and is in background as expected. If it were not so it would not work, even modifying the sync jobs on server.

The strange fact is that manually opening the app, the synchronization about what need to be synced is done instantly. For the moment I found a workaround to open the app with a tool every time I connect the phone to the charger. At least every night the download jobs occurs.

edit: checking the tablet test I don't know what to think. On that device the sync works. On oppo phone the sync don't works automatically but only manually open the app or modifying something on the server. There's no doubt that the app is running in background 'cause test number 2.

 

Edited by Bazzu85
additional infos
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
Bazzu85
On 06/07/2021 at 23:50, Luke said:

@Bazzu85, if you force close the app, then the android OS will not run the app's background download process. You don't have to keep the app in the foreground though.

Here I am with some tests..

Premise: the app is running in backgroud correctly and the feeling about all tests lead to a server problem updating the download jobs.

TEST1:

During the past days (a week) I have watched ton of stuff, including episodes that were in download jobs. I did see any update to the related download jobs. The status remained to "Downloaded".

2 days ago I opened the app and the download started. The download jobs status was "Transfering".

TEST2: 

I have a download job that sync the last 4 episode of a playlist

image.png.cdd6e5ae1437302240e2944e3771dd14.png

image.png.847f516903be23ada851db84b6a96088.png

Yesterday I removed and added again S07E18 - Heart of Matter (2) from the server (I had to update the file). This operation caused the update of the job to "ready to transfer" with the new episode.

Overnight the sync occurs without opening the app. That prove that was running in backgruond

TEST3:

Today I added some show to the jobs and the status become instantly to "ready to transfer". After a while the episode were synced to the phone without opening the app

 

If you need more test ask.

My conclusion is that something is missing when an item is marked as watched. The corresponding job need to be updated to become "ready to transfer" but this doesn't occurs. Doing some other actions (like adding a job o removing/adding episode involved with the job) seems that trigger the job update so that the device know to start to sync in background

thx

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
Bazzu85
On 07/12/2021 at 17:10, Luke said:

Can you try again with 3.2.32? Thanks.

Running now 3.2.35.

Not opening the app from yesterday and the download list is the same as yesterday. If I now open the app the downloads refreshes and start (tried the other day).

The app is confirmed in ram and background bit doesn't run unless I open it manually

Link to comment
Share on other sites

Bazzu85

Additionally if you want I have a logcat reader installed on phone . There something I can search to troubleshoot if the app/service is running or launches?

Link to comment
Share on other sites

  • 4 weeks later...
On 2/6/2022 at 4:32 PM, Bazzu85 said:

Additionally if you want I have a logcat reader installed on phone . There something I can search to troubleshoot if the app/service is running or launches?

That would be great. You could just provide the complete contents. Thanks !

Link to comment
Share on other sites

Bazzu85
6 hours ago, Luke said:

That would be great. You could just provide the complete contents. Thanks !

Check the pm..

Ty

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...