xDrip-Watchface
xDrip-Watchface copied to clipboard
Blank screen on time out or button press, Amazfit Pace
On 1st October 2019, midnight, watch started to show some strange issue. On timeout or button press it doesn't turn off background light only but also changes watchface to nothing (blank screen). I tried to:
- set Raise to light up and I only get blank screen with background light (until I press button)
- factory reset watch and test it without xdrip watchface and it worked. After xdrip watchface installation, same problem
- uninstall xdrip watchface and tried it with old version of it. Old version doesn't work
- unisntall Amazfit only. Install old version (prior 29.9. one) and it didn't fix the problem
- tried to change languages of xdrip watchface. Didn't help Anyone else?
Curiously, the same happened to me. It started doing that strange thing exactly at 0.00 of October 1st. I restored Amazfit to factory settings, re-install watchface, even installed old version of Amazfit apk (the latest is 3.4.3 and downgraded to 3.4.1) because I thought it could be owed to that. In fact, tried the same as you did, without success. Last year, the watchface suffered form a minor bug related to September or December month, can't remember. The issue is that if I shift to another watchface, the screen continues to go in black after a while. Urgent review is needed. I haven't the faintest idea of programming, but I am willing to test whatever change @Klaus3d3 may want to implement
an insight: it is just if the watch enters a hibernate mode and show no screen to save battery. The service is running in the background but it shows a black screen instead of the usual waiting screen. Occasionally, it falls into a unresponsive state so it does not wake up despite pressing the button or double-tapping the screen.
Mine is Amazfit Pace
Another test was to set September 1st in the smartphone so the watch changed the date, just in case. No luck: the problem this strategy creates is that Xdrip cannot show values because timestamp is out of date....,
reviewing the code, I found the "December" month repeated (in all the languages). Additionally, December was posted as the first month instead of January. Since September is a 30-days month, @Klaus3d3, is it possible this to freezes the sleep mode? path: app/src/main/java/com/klaus3d3/xDripwatchface/widget/MainClock.java Code:
private static String[][] months = { //{"DECEMBER", "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER"}, {"DECEMBER", "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", " DECEMBER"},
In addition to this, I found this code in the same MainClock.java: is it possible this "hide" and the mentioned above may cause the problem?
// Hide if disabled if(!service.getResources().getBoolean(R.bool.month)){monthLayout.show=false;}
When I tried to change the watchface, now the watch says "Xdrip+ watchface + services has stopped"
Guys, you are not alone. I have this, too. I'm on vaccation till sunday, so can't do anything about this till then. I also believe it's date related.
I Have also the issue.
@Klaus3d3 thank you for the great work, using daily :)
Thank you very much, @Klaus3d3 It's amazing how Amazfit-dependent I am right now. I miss it. Well this is the update: a) if I select any watchface but yours, and activate the service in the widget, the Amazfit works perfectly. What I do is shift right until the widget and let the watch to go to sleep mode. This way, every time I double-tap the screen or click the button I can see the BG and trend arrow This means the communication between smartphone and watch is working perfectly. It is just a question of anything in the watchface. b) this led to revise/read the code in the watchface. I am not an expert so I cannot interpret the meaning of most of the code. However, I noticed there is a routine that only works when the month has two digits: 10, 11 and 12 for October, November and December. It is here: xDrip-Watchface/app/src/main/java/com/klaus3d3/xDripwatchface/widget/MainClock.java
In the line 157 and following, the list of months contains December twice. One at the beginning of the list (why here and not at the end?) and another one at the end. This happens in all the languages. However, in the line 179 and following the short name for December is present only once at the beginning (why at the beginning? may this has caused this problem or the problem of past year in December?). Then, the routine for months with 2 digits starts in line 461. And it only activates "if(month>=9)". The following lines are for "months_3let" and "months". But since both lists contain a different number of elements, I guess it may cause an exception in Java language. I may be wrong, but I think this procedure and the bug in those lists may get the app confused since it is possible that the month 10 in "months_3let" and in "months" are different.
If @Klaus3d3 considers this may the problem, I'll be more than happy to have been helpful. Otherwise, sorry for my message. Please, I think we can wait until you come back from holidays. In fact, I have lived without a sensor for the last 30 years. Just we are getting tech-dependents ;)
Another update: shouldn't the filter for the procedure be "strictly higher than"? I mean, it only has to do that in months 10, 11 and 12, but not in 9. So an additional thought is whether this should be if(month>9) instead of if(month>=9)
Sorry if I'm wrong...
Thats what i thought, too. This is part of the original code from greatfit i just copied.
Greatfit code is the same at this point and greatfit still works. So maybe its something else
Is there any log file in the Amazfit we can check? Yesterday I tried once again to set the watchface by selecting it within the Amazfit smartphone app, and it heated a lot, got stuck in the screen (totally unresponsive) and with 20% of battery it drained totally to 0% in a few minutes... This happened October 1st, so somehow it must be linked to "date". What other routines are linked to current date/ timestamp?
I have the same problems. After 10 second screen black, long time to wake up (freeze system) after press button and battery drain after few hours.
Here is the fixed version. You will have to uninstall the one before installing you have because it has a different signature. Klaus is away for a while, you will get the official version soon. app-debug.zip
not working for me @GreatApo
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]ailure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
@krixoko Uninstall the previous version first :P
yes it is uninstalled, also confused
@krixoko Try uninstalling with ADB. Amazfit tools and uninstallers some times uninstall the apk but not completely. The command is: adb uninstall com.klaus3d3.xDripwatchface
thanks, will test it tomorrow :)
@GreatApo, @krixoko: I used Huami Amazfit tool and installation was unsuccessful. What I did: (1) uninstall old apk, (2) reboot watch; (3) install the new one; (4) reboot.
After step 3 the same message appeared: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]ailure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
I guess it might be owed to the different signature so it's a kind of unauthorised update.... Now, I'll try to do it by using ADB. Don't know whether the bootloader should be unlocked for this (????). Mine is still locked. Will tell you further if I'm succesful
@GreatApo: Thanks anyway for the work! I discovered your repository and will also try your amazmod tool
adb uninstall com.klaus3d3.xDripwatchface
Thanks. Uninstall with adb, reboot and install new apk working....
an update with the solution that worked, following the recommendation of using ADB instead of Huami Amazfit tool: In light of the "update incompatible" problem, I re-installed the old Klaus3d3 version using the same Huami tool. Reboot. Checked the name of the apk that should be uninstalled using ADB adb uninstall com.klaus3d3.xDripwatchface
Uninstall succesful. Then installed the @GreatApo new version using ADB ADB install /path_where_you_have_the_new_version/app-debug.apk
Installation was sucessful Reboot within Amazfit, performed the procedure to select the watchface. It initially yield an error (watchface service stopped) but the watchface charged anyway. Went to widget to check that background service was active, and it worked perfectly. BTW: I have Spanish language installed and "send health data to Xdrip+" active.
Thank you very much once again @Klaus3d3 and @GreatApo You don't know how you have had a positive impact on my quality of life
new apk working!
I tried to factory reset watch and then install GreatApo version and it was no go. 'Xdrip service has stopped'. Then I unistalled GreatApo version and couldn't install old version.
I tried to factory reset watch and then install GreatApo version and it was no go. 'Xdrip service has stopped'. Then I unistalled GreatApo version and couldn't install old version.
To start with, uninstall each version with ADB and not Amazfit Tool. Additionally, on both versions there is also a bug when data are not available (sth that can be the case after a factory reset). I pulled request a fix which is not included in the version I uploaded because I want Klaus to test it. Here it is if you want to try it: app-debug.zip
OK, thanks. I did uninstallation of your's version via adb and managed to install old version after that but still have 'xdrip service has stopped error'. I'm going to factory reset watch and try this latest version of your's. I understand that it will work. Thanks
@vebaba : please, do let us know what software you are using to do so. Huami Amazfit Tool? Try to use ADB. In my case, after following the mentioned above procedure, and selecting the watchface in Amazfit, it yielded the same message but the watchface screen appeared anyway. Then went to the widget and be sure that background service is on
For ADB you will need to open a command terminal (I use Windows) and you will need the drivers (you can download from here) https://amazfitwatchfaces.com/downloads/drv_p1.zip
You should download ADB tools for Windows (if you are in windows). You can download from here: https://developer.android.com/studio/releases/platform-tools
Then extract the files from the zip downloaded. Go to that folder and by pressing the key "shift"+right click select "open command terminal here". You should have Amazfit connected to the computer. Then write this: adb uninstall com.klaus3d3.xDripwatchface
When done, reboot watch
Then following the same procedure, write this: adb install /path_where_you_have_the_new_version/app-debug.apk
Of course, it should be this new one
it should work
)
OK, thanks. I did uninstallation of your's version via adb and managed to install old version after that but still have 'xdrip service has stopped error'. I'm going to factory reset watch and try this latest version of your's. I understand that it will work. Thanks
You don't really need to factory reset, just uninstall it.
Wow, you're both fast... I started factory reset prior reading answers. @yosepito I used adb for both install and uninstall. I didn't check widget though. Maybe that was a problem...
Wow, you're both fast... I started factory reset prior reading answers. @yosepito I used adb for both install and uninstall. I didn't check widget though. Maybe that was a problem...
It yielded the same message to me. Initially, it seemed to continue with the problem (unresponsive) but after a while it worked as usual. Although the service should be active when selecting the watchface, I checked it anyway in the widget. In light of the message, the service was stopped. Do activate it there and voilá
I tried to factory reset watch and then install GreatApo version and it was no go. 'Xdrip service has stopped'. Then I unistalled GreatApo version and couldn't install old version.
To start with, uninstall each version with ADB and not Amazfit Tool. Additionally, on both versions there is also a bug when data are not available (sth that can be the case after a factory reset). I pulled request a fix which is not included in the version I uploaded because I want Klaus to test it. Here it is if you want to try it: app-debug.zip
This worked for me. Thanks for your help. I installed it via adb NOTE: I don't have a Widget in this version. I don't needed it, really. Just for your reference.
@yosepito Thanks for your help, too
@vebaba I had the same problem but I don't know why :stuck_out_tongue: That is why I didn't upload it at first.
Vebaba, you don't have the widget? Thats strange.
Btw. The service starts automaticly when u choose the wf and stops when changing to a different wf. The switch on the setup page of the widget is for times, when u want the data to the widget but want to use a different wf. Apos Greatfit WF does can show the glucose data, too, as soon as we fixed it. Then his wf gets can also get the data from my service. But that needs to be fixed first. We never finalized this.