b4j4 / indicator-kdeconnect

AppIndicator for KDE Connect
GNU Lesser General Public License v2.1
371 stars 38 forks source link

Indicator randomly disappears after some time, reappears when the phone is unlocked [SOLVED] #43

Closed moondownr closed 7 years ago

moondownr commented 7 years ago

As the title says. Xubuntu 16.04. Also, "kdeconnect-send %f" command from Thunar doesn't work when the indicator isn't present (works after unlocking phone). phone: Xiaomi Redmi 4 Prime, Android 6.0.1

b4j4 commented 7 years ago

It's complicated but let me try to explain what's going on, when some phones is locked kdeconnect android app go to sleep to, it's not and indicator problem but a phone configuration issue to save power or a kdeconnect app issue. I have a Huawei with Android 4.4 that the app not sleep and the indicator is present every time and my main phone is Xiaomi Redmi 3S that the app sleep when phone is locked.

moondownr commented 7 years ago

I more or less suspected this is the case of app hibernating. However, does the tray icon on my desktop need to disappear? Even when the phone is locked, upon receiving any notification kde-connect wakes up and the indicator appears, along with the notification on my desktop. Say, is it out of question to be able to ping my phone from the indicator, thus waking up kde-connect on my phone and enabling other functions?

edit: meanwhile, I found the way to tell my Xioami phone to stop unloading apps from memory :)

b4j4 commented 7 years ago

@Moondownr, The indicator listens to android kdeconnect app, when it stops listening, the indicator disappears because the app is no longer running, but when you receive a notification the app wakes up and sends the notification but then it goes back to sleep.

It is possible to make the indicator not sleep, but your phone will not receive any commands.

moondownr commented 7 years ago

Alright, thanks for the explanation. I solved my problem on the android side anyway, so it's fine.

b4j4 commented 7 years ago

@Moondownr, So leave the solution here for the other people who have the same doubt, inclusive I kkk, because there is my laziness I have not walked in the configurations of my smartphone to look for the that.

moondownr commented 7 years ago

In case of my phone, which has MIUI8 on top of Marshmellow, you need to navigate to Settings-->Battery & Performance-->Manage apps battery usage-->Off (this will have a global effect on all apps) or Choose Apps, find KDE Connect, select "No restrictions". Also check that it has permission to autostart in Permissions-->Autostart. Finally, you might wanna keep the battery saver (Battery & Performance --> Power). These measures solved my issue. On reddit, I saw one guy reporting that for him it didn't and he had to resort to changing Background Process Limit and Memory Optimization settings in Developer Options. Hope this helps.

b4j4 commented 7 years ago

I use MUI8 too, Thanks help a lot, each one will have to find the equivalent settings on their mobile phones.

alcarraz commented 6 years ago

I have set no restrictions for kde connect in miui in my redmi 3s and still it seems to go down and disconnect :(. Does this happen to anyone else?

b4j4 commented 6 years ago

@alcarraz, I have a redmi 3s too, on MIUI 9 is necessary to lock the app on, recents apps display. screenshot_2018-05-23-20-56-26-281_com miui home

alcarraz commented 6 years ago

thanks for the answer but I already have it locked and with all permissions granted (background, auto-start). And I have miui 9.5 stable

joshirio commented 6 years ago

miui 8.0 android 8.0, huawei p8 lite 2017, same issue. Power managing is disabled for kdeconnect (manual settings, with autostart, background activity, etc.. all enabled). Still, if the screen is locked the app is stopped.

But other apps like VLC where manual power settings were enabled work with a locked screen, so not sure if this is only caused by MIUI.

aminehmida commented 6 years ago

Same as @joshirio. Running on Huawei Mate 10 pro.

Edit: found the original bug report: https://bugs.kde.org/show_bug.cgi?id=392950 Still, didn't solve my problem.

ahmedatawfik commented 5 years ago

On my Huawei P10 Plus with Android 8 and EMUI 8, I did the following and it worked like a charm:

Then do the following:

And finally restart your phone!

Using Ubuntu 18.10 with GSConnect