yashsingh1/xdaforums huggingface dataset:
[Amazfit] GreatApo:
I think this is the part where the error is... I fixed that part in Pace/Stratos by skipping some if statements in the com\huami\watch\watchface\AbstractSlptClock.class enableSlptClock() through smali editing...

private int enableSlptClock()
{
if (Util.getSportfaceValue() == 1) {}
int i;
SlptClock localSlptClock;
for (;;)
{
return 0;
if (Util.checkWatchFaceLocked(this.mContext))
{
Log.i(this.uuid, "slpt watchface locked");
}
else if (!Util.checkWatchFace(this.mContext))
{
Log.i(this.uuid, "check need watchface false");
}
else
{
i = Util.getSlptRuningMode();
Log.i(this.uuid, "slpt status check slptRunMode=" + i);
if (!this.mSlptClockClient.lockService())
{
Log.i(this.uuid, "lock service error!");
}
else
{
setClockPeriodSecond(false);
initWatchFaceConfig();
this.mSlptClockClient.clearAllClock();

If i remember correctly the problem was with these 2 checks:

- Util.checkWatchFaceLocked(this.mContext)

- !Util.checkWatchFace(this.mContext)

I may have a try editing them tomorrow...
[Amazfit] fgrassmann:
Thanks for your help! As I honestly did not know how to do that, I just replaced "my" com\huami\watch\watchface\AbstractSlptClock.class with the one from your jar, and it works!

Are you interested in the resulting WF3.jar?

Keep up the great work!
[Amazfit] GreatApo:
oh that works lol

Yeah, jar would be nice.
[Amazfit] fgrassmann:
Sometimes it can be that easy... *lol*

Is there a way to send attachments via this forum (as pm)? Otherwise: How should I send this to you? Care to send a pm with an email address? Or am I missing something?

Another question: I understand that I could add more than just the one font. But how do I configure which font is used for which item/widget?
[Amazfit] GreatApo:
Fonts are registered in this file:

app/src/main/java/com/dinodevs/greatfitwatchface/resource/ResourceManager.java

You have to change this line:

FONT_FILE("fonts/font.otf")/*, ANOTHER_FONT("fonts/myFont.otf")*/; // More fonts can go here

As you can see, I have already pointed out as comment how you can add more fonts. If you un-comment it (delete /* and */) then you will have a second font named ANOTHER_FONT and the font file is at app/src/main/assets/fonts/myFont.otf (the location it relative to the assets folder).

- Then for screen on, in the init() function of each widget you set each element's font like this:

this.ampmPaint.setTypeface(ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.FONT_FILE));

- For screen off, in the buildSlptViewComponent() function of each widget you set each element's font like this:

ampm.setTextAttrForAll(
settings.am_pmFontSize,
settings.am_pmColor,
ResourceManager.getTypeFace(service.getResources(), ResourceManager.Font.FONT_FILE)
);

In the above code parts, changing the FONT_FILE to ANOTHER_FONT will point to the second font. Οf course you can name them however you like and add as many fonts as you want.

These are all nice, but there is a big problem between screen on and off, read here.

* widgets are located in folder: app/src/main/java/com/dinodevs/greatfitwatchface/widget
[Amazfit] fgrassmann:
Thank you for the explanation - I saw the line in the ResourceManager, but didn't know how to further use this. It - of course :) - works as you described, and all seems to be fine until now.

How should I send the jar file to you? Even GitHub does not seem to provide a way to contact you. ;)

Yours,

fgrassmann
[Amazfit] GreatApo:
I was suppose to PM you and I forgot :D
[Amazfit] fgrassmann:
I think eventually you will remember.... ;)
[Amazfit] GreatApo:
Email me at greatapo(at)gmail.com
[Amazfit] sebastjanp:
Can someone shed some light on the two versions available in the releases page of GitHub?

There are two and I don't know which to install onto my Stratos?!? What is the difference between them?

GreatFit.3.8-Lattest-Stratos.apk or GreatFit.3.8-Pace-Stratos.apk

Please help
[Amazfit] GreatApo:
- GreatFit.3.8-Lattest-Stratos.apk is for Stratos with OS version 2.3.8.0

- GreatFit.3.8-Pace-Stratos.apk is for Stratos with OS version LESS than 2.3.8.0 and Pace with OS version 2.*.*.*
[Amazfit] cramer52:
Which Version is in the source code. I usually change some stuff like font, colour and background. In version 3.8 I get after changing these things an error on my Pace that the wear.apk stopped and the sleep screen isn't working as well. Not really a problem because there is nothing new in comparision to version 3.7 but I just wondered what the issue could be. Nevertheless Greatfit is in my opinion the best watchface keep it up.
[Amazfit] GreatApo:
it's huami's libraries. The Frankenstein version is for Stratos 2.3.8.0 (because I have to combine the previous libraries with the new) an the previous libraries are in a folder called "other" in the project. You can use the min version (I have just removed some useless stuff).
[Amazfit] cramer52:
That did the trick. I already thougth that it was about the stratos fix but I couldn't figure it out. Thank you so much.
[Amazfit] MagicMan3311:
Got the update 2.6.5.0 on the pace and the Watchface is going black oder to another watchface when going to sleep.

Is there any fix?

Tried to change some settings and save again. no luck...
[Amazfit] GreatApo:
it probably the new update and they changed the library there too.

Try the latest stratos.apk version! Let me know it it works!
[Amazfit] MagicMan3311:
It doesnt install. "INSTALL_FAILED_DEXOPT"

edit: wait.. even the pace version doesnt install.. i uninstalled before...
[Amazfit] GreatApo:
Yeah uninstall and try again
[Amazfit] MagicMan3311:
i uninstalled before. but now it even doesnt install the pace-version...
[Amazfit] GreatApo:
Sounds like you didn't uninstall through adb, try uninstalling with ADB
[Amazfit] MagicMan3311:
in uninstalled with adb with the commands in the first post.

the "pm clear ..."-thing ends in a "failed"

"pm list packages" says that it isnt installed anymore
[Amazfit] GreatApo:
reboot, try again the adb uninstall com.dinodevs.greatfitwatchface

The whole situation sound weird :/
[Amazfit] MagicMan3311:
yeah reboot fixed it. but i havent tried uninstalling first, as it wasnt installed. so in adb installed GreatFit.apk and then "success"

sry for that confusion.

Statos-Version (withstandby-screen) works on Firmware 2.6.5.0
[Amazfit] Santi_SAZ:
[MENTION=3668555]GreatApo[/MENTION] I love your watchface looks so cool and runs great but I found month's day and week's name one is over the other, and in widget 4, if choose heart rate the heart is over the BPM.

Thanks for your efforts to bring us this watchface
[Amazfit] GreatApo:
Days do not fit full, I have the option there so other developers can use it and make their own watchface.

The same thing goes for the bottom widget, that position has a center align, hence, change the heart rate to the widget where you have phone's battery, and vice versa.
[Amazfit] rjafonso:
Hello. This is the most complete watchface I have found until now. To me the second time zone is very usefull.

I noticed in the last update that second time zone is not working, and in the previous version it did not updated.

I also would like to know if is possible to increase the size of the second time zone, OR even better, to create a watchface were the second time zone is shown permantly.

Regards
[Amazfit] GreatApo:
I need to re-code this because it's a little unstable. To increase the font you will have to manually change that from the code (unfortunately I can't make style changes for everyone, we will end up with a frankeistain watchface :P). What do you mean by "shown permanently"? It is suppose to show up in screen off...
[Amazfit] rjafonso:
Hello,

By showing permantly I mean a new dedicated watch face for "Dual Time".

To have a "main" time sync with phone, and also a second time zone but clear and easy readable.

Something like thses examples:

apps.garmin.com/en-US/apps/230667a0-e5a6-49bc-aefd-856806870d7a

www dot getwatchmaker.com/watch/srJPC7LWif

www dot getwatchmaker.com/watch/sBkZRbIxMb

apps.garmin.com/en-US/apps/9abeafd5-f46f-4363-998a-6f2535784f5a

Regards
[Amazfit] GreatApo:
Oh, I got the idea
[Amazfit] rjafonso:
It would be great. All around the worl aviation staff uses a second time zone.
[Amazfit] fgrassmann:
I have to come back to this one: I used baksmali to decode the dex file, but the result does not look anything like your code, so I cannot adopt and try your changes. Could you roughly outline how to edit the AbstractSlptClock.class?

Thanks for your help!
[Amazfit] GreatApo:
Why don't you use my libs directly?

What I do every time I need to fix the libraries is:

- Find where the error is (from phone's logcat)

- Transform dex to jar

- Use a Java decompiler to read the code and find the part that needs to be changed

- Decode dex to smali

- Edit the smali code

You can find all the appropriate programs at the bottom of the first post.

However, this is not an easy task to do.

In terms of sharing knowledge, smali editing can be very easy to very hard, but if you edit it smart it is easy. So here are some general things about smali.

To start with, you don't read smali. It's a waste of time. You read the decompiled version and then you find the part you want to change in smali. Ctrl+f searching for hard coded strings or function names helps a lot.

From what I understand reading it, when you see "constant" or "local", variables are declared. Their names are v1, v2 etc... Like this:

const-string v1, "-"

On the other hand, other commands are passing variables as parameters. For example, here is where "-" is added at the end of a string:

(Image 1)

And when you see "move-result-object vX" the result of the command before this one, is assigned to variable vX (ex v1)

Btw, deleting ".line XXX" commands doesn't seem to affect the code :P

If I remember correctly, integer values are in hex.

In smali, different files of a class can be the functions of that class. Hence, you can copy paste a file, rename it, tweak a little the basic class file and you have a new function that does the same with the first. Once I coded a function, compiled my apk and extracted the my smali code and copy it in an modified smali code :P

I hoped I helped a little.
[Amazfit] fgrassmann:
Yes, it did - thank you.

I do not use you jar directly, as this does not work with the Verge correctly. And although I use your AbstractClassSlpt, there are a lot of crashes on my watch, so I wanted to rule out that this class is the reason. But I cannot find the checks you mentioned before, neither in my HW3.jar nor in your Frankenstein jar...

Maybe I should wait until the Verge is officially supported by GreatFit... [emoji6]

Gesendet von meinem ONEPLUS A3003 mit Tapatalk
[Amazfit] GreatApo:
Oh, there are verge libraries ready! I think I haven't uploaded them yet. I will reply you again later ;)
[Amazfit] GreatApo:
Not ready yet, I hope i will have the time to work on this this month.
[Amazfit] otaviobravim:
Hello!

MAN, thanks a lot for this watchface, it is awesome dev!!

I am using the Amazmod service 1843 and, after the last update 2.6.5.0 the Greatfit watchface stopped working (I mean, it works pretty well, but the lock screen gets black and that's it... tried the solutions I found at pag 1 [still reading the rest])

I made the installation through Tools All in One, and installed and uninstalled again through the same software. I tried to use ADB to uninstall, but it failed, couldn't understand why...

So, I tried to clean cache and dalvik cache to see if i get this working and it didn't... My question is. Does it only work is I factory reset the watch. ALSO, can I factory reset through TWRP?? I've heard through TWRP is dangerous, Will someone clarify that for me? Is there another way?
[Amazfit] GreatApo:
Like Stratos, Pace was also updated to the new huami libraries, hence, install the "latest stratos" version and it will not crash.
[Amazfit] otaviobravim:
That, sir, worked like a charm. Thank you so much for your time.

Also, if I may ask, the TWRP question. Is I ever need, can i rely on TWRP to perform a factory reset?
[Amazfit] GreatApo:
it's not like we have many ROMs that mesh your system, there is not even point on having root. So you can keep twrp but you can easily just reset from settings and then flash a new ROM...
[Amazfit] fgrassmann:
I do not know the reason, but GreatFit seems to start draining the battery after some time (half a day or so), and eventually crashes so that the watch reboots. Is there a way to track down what is going wrong? The logcat seems to be cleared at reboot...
[Amazfit] GreatApo:
If it reboots no :/

What widgets in Greatfit are you using?
[Amazfit] fgrassmann:
Steps, calories, heart rate, weather icon, humidity, city, battery and watch alarm. And two progress bars (battery/steps).
[Amazfit] Damoedge:
That's 10 altogether...a lot!

Try just using 4/5 of them and I bet it will work better ?

?
[Amazfit] GreatApo:
Your Watchface manually resets 2 times

- for weather data: weather icon, humidity, city

- for phone battery/alarm

Those may consume some battery, however, it's not so much. I do not know if the libraries for verge are 100% functional. Even if the final version you send me if working, that doesn't mean it will not have problems.

You could test disabling each one widget (consider weather data as 1 and battery/alarm as 1 too) and test if one of all causes a crash.
[Amazfit] bigtom5000:
Hello

I've noticed battery drain on my Stratos. After about 1-2 days. During that time I checked some configurations but always returned to the very first one: steps/calories/weather/watch battery + battery bar. No crash/rebooting though. Any ideas? Thank you.

Wysłane z mojego MIX 2S przy użyciu Tapatalka
[Amazfit] GreatApo:
Like I said above, weather data (the official and the widgets I coded) along with phone data (battery/alarm) manually restart SLPT screen. The other data are coded correcty from ingenic (they do not restart the screen, they just change a part of it).

However, I don't think this makes a lot of difference. I would propose to change the amazmod data forward interval to more minutes and clean you ram (from amazmod widget settings/shortcuts)

If problems persist, reset the watch. There is also a good guide about battery at the Global Amazfit group page in Facebook.
[Amazfit] PatriceLoco:
Hello, first congratulate you for the great job.

I would like to retouch the application and for that I have downloaded the source, I have opened it with the Android Studio but when trying to generate the apk it gives me a lot of errors. Should we install something else? some library or something?

A greeting.

[IMG="errors"]https://i.ibb.co/2hvqtDZ/errores.png[/IMG]
[Amazfit] GreatApo:
Not really. Usually it works out of the box, however, do not upgrade the gradle because that causes crashes some times (if you did, I think you have to delete your android studio cache folder).

Additionally, publish also causes problems many times on APKs for Amazfit because of the "minify" option. So better stick to debug version compiling.

From the image there are a lot of warnings for missing libs, make sure that the library from the lib problem if loading
[Amazfit] PatriceLoco:
I deleted the project and I have copied it again, this time I have not updated the gradle.

When I create an app (other app) with the Android Studio I first run it from here to debug errors, when it seems to be going well I generate a signed-apk to be installed on any mobile.

In this case it does not let me run the app, it tells me that it has not found default activity. I tried to generate a debug-apk but when I try to install it it tells me that it can not. I tried to generate a signed-apk but it gives me the same error as before, skipping a lot of warnings.

Any clue how to generate the signed-apk?

A greeting.
[Amazfit] GreatApo:
The problem is that you install it on your mobile :P, install it on your watch! The code is been run from springboard launcher, it doesn't have an activity, it's not a normal app.
[Amazfit] GreatApo:
Uninstall using ADB first (not any other program)
[Amazfit] wsabg:
I haven't even installed it yet, so no chance to uninstall?
[Amazfit] GreatApo:
This error message indicates that a version is already installed. Probably you uninstalled a previous version of this watchface in the past using Amazfit Tools or an other program that doesn't completely uninstalls the app. Please run the uninstall command again and then install.
[Amazfit] wsabg:
Thanks for your help, but I am out here now. I have no clue what to do (have installed just a couple of watchfaces with "apkinstaller") and never any version of this GreatFit-wf.

Haven't ever used the adb-command itself (old and grumpy man ;) ) and have no idea how to uninstall something I haven't installed.

Thanks anyways!
[Amazfit] GreatApo:
GreatFit sources are the base for many APK watchfaces . Maybe somebody forgot to change the package name ? in the apps you have installed. You haven't done something wrong.

Anyway, it is not so had to run the uninstall command. Just download ADB from here: (SDK tools)

https://developer.android.com/studio/releases/platform-tools#download

You will download some files. One of them is adb.exe, shift-right click (press shift and right click the folder, not any file) and select Run command prompt or power shell. A blue or black command window will pop up. Connect your phone to your pc. Write:

adb.exe uninstall com.dinodevs.greatfitwatchface

and hit [enter]. If the window is blue (powershell) add a "\" infront of the command :)

I hope I helped you. It would be like old times playing in DOS :fingers-crossed:
[Amazfit] Koboldchen:
Nice watchface, thank you!

I've noticed one thing: When displaying the time in 24-hour format, a.m. or p.m. is not necessary.
[Amazfit] GreatApo:
I intend to add options to enable/disable fixed elements (hours, minutes, am_pm), so that could be turned off :)
[Amazfit] GreatApo:
Damn, indeed they are...

Ok, as much I like maths and equations, I am a little bored reading articles on fishes ?

So, I could need some help. If you find any paper connecting the fish activity with any parameters I could be able to work on that :) (maybe on a nice widget).

The parameters we have and may be related are:

- Air pressure

- Weather

- Temperature

- UV rays status

- Time ofcourse
[Amazfit] wsabg:
Ol' man happy :) - thanks mate!

I had to use

.\\adb.exe uninstall com.dinodevs.greatfitwatchface

* daemon not running; starting now at tcp:5037

* daemon started successfully

Success​

Right now I have "weather icon" as 4th widget - that seems to be that little thingie on the bottom?

And is there any chance to get a less compressed font - it's very hard for me to read the wigdet-texts?

Other then that: Great work and fine service!
[Amazfit] GreatApo:
You are right the widgets are a little small. However I am not going to change them. This is more like a base sources for other developers. I tried to fit many things in our small screen in order to show them off, and that is not so practical.

Yes the 4th widget is at the bottom center. The weather icons are a little small too (are those already used by huami). Did you installed version 3.1? Because I turned them white today and released a new version...
[Amazfit] vd69:
Take a look at this depenting from barometric pressure and wheather

http://www.anglerwise.com/2010/02/09/how-does-barometric-pressure-affect-fishing/
[Amazfit] GreatApo:
There are not enough info but I may search it more.

Version 3.2 is out with some fixes...

Version 3.2 (28/08/2018)
• Dive depth scale fix
• Fixed huami's libraries crashes related to activities
[Amazfit] vd69:
Then I didn't really understood what you meant, when you said paper.

am not a programmer so please bear with me .

Ιs it possible for us older people with presvyopia to have bigger widget letters.

Thanks Μπραβο σου .
[Amazfit] GreatApo:
With the "paper" I means a publication in a scientific journal. The link you sent me was quite right, the problem is that it doesn't cover all the variety of weather respectively with the air pressure. Thus I will have to make assumptions and since I am completely stranger with fishing, those assumptions may be wrong. But this is something that I can start from maybe.

Many users have pointed out that the fond is too small. The truth is that indeed the font is small in this specific watchface style. However, I am not going to increase it or add an option (that is a little difficult) since this project's goal is to provide the APK sources for other developers/stylers. Other developers already make more clear watchfaces :)
[Amazfit] GreatApo:
New update:

Version 3.3 (30/08/2018)

• Russian translation: Better 3 letters days format

• "None" widget option now appears even if it is selected in other widget position

• Calories bar in slpt fixed

• Heart rate bar added

• Heart rate flashing icon added
[Amazfit] djalex29:
Hello! In my opinion this is the best WATCHFACE! Thanks for the work you've done. One thing, on my Stratos watch (StratOS 3.1 firmware) can not be selected. He's not on the list. You have to choose through the application on your phone amazfit. Tell me how can I fix this?
[Amazfit] GreatApo:
Because it is :P

The most common problem is having installed an other apk watchface which sources are based on GreatFit but some classes are not changed and the watchfaces conflict. Do you have any watchface from Marek Zima for example? Try uninstalling it first then reboot.
[Amazfit] GreatApo:
New Version 3.4 (01/09/2018)

• Phone's battery progress bar added

• New widget world time added (a second time where you can set the time difference)

• Weather image widget improvements: temperature is shown as its text

• Status bar and its settings now work

• AM/PM always show option

• New Widget 5 position added (left-center, by default it's empty)

• "None" even if selected on an other bar fix

• Xdrip widget font size fix

• Today/Total distance widgets units when screen is on fix

• Total distance widget now works (was not initialized)
[Amazfit] vd69:
Bravo once again everything works very nice. The best and most complete watchface by far. Thank you.
[Amazfit] PatriceLoco:
Thank you very much, I have put in "Launch options" nothing and now if it has run on the watch.
[Amazfit] urinamess:
need help with the latest version here. with version 1.1 it works fine on my watch. but when trying to install version 3.8, it says update incompatible & it won't install. so up until now im using version 1.1. i really love the update on this watchface. please tell me what to do? tia
[Amazfit] mardeck:
Hi,

Have you read the first page?

There is an description: if you get an error, please uninstall and install it again.
[Amazfit] PatriceLoco:
Hello, I already managed to run the watchface from the android studio, I'm retouching the code a bit to leave it to my liking. I have found what I think is a bug, when you select "notifications" the watchface gives an error stopping. I think the problem is here:

I added to isCustom "phone_alarm" and "notifications" and it works.
[Amazfit] panais86:
Battery drain after 2 days

Hello,

I want to ask if this persits to all users with this watch face so we can identify the problem. Is it possible that this problem comes from the widgets?
[Amazfit] GreatApo:
From what we know up untill now, no. If widgets where the problem, all users would have them.

Amazfit is very unstable sometimes, why don't know exactly why but it seems to be related to ADB use. Don't get me wrong, it's not bad to install apps but the watch is unstable.

So, if you have battery drain you can try:

- Clean memory (Amazmod)

- Factory reset and reinstall your apps. Problems will be solved.

Does widgets in general consume battery? Yeah they do but it's not that much noticeable.