DP-3T / dp3t-app-android-demo

The DP3T-App for Android
Mozilla Public License 2.0
323 stars 79 forks source link

app stops working after some hours #25

Open git-ere opened 4 years ago

git-ere commented 4 years ago

after some hours of work the app seems to stop working without any message. the icon disappears and when restarting the app everything seems to work again.

is there a way to get additional information about the unexpected stop or a way we can assist you in testing?

maebli commented 4 years ago

I did not experince this, tested on a pixel3a with Android 10. I have had the app running for 3 days+.

akuckartz commented 4 years ago

I can not confirm this issue.

git-ere commented 4 years ago

I have the issue on a Huawei P20 Pro, Android 9

now after 5 to 6 hours the app stopped working

romixch commented 4 years ago

From my own experience of developing an app with background services and 10'000+ installations, this can become nasty. Some vendors implemented pretty restrictive resource management that kills your app while running in the background. Huawei and Samsung are the worst ones. Unfortunately, they have the biggest market share. There is some help and documentation around this: https://dontkillmyapp.com/. But the solution depends on the use case. I guess there is some additional work to do here. Although I did not check if this has been addressed in the code here.

RobbertH commented 4 years ago

Asking the powermanager to ignore battery optimizations for this app might help: https://stackoverflow.com/a/54982071/13237645

git-ere commented 4 years ago

I found an option to set it to "Manage manually" and allowed background etc. I'll continue to test

njulemon commented 4 years ago

No need to ask for ignoring battery optimizations for this app.

The phone enters in Doze mode after a while when :

FYI, there is two states for Doze Mode (Idle and Deep). Phone enters in the first mode (Idle) when three conditions are present for 30 min to 1 hour. It will probably interrupt bluetooth operations. But I guess you do not want to scan when a user is sleeping or at rest.

git-ere commented 4 years ago

But I guess you do not want to scan when a user is sleeping or at rest.

if I'm sitting for some hours at my desk (without moving) and people come for a talk to me, I think my phone should continue scanning to detect the devices of my visitors - if the visitor gets sick in a week I would like to be informed. Or did I misunderstand something?

git-ere commented 4 years ago

I found an option to set it to "Manage manually" and allowed background etc. I'll continue to test

since I've changed the power setttings more than 24 hours ago, the app runs without any problem. this setting seems to solve the problem on the huawei p20

zukunft commented 4 years ago

I had the issue with the "old" next-step.io app on lineageOS 16.0 on a OnePlus 5t, but the actual develop branch may work fine. My problem is, that the sync with the server is not obviously not yet working. Has anyone setup a server for testing the sync?

dalwhin commented 4 years ago

My problem is, that the sync with the server is not obviously not yet working. Has anyone setup a server for testing the sync?

Could this be the same problem as in issue 34 ?