1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-22 16:23:09 +02:00

1985 Commits

Author SHA1 Message Date
oliexdev
7a0dcff820 update openScale to version 2.4.4 2021-11-15 10:29:17 +01:00
oliexdev
be98e37018 check for Bluetooth connect and scan permissions for connecting >= Android 12 2021-11-15 10:24:46 +01:00
oliexdev
9947c5b955 added mutable flags for Android 12, see #791 2021-11-15 09:32:27 +01:00
oliexdev
49ae42b508 update openScale to version 2.4.3 2021-11-12 20:31:02 +01:00
oliexdev
77960dced1 fixed Android 12 installation errors and crashes 2021-11-12 20:28:11 +01:00
oliexdev
fc02ea3008 update openScale to version 2.4.2 2021-11-12 07:36:23 +01:00
Hosted Weblate
2b12775be7 Merge branch 'origin/master' into Weblate. 2021-11-11 20:52:24 +01:00
Milo Ivir
abb4d1aaf3 Translated using Weblate (Croatian)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/hr/
2021-11-11 20:52:22 +01:00
oliexdev
ff4b1c88aa don't include version number into the apk filename for debug build type so Travis can find it 2021-11-09 10:21:41 +01:00
oliexdev
8b71dc4042 try out of Beurer BF720, see #789 2021-11-08 11:36:51 +01:00
oliexdev
b85fd08f28 added some debug information for the permission handling 2021-11-07 11:10:50 +01:00
Gerald P
46fb92b351 Save body water as percentage instead of kg on BF105 (#778)
Co-authored-by: Gerald <git@cablelink.at>
2021-11-05 11:30:19 +01:00
oliexdev
0abf478602 check for new Bluetooth permissions in Android version >= 31, see #779 2021-11-05 08:49:19 +01:00
Joel A
c42ce3d32a Translated using Weblate (Swedish)
Currently translated at 96.6% (258 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/sv/
2021-11-01 13:37:12 +01:00
Nikita Epifanov
54ff851ad8 Translated using Weblate (Russian)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/ru/
2021-10-30 03:36:32 +02:00
J. Lavoie
ebf0616c7d Translated using Weblate (Italian)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/it/
2021-10-30 03:36:32 +02:00
J. Lavoie
f125a35cd4 Translated using Weblate (French)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/fr/
2021-10-30 03:36:32 +02:00
Reza Almanda
c0f8ffe63c Translated using Weblate (Indonesian)
Currently translated at 51.6% (138 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/id/
2021-10-26 06:12:03 +02:00
Michal L
9def21001a Translated using Weblate (Polish)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/pl/
2021-10-24 18:41:10 +02:00
zion2k
79a7a1e13f Translated using Weblate (German)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/de/
2021-10-24 18:41:10 +02:00
Eric
9f14605c13 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/zh_Hans/
2021-10-21 18:36:15 +02:00
Ihor Hordiichuk
fb3cbfccdf Translated using Weblate (Ukrainian)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/uk/
2021-10-21 18:36:15 +02:00
Yaron Shahrabani
056ce26def Translated using Weblate (Hebrew)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/he/
2021-10-21 18:36:14 +02:00
Oğuz Ersen
2b547fa24e Translated using Weblate (Turkish)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/tr/
2021-10-21 18:36:14 +02:00
Heimen Stoffels
a82617c3b4 Translated using Weblate (Dutch)
Currently translated at 100.0% (267 of 267 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/nl/
2021-10-21 18:36:14 +02:00
Hosted Weblate
816efea377 Merge branch 'origin/master' into Weblate. 2021-10-20 13:47:16 +02:00
J. Lavoie
e8682ae296 Translated using Weblate (Romanian)
Currently translated at 62.1% (164 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/ro/
2021-10-20 13:47:14 +02:00
oliexdev
805181224d update openScale to version 2.4.1 2021-10-11 17:42:30 +02:00
oliexdev
8251ee7ba5 update openScale to version 2.4.0 2021-10-10 13:00:24 +02:00
oliexdev
914bf26498 fixed conversion error for checksum calculation. 2021-10-10 11:19:12 +02:00
Santtu Lakkala
36eb1a8b40 Add support for OKOK 1.1 scales (weight only) (#738) 2021-10-10 11:08:16 +02:00
Adam Serbinski
4ec9b4bd0c Update calculations for OneByone scales (#747)
* Update calculations for OneByone scales

Previously, the value reported for muscle mass was lean body mass
less skeletal mass. This was not a correct report for muscle mass
since it included additional values, such as organs and skin mass.

In addition, the impedance value previously used was incorrect.
There were, in fact, two different calculations being performed
for impedance based on data fields that were not relevant to it,
therefore the value for impedance was entirely incorrect, jumpy,
and unpredictable. In fact, the correct bytes for impedance are
the second and third bytes in the data packet received from the
scale, which produces correct and reasonable impedance values.

This commit corrects the prior errors, provides a calculation for
lean body mass, and calculates muscle mass based on the Janssen
formula;

https://journals.physiology.org/doi/pdf/10.1152/jappl.2000.89.2.465

* Muscle mass should be percent of total body weight, not absolute kg
2021-10-10 11:05:35 +02:00
Krišjāns Bluķis
c9c6ca30bb Basic support for Beurer BF105, BF600, BF850, BF950 and Silvercrest SBF77; (#753)
* added code to register a new user and use a consent code for an existing scale

* BlueToothStandardWeightProfile: move access to SharedPreferences to wrapper functions;

* BlueToothStandardWeightProfile: rename CHARACTERISTIC_USER_BIRTHDAY to
CHARACTERISTIC_USER_DATE_OF_BIRTH to match Bluetooth documentation;

* Drop unused import: java.util.GregorianCalendar;

* BluetoothStandardWeightProfile: create new user if missing either consent
code or scale user index;

* BluetoothStandardWeightProfile: update user's initialWeight only for user
that is being currently created;

* BluetoothStandardWeightProfile: store user data after InitialWeight update;

* BluetoothStandardWeightProfile: fix user ID detection for weight and body composition measurements;

* BluetoothStandardWeightProfile: remove unused class variables;

* BluetoothStandardWeightProfile: simplify scale user selection code;

* BluetoothStandardWeightProfile: add wrapper to set user activity level when creating new scale user;

* BluetoothStandardWeightProfile: add wrapper to request scale measurement;

* BluetoothBeurerBF105: use base class methods to access SharedPreferences;

* BluetoothStandardWeightProfile: use scale user index to set user id in measurement database;

* BluetoothStandardWeightProfile: separate measurement parsing and storing;

* basic Beurer BF600 support;

Based on BluetoothBeurerBF105 by jensMF <jens.freudenthal@zoho.com>;

* BluetoothStandardWeightProfile: Update state machine: use enum with meaningful names instead of hard-coded integers;

* BluetoothBeurerBF600: fix new scale user creation.
Birthday in BF600 consists only from date, no time fields.

* BluetoothStandardWeightProfile: Add wrappers and SM states to request vendor-specific scale user-list;

* BluetoothBeurerBF600: read vendor specific user list, based on BluetoothBeurerBF105 by jensMF <jens.freudenthal@zoho.com>;

* BluetoothStandardWeightProfile: fix unbinding of userScaleIndex from app userId;

* Implement dialog to select existing scale user and enter scale user pin/consent code.

* BluetoothStandardWeightProfile: show warning if scale battery level below 10%;

* BluetoothStandardWeightProfile: When creating new scale user: request user to step on scale barefoot;

* Reconnect Bluetooth scale after user enters consent code or selects scale user;

* BluetoothFactory: threat Beurer BF850 and BF950 the same as BF600;

* BluetoothStandardWeightProfile: fix max stepNr warning message;

* BluetoothStandardWeightProfile: Refactor onBluetoothNotify(): move handling of User Control Point to separate function;

* BluetoothStandardWeightProfile: make debug messages about User Control Point more explicit;

* BluetoothStandardWeightProfile: make debug messages about unhandled notifications more explicit;

* BluetoothStandardWeightProfile: make decoding of weight and body composition measurements more verbose;

* BluetoothStandardWeightProfile: merge previous and new measurement if new measurement lacks user id (and timestamp);

Bluetooth scales usually implement both "Weight Scale Feature" and
"Body Composition Feature". It seems that scale first transmits weight
measurement (with user index and timestamp) and later transmits body
composition measurement (without user index and timestamp).
If previous measurement contains user index and new measurements does not
then merge them and store as one.
NOTE: On scales that implement only Weight Scale feature (or only Body
Composition feature) this commit will cause last measurement transmitted
to be delayed until disconnect.

* BluetoothStandardWeightProfile: Calculate lean body mass and bone mass;

Thanks to Adam Serbinski <adam@serbinski.com> for providing formulas!

* BluetoothStandardWeightProfile: remove redundant constant;

* BluetoothBeurerBF600: cosmetic: fix newline;

* BluetoothGattUuidBF600: show scale user initials (if set) instead of sale user index;

* BluetoothSwpSBF77 experimental support for SBF77 based on BF600 and BF105;

* BluetoothCommunication: Stop state machine only if setNotification operation was enqueued;

* BluetoothStandardWeightProfile: avoid hang if battery service is not implemented by connected device;

* BluetoothFactory: treat BF950 like SBF77;

* BluetoothSwpSBF77: show scale user initials (if set) instead of sale user index;

* BluetoothStandardWeightProfile: reuse common method to decode vendor specific scale user data;

* BluetoothBeurerBF600 and BluetoothSwpSBF77: show debug message if setNotifyVendorSpecificUserList() passed or failed;

* BluetoothSwpSBF77: Add UUID to send user initials to BF960;

* BluetoothSwpSBF77: send user activity level to scale (Beurer BF950 and SBF77);

* BluetoothSwpSBF77: Implement request to perform measurement (Beurer BF950 and SBF77);

* BluetoothSwpSBF77: cosmetic: fix white-space;

* update Blesses library version to 2.0.11

* usage of default scale user constructor

* move custom scale characteristics into their scale classes

* usage of string resources instead of hard coded strings

* BluetoothStandardWeightProfile: Fix writeBirthday() method according to Bluetooth GAAT_Specification_Supplement_v4 chapter 3.59.2;

Remove writeBirthday() overrides in classes that extends BluetoothStandardWeightProfile;

* BluetoothBeurerBF105: reuse state-machine and helper functions from BluetoothStandardWeightProfile;

* BluetoothBeurerBF105: use 0 instead of 1 when requesting user list;

Vendor application also seems to be using 0 (according to btsnoop_hci.log from BF105);

* BluetoothStandardWeightProfile: move user initials helper functions to base class;

* BluetoothCommunication: fix needReConnect() function;

Was broken by: update Blesses library to version to 2.0.11 (95e1d1298b);

* BluetoothBeurerBF105: move call to writeInitials() to base class;

* BluetoothBeurerBF600: write user initials if specific characteristic exists on scale;

Works on Beurer BF850. On Beurer BF600 there is no user initials;

* BluetoothSwpSBF77: write user initials if specific characteristic exists on scale;

Should work on Silvercrest SBF77 and Beurer BF950;

* BluetoothStandardWeightProfile: use resource strings instead of hard coded strings

* BluetoothStandardWeightProfile and BluetoothCommunication: catch IllegalArgumentException in setNotificationOn();

It seems that blessed library 2.0.11 (95e1d1298b)
returns non-null object from getCharacteristic() even if characteristic is not
available and then trows exception later;

* BluetoothStandardWeightProfile: fix crash when user name starts with space character;

* BluetoothStandardWeightProfile: fix crash when user name contains two words with two or more spaces between them;

* BluetoothSwpSBF77: prepare to merge BluetoothSwpSBF77 and BluetoothBeurerBF105;

Change function order in file to reduce diff;

* BluetoothSwpSBF77: cosmetic code formatting change;

* BluetoothStandardWeightProfile: stop state-machine after requesting scale user list;

Co-authored-by: jensMF <jens.freudenthal@zoho.com>

* BluetoothStandardWeightProfile: remove doubled call;

Co-authored-by: jensMF <jens.freudenthal@zoho.com>

* BluetoothStandardWeightProfile: make this class abstract and make stub functions abstract also;

* BluetoothStandardWeightProfile: convert VENDOR_SPECIFIC_MAX_USERS into abstract function;

* Refactor: Rename BluetoothSwpSBF77 to BluetoothBeurerBF950;

* BluetoothBeurerBF950: use BluetoothBeurerBF105 as base class; Affects BF950 and SBF77;

* BluetoothFactory: remove commented code about BluetoothStandardWeightProfile;

All mentioned scales have proper classes implemented;

* BluetoothStandardWeightProfile: fix bug: app requests to select scale user on each connection if scale have maximum number of users;

* update libraries to newest version and added some comments

Co-authored-by: jensMF <jens.freudenthal@zoho.com>
Co-authored-by: oliexdev <olie.xdev@googlemail.com>
2021-10-10 11:00:08 +02:00
Hosted Weblate
3862098738 Merge branch 'origin/master' into Weblate. 2021-10-04 07:36:39 +02:00
Vangelis Skarmoutsos
e4121cc9ab Translated using Weblate (Greek)
Currently translated at 96.9% (256 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/el/
2021-10-04 07:36:37 +02:00
Adam Serbinski
d83773c3d5 Bring muscle mass eval sheet to proper ranges (#748)
The original values were obtained from a commercial scale user
manual, which was not consistent with ranges found from reputable
academic or health sources. This updates the range limits.

Values from paper "Skeletal muscle mass and distribution in 468
men and women aged 18-88 yr" by Ian Janssen et al;

https://journals.physiology.org/doi/pdf/10.1152/jappl.2000.89.1.81
2021-08-27 10:39:29 +02:00
oliexdev
3d547d5673 update gradle version otherwise travis build won't work 2021-08-21 19:02:40 +02:00
lbdroid
5183278432 Fix bodyfat calculation for 1byone (#741)
Adjust the value of bodyVar instead of replacing bodyVar with the adjustment factor.
2021-08-21 18:01:16 +02:00
oliexdev
4b451e40b7 make Bluetooth list scrollable, see #766 2021-08-21 17:33:19 +02:00
oliexdev
49e4cd8867 upgrade dependencies 2021-08-21 16:24:05 +02:00
Reza Almanda
67bf8dd13b Translated using Weblate (Indonesian)
Currently translated at 40.9% (108 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/id/
2021-08-19 09:33:47 +02:00
Michal L
2935191e05 Translated using Weblate (Polish)
Currently translated at 100.0% (264 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/pl/
2021-08-09 02:37:35 +02:00
Ihor Hordiichuk
2784a55064 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (264 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/uk/
2021-07-21 06:33:32 +02:00
Tiny
77dd3227c3 Translated using Weblate (Swedish)
Currently translated at 79.5% (210 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/sv/
2021-06-22 12:34:18 +02:00
Reza Almanda
ed54387a21 Translated using Weblate (Indonesian)
Currently translated at 30.6% (81 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/id/
2021-06-18 04:33:49 +02:00
Hosted Weblate
91bb247b15 Merge branch 'origin/master' into Weblate. 2021-06-02 16:32:24 +02:00
Jacque Fresco
ee05acef1f Translated using Weblate (Indonesian)
Currently translated at 0.7% (2 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/id/
2021-06-02 16:32:22 +02:00
Sebastian Lechte
cab0a627ed Significantly raise BMI MaxValue (#729)
BMI over 50 is not unlikely, raise the value to something extreme.

BMI 125 would be about 300kg at 1.55m body height.
2021-05-16 11:23:20 +02:00
huuhaa
24b79f3569 Translated using Weblate (Finnish)
Currently translated at 73.1% (193 of 264 strings)

Translation: openScale/Strings
Translate-URL: https://hosted.weblate.org/projects/openscale/strings/fi/
2021-05-08 23:33:06 +02:00
Hosted Weblate
0f5aad1ff8 Merge branch 'origin/master' into Weblate. 2021-05-03 14:32:11 +02:00