1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-08-25 16:50:44 +02:00

Merge branch 'master' of https://github.com/Freeyourgadget/Gadgetbridge into q-hybrid-abstraction

This commit is contained in:
Daniel Dakhno 2019-10-25 14:35:05 +02:00
commit 7710b9ea2a
23 changed files with 447 additions and 23 deletions

View File

@ -1,5 +1,14 @@
### Changelog
#### NEXT
* Amazfit GTR: Initial and incomplete support
* Mi Band 4: Enable emoji font setting
* Makibes HR3: Support the english version
* Makibes HR3: Enable bluetooth pairing for working reconnection
* Work around crash when trying to display changelog
* "Limit sleep charts range" (FIXME)
* " Check for non empty list of sleep sessions" (FIXME)
#### Version 0.37.1
* Amazfit Bip Lite: Support flashing firmware and watchfaces

View File

@ -31,6 +31,7 @@ import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
@ -202,7 +203,12 @@ public class ControlCenterv2 extends AppCompatActivity
ChangeLog cl = createChangeLog();
if (cl.isFirstRun()) {
cl.getLogDialog().show();
try {
cl.getLogDialog().show();
} catch (Exception ignored){
GB.toast(getBaseContext(), "Error showing Changelog", Toast.LENGTH_LONG, GB.ERROR);
}
}
GBApplication.deviceService().start();
@ -285,7 +291,11 @@ public class ControlCenterv2 extends AppCompatActivity
return true;
case R.id.external_changelog:
ChangeLog cl = createChangeLog();
cl.getFullLogDialog().show();
try {
cl.getLogDialog().show();
} catch (Exception ignored) {
GB.toast(getBaseContext(), "Error showing Changelog", Toast.LENGTH_LONG, GB.ERROR);
}
return true;
}

View File

@ -69,6 +69,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
import nodomain.freeyourgadget.gadgetbridge.util.DateTimeUtils;
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
/**
* A base class fragment to be used with ChartsActivity. The fragment can supply
@ -170,12 +171,18 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
}
protected void init() {
Prefs prefs = GBApplication.getPrefs();
TypedValue runningColor = new TypedValue();
BACKGROUND_COLOR = GBApplication.getBackgroundColor(getContext());
LEGEND_TEXT_COLOR = DESCRIPTION_COLOR = GBApplication.getTextColor(getContext());
CHART_TEXT_COLOR = ContextCompat.getColor(getContext(), R.color.secondarytext);
HEARTRATE_COLOR = ContextCompat.getColor(getContext(), R.color.chart_heartrate);
if (prefs.getBoolean("chart_heartrate_color", false)) {
HEARTRATE_COLOR = ContextCompat.getColor(getContext(), R.color.chart_heartrate_alternative);
}else{
HEARTRATE_COLOR = ContextCompat.getColor(getContext(), R.color.chart_heartrate);
}
HEARTRATE_FILL_COLOR = ContextCompat.getColor(getContext(), R.color.chart_heartrate_fill);
getContext().getTheme().resolveAttribute(R.attr.chart_activity, runningColor, true);
AK_ACTIVITY_COLOR = runningColor.data;
getContext().getTheme().resolveAttribute(R.attr.chart_deep_sleep, runningColor, true);

View File

@ -0,0 +1,67 @@
/* Copyright (C) 2017-2019 Andreas Shimokawa, Carsten Pfeiffer, Daniele
Gobbetti, João Paulo Barraca
This file is part of Gadgetbridge.
Gadgetbridge is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gadgetbridge is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.net.Uri;
import androidx.annotation.NonNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip.AmazfitBipCoordinator;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDeviceCandidate;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
public class AmazfitGTRCoordinator extends AmazfitBipCoordinator {
private static final Logger LOG = LoggerFactory.getLogger(AmazfitGTRCoordinator.class);
@Override
public DeviceType getDeviceType() {
return DeviceType.AMAZFITGTR;
}
@NonNull
@Override
public DeviceType getSupportedType(GBDeviceCandidate candidate) {
try {
BluetoothDevice device = candidate.getDevice();
String name = device.getName();
if (name != null && name.equalsIgnoreCase("Amazfit GTR")) {
return DeviceType.AMAZFITGTR;
}
} catch (Exception ex) {
LOG.error("unable to check device support", ex);
}
return DeviceType.UNKNOWN;
}
@Override
public InstallHandler findInstallHandler(Uri uri, Context context) {
AmazfitGTRFWInstallHandler handler = new AmazfitGTRFWInstallHandler(uri, context);
return handler.isValid() ? handler : null;
}
@Override
public int getBondingStyle() {
return BONDING_STYLE_REQUIRE_KEY;
}
}

View File

@ -0,0 +1,44 @@
/* Copyright (C) 2016-2019 Andreas Shimokawa, Carsten Pfeiffer, Daniele
Gobbetti
This file is part of Gadgetbridge.
Gadgetbridge is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gadgetbridge is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr;
import android.content.Context;
import android.net.Uri;
import androidx.annotation.NonNull;
import java.io.IOException;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRFirmwareInfo;
public class AmazfitGTRFWHelper extends HuamiFWHelper {
public AmazfitGTRFWHelper(Uri uri, Context context) throws IOException {
super(uri, context);
}
@NonNull
@Override
protected void determineFirmwareInfo(byte[] wholeFirmwareBytes) {
firmwareInfo = new AmazfitGTRFirmwareInfo(wholeFirmwareBytes);
if (!firmwareInfo.isHeaderValid()) {
throw new IllegalArgumentException("Not a an Amazifit GTR firmware");
}
}
}

View File

@ -0,0 +1,49 @@
/* Copyright (C) 2015-2019 Andreas Shimokawa, Carsten Pfeiffer
This file is part of Gadgetbridge.
Gadgetbridge is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gadgetbridge is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr;
import android.content.Context;
import android.net.Uri;
import java.io.IOException;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.AbstractMiBandFWHelper;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.AbstractMiBandFWInstallHandler;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
class AmazfitGTRFWInstallHandler extends AbstractMiBandFWInstallHandler {
AmazfitGTRFWInstallHandler(Uri uri, Context context) {
super(uri, context);
}
@Override
protected String getFwUpgradeNotice() {
return mContext.getString(R.string.fw_upgrade_notice_amazfitgtr, helper.getHumanFirmwareVersion());
}
@Override
protected AbstractMiBandFWHelper createHelper(Uri uri, Context context) throws IOException {
return new AmazfitGTRFWHelper(uri, context);
}
@Override
protected boolean isSupportedDeviceType(GBDevice device) {
return device.getType() == DeviceType.AMAZFITGTR;
}
}

View File

@ -89,6 +89,7 @@ public class MiBand4Coordinator extends HuamiCoordinator {
return new int[]{
R.xml.devicesettings_miband3,
R.xml.devicesettings_wearlocation,
R.xml.devicesettings_custom_emoji_font,
R.xml.devicesettings_dateformat,
R.xml.devicesettings_nightmode,
R.xml.devicesettings_liftwrist_display,

View File

@ -40,6 +40,7 @@ public enum DeviceType {
AMAZFITCOR2(15, R.drawable.ic_device_default, R.drawable.ic_device_default_disabled, R.string.devicetype_amazfit_cor2),
MIBAND4(16, R.drawable.ic_device_miband2, R.drawable.ic_device_miband2_disabled, R.string.devicetype_miband4),
AMAZFITBIP_LITE(17, R.drawable.ic_device_hplus, R.drawable.ic_device_hplus_disabled, R.string.devicetype_amazfit_bip_lite),
AMAZFITGTR(18, R.drawable.ic_device_hplus, R.drawable.ic_device_hplus_disabled, R.string.devicetype_amazfit_gtr),
VIBRATISSIMO(20, R.drawable.ic_device_lovetoy, R.drawable.ic_device_lovetoy_disabled, R.string.devicetype_vibratissimo),
LIVEVIEW(30, R.drawable.ic_device_default, R.drawable.ic_device_default_disabled, R.string.devicetype_liveview),
HPLUS(40, R.drawable.ic_device_hplus, R.drawable.ic_device_hplus_disabled, R.string.devicetype_hplus),

View File

@ -35,6 +35,7 @@ import nodomain.freeyourgadget.gadgetbridge.service.devices.hplus.HPlusSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip.AmazfitBipLiteSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip.AmazfitBipSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr.AmazfitGTRSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcor.AmazfitCorSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitcor2.AmazfitCor2Support;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.miband3.MiBand3Support;
@ -142,6 +143,9 @@ public class DeviceSupportFactory {
case AMAZFITBIP_LITE:
deviceSupport = new ServiceDeviceSupport(new AmazfitBipLiteSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
break;
case AMAZFITGTR:
deviceSupport = new ServiceDeviceSupport(new AmazfitGTRSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
break;
case AMAZFITCOR:
deviceSupport = new ServiceDeviceSupport(new AmazfitCorSupport(), EnumSet.of(ServiceDeviceSupport.Flags.BUSY_CHECKING));
break;

View File

@ -124,7 +124,7 @@ public class AmazfitBipSupport extends HuamiSupport {
appSuffix = appName.getBytes();
suffixlength = appSuffix.length;
}
if (gbDevice.getType() == DeviceType.MIBAND4) {
if (gbDevice.getType() == DeviceType.MIBAND4 || gbDevice.getType() == DeviceType.AMAZFITGTR) {
prefixlength += 4;
}
@ -134,7 +134,7 @@ public class AmazfitBipSupport extends HuamiSupport {
byte[] command = new byte[length + prefixlength + suffixlength];
int pos = 0;
command[pos++] = (byte) alertCategory.getId();
if (gbDevice.getType() == DeviceType.MIBAND4) {
if (gbDevice.getType() == DeviceType.MIBAND4 || gbDevice.getType() == DeviceType.AMAZFITGTR) {
command[pos++] = 0; // TODO
command[pos++] = 0;
command[pos++] = 0;

View File

@ -0,0 +1,116 @@
/* Copyright (C) 2017-2019 Andreas Shimokawa, Carsten Pfeiffer
This file is part of Gadgetbridge.
Gadgetbridge is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gadgetbridge is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr;
import java.util.HashMap;
import java.util.Map;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.model.DeviceType;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiFirmwareInfo;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.HuamiFirmwareType;
import nodomain.freeyourgadget.gadgetbridge.util.ArrayUtils;
public class AmazfitGTRFirmwareInfo extends HuamiFirmwareInfo {
private static final int FW_OFFSET = 2;
private static final byte[] FW_HEADER = new byte[]{
0x09, 0x20, (byte) 0x99, 0x12, 0x01, 0x08 // completely nonsense probably
};
private static final byte[] GPS_ALMANAC_HEADER = new byte[]{ // probably wrong
(byte) 0xa0, (byte) 0x80, 0x08, 0x00, (byte) 0x8b, 0x07
};
private static final byte[] GPS_CEP_HEADER = new byte[]{ // probably wrong
0x2a, 0x12, (byte) 0xa0, 0x02
};
// gps detection is totally bogus, just the first 16 bytes
private static final byte[][] GPS_HEADERS = {
new byte[]{
0x73, 0x75, 0x68, (byte) 0xd0, 0x70, 0x73, (byte) 0xbb, 0x5a,
0x3e, (byte) 0xc3, (byte) 0xd3, 0x09, (byte) 0x9e, 0x1d, (byte) 0xd3, (byte) 0xc9
}
};
private static Map<Integer, String> crcToVersion = new HashMap<>();
static {
// firmware
// Latin Firmware
// resources
// font
// gps
crcToVersion.put(62532, "18344,eb2f43f,126");
}
public AmazfitGTRFirmwareInfo(byte[] bytes) {
super(bytes);
}
@Override
protected HuamiFirmwareType determineFirmwareType(byte[] bytes) {
if (ArrayUtils.equals(bytes, NEWRES_HEADER, COMPRESSED_RES_HEADER_OFFSET_NEW)) {
return HuamiFirmwareType.RES_COMPRESSED;
}
if (ArrayUtils.equals(bytes, FW_HEADER, FW_OFFSET)) {
if (searchString32BitAligned(bytes, "Amazfit GTR")) {
return HuamiFirmwareType.FIRMWARE;
}
return HuamiFirmwareType.INVALID;
}
if (ArrayUtils.startsWith(bytes, WATCHFACE_HEADER)) {
return HuamiFirmwareType.WATCHFACE;
}
if (ArrayUtils.startsWith(bytes, NEWFT_HEADER)) {
if (bytes[10] == 0x01) {
return HuamiFirmwareType.FONT;
} else if (bytes[10] == 0x02) {
return HuamiFirmwareType.FONT_LATIN;
}
}
if (ArrayUtils.startsWith(bytes, GPS_ALMANAC_HEADER)) {
return HuamiFirmwareType.GPS_ALMANAC;
}
if (ArrayUtils.startsWith(bytes, GPS_CEP_HEADER)) {
return HuamiFirmwareType.GPS_CEP;
}
for (byte[] gpsHeader : GPS_HEADERS) {
if (ArrayUtils.startsWith(bytes, gpsHeader)) {
return HuamiFirmwareType.GPS;
}
}
return HuamiFirmwareType.INVALID;
}
@Override
public boolean isGenerallyCompatibleWith(GBDevice device) {
return isHeaderValid() && device.getType() == DeviceType.AMAZFITGTR;
}
@Override
protected Map<Integer, String> getCrcMap() {
return crcToVersion;
}
}

View File

@ -0,0 +1,45 @@
/* Copyright (C) 2017-2019 Andreas Shimokawa, Carsten Pfeiffer, Matthieu
Baerts, Roi Greenberg
This file is part of Gadgetbridge.
Gadgetbridge is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gadgetbridge is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitgtr;
import android.content.Context;
import android.net.Uri;
import java.io.IOException;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.HuamiFWHelper;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr.AmazfitGTRFWHelper;
import nodomain.freeyourgadget.gadgetbridge.service.devices.huami.amazfitbip.AmazfitBipSupport;
public class AmazfitGTRSupport extends AmazfitBipSupport {
@Override
public byte getCryptFlags() {
return (byte) 0x80;
}
@Override
protected byte getAuthFlags() {
return 0x00;
}
@Override
public HuamiFWHelper createFWHelper(Uri uri, Context context) throws IOException {
return new AmazfitGTRFWHelper(uri, context);
}
}

View File

@ -46,6 +46,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.hplus.EXRIZUK8Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.HPlusCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.MakibesF68Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip.AmazfitBipLiteCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitgtr.AmazfitGTRCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.makibeshr3.MakibesHR3Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.hplus.Q8Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.huami.amazfitbip.AmazfitBipCoordinator;
@ -208,6 +209,7 @@ public class DeviceHelper {
result.add(new AmazfitBipLiteCoordinator());
result.add(new AmazfitCorCoordinator());
result.add(new AmazfitCor2Coordinator());
result.add(new AmazfitGTRCoordinator());
result.add(new MiBand3Coordinator());
result.add(new MiBand4Coordinator());
result.add(new MiBand2HRXCoordinator());

View File

@ -757,8 +757,16 @@
<string name="devicetype_makibes_hr3">Makibes HR3</string>
<string name="devicetype_amazfit_bip_lite">Amazfit Bip Lite</string>
<string name="prefs_find_phone">Vyhledat telefon</string>
<string name="prefs_enable_find_phone">Povolit vyhledání telefonu</string>
<string name="prefs_enable_find_phone">Zapnout \\\'Vyhledání telefonu\\\'</string>
<string name="prefs_find_phone_summary">Použijte náramek/hodinky k prozvonění telefonu.</string>
<string name="prefs_find_phone_duration">Délka zvonění ve vteřinách</string>
<string name="maximum_duration">Délka</string>
<string name="discovery_need_to_enter_authkey">Toto zařízení vyžaduje tajný klíč, podržte dlouze na jménu zařízení pro jeho vložení. pro více detailů čtěte wiki.</string>
<string name="fw_upgrade_notice_amazfitbip_lite">Chystáte se nainstalovat firmvér %s na vašem Amazfit Bip Lite.
\n
\nProsím nezapomeňte nainstalovat soubor .fw, a poté soubor .res . Vaše hodinky se po instalaci souboru .fw restartují.
\n
\nPoznámka: Nemusíte instalovat soubory .res , pokud je tento soubor přesně stejný jako ten, který byl nainstalován dříve.
\n
\nPOKRAČUJTE TO NA VLASTNÍ NEBEZPEČÍ!</string>
</resources>

View File

@ -419,11 +419,11 @@
<string name="discovery_dont_pair">Nicht koppeln</string>
<string name="stats_title">Geschwindigkeitszonen</string>
<string name="fw_upgrade_notice_amazfitbip">Du bist dabei, die Firmware %s auf deine Amazfit Bip zu installieren.
\n
\n
\nBitte stelle sicher, dass du die .fw Datei, dann die .res Datei und schließlich die .gps Datei installierst. Deine Uhr wird nach der Installation der .fw Datei neu gestartet.
\n
\n
\nHinweis: Du musst die .res und .gps nicht installieren, wenn diese Dateien genau die gleichen sind wie die zuvor installierten.
\n
\n
\nINSTALLATION AUF EIGENE GEFAHR!</string>
<string name="mi2_prefs_button_actions">Tastenaktionen</string>
<string name="mi2_prefs_button_actions_summary">Bestimmte Aktion bei Tastendruck auf dem Mi Band 2</string>
@ -446,7 +446,7 @@
<string name="english">Englisch</string>
<string name="fw_upgrade_notice_amazfitcor">Du bist dabei, die Firmware %s auf deine Amazfit Cor zu installieren.
\n
\nBitte stelle sicher, dass du die .fw Datei und die .res Datei installierst. Dein Band wird nach der Installation der .fw Datei neu gestartet.
\nBitte stelle sicher, dass du die .fw Datei und danach die .res Datei installierst. Dein Band wird nach der Installation der .fw Datei neu gestartet.
\n
\nHinweis: Du musst .res nicht installieren, wenn es genau das gleiche ist, wie die zuvor installierte.
\n
@ -695,17 +695,13 @@
<string name="pref_summary_authkey">Ändere den Authentifizierungsschlüssel in einen gemeinsamen Schlüssel auf all deinen Android-Geräten, von denen aus du eine Verbindung herstellen möchtet. Der bisherige Standardschlüssel für alle Geräte ist 0123456789@ABCDE</string>
<string name="devicetype_bfh16">BFH-16</string>
<string name="fw_upgrade_notice_amazfitcor2">Du bist dabei, die %s-Firmware auf deine Amazfit Cor 2 zu installieren.
\n
\n
\nBitte stelle sicher, dass Du die .fw-Datei und danach die .res-Datei installierst. Dein Band wird nach der Installation der.fw-Datei neu gestartet:
\n
\n
\nBitte stelle sicher, dass Du die .fw-Datei und danach die .res-Datei installierst. Dein Band wird nach der Installation der.fw-Datei neu gestartet.
\n
\nHinweis: Du musst .res nicht installieren, wenn es genau das gleiche ist, wie die zuvor installierte.
\n
\n
\nAUF EIGENE GEFAHR!
\n
\n
\nVOLLSTÄNDIG UNGETESTET, WAHRSCHEINLICH MUSST DU EINE BEATS_W FIRMWARE FLASHEN, WENN DEIN GERÄTENAME \"Amazfit Band 2\" IST</string>
<string name="dutch">Niederländisch</string>
<string name="turkish">Türkisch</string>
@ -776,4 +772,12 @@
<string name="prefs_find_phone_summary">Verwende dein Band, um den Klingelton deines Handys wiederzugeben.</string>
<string name="prefs_find_phone_duration">Klingeldauer in Sekunden</string>
<string name="maximum_duration">Dauer</string>
<string name="discovery_need_to_enter_authkey">Dieses Gerät benötigt eine geheime Authentifikationstaste, die du mit einem langen Druck auf das Gerät eingeben kannst. Lies das Wiki.</string>
<string name="fw_upgrade_notice_amazfitbip_lite">Du bist dabei, die Firmware %s auf deine Amazfit Bip Lite zu installieren.
\n
\nBitte stelle sicher, dass du die .fw Datei und danach die .res Datei installierst. Dein Uhr wird nach der Installation der .fw Datei neu gestartet.
\n
\nHinweis: Du musst .res nicht installieren, wenn es genau das gleiche ist, wie die zuvor installierte.
\n
\nINSTALLATION AUF EIGENE GEFAHR!</string>
</resources>

View File

@ -755,9 +755,16 @@
<string name="devicetype_makibes_hr3">Makibes HR3</string>
<string name="devicetype_amazfit_bip_lite">Amazfit Bip Lite</string>
<string name="prefs_find_phone">איתור הטלפון</string>
<string name="prefs_enable_find_phone">הפעלת איתור הטלפון</string>
<string name="prefs_enable_find_phone">הפעלת איתור הטלפון</string>
<string name="prefs_find_phone_summary">ניתן להשתמש בצמיד כדי שהטלפון שלך ישמיע צלצול.</string>
<string name="prefs_find_phone_duration">משך זמן הצלצול בשניות</string>
<string name="maximum_duration">משך</string>
<string name="discovery_need_to_enter_authkey">למכשיר זה נדרש מפתח אימות סודי, יש לגעת נגיעה ארוכה על המכשיר כדי להזין אותו. פרטים נוספים בוויקי.</string>
<string name="fw_upgrade_notice_amazfitbip_lite">פעולה זו תתקין את הקושחה %s על ה־Amazfit Bip Lite שלך.
\n
\nנא לוודא את התקנת קושחת ה־‎.fw בהתחלה, לאחר מכן את קובץ ה־‎.res השעון שלך יופעל מחדש לאחר התקנת קובץ ה־fw.
\n
\nלתשומת לבך: אין צורך בהתקנת קובץ ה־‎.res אם הוא כבר זהה לזה שהתקנת בעבר.
\n
\nהמשך התהליך הוא על אחריותך!</string>
</resources>

View File

@ -762,4 +762,11 @@
<string name="prefs_find_phone_duration">Anropsvarighet i sekunder</string>
<string name="maximum_duration">Varighet</string>
<string name="discovery_need_to_enter_authkey">Denne enheten trenger en hemmelig identitetsbekreftelsesnøkkel. Trykk lenge på enheten for å skrive den inn. Les wiki-en.</string>
<string name="fw_upgrade_notice_amazfitbip_lite">Du er i ferd med å installere %s-fastvaren på din Amazfit Bip Lite.
\n
\nForsikre deg om at du installerer ..fw-fila, så .res-fila, og til sist gps-fila. Armbåndsuret ditt vil starte på nytt etter at .fw-fila er installert.
\n
\nMerk: Du trenger ikke å installere .res-filen hvis den er akkurat den samme som den som allerede er installert.
\n
\nFORTSETT PÅ EGEN RISIKO!</string>
</resources>

View File

@ -758,4 +758,17 @@
<string name="preferences_makibes_hr3_settings">Makibes HR3 instellingen</string>
<string name="devicetype_makibes_hr3">Makibes HR3</string>
<string name="devicetype_amazfit_bip_lite">Amazfit Bip Lite</string>
<string name="prefs_find_phone">Vind telefoon</string>
<string name="prefs_enable_find_phone">Zet \\\'Vind telefoon\\\' aan</string>
<string name="prefs_find_phone_summary">Gebruik je band om de beltoon van je telefoon af te spelen.</string>
<string name="prefs_find_phone_duration">Belduur in seconden</string>
<string name="maximum_duration">Duur</string>
<string name="discovery_need_to_enter_authkey">Dit apparaat heeft een geheime verificatiesleutel nodig, druk lang op het apparaat om deze in te voeren. Lees de wiki.</string>
<string name="fw_upgrade_notice_amazfitbip_lite">U staat op het punt om de firmware %s te installeren op uw Amazfit Bip Lite.
\n
\nZorg ervoor dat u het .fw-bestand installeert, daarna het .res-bestand en als laatste het .gps-bestand. Uw horloge wordt opnieuw gestart na het installeren van het .fw-bestand.
\n
\nOpmerking: U hoeft de .res niet te installeren als deze exact dezelfde is als degene die ervoor al was geïnstalleerd.
\n
\nGA VERDER OP EIGEN RISICO!</string>
</resources>

View File

@ -367,12 +367,12 @@
<string name="controlcenter_snackbar_connecting">Conectando…</string>
<string name="controlcenter_snackbar_requested_screenshot">Tirar captura de tela do dispositivo</string>
<string name="title_activity_calblacklist">Blacklist do Calendário</string>
<string name="fw_upgrade_notice_amazfitbip">Você está prestes a instalar o firmware %s no seu Amazip Bip.
\n
\nCertifique-se de instalar o firmware .gps, depois o arquivo .res e, finalmente, o arquivo .fw. Seu relógio será reiniciado após a instalação do arquivo .fw.
\n
\nNota: você não precisa instalar .res e .gps se esses arquivos forem exatamente os mesmos que os instalados anteriormente.
\n
<string name="fw_upgrade_notice_amazfitbip">Você está prestes a instalar o firmware %s no seu Amazfit Bip.
\n
\nCertifique-se de instalar o firmware .fw, depois o arquivo .res e finalmente o arquivo .gps. Seu relógio será reiniciado após a instalação do arquivo .fw.
\n
\nNota: você não precisa instalar .res e .gps se esses arquivos forem exatamente os mesmos que os instalados anteriormente.
\n
\nPROSSIGA POR SUA CONTA E RISCO!</string>
<string name="fw_upgrade_notice_amazfitcor">Você está prestes a instalar o firmware %s no seu Amazfit Cor.
\n
@ -770,4 +770,12 @@
<string name="prefs_find_phone_duration">Duração do toque sonoro em segundos</string>
<string name="maximum_duration">Duração</string>
<string name="discovery_need_to_enter_authkey">Esse dispositivo precisa de sua chave de autenticação secreta, realize pressionamento longo no dispositivo para inseri-lo. Leia o wiki.</string>
<string name="fw_upgrade_notice_amazfitbip_lite">Você está prestes a instalar o firmware %s no seu Amazit Bip Lite.
\n
\nCertifique-se de instalar o arquivo .fw, e depois o arquivo .res. Seu relógio será reiniciado após a instalação do arquivo .fw.
\n
\nNota: você não precisa instalar .res se esse arquivo for exatamente o mesmo que os instalados anteriormente.
\n
\nPROSSIGA POR SUA CONTA E RISCO!</string>
<string name="devicetype_amazfit_gtr">Amazfit GTR</string>
</resources>

View File

@ -767,4 +767,11 @@
<string name="prefs_find_phone_duration">铃声将持续数秒</string>
<string name="maximum_duration">持续</string>
<string name="discovery_need_to_enter_authkey">此设备需要认证密钥,请在设备上长按以输入密钥。具体请阅读 Wiki 。</string>
<string name="fw_upgrade_notice_amazfitbip_lite">"您即将在米动手表青春版 Lite(Amazfit Bip Lite)上安装 %s 版本的固件
\n
\n请确保先安装 .fw 文件,再安装 .res 文件。您的手环将会在安装了 .fw 文件后重启
\n
\n备注如果您安装的 .res 文件和之前相同,则无需安装 .res 文件
\n
\n风险自担"</string>
</resources>

View File

@ -18,6 +18,7 @@
<color name="divider" type="color">#1f000000</color>
<color name="chart_heartrate" type="color">#ffab40</color>
<color name="chart_heartrate_alternative" type="color">#8B0000</color>
<color name="chart_heartrate_fill" type="color">#fadab1</color>
<color name="chart_deep_sleep_light" type="color">#0071b7</color>
<color name="chart_deep_sleep_dark" type="color">#4c5aff</color>

View File

@ -66,6 +66,7 @@
\nPROCEED AT YOUR OWN RISK!
\n
\nCOMPLETELY UNTESTED, PROBABLY YOU NEED TO FLASH A BEATS_W FIRMWARE IF YOUR DEVICE NAME IS \"Amazfit Band 2\"</string>
<string name="fw_upgrade_notice_amazfitgtr">You are about to install the %s firmware on your Amazfit GTR.\n\nPlease make sure to install the .fw file, then the .res file, and finally the .gps file. Your watch will reboot after installing the .fw file.\n\nNote: You do not have to install .res and .gps if these files are exactly the same as the ones previously installed.\n\nPROCEED AT YOUR OWN RISK!</string>
<string name="fw_upgrade_notice_miband3">You are about to install the %s firmware on your Mi Band 3.\n\nPlease make sure to install the .fw file, and after that the .res file. Your band will reboot after installing the .fw file.\n\nNote: You do not have to install .res if it is exactly the same as the one previously installed.\n\nPROCEED AT YOUR OWN RISK!</string>
<string name="fw_upgrade_notice_miband4">You are about to install the %s firmware on your Mi Band 4.\n\nPlease make sure to install the .fw file, and after that the .res file. Your band will reboot after installing the .fw file.\n\nNote: You do not have to install .res if it is exactly the same as the one previously installed.\n\nPROCEED AT YOUR OWN RISK!</string>
<string name="fw_multi_upgrade_notice">You are about to install the %1$s and %2$s firmware, instead of the ones currently on your Mi Band.</string>
@ -526,6 +527,9 @@
<string name="pref_title_charts_range">Charts Range</string>
<string name="pref_charts_range_on">Charts range is set to a Month</string>
<string name="pref_charts_range_off">Charts range is set to a Week</string>
<string name="pref_chart_heartrate_color_red">Red</string>
<string name="pref_chart_heartrate_color_orange">Orange</string>
<string name="pref_title_chart_heartrate_color">Heart rate color</string>
<string name="weekstepschart_steps_a_month">Steps per month</string>
<string name="weeksleepchart_sleep_a_month">Sleep per month</string>
<string name="authenticating">Authenticating</string>
@ -657,6 +661,7 @@
<string name="devicetype_amazfit_bip_lite">Amazfit Bip Lite</string>
<string name="devicetype_amazfit_cor">Amazfit Cor</string>
<string name="devicetype_amazfit_cor2">Amazfit Cor 2</string>
<string name="devicetype_amazfit_gtr">Amazfit GTR</string>
<string name="devicetype_vibratissimo">Vibratissimo</string>
<string name="devicetype_liveview">LiveView</string>
<string name="devicetype_hplus">HPlus</string>

View File

@ -17,6 +17,15 @@
android:maxLength="3"
android:defaultValue="10"
android:title="@string/activity_prefs_chart_min_heart_rate" />
<CheckBoxPreference
android:layout="@layout/preference_checkbox"
android:defaultValue="false"
android:key="chart_heartrate_color"
android:summaryOff="@string/pref_chart_heartrate_color_orange"
android:summaryOn="@string/pref_chart_heartrate_color_red"
android:title="@string/pref_title_chart_heartrate_color" />
<CheckBoxPreference
android:layout="@layout/preference_checkbox"
android:defaultValue="true"