yashsingh1/xdaforums huggingface dataset:
[Amazfit] Dr.Shultz:
One of the coolest watchface for stratos i ever use. But only one suggestion - it will be more useful to change digits color separate from progress bar. In my point white digits are exellent reading in sleep mode in every light conditions, but with red progress bar it will looks much better. Is it possible?
[Amazfit] GreatApo:
Yes it is possible. However, if this is to happen, settings for each widget will have to be provided separately. It's not that hard but it will overpopulate settings.

I still believe that the key is the manipulation/customization from phone ;)
[Amazfit] Dr.Shultz:
Sounds cool. But I think it will takes lots of your efforts. I wish you can, and wish you will be the first one who did it. But yet can you tell where I can do it in apk for own use? If it possible, I nubee in apk.
[Amazfit] GreatApo:
That's true. Well, most of the work from watch's side has been made and I already code in amazmod ;) But yes, it's a lot of work.

It is very easy actually. Download (clone) the whole project from GitHub. Open it with android studio. You only have to edit the "app/src/main/res/values/arrays.xml". Two things need to change there:

1. Hours' color

Go to line 9 and change the hex color (from #ff0000 to #ffffff if you want them to be white)

2. Remove hours from changing color in settings

Go to line 255 and either delete it or comment it (like line 257)

Build the APK and install it! Mined that your APK like have a different signature so you will have to uninstall any installed version first (better do it with ADB).

PS: If you find all these difficult, install this: View attachment app-debug.apk :D
[Amazfit] Rdzeniuch:
When i set up month as text, when unlocked it works fine but when i lock it, it shows only 3 letters of month. I don't like it because it leaves empty space. (In Polish language)
[Amazfit] GreatApo:
You are right! I was not aware of that, thanks for reporting.

Fixed on this commit.
[Amazfit] DaveHTC200:
What a find this face is! Great work!!

One question, I'm likely overlooking something simple, but how do I remove the lower date as show?
[Amazfit] GreatApo:
Long click the watchface, and then click settings on GreatFit.

Now if you scroll a little you will see widget 1 to 5. The lower widget is number 4 (1=top left, 2=top right, 3=center, 4=bottom, 5=center-left). Click widget 4 and select an other widget (now you have "date" selected). Chose something smaller that will fit there like battery ;)

Then click the Save button!
[Amazfit] DaveHTC200:
Not sure how the hell I missed that haha!

Thank you and thank you for a great watch face and work put into it!!
[Amazfit] GreatApo:
? mind that some elements need additional software to work like phone's battery.
[Amazfit] DaveHTC200:
Got it thank you :good:
[Amazfit] GreatApo:
He replaced the proper files. Maybe it's a bug from the decompiler.
[Amazfit] darkvoid_66:
GreatApo do you have any idea why cursor remains null when running this code inside any widget:

// Get last heart rates
Cursor cur = null;
String heartrates = "";
try {
cur = [B]this.mService.[/B]getContentResolver().query(Uri.parse("content://com.huami.watch.health.heartdata"), null, null, null, "utc_time ASC");
// Use the cursor to step through the returned records
while (cur.moveToNext()) {
// Get the field values
// example: utc_time=1528485660, time_zone=0, heart_rate=96
long utc_time = cur.getLong(0);
//int time_zone = cur.getInt(1);
int heart_rate = cur.getInt(2);

heartrates += utc_time+","+heart_rate+",";
}
cur.close();
} catch (SecurityException e) {
//Getting data error
Log.w("hugo1",e.getMessage());
}

After your last URI query tips I found the data I was looking for!

But first I was trying to put your code working before quering the URI I need but I always get this:
[Amazfit] cjom:
I don't know why that happens.

I use minimal setup, with no widgets.

I attach the only files I replaced, in case anyone care to edit.
[Amazfit] GreatApo:
Are you sure there are saved data? (do you see the data when you run it on ADB?)

The code I linked to amazmod is the one I wrote and currently gets the manual heart-rate data from phone (works).

I had a look in your file. You replaced the integer file that has the positions. The problem may be related to the (de)compiling and how these numbers are assumed as pixels etc.

If anyone want's to fix it, I would suggest replacing the files in the sources and compile them with Android Studio. That been said, cjom thank again for the mod fix, this is a minor bug.
[Amazfit] cjom:
Today I could spend some time to test and my notifications seems to be as intended. I changed languages, changed widgets, and my notifications were always under day of week. :(

I don't know what happened with [MENTION=5687058]ahsim[/MENTION] but I pulled the apk from my watch and reuploaded, in case I had messed up with previous apk.
[Amazfit] eldiegogm:
Ayuda por favor, no funciona el widget de Xdrip de Klaus3d3, hay que configurar algo?

Es para controlar la glucosa de un niño, sería de mucha ayuda.
[Amazfit] GreatApo:
Yes, I am aware of that, it has some problems. Thanks for bringing this up and reminding it to me. I will try to find a work around for using the official Xdrip and send the data through Amazmod. Be a little patient, I will prioritize it.
[Amazfit] atreyunext:
Hola!!!!

Como puedes ver yo ya en Diciembre 2018 y en Febrero de 2019 pregunte por ello!!!!!!!!

No hay ninguna noticia al respecto por lo que se ve!!!! Lo peor casi es que lo pone en las caracteristicas de Great Fit en el inicio, y despues no funciona!!!!

Ademas reseñar que el trabajo hecho por KLAUS3d3 ya esta integrado en el XDRIP oficial y por tanto no es necesario llevar el xdrip mofdificado por el!!! Si es necesario llevar su esfera, asi que por ahora nos olvidamos de usar la de greatfit!!!:(

Hello!!!!

As you can see I already in December 2018 and in February 2019 ask for it !!!!!!!!

There is no news about it for what it looks !!!!

In addition, the work done by KLAUS3d3 is already integrated into the official XDRIP and therefore it is not necessary to carry out the XDRIP by him !!! If it is necessary to carry out its sphere, so for now we forget to use the one of greatfit !!!

I hope new notices by GreatApo
[Amazfit] eldiegogm:
Si gracias, el problema es que la esfera de KLAUS3d3 solo funciona en el pace y el stratos pero en el verge que es el que tengo yo se ve mal y confiaba que con la Greatfit que se ve estupendamente lo solucionaría. Esperaremos muchas gracias.
[Amazfit] GreatApo:
New version v4.0 out. It has the white background/bold fonts that I have promised a while back.

Version 4.0 (13/07/2019)
Improvements:
• Different fond weights selection added in settings: Thin (default), Regular, Bold
• White background option added in "other settings", this will also turn icons/text to black (except from the main colored elements like hour)
• Description added in settings to the "Notification" widget
[Amazfit] xdauser2019:
:good: Thanks for keeping this watch face alive, even with new options :highfive::good:
[Amazfit] Goncav92:
Hi there! Great watchface, excellent app! Everything at a glance! Thanks for that. I'm having an issue: for some time now the app 'frezees' when the watch enter that 'low light mode' and then nothing can wake it up. Nor lift the wrist neither double tap the screen. The only solution is to reboot, so, unfortunately, I had to quit using Greatfit. Am I missing something? Any ideas to solve this issue? I really would like to make Greatfit my default watchface. Thank you for the help. I'm new here, if I'm posting at the wrong place I apologize in advance and await for directions. Best regards!
[Amazfit] GreatApo:
I don't really know where the problem is, what you can try is:

- uninstall GreatFit, run this adb command: "adb shell pm clear com.dinodevs.greatfitwatchface", and then re-install

- reset the whole watch but do not restore the data after connect, install GreatFit
[Amazfit] xdauser2019:
If you using Verge, after update to 3.2.3.0 with stock pre-installed watch faces happening the same for me too. For strange reason stuck wrist up mode and need to reboot watch. Probably that is issues/bugs of new software which was released from Amazfit/Huami :)

---------- Post added at 12:11 AM ---------- Previous post was at 12:08 AM ----------

I'm sure this is not related with yours watch face, for a while i using pre-installed watch faces: rings, spiked and ect., which is created by Huami/Amazfit/Territory Studio, after update with various watch faces which are from these companies stuck too, so i'm sure yours watch face is not reason here :)
[Amazfit] GreatApo:
The whole system is quite unstable and there is really no way to track such problems. Factoring resetting without restoring data many time helps to restore system's stability/battery consumption etc.

Excluding the libraries, GreatFit's code is very stable and efficient indeed.
[Amazfit] Sadegh:
Dear GreatApo

how can I change one of the widgets.

For example change widget 5, so that it shows the number gotten from an app installed on the watch?

Thanks
[Amazfit] GreatApo:
You need to code a new widget and them apply it on any widget position you want. As a start you can change the code of a widget you do not use. If you want the data from the other app to be updated frequently, I suggest you change the "world time" widget in the GreatWidget.java because it is coded to be updated. To transfer the data from the app, you can write them as a system variable and then read it from there.

You can find some links for examples in the fist post, go through them before starting even if they are not exactly what you want to do (you will get some info about the watchface structure).

Let me know if you need help when you get it going.
[Amazfit] no2:
Altitude in widget 1 and air pressure in widget 2. Altitude does not work ("--M"). The only working version is 3.8

Best regards
[Amazfit] Goncav92:
Yeah, I'm using Verge. Ok, so I'll wait for now. Thank you! :D
[Amazfit] xdauser2019:
As i mentioned i'm sure it's not related with yours watch face. I was happy then after one update was very fast fixed wrist up problem with next update in begging of my meet with this company and Verge watch. But now looks like they stuck and often problems is not fixed at all. I trying to report about all prolems which i found, but need to wait very long time sometime to get solution or update with fixed problem. In chat working just one agent in US market, in Europe support at all don't reacting or reacting very very slow to yours problems. Some banking companies these days in my region presented theirs new service payment with smart watch, Amazfit until now can't say will be voice assistant in all rest world like Europe, part of Asia and ect. If say honest everybody now what is China's product, but i thought Amazfit will be different, much more better quality, for example like Huawei. But looks like they can't fast solve some problems which is now. If something they fixing, inevitably will be new. The same was with other Asia big company. I don't want to criticize Amazfit, i like this company, but often come out in my mind "hey man, this is China company, why you are so exacting to it", but you know when company writing that they are leader in wearable devices, you starting to think that they are good, but some situation showing that "leader" in China probably means something else :)

With this story i wanted to say what no need to expect stability, tracks of problems and ect., then whole country in whole world is know as cheap products and work country. So after one update i very very much waiting for next, because that more as 60% will be something wrong, will be left mistakes and ect. I like Verge as watch, but operating systems need to care much more careful before they releasing it :) App Amazfit Watch is not exception. So be quiet, yours watch face is perfect or close to it, this is probably again is Amazfit/Huami developers left bugs. By the way mine Verge rebooting automatic without my intervention sometime and stuck wrist up mode which was mentioned too and it doesn't matter which watch face i using :) I hope you will support GreatFit further and i wish you good luck, your work is great and if say honest i hope you will do it much more powerful as is now (differnet icons, much more options and ect., you know perfect havn't limits) :)

---------- Post added at 08:00 PM ---------- Previous post was at 07:41 PM ----------

Hey, welcome. In any time ready to help if i can :) By the way mines rebooting itself automatic without my intervention, i starting to think that stuck wrist up and rebooting can be related. Already reported Amazfit, waiting for fix and update, i hope will be solved these problems as fast as they can withou any new bugs :)
[Amazfit] willib82:
NICE Work!

Is there a setting that I can see the disconnect state also on the energy saving mode of the watch? I enabled status bar but I have to wake the watch to see if it is disconnected.
[Amazfit] Sadegh:
Thanks for your answer, but it seems harder than I thought :)

I want to ask more details but dont know how to start :)
[Amazfit] GreatApo:
There isn't, however, I intend to add wifi/connection/bluetooth state icons (it can be done).

Yeah, it is not that straight forward. It is not that hard, however, you will need to spend time on it :/ .
[Amazfit] uoY_redruM:
Not sure this is related to the WF or not but figured I'd ask because I've exhausted every other idea. My watch stopped getting notification yesterday. If I do test notification through AmazMod or the Amazfit app, they all work fine. I tried uninstalling the app. I tried rebooting the watch. I updated the watch firmware. I tried disabling and enabling the permissions. It literally out of the blue just stopped working. Calls, texts, nothing is coming through. Both apps show they're connected to the watch, it syncs fine, every form of pushed text notification test works.....but nothing works. Any clue?
[Amazfit] Damoedge:
Did you update the Amazfit app recently?
[Amazfit] darkvoid_66:
I have customized everything and made a new watchface. I was able to change the preview changing the watchface on the watch itself.

But I can't seem to find the place to change the watchface preview in phone Amazfit App (watch face store).

Can you tell me how to change this?
[Amazfit] GreatApo:
Just change the preview image in the res folder. Mind that the image is cached so you need to clear launcher's data (the same is probable your problem with Amazfit app).
[Amazfit] darkvoid_66:
I have changed all images, including the preview.

My problem was the Amazfit app cache.

Thanks
[Amazfit] uvys:
This watchface is amazing. Thank you. One bug I found is that when background is set to white I don't see moonphase icon when watch is in power saving mode (low res mode). The problem doesn't show up when black background is set.
[Amazfit] GreatApo:
Thanks for the feedback, I will change the icons :)
[Amazfit] almacarbon:
Will it work on latest paceficator rom? v.2.6.60
[Amazfit] GreatApo:
Probably yes, feel free to let us know :)
[Amazfit] almacarbon:
So far, working fine!
[Amazfit] cyanides13:
Awesome watchface

This the best watch face I've used so far, It can give me my location, notification count, step count, and weather all of the same time, I've yet to find another watchface that can do all of this. A few wishlist for the next version.

- More available background colors (White & Black only), it would be nice to have a red backgroud or a gray background option because the backlight bleed on black background kinda makes the watch look cheap.

- More analog watch hands style options, the stock ones are kinda thicc.
[Amazfit] GreatApo:
More background color options may be possible, however, mind the 8 color limitation of the screen off mode (grey can't be used, unless I make a chess grid background which will seem grey if you don't look too close). Analog hands are not perfect, I agree :P
[Amazfit] zam82:
[MENTION=3668555]GreatApo[/MENTION] if i install this will it read the notification count from amazmod notifications? thanks and sorry for all the bothering tonight
[Amazfit] GreatApo:
Yes it should.

No problem.
[Amazfit] Sanyi009:
Wrist up screen resolution

Why small screen resolution if wrist up and screnn is "lock"? Sorry my english ?
[Amazfit] GreatApo:
Because you still can't interact with the watch at this state. The watch is still locked but the back-light is on (and the screen changes to 26 colors mode).
[Amazfit] chidav77:
Hi master.

I'm studying your code and is really a good work.

I have a question if you can help me...

How can I have a list of content available?

I mean.... this is for daily steps

//ADB test, not sure if this is the saved location (I don't remember and can't test it right now)
adb shell content query --uri content://com.huami.watch.health/daily_motion

but where I can find other contents?

many thanks
[Amazfit] chidav77:
Thank you very much.

Another little question...

How to debug?

I see that you said to use logcat. Forgive me but... Where i can find the log on the watch?

Thanks
[Amazfit] GreatApo:
Have your watch connected to the PC, and either run the log command in terminal "adb logcat" or at the bottom left of your Android Studio click the "Logcat" tab. That is your phone's live log feed. You can set some parameters to show only your app's log but some errors may be thrown by system. However you still need to install the apk to the watch to debug it (emulator wont work). Moreover, mind that screen on and screen off are 2 different services, the code is mixed in the same classes but they run separately. To test the slpt without destroying your charger use this command to let the watch turn to slpt mode (screen off) while charging:

// Enable lockscreen while charging
adb shell setprop prop.sys.show_chargingui false
adb shell svc power stayon false
// Disable lockscreen while charging
adb shell setprop prop.sys.show_chargingui true
adb shell svc power stayon true

Mind that many times when an error occurs, the SLPT service just crashes with no error reporting :P

Finally, to separate the code in your head, in each widget.java, only the "buildSlptViewComponent" function runs in SLPT mode and only once (when the watch is applied). The rest of the code runs when screen is on, the "draw" function runs continuously and the "onDataUpdate" handles the new/updated data (only for screen on UI). Screen off elements are automatic updated, read the code and you will figure out how it works.
[Amazfit] chidav77:
Thank you. Very clear explanation

Another question. I'm not able to understand how you draw the circle bar.

I would like to create a watchface without it.

Could you please tell me where I can find the code that draw the circle bar?

thanks
[Amazfit] GreatApo:
Imagine the bar been many bars but only one is enabled based on your settings. Thus, each bar type can be found in each widget.java. For example, if you search the BatteryWidget.java for "// Battery bar" you will see the 2 points (screen on and screen off) where the bar is drawn. These are the points where is the code...

However, you don't need to change the code at all. Just change the arrays.xml and comment the "item" at line 165 (I am not sure if it will work with no elements but you could test it and see if the code crash :P ). Generally, you can change most of the watchface from this file.
[Amazfit] mrducluan:
so what about APK for smartwatch 2 ( nexo, verge 2)?
[Amazfit] GreatApo:
I may get my hands on a Nexo once the global version is released. For now even the CN version is very unstable. However, keep in mind that Nexo doesn't work similarly to Pace/Stratos/Verge.
[Amazfit] chidav77:
Thanks greatApo...

I have another question... but is related more to Android than to your watchface...

I see the following code in loadsettings class

@StyleableRes int i = 0;
// Hours
this.hoursBool = sharedPreferences.getBoolean("hoursBool", true);
if(this.hoursBool) {
TypedArray hours = res.obtainTypedArray(R.array.hours);

this.hoursFontSize = scale*sharedPreferences.getFloat("hoursFontSize", hours.getDimension(i++, 0));
this.hoursLeft = scale*sharedPreferences.getFloat("hoursLeft", hours.getDimension(i++, 0));
this.hoursTop = scale*sharedPreferences.getFloat("hoursTop", hours.getDimension(i++, 0));
if(this.color>-1 && theme_elements.indexOf("hours")>-1){
this.hoursColor = Color.parseColor(color_codes[this.color]);
i++;
}else{
this.hoursColor = sharedPreferences.getInt("hour_color", hours.getColor(i++, 0));
}

this.hoursAlignLeft = sharedPreferences.getBoolean("hoursAlignLeft", hours.getBoolean(i, true));
hours.recycle();
}

I am really stucked on the StyleableResdirective... I don't understand how it works...

Could you please help me? or tell me where I can find some explanation?

Sorry to bother you... I'm a frontend angular developer... pretty new to android ;)

thanks
[Amazfit] GreatApo:
Feel free to ask anything, I am not bothered. I also link my answers in the first post for other developers to find them, so its good for the project...

If I am not mistaken, "@StyleableRes" just indicates that the integer parameter points to a resource. Here is the relevant documentation. In this case, it is used to loop through the elements of a resource array (when i++ is used it is auto-incremented).

The style of the watchface is intended to be easily change from the arrays.xml (and the other value xmls). I thought this would make it easier for others to make their own watchfaces but in the end not many people did so. Most people that get interested get deeper in the code (like you). When I wrote that code, I thought I could include many different xml files and I could include multiple watchface styles this way. However those value xml files are not intended to be used that way. A more efficient way, if I ever change it, would be by including of sideloading all the parameter from json files, or xml base files (like the official *.wfz).

So to sum up, it is a crappy code, it works but I don't like it. Don't take it as an example :P
[Amazfit] chidav77:
Thanks again, i dont judge the code of other developer, even if is crappy I can only learn from you.

I asked you for the code because I want to make the hour color independant from the main color.

So i removed the hours from the array of theme elements and get an exception of index out of bounds.

Once i got some time i will find a way to manage it ?

Thanks again
[Amazfit] GreatApo:
I just tried to replicate the problem but it worked for me (i have the green theme, hours appeared red). The code seems fine too. Are you sure you haven't accidentally remove any item from the hours? These items should exist:

<array name="hours">
<item name="font_size">190px</item> <!-- font size -->
<item name="left">108px</item> <!-- position left -->
<item name="top">226px</item> <!-- position top -->
<item name="color">#ff0000</item> <!-- color -->
<item name="align_left">false</item> <!-- align left -->
</array>
[Amazfit] chidav77:
My goal is to let the user choose the color.

I already created the settings menu.

I think that my issue is here...

if(this.color>-1 && theme_elements.indexOf("hours")>-1){
this.hoursColor = Color.parseColor(color_codes[this.color]);
i++;
}else{
this.hoursColor = sharedPreferences.getInt("hour_color", hours.getColor(i++, 0));
}

Please note that the else path is my code probably wrong.

If I remove the hour from theme list to force the flow to go in the else path, i get the index out of bound.

But I think that is my mistake, I m really new to android ?
[Amazfit] GreatApo:
Your problem is that i++ in your else line. You either removed the "color" (and "align"?) items of the hours in the arrays.xml or you have increase the "i" beyond the length of the hours array before your posted code. In the else path you get the parameter "hour_color" that I assume you change in settings, but the second parameter of the sharedPreferences is the default value (in your code the "hours.getColor(i++, 0)"). This is probably where the error comes from. So, make sure in the arrays.xml you have the structure I mentioned in the previous reply. These would be your default values.