Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App closed in the background on Huawei phones #500

Closed
make92 opened this issue Jun 30, 2017 · 17 comments
Closed

App closed in the background on Huawei phones #500

make92 opened this issue Jun 30, 2017 · 17 comments
Labels

Comments

@make92
Copy link

make92 commented Jun 30, 2017

hi,
i was using owntracks on my samsung mobile with android 6 for quite some time without any problems.
since i changed to Huawei P10plus with Android 7 owntracks get closed/crashed after an undefined time.
it seems when the app is in the background it gets sometimes closed/crashed after some hours or days.
i tried the lates version (1.2.3) as well as the beta (1.2.4) same results

all batt. saving settings are disabled for it, so i assume the issue must be somewhere else.

@binarybucks
Copy link

I've released 1.2.5 now which includes several fixes. Please report back if the app works better now.
The rewrite for v.2.0 is coming along nicely. It should be much more stable.

@make92
Copy link
Author

make92 commented Jun 30, 2017

just installed 1.2.5
will have an eye on it and let you know how its going.
any big changes planed for v.2.0 ?

@binarybucks
Copy link

Not regarding functionality besides the way the MQTT connection works.
However, large parts of the app have been rewritten.

@jkvalence
Copy link

I have two phones with owntracks connected to cloudmqtt. My phone is running 1.2.5 and my wife is running 1.2.3. Her phone sends updates to cloudmqtt and updates owntracks map as I expect it. My phone is not sending updates most of the time unless I open the front end and sometimes I have two wife entities in my friends, and sometimes I'm in Florida when I'm not. Both phones are configured exactly the same. Any ideas?

@binarybucks
Copy link

binarybucks commented Jul 1, 2017 via email

@make92
Copy link
Author

make92 commented Jul 1, 2017

installed yesterday v.1.2.5 and today morning it was closed again.
so same problem still exist for me.

@binarybucks
Copy link

Unfortunately I don't see any matching crashes that were reported.
How do you notice that the app is closed? Is the notification no longer shown?

@make92
Copy link
Author

make92 commented Jul 1, 2017

there are several things how i noticed it:

  • the app icon/indicator on top of the screen is gone
  • if i check in APPS owntracks the "force stop" is not available
  • no notifications are send

@binarybucks
Copy link

Do you have the ongoing notification enabled in the preferences?

@binarybucks
Copy link

Could you check if the app is set as "protected app"?
Huawei Phones tend to kill apps agressively without adhering to normal Android standards for background apps.

From a quick Google search it should look like the screenshot below:
image

@make92
Copy link
Author

make92 commented Jul 1, 2017

It's called a bit different in the version I'm using but that's the first thing I checked and enabled.
screenshot_20170701-204910
screenshot_20170701-204826

@make92 make92 closed this as completed Jul 1, 2017
@make92 make92 reopened this Jul 1, 2017
@jkvalence
Copy link

If you say that they are configured exactly the same, das this include the MQTT client id?

Also what devices and Android Versions are you using?

Sorry about the response time. We are using two separate IDs, Users, etc...
We both have LG G6 phones running 7.0

@binarybucks
Copy link

@make92 the "ignore battery optimization" doesn't hurt, but it's not the "feature" that disables background closing on Huawei phones. Check if there's something like Phone manager - Battery - Close apps after screen lock. Also, if you find something similar, restart the phone.

@binarybucks binarybucks changed the title owntracks app closed/crashed App closed in the background on Huawei phones Jul 21, 2017
@SaikCaskey
Copy link

Hey guys, it's in "Advanced Settings"->"Battery Manager"->"Protected Apps"
I notice foreground services are not honoured in unprotected apps. Sounds like you can prompt for protection.
This ignore optimisations thing causes a new headache for me - can we prompt for this to be set? I hope they either open this up to developers more or explain to users that it's actually ridiculous in most cases. Although I've heard that this is common in the Chinese market where users have to be more wary of apps/background tracking/unverified

@make92
Copy link
Author

make92 commented Sep 22, 2017

On my Huawei P10 plus this feature is called "ignore battery optimization", however even if you enable owntracks for this it's still closing after some days automatically.
What I figured out is that o other models, like the hornor 8, this is not happening. But that o e jasmine also a different android 7 version.

@SaikCaskey
Copy link

@make92 Ignore battery optimisation is not the same as Protected Apps, Android offers this Battery Optimisation on its own

@SaikCaskey
Copy link

Also, there is no way to tell if your app is "protected" or not. Does anyone know if the next release of EMUI will have an API for this? Huawei obviously don't email back and I can't find a solid source

@binarybucks binarybucks added this to the Archive milestone Oct 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants