1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-12 13:09:24 +01:00

Merge branch 'master' into new_GUI

This commit is contained in:
Translation Bot 2017-03-08 21:42:52 +01:00
commit 3abbe12b53
57 changed files with 1860 additions and 622 deletions

View File

@ -16,10 +16,10 @@ android:
- tools
# The BuildTools version used by your project
- build-tools-23.0.3
- build-tools-25.0.2
# The SDK version used to compile your project
- android-23
- android-25
# Additional components
- extra-android-m2repository
@ -30,4 +30,4 @@ android:
#- sys-img-armeabi-v7a-android-19
#- sys-img-x86-android-17
script: ./gradlew build connectedCheck --info --stacktrace
script: ./gradlew build connectedCheck --stacktrace

View File

@ -1,5 +1,13 @@
###Changelog
###Version 0.18.0 (next)
* Add Portuguese pt_PT and pt_BR translations
* Add Hebrew translation and transliteration
* Consistently display device specific icons already during discovery
* Add sleep chart diplaying the last week of sleep
* Huge speedup for weekly charts when changing days
* Drop support for pre Gadgetbride 0.12.0 database
####Version 0.17.5
* Automatically start the service on boot (can be turned off)
* Pebble: PebbleKit compatibility improvements (Datalogging)

View File

@ -152,6 +152,7 @@ Feel free to open an issue on our issue tracker, but please:
## Having problems?
0. Phone crashing during device discovery? Disable Privacy Guard (or similarly named functionality) during discovery.
1. Open Gadgetbridge's settings and check the option to write log files
2. Reproduce the problem you encountered
3. Check the logfile at /sdcard/Android/data/nodomain.freeyourgadget.gadgetbridge/files/gadgetbridge.log

View File

@ -17,17 +17,17 @@ android {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "nodomain.freeyourgadget.gadgetbridge"
minSdkVersion 19
targetSdkVersion 23
targetSdkVersion 25
// note: always bump BOTH versionCode and versionName!
versionName "0.17.5"
versionCode 86
versionName "0.18.0"
versionCode 87
vectorDrawables.useSupportLibrary = true
}
buildTypes {
@ -61,14 +61,20 @@ dependencies {
// testCompile 'ch.qos.logback:logback-core:1.1.3'
testCompile 'junit:junit:4.12'
testCompile "org.mockito:mockito-core:1.9.5"
testCompile "org.robolectric:robolectric:3.1.2"
testCompile "org.robolectric:robolectric:3.2.2"
compile fileTree(dir: 'libs', include: ['*.jar'])
<<<<<<< HEAD
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
=======
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:design:25.2.0'
>>>>>>> master
compile 'com.github.tony19:logback-android-classic:1.1.1-4'
compile 'org.slf4j:slf4j-api:1.7.7'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'

View File

@ -89,6 +89,26 @@
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.fw" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.fw" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.fw" />
<data android:pathPattern="/.*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\.ft" />
<data android:pathPattern="/.*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\.pbw" />
<data android:pathPattern="/.*\\..*\\.pbw" />
<data android:pathPattern="/.*\\..*\\..*\\.pbw" />
@ -142,6 +162,26 @@
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.fw" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.fw" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.fw" />
<data android:pathPattern="/.*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft.en" />
<data android:pathPattern="/.*\\.ft" />
<data android:pathPattern="/.*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.ft" />
<data android:pathPattern="/.*\\.pbw" />
<data android:pathPattern="/.*\\..*\\.pbw" />
<data android:pathPattern="/.*\\..*\\..*\\.pbw" />

View File

@ -109,8 +109,7 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
if (device != null && device.getAddress().equals(bondingAddress)) {
int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_NONE);
if (bondState == BluetoothDevice.BOND_BONDED) {
GB.toast(DiscoveryActivity.this, "Successfully bonded with: " + bondingAddress, Toast.LENGTH_SHORT, GB.INFO);
finish();
handleDeviceBonded();
}
}
}
@ -118,6 +117,11 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
}
};
private void handleDeviceBonded() {
GB.toast(DiscoveryActivity.this, "Successfully bonded with: " + bondingAddress, Toast.LENGTH_SHORT, GB.INFO);
finish();
}
private final BluetoothAdapter.LeScanCallback leScanCallback = new BluetoothAdapter.LeScanCallback() {
@Override
public void onLeScan(BluetoothDevice device, int rssi, byte[] scanRecord) {
@ -516,9 +520,21 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
} else {
try {
BluetoothDevice btDevice = adapter.getRemoteDevice(deviceCandidate.getMacAddress());
if (btDevice.createBond()) {
// async, wait for bonding event to finish this activity
bondingAddress = btDevice.getAddress();
switch (btDevice.getBondState()) {
case BluetoothDevice.BOND_NONE: {
if (btDevice.createBond()) {
// async, wait for bonding event to finish this activity
bondingAddress = btDevice.getAddress();
}
break;
}
case BluetoothDevice.BOND_BONDING:
// async, wait for bonding event to finish this activity
bondingAddress = btDevice.getAddress();
break;
case BluetoothDevice.BOND_BONDED:
handleDeviceBonded();
break;
}
} catch (Exception e) {
LOG.error("Error pairing device: " + deviceCandidate.getMacAddress());

View File

@ -19,6 +19,7 @@ import com.github.mikephil.charting.data.BarEntry;
import com.github.mikephil.charting.data.PieData;
import com.github.mikephil.charting.data.PieDataSet;
import com.github.mikephil.charting.data.PieEntry;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.formatter.IValueFormatter;
import org.slf4j.Logger;
@ -46,6 +47,8 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
private PieChart mTodayPieChart;
private BarChart mWeekChart;
private int mOffsetHours = getOffsetHours();
@Override
protected ChartsData refreshInBackground(ChartsHost chartsHost, DBHandler db, GBDevice device) {
Calendar day = Calendar.getInstance();
@ -86,14 +89,14 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
for (int counter = 0; counter < 7; counter++) {
ActivityAmounts amounts = getActivityAmountsForDay(db, day, device);
entries.add(new BarEntry(counter, getTotalForActivityAmounts(amounts)));
entries.add(new BarEntry(counter, getTotalsForActivityAmounts(amounts)));
labels.add(day.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT, mLocale));
day.add(Calendar.DATE, 1);
}
BarDataSet set = new BarDataSet(entries, "");
set.setColor(getMainColor());
set.setValueFormatter(getFormatter());
set.setColors(getColors());
set.setValueFormatter(getBarValueFormatter());
BarData barData = new BarData(set);
barData.setValueTextColor(Color.GRAY); //prevent tearing other graph elements with the black text. Another approach would be to hide the values cmpletely with data.setDrawValues(false);
@ -106,33 +109,34 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
}
private DayData refreshDayPie(DBHandler db, Calendar day, GBDevice device) {
ActivityAmounts amounts = getActivityAmountsForDay(db, day, device);
int totalValue = getTotalForActivityAmounts(amounts);
PieData data = new PieData();
List<PieEntry> entries = new ArrayList<>();
List<Integer> colors = new ArrayList<>();
PieDataSet set = new PieDataSet(entries, "");
entries.add(new PieEntry(totalValue, "")); //we don't want labels on the pie chart
colors.add(getMainColor());
if (totalValue < mTargetValue) {
entries.add(new PieEntry((mTargetValue - totalValue))); //we don't want labels on the pie chart
colors.add(Color.GRAY);
ActivityAmounts amounts = getActivityAmountsForDay(db, day, device);
float totalValues[] = getTotalsForActivityAmounts(amounts);
float totalValue = 0;
for (float value : totalValues) {
totalValue += value;
entries.add(new PieEntry(value));
}
set.setValueFormatter(getPieValueFormatter());
set.setColors(getColors());
if (totalValue < mTargetValue) {
entries.add(new PieEntry((mTargetValue - totalValue)));
set.addColor(Color.GRAY);
}
PieDataSet set = new PieDataSet(entries, "");
set.setValueFormatter(getFormatter());
set.setColors(colors);
data.setDataSet(set);
//this hides the values (numeric) added to the set. These would be shown aside the strings set with addXValue above
data.setDrawValues(false);
return new DayData(data, formatPieValue(totalValue));
return new DayData(data, formatPieValue((int) totalValue));
}
protected abstract String formatPieValue(int value);
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
@ -160,7 +164,7 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
private void setupTodayPieChart() {
mTodayPieChart.setBackgroundColor(BACKGROUND_COLOR);
mTodayPieChart.getDescription().setTextColor(DESCRIPTION_COLOR);
mTodayPieChart.getDescription().setText(getContext().getString(R.string.weeksteps_today_steps_description, String.valueOf(mTargetValue)));
mTodayPieChart.getDescription().setText(getPieDescription(mTargetValue));
// mTodayPieChart.setNoDataTextDescription("");
mTodayPieChart.setNoDataText("");
mTodayPieChart.getLegend().setEnabled(false);
@ -190,7 +194,7 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
y.setDrawZeroLine(true);
y.setSpaceBottom(0);
y.setAxisMinimum(0);
y.setValueFormatter(getYAxisFormatter());
y.setEnabled(true);
YAxis yAxisRight = mWeekChart.getAxisRight();
@ -211,7 +215,7 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
// chart.getLegend().setTextColor(LEGEND_TEXT_COLOR);
}
private List<? extends ActivitySample> getSamplesOfDay(DBHandler db, Calendar day, GBDevice device) {
private List<? extends ActivitySample> getSamplesOfDay(DBHandler db, Calendar day, int offsetHours, GBDevice device) {
int startTs;
int endTs;
@ -219,12 +223,10 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
day.set(Calendar.HOUR_OF_DAY, 0);
day.set(Calendar.MINUTE, 0);
day.set(Calendar.SECOND, 0);
startTs = (int) (day.getTimeInMillis() / 1000);
day.add(Calendar.HOUR, offsetHours);
day.set(Calendar.HOUR_OF_DAY, 23);
day.set(Calendar.MINUTE, 59);
day.set(Calendar.SECOND, 59);
endTs = (int) (day.getTimeInMillis() / 1000);
startTs = (int) (day.getTimeInMillis() / 1000);
endTs = startTs + 24 * 60 * 60 - 1;
return getSamples(db, device, startTs, endTs);
}
@ -270,14 +272,14 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
Activity activity = getActivity();
if (activity != null) {
activityAmountCache = ((ChartsActivity) activity).mActivityAmountCache;
amounts = (ActivityAmounts) (activityAmountCache.lookup(day.hashCode()));
amounts = (ActivityAmounts) (activityAmountCache.lookup(day.hashCode() ^ mOffsetHours));
}
if (amounts == null) {
ActivityAnalysis analysis = new ActivityAnalysis();
amounts = analysis.calculateActivityAmounts(getSamplesOfDay(db, day, device));
amounts = analysis.calculateActivityAmounts(getSamplesOfDay(db, day, mOffsetHours, device));
if (activityAmountCache != null) {
activityAmountCache.add(day.hashCode(), amounts);
activityAmountCache.add(day.hashCode() ^ mOffsetHours, amounts);
}
}
@ -286,9 +288,19 @@ public abstract class AbstractWeekChartFragment extends AbstractChartFragment {
abstract int getGoal();
abstract int getTotalForActivityAmounts(ActivityAmounts activityAmounts);
abstract int getOffsetHours();
abstract IValueFormatter getFormatter();
abstract float[] getTotalsForActivityAmounts(ActivityAmounts activityAmounts);
abstract Integer getMainColor();
abstract String formatPieValue(int value);
abstract IValueFormatter getPieValueFormatter();
abstract IValueFormatter getBarValueFormatter();
abstract IAxisValueFormatter getYAxisFormatter();
abstract int[] getColors();
abstract String getPieDescription(int targetValue);
}

View File

@ -53,7 +53,7 @@ public class ChartsActivity extends AbstractGBFragmentActivity implements Charts
private PagerTabStrip mPagerTabStrip;
private ViewPager viewPager;
LimitedQueue mActivityAmountCache = new LimitedQueue(32);
LimitedQueue mActivityAmountCache = new LimitedQueue(60);
private static class ShowDurationDialog extends Dialog {
private final String mDuration;

View File

@ -1,6 +1,8 @@
package nodomain.freeyourgadget.gadgetbridge.activities.charts;
import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.formatter.IValueFormatter;
import com.github.mikephil.charting.utils.ViewPortHandler;
@ -18,20 +20,33 @@ public class WeekSleepChartFragment extends AbstractWeekChartFragment {
return getString(R.string.weeksleepchart_sleep_a_week);
}
@Override
String getPieDescription(int targetValue) {
return getString(R.string.weeksleepchart_today_sleep_description, DateTimeUtils.minutesToHHMM(targetValue));
}
@Override
int getGoal() {
return 8 * 60; // FIXME
}
@Override
int getTotalForActivityAmounts(ActivityAmounts activityAmounts) {
long totalSeconds = 0;
int getOffsetHours() {
return -12;
}
@Override
float[] getTotalsForActivityAmounts(ActivityAmounts activityAmounts) {
long totalSecondsDeepSleep = 0;
long totalSecondsLightSleep = 0;
for (ActivityAmount amount : activityAmounts.getAmounts()) {
if ((amount.getActivityKind() & ActivityKind.TYPE_SLEEP) != 0) {
totalSeconds += amount.getTotalSeconds();
if (amount.getActivityKind() == ActivityKind.TYPE_DEEP_SLEEP) {
totalSecondsDeepSleep += amount.getTotalSeconds();
} else if (amount.getActivityKind() == ActivityKind.TYPE_LIGHT_SLEEP) {
totalSecondsLightSleep += amount.getTotalSeconds();
}
}
return (int) (totalSeconds / 60);
return new float[]{(int) (totalSecondsDeepSleep / 60), (int) (totalSecondsLightSleep / 60)};
}
@Override
@ -40,7 +55,7 @@ public class WeekSleepChartFragment extends AbstractWeekChartFragment {
}
@Override
IValueFormatter getFormatter() {
IValueFormatter getPieValueFormatter() {
return new IValueFormatter() {
@Override
public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {
@ -50,7 +65,27 @@ public class WeekSleepChartFragment extends AbstractWeekChartFragment {
}
@Override
Integer getMainColor() {
return akLightSleep.color;
IValueFormatter getBarValueFormatter() {
return new IValueFormatter() {
@Override
public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {
return DateTimeUtils.minutesToHHMM((int) value);
}
};
}
@Override
IAxisValueFormatter getYAxisFormatter() {
return new IAxisValueFormatter() {
@Override
public String getFormattedValue(float value, AxisBase axis) {
return DateTimeUtils.minutesToHHMM((int) value);
}
};
}
@Override
int[] getColors() {
return new int[]{akDeepSleep.color, akLightSleep.color};
}
}

View File

@ -1,5 +1,6 @@
package nodomain.freeyourgadget.gadgetbridge.activities.charts;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.formatter.IValueFormatter;
import nodomain.freeyourgadget.gadgetbridge.R;
@ -14,6 +15,11 @@ public class WeekStepsChartFragment extends AbstractWeekChartFragment {
return getString(R.string.weekstepschart_steps_a_week);
}
@Override
String getPieDescription(int targetValue) {
return getString(R.string.weeksteps_today_steps_description, String.valueOf(targetValue));
}
@Override
int getGoal() {
GBDevice device = getChartsHost().getDevice();
@ -24,13 +30,18 @@ public class WeekStepsChartFragment extends AbstractWeekChartFragment {
}
@Override
int getTotalForActivityAmounts(ActivityAmounts activityAmounts) {
int getOffsetHours() {
return 0;
}
@Override
float[] getTotalsForActivityAmounts(ActivityAmounts activityAmounts) {
int totalSteps = 0;
for (ActivityAmount amount : activityAmounts.getAmounts()) {
totalSteps += amount.getTotalSteps();
amount.getTotalSteps();
}
return totalSteps;
return new float[]{totalSteps};
}
@Override
@ -39,12 +50,22 @@ public class WeekStepsChartFragment extends AbstractWeekChartFragment {
}
@Override
IValueFormatter getFormatter() {
IValueFormatter getPieValueFormatter() {
return null;
}
@Override
Integer getMainColor() {
return akActivity.color;
IValueFormatter getBarValueFormatter() {
return null;
}
@Override
IAxisValueFormatter getYAxisFormatter() {
return null;
}
@Override
int[] getColors() {
return new int[]{akActivity.color};
}
}

View File

@ -45,18 +45,7 @@ public class DeviceCandidateAdapter extends ArrayAdapter<GBDeviceCandidate> {
String name = formatDeviceCandidate(device);
deviceNameLabel.setText(name);
deviceAddressLabel.setText(device.getMacAddress());
switch (device.getDeviceType()) {
case PEBBLE:
deviceImageView.setImageResource(R.drawable.ic_device_pebble);
break;
case MIBAND:
case MIBAND2:
deviceImageView.setImageResource(R.drawable.ic_device_miband);
break;
default:
deviceImageView.setImageResource(R.drawable.ic_launcher);
}
deviceImageView.setImageResource(device.getDeviceType().getIcon());
return view;
}

View File

@ -111,43 +111,10 @@ public class GBDeviceAdapter extends ArrayAdapter<GBDevice> {
batteryStatusLabel.setText("");
}
switch (device.getType()) {
case PEBBLE:
if (device.isConnected()) {
deviceImageView.setImageResource(R.drawable.ic_device_pebble);
} else {
deviceImageView.setImageResource(R.drawable.ic_device_pebble_disabled);
}
break;
case MIBAND:
case MIBAND2:
if (device.isConnected()) {
deviceImageView.setImageResource(R.drawable.ic_device_miband);
} else {
deviceImageView.setImageResource(R.drawable.ic_device_miband_disabled);
}
break;
case VIBRATISSIMO:
if (device.isConnected()) {
deviceImageView.setImageResource(R.drawable.ic_device_lovetoy);
} else {
deviceImageView.setImageResource(R.drawable.ic_device_lovetoy_disabled);
}
break;
case HPLUS:
case MAKIBESF68:
if( device.isConnected()) {
deviceImageView.setImageResource(R.drawable.ic_device_hplus);
} else {
deviceImageView.setImageResource(R.drawable.ic_device_hplus_disabled);
}
break;
default:
if (device.isConnected()) {
deviceImageView.setImageResource(R.drawable.ic_launcher);
} else {
deviceImageView.setImageResource(R.drawable.ic_device_default_disabled);
}
if (device.isConnected()) {
deviceImageView.setImageResource(device.getType().getIcon());
} else {
deviceImageView.setImageResource(device.getType().getDisabledIcon());
}
return view;

View File

@ -6,7 +6,9 @@ import android.bluetooth.le.ScanFilter;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.util.Collection;
@ -83,18 +85,20 @@ public interface DeviceCoordinator {
/**
* Returns the Activity class to be started in order to perform a pairing of a
* given device.
* given device after its discovery.
*
* @return
* @return the activity class for pairing/initial authentication, or null if none
*/
@Nullable
Class<? extends Activity> getPairingActivity();
/**
* Returns the Activity class that will be used as the primary activity
* for the given device.
*
* @return
* @return the primary activity class, or null if none
*/
@Nullable
Class<? extends Activity> getPrimaryActivity();
/**

View File

@ -94,10 +94,16 @@ public class MiBand2Service {
public static final byte[] COMMAND_SET_FITNESS_GOAL_END = new byte[] { 0, 0 };
public static byte COMMAND_DATEFORMAT = 0x06;
public static byte ENDPOINT_DISPLAY = 0x06;
public static final byte[] DATEFORMAT_DATE_TIME = new byte[] { COMMAND_DATEFORMAT, 0x0a, 0x0, 0x03 };
public static final byte[] DATEFORMAT_TIME = new byte[] { COMMAND_DATEFORMAT, 0x0a, 0x0, 0x0 };
public static final byte[] DATEFORMAT_DATE_TIME = new byte[] {ENDPOINT_DISPLAY, 0x0a, 0x0, 0x03 };
public static final byte[] DATEFORMAT_TIME = new byte[] {ENDPOINT_DISPLAY, 0x0a, 0x0, 0x0 };
public static final byte[] DATEFORMAT_TIME_12_HOURS = new byte[] {ENDPOINT_DISPLAY, 0x02, 0x0, 0x0 };
public static final byte[] DATEFORMAT_TIME_24_HOURS = new byte[] {ENDPOINT_DISPLAY, 0x02, 0x0, 0x1 };
public static final byte[] COMMAND_ENABLE_DISPLAY_ON_LIFT_WRIST = new byte[]{ENDPOINT_DISPLAY, 0x05, 0x00, 0x01};
public static final byte[] COMMAND_DISABLE_DISPLAY_ON_LIFT_WRIST = new byte[]{ENDPOINT_DISPLAY, 0x05, 0x00, 0x00};
public static final byte[] DISPLAY_XXX = new byte[] {ENDPOINT_DISPLAY, 0x03, 0x0, 0x0 };
public static final byte[] DISPLAY_YYY = new byte[] {ENDPOINT_DISPLAY, 0x10, 0x0, 0x1, 0x0 };
public static final byte RESPONSE = 0x10;
@ -109,14 +115,14 @@ public class MiBand2Service {
public static final byte COMMAND_FIRMWARE_START_DATA = 0x03; // to UUID_CHARACTERISTIC_FIRMWARE
public static final byte COMMAND_FIRMWARE_UPDATE_SYNC = 0x00; // to UUID_CHARACTERISTIC_FIRMWARE
public static final byte COMMAND_FIRMWARE_CHECKSUM = 0x04; // to UUID_CHARACTERISTIC_FIRMWARE
public static final byte COMMAND_FIRMWARE_APPLY_REBOOT = 0x05; // or is it REBOOT? to UUID_CHARACTERISTIC_FIRMWARE
public static final byte COMMAND_FIRMWARE_REBOOT = 0x05; // to UUID_CHARACTERISTIC_FIRMWARE
public static final byte[] RESPONSE_FINISH_SUCCESS = new byte[] {RESPONSE, 2, SUCCESS };
public static final byte[] RESPONSE_FIRMWARE_DATA_SUCCESS = new byte[] {RESPONSE, COMMAND_FIRMWARE_START_DATA, SUCCESS };
/**
* Received in response to any dateformat configuration request (byte 0 in the byte[] value.
*/
public static final byte[] RESPONSE_DATEFORMAT_SUCCESS = new byte[] { RESPONSE, COMMAND_DATEFORMAT, 0x0a, 0x0, 0x01 };
public static final byte[] RESPONSE_DATEFORMAT_SUCCESS = new byte[] { RESPONSE, ENDPOINT_DISPLAY, 0x0a, 0x0, 0x01 };
public static final byte[] RESPONSE_ACTIVITY_DATA_START_DATE_SUCCESS = new byte[] { RESPONSE, COMMAND_ACTIVITY_DATA_START_DATE, SUCCESS};
public static final byte[] WEAR_LOCATION_LEFT_WRIST = new byte[] { 0x20, 0x00, 0x00, 0x02 };
@ -125,32 +131,13 @@ public class MiBand2Service {
public static final byte[] COMMAND_ENABLE_HR_SLEEP_MEASUREMENT = new byte[]{0x15, 0x00, 0x01};
public static final byte[] COMMAND_DISABLE_HR_SLEEP_MEASUREMENT = new byte[]{0x15, 0x00, 0x00};
public static final byte[] COMMAND_ENABLE_DISPLAY_ON_LIFT_WRIST = new byte[]{0x06, 0x05, 0x00, 0x01};
public static final byte[] COMMAND_DISABLE_DISPLAY_ON_LIFT_WRIST = new byte[]{0x06, 0x05, 0x00, 0x00};
public static final byte[] COMMAND_TEXT_NOTIFICATION = new byte[] {0x05, 0x01};
public static final byte COMMAND_ALERT_CATEGORY_CHAT = (byte) 0xfa;
static {
MIBAND_DEBUG = new HashMap<>();
MIBAND_DEBUG.put(UUID_SERVICE_MIBAND_SERVICE, "MiBand Service");
MIBAND_DEBUG.put(UUID_SERVICE_HEART_RATE, "MiBand HR Service");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_DEVICE_INFO, "Device Info");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_DEVICE_NAME, "Device Name");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_NOTIFICATION, "Notification");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_USER_INFO, "User Info");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_CONTROL_POINT, "Control Point");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_REALTIME_STEPS, "Realtime Steps");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_ACTIVITY_DATA, "Activity Data");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_FIRMWARE_DATA, "Firmware Data");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_LE_PARAMS, "LE Params");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_DATE_TIME, "Date/Time");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_STATISTICS, "Statistics");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_BATTERY, "Battery");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_TEST, "Test");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_SENSOR_DATA, "Sensor Data");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_PAIR, "Pair");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT, "Heart Rate Control Point");
// MIBAND_DEBUG.put(UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT, "Heart Rate Measure");
}
public static String lookup(UUID uuid, String fallback) {

View File

@ -26,7 +26,6 @@ import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PR
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_MIBAND_FITNESS_GOAL;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_MIBAND_RESERVE_ALARM_FOR_CALENDAR;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_MIBAND_USE_HR_FOR_SLEEP_DETECTION;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_MIBAND_SETUP_BT_PAIRING;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.PREF_USER_ALIAS;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.VIBRATION_COUNT;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.getNotificationPrefKey;

View File

@ -4,6 +4,9 @@ import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattService;
import static nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDeviceSupport.BASE_UUID;
public class MiBandService {
@ -14,7 +17,7 @@ public class MiBandService {
public static final UUID UUID_SERVICE_MIBAND_SERVICE = UUID.fromString(String.format(BASE_UUID, "FEE0"));
public static final UUID UUID_SERVICE_MIBAND2_SERVICE = UUID.fromString(String.format(BASE_UUID, "FEE1"));
public static final UUID UUID_SERVICE_HEART_RATE = UUID.fromString(String.format(BASE_UUID, "180D"));
public static final UUID UUID_SERVICE_HEART_RATE = GattService.UUID_SERVICE_HEART_RATE;
public static final String UUID_SERVICE_WEIGHT_SERVICE = "00001530-0000-3512-2118-0009af100700";
public static final UUID UUID_CHARACTERISTIC_DEVICE_INFO = UUID.fromString(String.format(BASE_UUID, "FF01"));
@ -47,8 +50,8 @@ public class MiBandService {
public static final UUID UUID_CHARACTERISTIC_PAIR = UUID.fromString(String.format(BASE_UUID, "FF0F"));
public static final UUID UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT = UUID.fromString(String.format(BASE_UUID, "2A39"));
public static final UUID UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT = UUID.fromString(String.format(BASE_UUID, "2A37"));
public static final UUID UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT = GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT;
public static final UUID UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT = GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT;

View File

@ -1,5 +1,9 @@
package nodomain.freeyourgadget.gadgetbridge.model;
import android.support.annotation.DrawableRes;
import nodomain.freeyourgadget.gadgetbridge.R;
/**
* For every supported device, a device type constant must exist.
*
@ -7,20 +11,26 @@ package nodomain.freeyourgadget.gadgetbridge.model;
* and may not be changed.
*/
public enum DeviceType {
UNKNOWN(-1),
PEBBLE(1),
MIBAND(10),
MIBAND2(11),
VIBRATISSIMO(20),
LIVEVIEW(30),
HPLUS(40),
MAKIBESF68(41),
TEST(1000);
UNKNOWN(-1, R.drawable.ic_launcher, R.drawable.ic_device_default_disabled),
PEBBLE(1, R.drawable.ic_device_pebble, R.drawable.ic_device_pebble_disabled),
MIBAND(10, R.drawable.ic_device_miband, R.drawable.ic_device_miband_disabled),
MIBAND2(11, R.drawable.ic_device_miband, R.drawable.ic_device_miband_disabled),
VIBRATISSIMO(20, R.drawable.ic_device_lovetoy, R.drawable.ic_device_lovetoy_disabled),
LIVEVIEW(30, R.drawable.ic_launcher, R.drawable.ic_device_default_disabled),
HPLUS(40, R.drawable.ic_device_hplus, R.drawable.ic_device_hplus_disabled),
MAKIBESF68(41, R.drawable.ic_device_hplus, R.drawable.ic_device_hplus_disabled),
TEST(1000, R.drawable.ic_launcher, R.drawable.ic_device_default_disabled);
private final int key;
@DrawableRes
private final int defaultIcon;
@DrawableRes
private final int disabledIcon;
DeviceType(int key) {
DeviceType(int key, int defaultIcon, int disabledIcon) {
this.key = key;
this.defaultIcon = defaultIcon;
this.disabledIcon = disabledIcon;
}
public int getKey() {
@ -39,4 +49,14 @@ public enum DeviceType {
}
return DeviceType.UNKNOWN;
}
@DrawableRes
public int getIcon() {
return defaultIcon;
}
@DrawableRes
public int getDisabledIcon() {
return disabledIcon;
}
}

View File

@ -5,6 +5,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.pebble.PebbleIconID;
public enum NotificationType {
// TODO: this this pebbleism needs to be moved somewhere else
UNKNOWN(PebbleIconID.NOTIFICATION_GENERIC, PebbleColor.Red),
CONVERSATIONS(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.Inchworm),
@ -19,6 +20,7 @@ public enum NotificationType {
TELEGRAM(PebbleIconID.NOTIFICATION_TELEGRAM, PebbleColor.PictonBlue),
WHATSAPP(PebbleIconID.NOTIFICATION_WHATSAPP, PebbleColor.MayGreen),
GENERIC_ALARM_CLOCK(PebbleIconID.ALARM_CLOCK, PebbleColor.Red);
// Note: if you add any more constants, update all clients as well
public int icon;
public byte color;

View File

@ -261,6 +261,35 @@ public class Weather {
}
}
public static String mapToOpenWeatherMapIcon(int openWeatherMapCondition) {
//see https://openweathermap.org/weather-conditions
String condition = "02d"; //generic "variable" icon
if (openWeatherMapCondition >= 200 && openWeatherMapCondition < 300) {
condition = "11d";
} else if (openWeatherMapCondition >= 300 && openWeatherMapCondition < 500) {
condition = "09d";
} else if (openWeatherMapCondition >= 500 && openWeatherMapCondition < 510) {
condition = "10d";
} else if (openWeatherMapCondition >= 511 && openWeatherMapCondition < 600) {
condition = "09d";
} else if (openWeatherMapCondition >= 600 && openWeatherMapCondition < 700) {
condition = "13d";
} else if (openWeatherMapCondition >= 700 && openWeatherMapCondition < 800) {
condition = "50d";
} else if (openWeatherMapCondition == 800) {
condition = "01d"; //TODO: night?
} else if (openWeatherMapCondition == 801) {
condition = "02d"; //TODO: night?
} else if (openWeatherMapCondition == 802) {
condition = "03d"; //TODO: night?
} else if (openWeatherMapCondition == 803 || openWeatherMapCondition == 804) {
condition = "04d"; //TODO: night?
}
return condition;
}
public static int mapToOpenWeatherMapCondition(int yahooCondition) {
switch (yahooCondition) {
//yahoo weather conditions:

View File

@ -1,10 +1,13 @@
package nodomain.freeyourgadget.gadgetbridge.service.btle;
import java.nio.charset.StandardCharsets;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandCoordinator;
import nodomain.freeyourgadget.gadgetbridge.model.NotificationType;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification.AlertCategory;
/**
* Provides methods to convert standard BLE units to byte sequences and vice versa.
@ -233,4 +236,33 @@ public class BLETypeConversions {
}
return 0;
}
public static byte[] toUtf8s(String message) {
return message.getBytes(StandardCharsets.UTF_8);
}
public static AlertCategory toAlertCategory(NotificationType type) {
switch (type) {
case GENERIC_ALARM_CLOCK:
return AlertCategory.HighPriorityAlert;
case GENERIC_SMS:
return AlertCategory.SMS;
case GENERIC_EMAIL:
return AlertCategory.Email;
case GENERIC_NAVIGATION:
return AlertCategory.Simple;
case RIOT:
case SIGNAL:
case TELEGRAM:
case WHATSAPP:
case CONVERSATIONS:
case FACEBOOK:
case FACEBOOK_MESSENGER:
case TWITTER:
return AlertCategory.InstantMessage;
case UNKNOWN:
return AlertCategory.Simple;
}
return AlertCategory.Simple;
}
}

View File

@ -21,6 +21,7 @@ public class GattCharacteristic {
public static final UUID UUID_CHARACTERISTIC_ALERT_CATEGORY_ID = UUID.fromString((String.format(AbstractBTLEDeviceSupport.BASE_UUID, "2A43")));
public static final UUID UUID_CHARACTERISTIC_ALERT_CATEGORY_ID_BIT_MASK = UUID.fromString((String.format(AbstractBTLEDeviceSupport.BASE_UUID, "2A42")));
public static final UUID UUID_CHARACTERISTIC_ALERT_LEVEL = UUID.fromString((String.format(AbstractBTLEDeviceSupport.BASE_UUID, "2A06")));
public static final UUID UUID_CHARACTERISTIC_CLIENT_CHARACTERISTIC_CONFIG = UUID.fromString((String.format(AbstractBTLEDeviceSupport.BASE_UUID, "2902")));
public static final byte NO_ALERT = 0x0;
public static final byte MILD_ALERT = 0x1;

View File

@ -1,12 +1,66 @@
package nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification;
import android.bluetooth.BluetoothGattCharacteristic;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.AbstractBleProfile;
import nodomain.freeyourgadget.gadgetbridge.util.StringUtils;
public class AlertNotificationProfile<T extends AbstractBTLEDeviceSupport> extends AbstractBleProfile<T> {
private static final Logger LOG = LoggerFactory.getLogger(AlertNotificationProfile.class);
private static final int MAX_MSG_LENGTH = 18;
public AlertNotificationProfile(T support) {
super(support);
}
public void newAlert(TransactionBuilder builder, NewAlert alert, OverflowStrategy strategy) {
BluetoothGattCharacteristic characteristic = getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_NEW_ALERT);
if (characteristic != null) {
String message = alert.getMessage();
if (message.length() > MAX_MSG_LENGTH && strategy == OverflowStrategy.TRUNCATE) {
message = StringUtils.truncate(message, MAX_MSG_LENGTH);
}
int numChunks = message.length() / MAX_MSG_LENGTH;
if (message.length() % MAX_MSG_LENGTH > 0) {
numChunks++;
}
for (int i = 0; i < numChunks; i++) {
int offset = i * MAX_MSG_LENGTH;
int restLength = message.length() - offset;
message = message.substring(offset, offset + Math.min(MAX_MSG_LENGTH, restLength));
if (message.length() == 0) {
break;
}
writeAlertMessage(builder, characteristic, alert, message, i);
}
} else {
LOG.warn("NEW_ALERT characteristic not available");
}
}
protected void writeAlertMessage(TransactionBuilder builder, BluetoothGattCharacteristic characteristic, NewAlert alert, String message, int chunk) {
try {
ByteArrayOutputStream stream = new ByteArrayOutputStream(100);
stream.write(alert.getCategory().getId());
stream.write(alert.getNumAlerts());
stream.write(BLETypeConversions.toUtf8s(message));
builder.write(characteristic, stream.toByteArray());
} catch (IOException ex) {
// aint gonna happen
LOG.error("Error writing alert message to ByteArrayOutputStream");
}
}
}

View File

@ -0,0 +1,52 @@
package nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification;
/**
* https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.new_alert.xml&u=org.bluetooth.characteristic.new_alert.xml
*
Recommended Usage for Text String Information Field in New Incoming Alert:
The usage of this text is up to the implementation, but the recommended text for the category is defined as following for best user experience:
Category: Simple Alert - The title of the alert
Category: Email - Sender name
Category: News - Title of the news feed
Category: Call - Caller name or caller ID
Category: Missed call - Caller name or caller ID
Category: SMS - Sender name or caller ID
Category: Voice mail - Sender name or caller ID
Category: Schedule - Title of the schedule
Category Hig:h Prioritized Aler - Title of the alert
Category: Instant Messaging - Sender name
*/
public class NewAlert {
private final AlertCategory category;
private final int numAlerts;
private final String message;
public NewAlert(AlertCategory category, int /*uint8*/ numAlerts, String /*utf8s*/ message) {
this.category = category;
this.numAlerts = numAlerts;
this.message = message;
}
public AlertCategory getCategory() {
return category;
}
public int getNumAlerts() {
return numAlerts;
}
public String getMessage() {
return message;
}
}

View File

@ -0,0 +1,6 @@
package nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification;
public enum OverflowStrategy {
TRUNCATE,
MAKE_MULTIPLE
}

View File

@ -0,0 +1,21 @@
package nodomain.freeyourgadget.gadgetbridge.service.devices.common;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification.AlertCategory;
public class SimpleNotification {
private final String message;
private final AlertCategory alertCategory;
public SimpleNotification(String message, AlertCategory alertCategory) {
this.message = message;
this.alertCategory = alertCategory;
}
public AlertCategory getAlertCategory() {
return alertCategory;
}
public String getMessage() {
return message;
}
}

View File

@ -53,6 +53,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec;
import nodomain.freeyourgadget.gadgetbridge.model.NotificationType;
import nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec;
import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
import nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattService;
@ -61,10 +62,13 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.AbortTransactio
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.ConditionalWriteAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceStateAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.WriteAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification.AlertCategory;
import nodomain.freeyourgadget.gadgetbridge.service.devices.common.SimpleNotification;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.operations.FetchActivityOperation;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.operations.UpdateFirmwareOperation;
import nodomain.freeyourgadget.gadgetbridge.util.DateTimeUtils;
import nodomain.freeyourgadget.gadgetbridge.util.GB;
import nodomain.freeyourgadget.gadgetbridge.util.NotificationUtils;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.DEFAULT_VALUE_FLASH_COLOUR;
@ -205,19 +209,19 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
return mDeviceInfo;
}
private MiBandSupport sendDefaultNotification(TransactionBuilder builder, short repeat, BtLEAction extraAction) {
private MiBandSupport sendDefaultNotification(TransactionBuilder builder, SimpleNotification simpleNotification, short repeat, BtLEAction extraAction) {
LOG.info("Sending notification to MiBand: (" + repeat + " times)");
NotificationStrategy strategy = getNotificationStrategy();
for (short i = 0; i < repeat; i++) {
strategy.sendDefaultNotification(builder, extraAction);
strategy.sendDefaultNotification(builder, simpleNotification, extraAction);
}
return this;
}
/**
* Adds a custom notification to the given transaction builder
*
* @param vibrationProfile specifies how and how often the Band shall vibrate.
* @param vibrationProfile specifies how and how often the Band shall vibrate.
* @param simpleNotification
* @param flashTimes
* @param flashColour
* @param originalColour
@ -225,8 +229,8 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
* @param extraAction an extra action to be executed after every vibration and flash sequence. Allows to abort the repetition, for example.
* @param builder
*/
private MiBandSupport sendCustomNotification(VibrationProfile vibrationProfile, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
getNotificationStrategy().sendCustomNotification(vibrationProfile, flashTimes, flashColour, originalColour, flashDuration, extraAction, builder);
private MiBandSupport sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
getNotificationStrategy().sendCustomNotification(vibrationProfile, simpleNotification, flashTimes, flashColour, originalColour, flashDuration, extraAction, builder);
LOG.info("Sending notification to MiBand");
return this;
}
@ -454,17 +458,17 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
return this;
}
private void performDefaultNotification(String task, short repeat, BtLEAction extraAction) {
private void performDefaultNotification(String task, SimpleNotification simpleNotification, short repeat, BtLEAction extraAction) {
try {
TransactionBuilder builder = performInitialized(task);
sendDefaultNotification(builder, repeat, extraAction);
sendDefaultNotification(builder, simpleNotification, repeat, extraAction);
builder.queue(getQueue());
} catch (IOException ex) {
LOG.error("Unable to send notification to MI device", ex);
}
}
private void performPreferredNotification(String task, String notificationOrigin, BtLEAction extraAction) {
private void performPreferredNotification(String task, SimpleNotification simpleNotification, String notificationOrigin, BtLEAction extraAction) {
try {
TransactionBuilder builder = performInitialized(task);
Prefs prefs = GBApplication.getPrefs();
@ -479,7 +483,7 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
int flashDuration = getPreferredFlashDuration(notificationOrigin, prefs);
// setLowLatency(builder);
sendCustomNotification(profile, flashTimes, flashColour, originalColour, flashDuration, extraAction, builder);
sendCustomNotification(profile, simpleNotification, flashTimes, flashColour, originalColour, flashDuration, extraAction, builder);
// setHighLatency(builder);
// sendCustomNotification(vibrateDuration, vibrateTimes, vibratePause, flashTimes, flashColour, originalColour, flashDuration, builder);
builder.queue(getQueue());
@ -549,8 +553,11 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
return;
}
String message = NotificationUtils.getPreferredTextFor(notificationSpec, 40, 40, getContext()).trim();
SimpleNotification simpleNotification = new SimpleNotification(message, BLETypeConversions.toAlertCategory(notificationSpec.type));
String origin = notificationSpec.type.getGenericType();
performPreferredNotification(origin + " received", origin, null);
performPreferredNotification(origin + " received", simpleNotification, origin, null);
}
private void onAlarmClock(NotificationSpec notificationSpec) {
@ -561,7 +568,9 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
return !isAlarmClockRinging();
}
};
performPreferredNotification("alarm clock ringing", MiBandConst.ORIGIN_ALARM_CLOCK, abortAction);
String message = NotificationUtils.getPreferredTextFor(notificationSpec, 40, 40, getContext());
SimpleNotification simpleNotification = new SimpleNotification(message, AlertCategory.HighPriorityAlert);
performPreferredNotification("alarm clock ringing", simpleNotification, MiBandConst.ORIGIN_ALARM_CLOCK, abortAction);
}
@Override
@ -625,7 +634,9 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
return !isTelephoneRinging();
}
};
performPreferredNotification("incoming call", MiBandConst.ORIGIN_INCOMING_CALL, abortAction);
String message = NotificationUtils.getPreferredTextFor(callSpec);
SimpleNotification simpleNotification = new SimpleNotification(message, AlertCategory.IncomingCall);
performPreferredNotification("incoming call", simpleNotification, MiBandConst.ORIGIN_INCOMING_CALL, abortAction);
} else if ((callSpec.command == CallSpec.CALL_START) || (callSpec.command == CallSpec.CALL_END)) {
telephoneRinging = false;
}
@ -716,7 +727,8 @@ public class MiBandSupport extends AbstractBTLEDeviceSupport {
return !isLocatingDevice;
}
};
performDefaultNotification("locating device", (short) 255, abortAction);
SimpleNotification simpleNotification = new SimpleNotification(getContext().getString(R.string.find_device_you_found_it), AlertCategory.HighPriorityAlert);
performDefaultNotification("locating device", simpleNotification, (short) 255, abortAction);
}
}

View File

@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.VibrationProfile;
import nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.devices.common.SimpleNotification;
/**
* Does not do anything.
@ -14,12 +15,12 @@ public class NoNotificationStrategy implements NotificationStrategy {
private static final Logger LOG = LoggerFactory.getLogger(NoNotificationStrategy.class);
@Override
public void sendDefaultNotification(TransactionBuilder builder, BtLEAction extraAction) {
public void sendDefaultNotification(TransactionBuilder builder, SimpleNotification simpleNotification, BtLEAction extraAction) {
LOG.info("dummy notification stragegy: default notification");
}
@Override
public void sendCustomNotification(VibrationProfile vibrationProfile, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
LOG.info("dummy notification stragegy: custom notification");
public void sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
LOG.info("dummy notification stragegy: custom notification: " + simpleNotification);
}
}

View File

@ -3,14 +3,15 @@ package nodomain.freeyourgadget.gadgetbridge.service.devices.miband;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.VibrationProfile;
import nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.devices.common.SimpleNotification;
public interface NotificationStrategy {
void sendDefaultNotification(TransactionBuilder builder, BtLEAction extraAction);
void sendDefaultNotification(TransactionBuilder builder, SimpleNotification simpleNotification, BtLEAction extraAction);
/**
* Adds a custom notification to the given transaction builder
*
* @param vibrationProfile specifies how and how often the Band shall vibrate.
* @param simpleNotification
* @param flashTimes
* @param flashColour
* @param originalColour
@ -18,5 +19,5 @@ public interface NotificationStrategy {
* @param extraAction an extra action to be executed after every vibration and flash sequence. Allows to abort the repetition, for example.
* @param builder
*/
void sendCustomNotification(VibrationProfile vibrationProfile, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder);
void sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder);
}

View File

@ -10,6 +10,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.miband.VibrationProfile;
import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDeviceSupport;
import nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.devices.common.SimpleNotification;
public class V1NotificationStrategy implements NotificationStrategy {
private static final Logger LOG = LoggerFactory.getLogger(V1NotificationStrategy.class);
@ -24,7 +25,7 @@ public class V1NotificationStrategy implements NotificationStrategy {
}
@Override
public void sendDefaultNotification(TransactionBuilder builder, BtLEAction extraAction) {
public void sendDefaultNotification(TransactionBuilder builder, SimpleNotification simpleNotification, BtLEAction extraAction) {
BluetoothGattCharacteristic characteristic = support.getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT);
builder.write(characteristic, getDefaultNotification());
builder.add(extraAction);
@ -53,8 +54,8 @@ public class V1NotificationStrategy implements NotificationStrategy {
/**
* Adds a custom notification to the given transaction builder
*
* @param vibrationProfile specifies how and how often the Band shall vibrate.
* @param simpleNotification
* @param flashTimes
* @param flashColour
* @param originalColour
@ -63,7 +64,7 @@ public class V1NotificationStrategy implements NotificationStrategy {
* @param builder
*/
@Override
public void sendCustomNotification(VibrationProfile vibrationProfile, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
public void sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
BluetoothGattCharacteristic controlPoint = support.getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT);
for (short i = 0; i < vibrationProfile.getRepeat(); i++) {
int[] onOffSequence = vibrationProfile.getOnOffSequence();

View File

@ -7,6 +7,10 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDeviceSuppo
import nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification.AlertNotificationProfile;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification.NewAlert;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification.OverflowStrategy;
import nodomain.freeyourgadget.gadgetbridge.service.devices.common.SimpleNotification;
public class V2NotificationStrategy implements NotificationStrategy {
private final AbstractBTLEDeviceSupport support;
@ -20,12 +24,12 @@ public class V2NotificationStrategy implements NotificationStrategy {
}
@Override
public void sendDefaultNotification(TransactionBuilder builder, BtLEAction extraAction) {
public void sendDefaultNotification(TransactionBuilder builder, SimpleNotification simpleNotification, BtLEAction extraAction) {
VibrationProfile profile = VibrationProfile.getProfile(VibrationProfile.ID_MEDIUM, (short) 3);
sendCustomNotification(profile, extraAction, builder);
sendCustomNotification(profile, simpleNotification, extraAction, builder);
}
protected void sendCustomNotification(VibrationProfile vibrationProfile, BtLEAction extraAction, TransactionBuilder builder) {
protected void sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, BtLEAction extraAction, TransactionBuilder builder) {
//use the new alert characteristic
BluetoothGattCharacteristic alert = support.getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_ALERT_LEVEL);
for (short i = 0; i < vibrationProfile.getRepeat(); i++) {
@ -49,11 +53,18 @@ public class V2NotificationStrategy implements NotificationStrategy {
}
}
}
// sendAlert(simpleNotification, builder);
}
protected void sendAlert(SimpleNotification simpleNotification, TransactionBuilder builder) {
AlertNotificationProfile<?> profile = new AlertNotificationProfile<>(getSupport());
NewAlert alert = new NewAlert(simpleNotification.getAlertCategory(), 1, simpleNotification.getMessage());
profile.newAlert(builder, alert, OverflowStrategy.MAKE_MULTIPLE);
}
@Override
public void sendCustomNotification(VibrationProfile vibrationProfile, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
public void sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
// all other parameters are unfortunately not supported anymore ;-(
sendCustomNotification(vibrationProfile, extraAction, builder);
sendCustomNotification(vibrationProfile, simpleNotification, extraAction, builder);
}
}

View File

@ -0,0 +1,19 @@
package nodomain.freeyourgadget.gadgetbridge.service.devices.miband2;
public enum FirmwareType {
FIRMWARE((byte) 0),
FONT((byte) 1),
UNKNOWN1((byte) 2),
UNKNOWN2((byte) 3),
INVALID(Byte.MIN_VALUE);
private final byte value;
FirmwareType(byte value) {
this.value = value;
}
public byte getValue() {
return value;
}
}

View File

@ -27,13 +27,23 @@ public class Mi2FirmwareInfo {
(byte) 0xf3,
(byte) 0xe7,
};
private static final int FW_HEADER_OFFSET = 0x150;
private static final byte[] FT_HEADER = new byte[] { // HMZK font file (*.ft, *.ft.xx)
0x48,
0x4d,
0x5a,
0x4b
};
private static Map<Integer,String> crcToVersion = new HashMap<>();
static {
crcToVersion.put(41899, "1.0.0.39");
}
private FirmwareType firmwareType = FirmwareType.FIRMWARE;
public static String toVersion(int crc16) {
return crcToVersion.get(crc16);
}
@ -51,6 +61,18 @@ public class Mi2FirmwareInfo {
this.bytes = bytes;
crc16 = CheckSums.getCRC16(bytes);
firmwareVersion = crcToVersion.get(crc16);
firmwareType = determineFirmwareType(bytes);
}
private FirmwareType determineFirmwareType(byte[] bytes) {
if (ArrayUtils.startsWith(bytes, FT_HEADER)) {
return FirmwareType.FONT;
}
if (ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET)) {
// TODO: this is certainly not a correct validation, but it works for now
return FirmwareType.FIRMWARE;
}
return FirmwareType.INVALID;
}
public boolean isGenerallyCompatibleWith(GBDevice device) {
@ -58,8 +80,7 @@ public class Mi2FirmwareInfo {
}
public boolean isHeaderValid() {
// TODO: this is certainly not a correct validation, but it works for now
return ArrayUtils.equals(bytes, FW_HEADER, FW_HEADER_OFFSET);
return getFirmwareType() != FirmwareType.INVALID;
}
public void checkValid() throws IllegalArgumentException {
@ -84,4 +105,8 @@ public class Mi2FirmwareInfo {
public int getFirmwareVersion() {
return getCrc16(); // HACK until we know how to determine the version from the fw bytes
}
public FirmwareType getFirmwareType() {
return firmwareType;
}
}

View File

@ -7,6 +7,8 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.AbstractBTLEDeviceSuppo
import nodomain.freeyourgadget.gadgetbridge.service.btle.BtLEAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.GattCharacteristic;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification.AlertNotificationProfile;
import nodomain.freeyourgadget.gadgetbridge.service.devices.common.SimpleNotification;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.V2NotificationStrategy;
public class Mi2NotificationStrategy extends V2NotificationStrategy {
@ -16,7 +18,7 @@ public class Mi2NotificationStrategy extends V2NotificationStrategy {
}
@Override
protected void sendCustomNotification(VibrationProfile vibrationProfile, BtLEAction extraAction, TransactionBuilder builder) {
protected void sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, BtLEAction extraAction, TransactionBuilder builder) {
//use the new alert characteristic
BluetoothGattCharacteristic alert = getSupport().getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_ALERT_LEVEL);
for (short i = 0; i < vibrationProfile.getRepeat(); i++) {
@ -38,11 +40,13 @@ public class Mi2NotificationStrategy extends V2NotificationStrategy {
}
}
}
sendAlert(simpleNotification, builder);
}
@Override
public void sendCustomNotification(VibrationProfile vibrationProfile, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
public void sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
// all other parameters are unfortunately not supported anymore ;-(
sendCustomNotification(vibrationProfile, extraAction, builder);
sendCustomNotification(vibrationProfile, simpleNotification, extraAction, builder);
}
}

View File

@ -8,6 +8,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.support.v4.content.LocalBroadcastManager;
import android.text.format.DateFormat;
import android.widget.Toast;
import org.apache.commons.lang3.ArrayUtils;
@ -16,7 +17,6 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.List;
@ -36,7 +36,6 @@ import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBand2SampleProvider
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBand2Service;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandDateConverter;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandService;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.VibrationProfile;
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
@ -44,7 +43,6 @@ import nodomain.freeyourgadget.gadgetbridge.entities.Device;
import nodomain.freeyourgadget.gadgetbridge.entities.MiBandActivitySample;
import nodomain.freeyourgadget.gadgetbridge.entities.User;
import nodomain.freeyourgadget.gadgetbridge.impl.GBAlarm;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice.State;
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
import nodomain.freeyourgadget.gadgetbridge.model.Alarm;
@ -66,19 +64,18 @@ import nodomain.freeyourgadget.gadgetbridge.service.btle.GattService;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.AbortTransactionAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceStateAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.WriteAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.alertnotification.AlertCategory;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.deviceinfo.DeviceInfoProfile;
import nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.heartrate.HeartRateProfile;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.CheckAuthenticationNeededAction;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.DeviceInfo;
import nodomain.freeyourgadget.gadgetbridge.service.devices.common.SimpleNotification;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.NotificationStrategy;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.RealtimeSamplesSupport;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.actions.StopNotificationAction;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.operations.FetchActivityOperation;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.operations.InitOperation;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.operations.UpdateFirmwareOperation;
import nodomain.freeyourgadget.gadgetbridge.util.DateTimeUtils;
import nodomain.freeyourgadget.gadgetbridge.util.GB;
import nodomain.freeyourgadget.gadgetbridge.util.NotificationUtils;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
import static nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBandConst.DEFAULT_VALUE_FLASH_COLOUR;
@ -119,8 +116,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
private volatile boolean telephoneRinging;
private volatile boolean isLocatingDevice;
private DeviceInfo mDeviceInfo;
private final GBDeviceEventVersionInfo versionCmd = new GBDeviceEventVersionInfo();
private final GBDeviceEventBatteryInfo batteryCmd = new GBDeviceEventBatteryInfo();
private RealtimeSamplesSupport realtimeSamplesSupport;
@ -167,26 +162,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
} catch (IOException e) {
GB.toast(getContext(), "Initializing Mi Band 2 failed", Toast.LENGTH_SHORT, GB.ERROR, e);
}
// builder.add(new SetDeviceStateAction(getDevice(), State.INITIALIZING, getContext()));
// enableNotifications(builder, true)
// .setLowLatency(builder)
// .readDate(builder) // without reading the data, we get sporadic connection problems, especially directly after turning on BT
// this is apparently not needed anymore, and actually causes problems when bonding is not used/does not work
// so we simply not use the UUID_PAIR characteristic.
// .pair(builder)
//.requestDeviceInfo(builder)
//.requestBatteryInfo(builder);
// .sendUserInfo(builder)
// .checkAuthenticationNeeded(builder, getDevice())
// .setWearLocation(builder)
// .setHeartrateSleepSupport(builder)
// .setFitnessGoal(builder)
// .enableFurtherNotifications(builder, true)
// .setCurrentTime(builder)
// .requestBatteryInfo(builder)
// .setHighLatency(builder)
// .setInitialized(builder);
return builder;
}
@ -222,27 +197,13 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return this;
}
private MiBand2Support readDate(TransactionBuilder builder) {
// NAVL
// builder.read(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_DATE_TIME));
// TODO: handle result
builder.read(getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_CURRENT_TIME));
return this;
}
// NAVL
public MiBand2Support setLowLatency(TransactionBuilder builder) {
// builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_LE_PARAMS), getLowLatency());
return this;
}
// NAVL
public MiBand2Support setHighLatency(TransactionBuilder builder) {
// builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_LE_PARAMS), getHighLatency());
// TODO: low latency?
return this;
}
private MiBand2Support checkAuthenticationNeeded(TransactionBuilder builder, GBDevice device) {
builder.add(new CheckAuthenticationNeededAction(device));
public MiBand2Support setHighLatency(TransactionBuilder builder) {
// TODO: high latency?
return this;
}
@ -268,13 +229,10 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
}
public MiBand2Support enableFurtherNotifications(TransactionBuilder builder, boolean enable) {
// builder.notify(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS), enable)
// .notify(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_ACTIVITY_DATA), enable)
// .notify(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_SENSOR_DATA), enable);
builder.notify(getCharacteristic(MiBand2Service.UUID_CHARACTERISTIC_3_CONFIGURATION), enable);
builder.notify(getCharacteristic(MiBand2Service.UUID_CHARACTERISTIC_6_BATTERY_INFO), enable);
builder.notify(getCharacteristic(MiBand2Service.UUID_CHARACTERISTIC_10_BUTTON), enable);
BluetoothGattCharacteristic heartrateCharacteristic = getCharacteristic(MiBandService.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT);
BluetoothGattCharacteristic heartrateCharacteristic = getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT);
if (heartrateCharacteristic != null) {
builder.notify(heartrateCharacteristic, enable);
}
@ -297,23 +255,19 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
}
}
public DeviceInfo getDeviceInfo() {
return mDeviceInfo;
}
private MiBand2Support sendDefaultNotification(TransactionBuilder builder, short repeat, BtLEAction extraAction) {
private MiBand2Support sendDefaultNotification(TransactionBuilder builder, SimpleNotification simpleNotification, short repeat, BtLEAction extraAction) {
LOG.info("Sending notification to MiBand: (" + repeat + " times)");
NotificationStrategy strategy = getNotificationStrategy();
for (short i = 0; i < repeat; i++) {
strategy.sendDefaultNotification(builder, extraAction);
strategy.sendDefaultNotification(builder, simpleNotification, extraAction);
}
return this;
}
/**
* Adds a custom notification to the given transaction builder
*
* @param vibrationProfile specifies how and how often the Band shall vibrate.
* @param simpleNotification
* @param flashTimes
* @param flashColour
* @param originalColour
@ -321,8 +275,8 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
* @param extraAction an extra action to be executed after every vibration and flash sequence. Allows to abort the repetition, for example.
* @param builder
*/
private MiBand2Support sendCustomNotification(VibrationProfile vibrationProfile, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
getNotificationStrategy().sendCustomNotification(vibrationProfile, flashTimes, flashColour, originalColour, flashDuration, extraAction, builder);
private MiBand2Support sendCustomNotification(VibrationProfile vibrationProfile, SimpleNotification simpleNotification, int flashTimes, int flashColour, int originalColour, long flashDuration, BtLEAction extraAction, TransactionBuilder builder) {
getNotificationStrategy().sendCustomNotification(vibrationProfile, simpleNotification, flashTimes, flashColour, originalColour, flashDuration, extraAction, builder);
LOG.info("Sending notification to MiBand");
return this;
}
@ -331,44 +285,10 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return new Mi2NotificationStrategy(this);
}
static final byte[] reboot = new byte[]{MiBandService.COMMAND_REBOOT};
static final byte[] startHeartMeasurementManual = new byte[]{0x15, MiBandService.COMMAND_SET_HR_MANUAL, 1};
static final byte[] stopHeartMeasurementManual = new byte[]{0x15, MiBandService.COMMAND_SET_HR_MANUAL, 0};
static final byte[] startHeartMeasurementContinuous = new byte[]{0x15, MiBandService.COMMAND_SET__HR_CONTINUOUS, 1};
static final byte[] stopHeartMeasurementContinuous = new byte[]{0x15, MiBandService.COMMAND_SET__HR_CONTINUOUS, 0};
static final byte[] startHeartMeasurementSleep = new byte[]{0x15, MiBandService.COMMAND_SET_HR_SLEEP, 1};
static final byte[] stopHeartMeasurementSleep = new byte[]{0x15, MiBandService.COMMAND_SET_HR_SLEEP, 0};
static final byte[] startRealTimeStepsNotifications = new byte[]{MiBandService.COMMAND_SET_REALTIME_STEPS_NOTIFICATION, 1};
static final byte[] stopRealTimeStepsNotifications = new byte[]{MiBandService.COMMAND_SET_REALTIME_STEPS_NOTIFICATION, 0};
/**
* Part of device initialization process. Do not call manually.
*
* @param builder
* @return
*/
private MiBand2Support sendUserInfo(TransactionBuilder builder) {
LOG.debug("Writing User Info!");
// Use a custom action instead of just builder.write() because mDeviceInfo
// is set by handleDeviceInfo *after* this action is created.
builder.add(new BtLEAction(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_USER_INFO)) {
@Override
public boolean expectsResult() {
return true;
}
@Override
public boolean run(BluetoothGatt gatt) {
// at this point, mDeviceInfo should be set
return new WriteAction(getCharacteristic(),
MiBandCoordinator.getAnyUserInfo(getDevice().getAddress()).getData(mDeviceInfo)
).run(gatt);
}
});
return this;
}
private static final byte[] startHeartMeasurementManual = new byte[]{0x15, MiBandService.COMMAND_SET_HR_MANUAL, 1};
private static final byte[] stopHeartMeasurementManual = new byte[]{0x15, MiBandService.COMMAND_SET_HR_MANUAL, 0};
private static final byte[] startHeartMeasurementContinuous = new byte[]{0x15, MiBandService.COMMAND_SET__HR_CONTINUOUS, 1};
private static final byte[] stopHeartMeasurementContinuous = new byte[]{0x15, MiBandService.COMMAND_SET__HR_CONTINUOUS, 0};
private MiBand2Support requestBatteryInfo(TransactionBuilder builder) {
LOG.debug("Requesting Battery Info!");
@ -383,31 +303,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return this;
}
/* private MiBandSupport requestHRInfo(TransactionBuilder builder) {
LOG.debug("Requesting HR Info!");
BluetoothGattCharacteristic HRInfo = getCharacteristic(MiBandService.UUID_CHAR_HEART_RATE_MEASUREMENT);
builder.read(HRInfo);
BluetoothGattCharacteristic HR_Point = getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT);
builder.read(HR_Point);
return this;
}
*//**
* Part of HR test. Do not call manually.
*
* @param transaction
* @return
*//*
private MiBandSupport heartrate(TransactionBuilder transaction) {
LOG.info("Attempting to read HR ...");
BluetoothGattCharacteristic characteristic = getCharacteristic(MiBandService.UUID_CHAR_HEART_RATE_MEASUREMENT);
if (characteristic != null) {
transaction.write(characteristic, new byte[]{MiBandService.COMMAND_SET__HR_CONTINUOUS});
} else {
LOG.info("Unable to read HR from MI device -- characteristic not available");
}
return this;
}*/
/**
* Part of device initialization process. Do not call manually.
*
@ -500,17 +395,17 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return this;
}
private void performDefaultNotification(String task, short repeat, BtLEAction extraAction) {
private void performDefaultNotification(String task, SimpleNotification simpleNotification, short repeat, BtLEAction extraAction) {
try {
TransactionBuilder builder = performInitialized(task);
sendDefaultNotification(builder, repeat, extraAction);
sendDefaultNotification(builder, simpleNotification, repeat, extraAction);
builder.queue(getQueue());
} catch (IOException ex) {
LOG.error("Unable to send notification to MI device", ex);
}
}
private void performPreferredNotification(String task, String notificationOrigin, int alertLevel, BtLEAction extraAction) {
private void performPreferredNotification(String task, String notificationOrigin, SimpleNotification simpleNotification, int alertLevel, BtLEAction extraAction) {
try {
TransactionBuilder builder = performInitialized(task);
Prefs prefs = GBApplication.getPrefs();
@ -525,7 +420,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
int originalColour = getPreferredOriginalColour(notificationOrigin, prefs);
int flashDuration = getPreferredFlashDuration(notificationOrigin, prefs);
sendCustomNotification(profile, flashTimes, flashColour, originalColour, flashDuration, extraAction, builder);
sendCustomNotification(profile, simpleNotification, flashTimes, flashColour, originalColour, flashDuration, extraAction, builder);
// sendCustomNotification(vibrateDuration, vibrateTimes, vibratePause, flashTimes, flashColour, originalColour, flashDuration, builder);
builder.queue(getQueue());
} catch (IOException ex) {
@ -597,8 +492,10 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
if (notificationSpec.type == NotificationType.UNKNOWN) {
alertLevel = MiBand2Service.ALERT_LEVEL_VIBRATE_ONLY;
}
String message = NotificationUtils.getPreferredTextFor(notificationSpec, 40, 40, getContext()).trim();
String origin = notificationSpec.type.getGenericType();
performPreferredNotification(origin + " received", origin, alertLevel, null);
SimpleNotification simpleNotification = new SimpleNotification(message, BLETypeConversions.toAlertCategory(notificationSpec.type));
performPreferredNotification(origin + " received", origin, simpleNotification, alertLevel, null);
}
private void onAlarmClock(NotificationSpec notificationSpec) {
@ -609,7 +506,9 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return !isAlarmClockRinging();
}
};
performPreferredNotification("alarm clock ringing", MiBandConst.ORIGIN_ALARM_CLOCK, MiBand2Service.ALERT_LEVEL_VIBRATE_ONLY, abortAction);
String message = NotificationUtils.getPreferredTextFor(notificationSpec, 40, 40, getContext());
SimpleNotification simpleNotification = new SimpleNotification(message, AlertCategory.HighPriorityAlert);
performPreferredNotification("alarm clock ringing", MiBandConst.ORIGIN_ALARM_CLOCK, simpleNotification, MiBand2Service.ALERT_LEVEL_VIBRATE_ONLY, abortAction);
}
@Override
@ -640,7 +539,9 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return !isTelephoneRinging();
}
};
performPreferredNotification("incoming call", MiBandConst.ORIGIN_INCOMING_CALL, MiBand2Service.ALERT_LEVEL_PHONE_CALL, abortAction);
String message = NotificationUtils.getPreferredTextFor(callSpec);
SimpleNotification simpleNotification = new SimpleNotification(message, AlertCategory.IncomingCall);
performPreferredNotification("incoming call", MiBandConst.ORIGIN_INCOMING_CALL, simpleNotification, MiBand2Service.ALERT_LEVEL_PHONE_CALL, abortAction);
} else if ((callSpec.command == CallSpec.CALL_START) || (callSpec.command == CallSpec.CALL_END)) {
telephoneRinging = false;
}
@ -674,7 +575,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
public void onReboot() {
try {
TransactionBuilder builder = performInitialized("Reboot");
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT), reboot);
builder.write(getCharacteristic(MiBand2Service.UUID_CHARACTERISTIC_FIRMWARE), new byte[] { MiBand2Service.COMMAND_FIRMWARE_REBOOT});
builder.queue(getQueue());
} catch (IOException ex) {
LOG.error("Unable to reboot MI", ex);
@ -685,9 +586,9 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
public void onHeartRateTest() {
try {
TransactionBuilder builder = performInitialized("HeartRateTest");
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), stopHeartMeasurementContinuous);
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), stopHeartMeasurementManual);
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), startHeartMeasurementManual);
builder.write(getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), stopHeartMeasurementContinuous);
builder.write(getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), stopHeartMeasurementManual);
builder.write(getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), startHeartMeasurementManual);
builder.queue(getQueue());
} catch (IOException ex) {
LOG.error("Unable to read HearRate with MI2", ex);
@ -699,8 +600,8 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
try {
TransactionBuilder builder = performInitialized("Enable realtime heart rateM measurement");
if (enable) {
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), stopHeartMeasurementManual);
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), startHeartMeasurementContinuous);
builder.write(getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), stopHeartMeasurementManual);
builder.write(getCharacteristic(GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), startHeartMeasurementContinuous);
} else {
builder.write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_HEART_RATE_CONTROL_POINT), stopHeartMeasurementContinuous);
}
@ -722,7 +623,8 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return !isLocatingDevice;
}
};
performDefaultNotification("locating device", (short) 255, abortAction);
SimpleNotification simpleNotification = new SimpleNotification(getContext().getString(R.string.find_device_you_found_it), AlertCategory.HighPriorityAlert.HighPriorityAlert);
performDefaultNotification("locating device", simpleNotification, (short) 255, abortAction);
}
}
@ -742,19 +644,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
@Override
public void onEnableRealtimeSteps(boolean enable) {
// try {
// BluetoothGattCharacteristic controlPoint = getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT);
// if (enable) {
// TransactionBuilder builder = performInitialized("Read realtime steps");
// builder.read(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS)).queue(getQueue());
// }
// performInitialized(enable ? "Enabling realtime steps notifications" : "Disabling realtime steps notifications")
// .write(getCharacteristic(MiBandService.UUID_CHARACTERISTIC_LE_PARAMS), enable ? getLowLatency() : getHighLatency())
// .write(controlPoint, enable ? startRealTimeStepsNotifications : stopRealTimeStepsNotifications).queue(getQueue());
// enableRealtimeSamplesTimer(enable);
// } catch (IOException e) {
// LOG.error("Unable to change realtime steps notification to: " + enable, e);
// }
}
private byte[] getHighLatency() {
@ -843,13 +732,10 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
if (MiBand2Service.UUID_CHARACTERISTIC_6_BATTERY_INFO.equals(characteristicUUID)) {
handleBatteryInfo(characteristic.getValue(), BluetoothGatt.GATT_SUCCESS);
return true;
} else if (MiBandService.UUID_CHARACTERISTIC_NOTIFICATION.equals(characteristicUUID)) {
handleNotificationNotif(characteristic.getValue());
return true;
} else if (MiBandService.UUID_CHARACTERISTIC_REALTIME_STEPS.equals(characteristicUUID)) {
handleRealtimeSteps(characteristic.getValue());
return true;
} else if (MiBandService.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT.equals(characteristicUUID)) {
} else if (GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT.equals(characteristicUUID)) {
handleHeartrate(characteristic.getValue());
return true;
// } else if (MiBand2Service.UUID_UNKNOQN_CHARACTERISTIC0.equals(characteristicUUID)) {
@ -890,12 +776,9 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
} else if (MiBand2Service.UUID_CHARACTERISTIC_6_BATTERY_INFO.equals(characteristicUUID)) {
handleBatteryInfo(characteristic.getValue(), status);
return true;
} else if (MiBandService.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT.equals(characteristicUUID)) {
} else if (GattCharacteristic.UUID_CHARACTERISTIC_HEART_RATE_MEASUREMENT.equals(characteristicUUID)) {
logHeartrate(characteristic.getValue(), status);
return true;
} else if (MiBandService.UUID_CHARACTERISTIC_DATE_TIME.equals(characteristicUUID)) {
logDate(characteristic.getValue(), status);
return true;
} else if (MiBand2Service.UUID_CHARACTERISTIC_10_BUTTON.equals(characteristicUUID)) {
handleButtonPressed(characteristic.getValue());
return true;
@ -910,16 +793,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
public boolean onCharacteristicWrite(BluetoothGatt gatt,
BluetoothGattCharacteristic characteristic, int status) {
UUID characteristicUUID = characteristic.getUuid();
if (MiBandService.UUID_CHARACTERISTIC_PAIR.equals(characteristicUUID)) {
handlePairResult(characteristic.getValue(), status);
return true;
} else if (MiBandService.UUID_CHARACTERISTIC_USER_INFO.equals(characteristicUUID)) {
handleUserInfoResult(characteristic.getValue(), status);
return true;
} else if (MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT.equals(characteristicUUID)) {
handleControlPointResult(characteristic.getValue(), status);
return true;
} else if (MiBand2Service.UUID_CHARACTERISTIC_AUTH.equals(characteristicUUID)) {
if (MiBand2Service.UUID_CHARACTERISTIC_AUTH.equals(characteristicUUID)) {
LOG.info("KEY AES SEND");
logMessageContent(characteristic.getValue());
return true;
@ -927,15 +801,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return false;
}
public void logDate(byte[] value, int status) {
if (status == BluetoothGatt.GATT_SUCCESS) {
GregorianCalendar calendar = MiBandDateConverter.rawBytesToCalendar(value);
LOG.info("Got Mi Band Date: " + DateTimeUtils.formatDateTime(calendar.getTime()));
} else {
logMessageContent(value);
}
}
public void logHeartrate(byte[] value, int status) {
if (status == BluetoothGatt.GATT_SUCCESS && value != null) {
LOG.info("Got heartrate:");
@ -1035,66 +900,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return realtimeSamplesSupport;
}
/**
* React to unsolicited messages sent by the Mi Band to the MiBandService.UUID_CHARACTERISTIC_NOTIFICATION
* characteristic,
* These messages appear to be always 1 byte long, with values that are listed in MiBandService.
* It is not excluded that there are further values which are still unknown.
* <p/>
* Upon receiving known values that request further action by GB, the appropriate method is called.
*
* @param value
*/
private void handleNotificationNotif(byte[] value) {
if (value.length != 1) {
LOG.error("Notifications should be 1 byte long.");
LOG.info("RECEIVED DATA WITH LENGTH: " + value.length);
for (byte b : value) {
LOG.warn("DATA: " + String.format("0x%2x", b));
}
return;
}
switch (value[0]) {
case MiBandService.NOTIFY_AUTHENTICATION_FAILED:
// we get first FAILED, then NOTIFY_STATUS_MOTOR_AUTH (0x13)
// which means, we need to authenticate by tapping
getDevice().setState(State.AUTHENTICATION_REQUIRED);
getDevice().sendDeviceUpdateIntent(getContext());
GB.toast(getContext(), "Band needs pairing", Toast.LENGTH_LONG, GB.ERROR);
break;
case MiBandService.NOTIFY_AUTHENTICATION_SUCCESS: // fall through -- not sure which one we get
case MiBandService.NOTIFY_RESET_AUTHENTICATION_SUCCESS: // for Mi 1A
case MiBandService.NOTIFY_STATUS_MOTOR_AUTH_SUCCESS:
LOG.info("Band successfully authenticated");
// maybe we can perform the rest of the initialization from here
doInitialize();
break;
case MiBandService.NOTIFY_STATUS_MOTOR_AUTH:
LOG.info("Band needs authentication (MOTOR_AUTH)");
getDevice().setState(State.AUTHENTICATING);
getDevice().sendDeviceUpdateIntent(getContext());
break;
case MiBandService.NOTIFY_SET_LATENCY_SUCCESS:
LOG.info("Setting latency succeeded.");
break;
default:
for (byte b : value) {
LOG.warn("DATA: " + String.format("0x%2x", b));
}
}
}
private void doInitialize() {
try {
TransactionBuilder builder = performInitialized("just initializing after authentication");
builder.queue(getQueue());
} catch (IOException ex) {
LOG.error("Unable to initialize device after authentication", ex);
}
}
private void handleDeviceName(byte[] value, int status) {
// if (status == BluetoothGatt.GATT_SUCCESS) {
// versionCmd.hwVersion = new String(value);
@ -1140,21 +945,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
// TODO: react on 0x10, 0x02, 0x01 on notification (success)
}
private void handleControlPointResult(byte[] value, int status) {
if (status != BluetoothGatt.GATT_SUCCESS) {
LOG.warn("Could not write to the control point.");
}
LOG.info("handleControlPoint write status:" + status + "; length: " + (value != null ? value.length : "(null)"));
if (value != null) {
for (byte b : value) {
LOG.info("handleControlPoint WROTE DATA:" + String.format("0x%8x", b));
}
} else {
LOG.warn("handleControlPoint WROTE null");
}
}
private void handleDeviceInfo(nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.deviceinfo.DeviceInfo info) {
// if (getDeviceInfo().supportsHeartrate()) {
// getDevice().addDeviceInfo(new GenericItem(
@ -1179,44 +969,6 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
}
}
private void handleUserInfoResult(byte[] value, int status) {
// successfully transferred user info means we're initialized
// commented out, because we have SetDeviceStateAction which sets initialized
// state on every successful initialization.
// if (status == BluetoothGatt.GATT_SUCCESS) {
// setConnectionState(State.INITIALIZED);
// }
}
private void setConnectionState(State newState) {
getDevice().setState(newState);
getDevice().sendDeviceUpdateIntent(getContext());
}
private void handlePairResult(byte[] pairResult, int status) {
if (status != BluetoothGatt.GATT_SUCCESS) {
LOG.info("Pairing MI device failed: " + status);
return;
}
String value = null;
if (pairResult != null) {
if (pairResult.length == 1) {
try {
if (pairResult[0] == 2) {
LOG.info("Successfully paired MI device");
return;
}
} catch (Exception ex) {
LOG.warn("Error identifying pairing result", ex);
return;
}
}
value = Arrays.toString(pairResult);
}
LOG.info("MI Band pairing result: " + value);
}
/**
* Fetch the events from the android device calendars and set the alarms on the miband.
* @param builder
@ -1250,7 +1002,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
@Override
public void onSendConfiguration(String config) {
TransactionBuilder builder = null;
TransactionBuilder builder;
try {
builder = performInitialized("Sending configuration for option: " + config);
switch (config) {
@ -1300,6 +1052,17 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
return this;
}
private MiBand2Support setTimeFormat(TransactionBuilder builder) {
boolean is24Format = DateFormat.is24HourFormat(getContext());
LOG.info("Setting 24h time format to " + is24Format);
if (is24Format) {
builder.write(getCharacteristic(MiBand2Service.UUID_CHARACTERISTIC_3_CONFIGURATION), MiBand2Service.DATEFORMAT_TIME_24_HOURS);
} else {
builder.write(getCharacteristic(MiBand2Service.UUID_CHARACTERISTIC_3_CONFIGURATION), MiBand2Service.DATEFORMAT_TIME_12_HOURS);
}
return this;
}
private MiBand2Support setActivateDisplayOnLiftWrist(TransactionBuilder builder) {
boolean enable = MiBand2Coordinator.getActivateDisplayOnLiftWrist();
LOG.info("Setting activate display on lift wrist to " + enable);
@ -1316,6 +1079,7 @@ public class MiBand2Support extends AbstractBTLEDeviceSupport {
enableFurtherNotifications(builder, true);
requestBatteryInfo(builder);
setDateDisplay(builder);
setTimeFormat(builder);
setWearLocation(builder);
setFitnessGoal(builder);
setActivateDisplayOnLiftWrist(builder);

View File

@ -17,14 +17,15 @@ import nodomain.freeyourgadget.gadgetbridge.GBApplication;
import nodomain.freeyourgadget.gadgetbridge.R;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventDisplayMessage;
import nodomain.freeyourgadget.gadgetbridge.devices.miband.MiBand2Service;
import nodomain.freeyourgadget.gadgetbridge.devices.miband2.MiBand2FWHelper;
import nodomain.freeyourgadget.gadgetbridge.service.btle.BLETypeConversions;
import nodomain.freeyourgadget.gadgetbridge.service.btle.TransactionBuilder;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetDeviceBusyAction;
import nodomain.freeyourgadget.gadgetbridge.service.btle.actions.SetProgressAction;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.MiBand2Support;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.AbstractMiBand2Operation;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.FirmwareType;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.Mi2FirmwareInfo;
import nodomain.freeyourgadget.gadgetbridge.devices.miband2.MiBand2FWHelper;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.MiBand2Support;
import nodomain.freeyourgadget.gadgetbridge.util.GB;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
@ -113,10 +114,15 @@ public class UpdateFirmwareOperation extends AbstractMiBand2Operation {
break;
}
case MiBand2Service.COMMAND_FIRMWARE_CHECKSUM: {
sendApplyReboot(getFirmwareInfo());
if (getFirmwareInfo().getFirmwareType() == FirmwareType.FIRMWARE) {
getSupport().onReboot();
} else {
GB.updateInstallNotification(getContext().getString(R.string.updatefirmwareoperation_update_complete), false, 100, getContext());
done();
}
break;
}
case MiBand2Service.COMMAND_FIRMWARE_APPLY_REBOOT: {
case MiBand2Service.COMMAND_FIRMWARE_REBOOT: {
GB.updateInstallNotification(getContext().getString(R.string.updatefirmwareoperation_update_complete), false, 100, getContext());
// getSupport().onReboot();
done();
@ -152,12 +158,20 @@ public class UpdateFirmwareOperation extends AbstractMiBand2Operation {
builder.add(new SetDeviceBusyAction(getDevice(), getContext().getString(R.string.updating_firmware), getContext()));
int fwSize = getFirmwareInfo().getSize();
byte[] sizeBytes = BLETypeConversions.fromUint24(fwSize);
byte[] bytes = new byte[]{
MiBand2Service.COMMAND_FIRMWARE_INIT,
sizeBytes[0],
sizeBytes[1],
sizeBytes[2],
};
int arraySize = 4;
boolean isFirmwareCode = getFirmwareInfo().getFirmwareType() == FirmwareType.FIRMWARE;
if (!isFirmwareCode) {
arraySize++;
}
byte[] bytes = new byte[arraySize];
int i = 0;
bytes[i++] = MiBand2Service.COMMAND_FIRMWARE_INIT;
bytes[i++] = sizeBytes[0];
bytes[i++] = sizeBytes[1];
bytes[i++] = sizeBytes[2];
if (!isFirmwareCode) {
bytes[i++] = getFirmwareInfo().getFirmwareType().getValue();
}
builder.write(fwCControlChar, bytes);
builder.queue(getQueue());
@ -176,7 +190,7 @@ public class UpdateFirmwareOperation extends AbstractMiBand2Operation {
*
* @param info
* @return whether the transfer succeeded or not. Only a BT layer exception will cause the transmission to fail.
* @see MiBand2Support#handleNotificationNotif
* @see #handleNotificationNotif
*/
private boolean sendFirmwareData(Mi2FirmwareInfo info) {
byte[] fwbytes = info.getBytes();
@ -237,21 +251,7 @@ public class UpdateFirmwareOperation extends AbstractMiBand2Operation {
builder.queue(getQueue());
}
private void sendApplyReboot(Mi2FirmwareInfo firmwareInfo) throws IOException {
TransactionBuilder builder = performInitialized("send firmware apply/reboot");
builder.write(fwCControlChar, new byte[] { MiBand2Service.COMMAND_FIRMWARE_APPLY_REBOOT });
builder.queue(getQueue());
}
private Mi2FirmwareInfo getFirmwareInfo() {
return firmwareInfo;
}
enum State {
INITIAL,
SEND_FW2,
SEND_FW1,
FINISHED,
UNKNOWN
}
}

View File

@ -25,6 +25,7 @@ public abstract class GBDeviceIoThread extends Thread {
return false;
}
@Override
public void run() {
}

View File

@ -52,4 +52,14 @@ public class ArrayUtils {
}
return result;
}
/**
* Returns true if the given byte array starts with the given values
* @param array the array to check
* @param values the values which the other array is checked to start with
* @return
*/
public static boolean startsWith(byte[] array, byte[] values) {
return equals(array, values, 0);
}
}

View File

@ -78,4 +78,8 @@ public class DateTimeUtils {
public static Calendar getCalendarUTC() {
return GregorianCalendar.getInstance(TimeZone.getTimeZone("UTC"));
}
public static String minutesToHHMM(int minutes) {
return String.format(Locale.US, "%d:%02d", minutes / 60, minutes % 60); // no I do not want to use durationformatter :P
}
}

View File

@ -20,7 +20,12 @@ public class LanguageUtils {
put('п', "p"); put('р', "r"); put('с', "s"); put('т', "t"); put('у', "u"); put('ф', "f"); put('х', "kh"); put('ц', "c");
put('ч', "ch");put('ш', "sh");put('щ', "shh");put('ъ', "\"");put('ы', "y"); put('ь', "'"); put('э', "eh"); put('ю', "ju");
put('я', "ja");
//hebrew chars
put('א', "a"); put('ב', "b"); put('ג', "g"); put('ד', "d"); put('ה', "h"); put('ו', "u"); put('ז', "z"); put('ח', "kh");
put('ט', "t"); put('י', "y"); put('כ', "c"); put('ל', "l"); put('מ', "m"); put('נ', "n"); put('ס', "s"); put('ע', "'");
put('פ', "p"); put('צ', "ts"); put('ק', "k"); put('ר', "r"); put('ש', "sh"); put('ת', "th"); put('ף', "f"); put('ץ', "ts");
put('ך', "ch");put('ם', "m");put('ן', "n");
//continue for other languages...
}
};

View File

@ -0,0 +1,46 @@
package nodomain.freeyourgadget.gadgetbridge.util;
import android.content.Context;
import android.support.annotation.NonNull;
import nodomain.freeyourgadget.gadgetbridge.model.CallSpec;
import nodomain.freeyourgadget.gadgetbridge.model.NotificationSpec;
public class NotificationUtils {
@NonNull
public static String getPreferredTextFor(NotificationSpec notificationSpec, int lengthBody, int lengthSubject, Context context) {
switch (notificationSpec.type) {
case GENERIC_ALARM_CLOCK:
return StringUtils.getFirstOf(notificationSpec.title, notificationSpec.subject);
case GENERIC_SMS:
case GENERIC_EMAIL:
return formatText(notificationSpec.sender, notificationSpec.subject, notificationSpec.body, lengthBody, lengthSubject, context);
case GENERIC_NAVIGATION:
return StringUtils.getFirstOf(notificationSpec.title, notificationSpec.body);
case RIOT:
case SIGNAL:
case TELEGRAM:
case TWITTER:
case WHATSAPP:
case CONVERSATIONS:
case FACEBOOK:
case FACEBOOK_MESSENGER:
return notificationSpec.body;
}
return "";
}
@NonNull
public static String formatText(String sender, String subject, String body, int lengthBody, int lengthSubject, Context context) {
StringBuilder builder = new StringBuilder();
builder.append(StringUtils.truncate(body, lengthBody));
builder.append(StringUtils.truncate(subject, lengthSubject));
builder.append(StringUtils.formatSender(sender, context));
return builder.toString();
}
public static String getPreferredTextFor(CallSpec callSpec) {
return StringUtils.getFirstOf(callSpec.name, callSpec.number);
}
}

View File

@ -1,12 +1,21 @@
package nodomain.freeyourgadget.gadgetbridge.util;
import android.content.Context;
import android.support.annotation.NonNull;
import nodomain.freeyourgadget.gadgetbridge.R;
public class StringUtils {
public static String truncate(String s, int maxLength){
int length = Math.min(s.length(), maxLength);
if(length < 0)
if (s == null) {
return "";
}
int length = Math.min(s.length(), maxLength);
if(length < 0) {
return "";
}
return s.substring(0, length);
}
@ -16,10 +25,28 @@ public class StringUtils {
}
public static String pad(String s, int length, char padChar){
while(s.length() < length)
while(s.length() < length) {
s += padChar;
}
return s;
}
@NonNull
public static String formatSender(String sender, Context context) {
if (sender == null || sender.length() == 0) {
return "";
}
return context.getString(R.string.StringUtils_sender, sender);
}
@NonNull
public static String getFirstOf(String first, String second) {
if (first != null && first.length() > 0) {
return first;
}
if (second != null) {
return second;
}
return "";
}
}

View File

@ -6,13 +6,13 @@
<string name="action_debug">Debug</string>
<string name="action_quit">Beenden</string>
<string name="controlcenter_fetch_activity_data">Synchronisieren</string>
<string name="controlcenter_start_sleepmonitor">Schlafmonitor (ALPHA)</string>
<string name="controlcenter_start_sleepmonitor">Schlafaufzeichnung (ALPHA)</string>
<string name="controlcenter_find_device">Suche verlegtes Gerät…</string>
<string name="controlcenter_take_screenshot">Bildschirmfoto</string>
<string name="controlcenter_take_screenshot">Bildschirmfoto machen</string>
<string name="controlcenter_disconnect">Trennen</string>
<string name="controlcenter_delete_device">Gerät Löschen</string>
<string name="controlcenter_delete_device_name">%1$s Löschen</string>
<string name="controlcenter_delete_device_dialogmessage">Das wird das Gerät und die dazugehörigen Daten löschen!</string>
<string name="controlcenter_delete_device">Gerät löschen</string>
<string name="controlcenter_delete_device_name">%1$s löschen</string>
<string name="controlcenter_delete_device_dialogmessage">Das wird das Gerät und alle zugehörigen Daten löschen!</string>
<string name="title_activity_debug">Debug</string>
<!--Strings related to AppManager-->
<string name="title_activity_appmanager">App Manager</string>
@ -27,6 +27,9 @@
<string name="appmanager_health_deactivate">deaktivieren</string>
<string name="appmanager_hrm_activate">HRM aktivieren</string>
<string name="appmanager_hrm_deactivate">HRM deaktivieren</string>
<string name="appmanager_weather_activate">System Wetter-App aktivieren</string>
<string name="appmanager_weather_deactivate">System Wetter-App deaktivieren</string>
<string name="appmanager_weather_install_provider">Installiere die Wetter-Benachrichtigungs-App</string>
<string name="app_configure">Konfigurieren</string>
<string name="app_move_to_top">Nach oben</string>
<!--Strings related to AppBlacklist-->
@ -43,27 +46,31 @@
<string name="pref_header_general">Allgemeine Einstellungen</string>
<string name="pref_title_general_autoconnectonbluetooth">Verbinde, wenn Bluetooth eingeschaltet wird</string>
<string name="pref_title_general_autostartonboot">Automatisch starten</string>
<string name="pref_title_general_autocreonnect">Verbindungen automatisch wiederherstellen</string>
<string name="pref_title_general_autocreonnect">Verbindung automatisch wiederherstellen</string>
<string name="pref_title_audo_player">Bevorzugter Audioplayer</string>
<string name="pref_default">Standard</string>
<string name="pref_header_datetime">Datum und Zeit</string>
<string name="pref_title_datetime_syctimeonconnect">Uhrzeit synchronisieren</string>
<string name="pref_summary_datetime_syctimeonconnect">Synchronisiere die Urzeit mit dem Gerät (bei Verbindingsaufbau und wenn die Zeit oder Zeitzone auf dem Android Gerät eingestellt wird)</string>
<string name="pref_title_theme">Thema</string>
<string name="pref_summary_datetime_syctimeonconnect">Synchronisiere die Uhrzeit mit dem Gerät bei Verbindungsaufbau und wenn die Zeit oder Zeitzone auf dem Android Gerät geändert wird</string>
<string name="pref_title_theme">Theme</string>
<string name="pref_theme_light">Hell</string>
<string name="pref_theme_dark">Dunkel</string>
<string name="pref_title_language">Sprache</string>
<string name="pref_title_minimize_priority">Gadgetbridge-Benachrichtigung ausblenden</string>
<string name="pref_summary_minimize_priority_off">Das Symbol in der Statusleiste und die Benachrichtigung auf dem Sperrbildschirm werden angezeigt</string>
<string name="pref_summary_minimize_priority_on">Das Symbol in der Statusleiste und die Benachrichtigung auf dem Sperrbildschirm werden nicht angezeigt</string>
<string name="pref_header_notifications">Benachrichtigungen</string>
<string name="pref_title_notifications_repetitions">Wiederholungen</string>
<string name="pref_title_notifications_call">Anrufe</string>
<string name="pref_title_notifications_sms">SMS</string>
<string name="pref_title_notifications_pebblemsg">Pebble Nachrichten</string>
<string name="pref_summary_notifications_pebblemsg">Unterstützung für Anwendungen die Benachrichtigungen an die Pebble via PebbleKit senden.</string>
<string name="pref_summary_notifications_pebblemsg">Unterstützung für Anwendungen, die Benachrichtigungen an die Pebble via PebbleKit senden.</string>
<string name="pref_title_notifications_generic">Andere Benachrichtigungen</string>
<string name="pref_title_whenscreenon">… auch wenn der Bildschirm an ist</string>
<string name="pref_title_notification_filter">Bitte nicht stören</string>
<string name="pref_summary_notification_filter">Stoppe unerwünschte Nachrichten, wenn im \"Nicht Stören\"-Modus</string>
<string name="pref_title_transliteration">Transliteration</string>
<string name="pref_summary_notification_filter">Benachrichtigungen nicht senden, wenn im \"Nicht Stören\"-Modus</string>
<string name="pref_title_transliteration">Transkription</string>
<string name="pref_summary_transliteration">Aktiviere dies, falls dein Gerät keine Unterstützung für den Zeichensatz deiner Sprache hat (momentan nur Kyrillisch)</string>
<string name="always">immer</string>
<string name="when_screen_off">wenn der Bildschirm aus ist</string>
<string name="never">niemals</string>
@ -72,7 +79,7 @@
<string name="pref_call_privacy_mode_off">Zeige Name und Telefonnumer</string>
<string name="pref_call_privacy_mode_name">Verstecke den Namen aber zeige die Telefonnummer an</string>
<string name="pref_call_privacy_mode_complete">Verstecke Name und Telefonnummer</string>
<string name="pref_blacklist">Sperre für Apps</string>
<string name="pref_blacklist">App-Benachrichtigungen blockieren</string>
<string name="pref_header_cannned_messages">Vorgefertigte Nachrichten</string>
<string name="pref_title_canned_replies">Antworten</string>
<string name="pref_title_canned_reply_suffix">Gemeinsame Endung</string>
@ -87,35 +94,43 @@
<string name="pref_title_pebble_sync_misfit">Misfit synchronisieren</string>
<string name="pref_title_pebble_sync_morpheuz">Morpheuz synchronisieren</string>
<string name="pref_title_enable_outgoing_call">Unterstützung für ausgehende Anrufe</string>
<string name="pref_summary_enable_outgoing_call">Falls dies deaktiviert wird, vibriert die Pebble 2/LE nicht bei ausgehenden Anrufen</string>
<string name="pref_title_enable_pebblekit">Erlaube Zugriff von anderen Android Apps</string>
<string name="pref_summary_enable_pebblekit">Experimentelle Unterstützung für Android Apps, die PebbleKit benutzen</string>
<string name="pref_title_sunrise_sunset">Sonnenauf- und -untergang </string>
<string name="pref_summary_sunrise_sunset">Sende Sonnenauf- und -untergangszeiten abhänging vom Standort auf die Pebble Timeline</string>
<string name="pref_title_autoremove_notifications">Verworfene Benachrichtigungen automatisch entfernen</string>
<string name="pref_summary_autoremove_notifications">Benachrichtigungen werden automatisch von der Pebble entfernt, wenn sie auf dem Android-Gerät verworfen werden</string>
<string name="pref_title_pebble_privacy_mode">Privatsphäre-Modus</string>
<string name="pref_pebble_privacy_mode_off">Normale Benachrichtigungen</string>
<string name="pref_pebble_privacy_mode_content">Verschiebe den Benachrichttigungstext außerhalb des Bildschirms</string>
<string name="pref_pebble_privacy_mode_content">Verschiebe den Benachrichtigungstext außerhalb des Bildschirms</string>
<string name="pref_pebble_privacy_mode_complete">Zeige nur das Benachrichtigungs-Symbol</string>
<string name="pref_header_location">Standort</string>
<string name="pref_title_location_aquire">Standort Bestimmen</string>
<string name="pref_title_location_aquire">Standort bestimmen</string>
<string name="pref_title_location_latitude">Breitengrad</string>
<string name="pref_title_location_longitude">Längengrad</string>
<string name="pref_title_location_keep_uptodate">Automatisch Standort aktualisieren</string>
<string name="pref_summary_location_keep_uptodate">Versuche den aktuellen Standort zur Laufzeit abzufragen und nutze die gespeicherten Standort falls das fehlschlägt</string>
<string name="toast_enable_networklocationprovider">Bitte ungefähre Standortbestimmung einschalten</string>
<string name="pref_summary_location_keep_uptodate">Versuche, den aktuellen Standort abzufragen und nutze den gespeicherten Standort, falls das fehlschlägt</string>
<string name="toast_enable_networklocationprovider">Bitte netzwerkbasierte Standortbestimmung einschalten</string>
<string name="toast_aqurired_networklocation">Standort wurde bestimmt</string>
<string name="pref_title_pebble_forceprotocol">Benachrichtigungsprotokoll erzwingen</string>
<string name="pref_summary_pebble_forceprotocol">Diese Option erzwingt das neuste Benachrichtigungsprotokoll abhängig von der Firmwareversion. NUR EINSCHALTEN, WENN DU WEISST WAS DU TUST!</string>
<string name="pref_summary_pebble_forceprotocol">Diese Option erzwingt das neuste Benachrichtigungsprotokoll abhängig von der Firmwareversion. NUR EINSCHALTEN, WENN DU WEISST, WAS DU TUST!</string>
<string name="pref_title_pebble_forceuntested">Ungetestete Features freischalten</string>
<string name="pref_summary_pebble_forceuntested">Schaltet ungetetestete Features frei. TU DIES NUR, WENN DU WEIßT, WAS DU TUST!</string>
<string name="pref_summary_pebble_forceuntested">Schaltet ungetetestete Features frei. NUR EINSCHALTEN WENN DU WEISST WAS DU TUST!</string>
<string name="pref_title_pebble_forcele">BLE immer bevorzugen</string>
<string name="pref_summary_pebble_forcele">Nutze den experimentellen LE support für alle Pebbles anstelle von BT classic. Setzt voraus, dass die \"Pebble LE\" gepaart wird, nachdem die nicht-LE Pebble einmal verbunden war.</string>
<string name="pref_summary_pebble_forcele">Nutze den experimentellen LE support für alle Pebbles anstelle von klassischem BT. Setzt voraus, dass die \"Pebble LE\" gekoppelt wird nachdem die nicht-LE Pebble einmal verbunden war.</string>
<string name="pref_title_pebble_mtu_limit">Pebble 2/LE GATT MTU Limit</string>
<string name="pref_summary_pebble_mtu_limit">Wenn deine Pebble 2/Pebble LE nicht so wie erwartet funktioniert, versuche die MTU zu begrenzen (erlaubte Werte zwischen 20512)</string>
<string name="pref_summary_pebble_mtu_limit">Wenn deine Pebble 2/Pebble LE nicht so wie erwartet funktioniert, versuche die MTU zu begrenzen (erlaubte Werte 20 bis 512)</string>
<string name="pref_title_pebble_enable_applogs">Watch App Logging einschalten</string>
<string name="pref_summary_pebble_enable_applogs">Schreibt logs von Watch Apps in Gadgetbridge logs (Pebble muss nach Ändern der Option erneut verbunden werden)</string>
<string name="pref_title_pebble_reconnect_attempts">Neuverbindungsversuche</string>
<string name="pref_summary_pebble_enable_applogs">Schreibt Logs von Watch Apps in Gadgetbridge-Logs (Pebble muss nach Ändern der Option erneut verbunden werden)</string>
<string name="pref_title_pebble_always_ack_pebblekit">nicht ausgereiftes PebbleKit ACKen</string>
<string name="pref_summary_pebble_always_ack_pebblekit">Nachrichten, die an externe Drittanbieter-Apps geschickt werden, werden immer und sofort bestätigt</string>
<string name="pref_title_pebble_reconnect_attempts">Wiederverbindungsversuche</string>
<string name="pref_title_unit_system">Einheiten</string>
<string name="pref_title_timeformat">Zeitformat</string>
<string name="pref_title_screentime">Bildschirm-An-Dauer</string>
<string name="prefs_title_all_day_heart_rate">Den ganzen Tag Herzfrequenz messen</string>
<string name="preferences_hplus_settings">HPlus/Makibes Einstellungen</string>
<string name="not_connected">nicht verbunden</string>
<string name="connecting">verbinde</string>
<string name="connected">verbunden</string>
@ -128,10 +143,10 @@
<string name="this_is_a_test_notification_from_gadgetbridge">Dies ist eine Test Benachrichtigung von Gadgetbridge</string>
<string name="bluetooth_is_not_supported_">Bluetooth wird nicht unterstützt.</string>
<string name="bluetooth_is_disabled_">Bluetooth ist abgeschaltet.</string>
<string name="tap_connected_device_for_app_mananger">berühre das verbundene Gerät, um den App Manager zu starten</string>
<string name="tap_connected_device_for_activity">Tippe auf das verbundene Gerät um die Aktivitätsdaten anzuzeigen</string>
<string name="tap_connected_device_for_vibration">Tippe auf das verbundene Gerät um zu vibrieren</string>
<string name="tap_a_device_to_connect">berühre ein Gerät zum Verbinden</string>
<string name="tap_connected_device_for_app_mananger">Tippe auf das verbundene Gerät, um den App Manager zu starten</string>
<string name="tap_connected_device_for_activity">Tippe auf das verbundene Gerät, um die Aktivitätsdaten anzuzeigen</string>
<string name="tap_connected_device_for_vibration">Tippe auf das verbundene Gerät, um zu vibrieren</string>
<string name="tap_a_device_to_connect">Tippe zum Verbinden auf das gewünschte Gerät</string>
<string name="cannot_connect_bt_address_invalid_">Verbindung kann nicht aufgebaut werden. BT Adresse ungültig?</string>
<string name="gadgetbridge_running">Gadgetbridge läuft</string>
<string name="installing_binary_d_d">installiere Datei %1$d/%2$d</string>
@ -147,11 +162,15 @@
<string name="discovery_start_scanning">Suche starten</string>
<string name="action_discover">Neues Gerät verbinden</string>
<string name="device_with_rssi">%1$s (%2$s)</string>
<string name="title_activity_android_pairing">Gerät paaren</string>
<string name="android_pairing_hint">Verwende den Android Bluetooth Paaren-Dialog um Dein Gerät zu paaren.</string>
<string name="title_activity_mi_band_pairing">Paare Dein Mi Band</string>
<string name="pairing">Pairing mit %s…</string>
<string name="message_cannot_pair_no_mac">Kein MAC Adresse bekommen, kann nicht paaren.</string>
<string name="title_activity_android_pairing">Gerät koppeln</string>
<string name="android_pairing_hint">Verwende den Android Bluetooth Kopplungsdialog um Dein Gerät zu koppeln.</string>
<string name="title_activity_mi_band_pairing">Kopple Dein Mi Band</string>
<string name="pairing">Koppeln mit %s…</string>
<string name="pairing_creating_bond_with">Bindung mit %1$s (%2$s) herstellen</string>
<string name="pairing_unable_to_pair_with">Kann nicht mit %1$s (%2$s) koppeln</string>
<string name="pairing_in_progress">Bindung findet statt: %1$s (%2$s)</string>
<string name="pairing_already_bonded">Bereits mit %1$s (%2$s) gebunden, stelle Verbindung her......</string>
<string name="message_cannot_pair_no_mac">Keine MAC Adresse erhalten, kann nicht koppeln.</string>
<string name="preferences_category_device_specific_settings">Gerätespezifische Einstellungen</string>
<string name="preferences_miband_settings">Mi Band Einstellungen</string>
<string name="male">männlich</string>
@ -169,18 +188,18 @@
<string name="miband_prefs_alias">Name/Alias</string>
<string name="pref_header_vibration_count">Anzahl der Vibrationen</string>
<string name="title_activity_sleepmonitor">Schlafmonitor</string>
<string name="pref_write_logfiles">Log-Dateien schreiben</string>
<string name="pref_write_logfiles">Logdateien schreiben</string>
<string name="initializing">initialisiere</string>
<string name="busy_task_fetch_activity_data">Hole Aktivitätsdaten</string>
<string name="busy_task_fetch_activity_data">Rufe Aktivitätsdaten ab</string>
<string name="sleep_activity_date_range">Von %1$s bis %2$s</string>
<string name="miband_prefs_wearside">Links- oder Rechtsträger?</string>
<string name="miband_prefs_wearside">Linker oder rechter Arm?</string>
<string name="pref_screen_vibration_profile">Vibrationsprofile</string>
<string name="vibration_profile_staccato">Stakkato</string>
<string name="vibration_profile_short">Kurz</string>
<string name="vibration_profile_medium">Mittel</string>
<string name="vibration_profile_long">Lang</string>
<string name="vibration_profile_waterdrop">Wassertropfen</string>
<string name="vibration_profile_ring">Ring</string>
<string name="vibration_profile_ring">Klingel</string>
<string name="vibration_profile_alarm_clock">Wecker</string>
<string name="miband_prefs_vibration">Vibration</string>
<string name="vibration_try">Test</string>
@ -193,7 +212,7 @@
<string name="pref_screen_notification_profile_generic_navigation">Navigation</string>
<string name="pref_screen_notification_profile_generic_social">Soziales Netzwerk</string>
<string name="control_center_find_lost_device">Verlegtes Gerät suchen</string>
<string name="control_center_cancel_to_stop_vibration">Abbrechen um die Vibration zu stoppen.</string>
<string name="control_center_cancel_to_stop_vibration">Abbrechen, um die Vibration zu stoppen.</string>
<string name="title_activity_charts">Deine Aktivität</string>
<string name="title_activity_set_alarm">Wecker stellen</string>
<string name="controlcenter_start_configure_alarms">Wecker stellen</string>
@ -207,7 +226,7 @@
<string name="alarm_sat_short">Sa</string>
<string name="alarm_smart_wakeup">Intelligenter Wecker </string>
<string name="user_feedback_miband_set_alarms_failed">Beim Stellen der Wecker ist ein Fehler aufgetreten. Bitte erneut versuchen!</string>
<string name="user_feedback_miband_set_alarms_ok">Wecker wurden auf dem Gerät gestellt!</string>
<string name="user_feedback_miband_set_alarms_ok">Wecker wurden an das Gerät gesendet!</string>
<string name="chart_no_data_synchronize">Keine Daten. Gerät synchronisieren?</string>
<string name="user_feedback_miband_activity_data_transfer">%1$s an Daten werden übertragen, beginnend mit %2$s</string>
<string name="miband_prefs_fitness_goal">Ziel Anzahl Schritte pro Tag</string>
@ -216,14 +235,15 @@
<string name="cannot_connect">Kann keine Verbindung herstellen: %1$s</string>
<string name="installer_activity_unable_to_find_handler">Kann keinen Handler für die Installation dieser Datei finden.</string>
<string name="pbw_install_handler_unable_to_install">Konnte folgende Datei nicht installieren: %1$s</string>
<string name="pbw_install_handler_hw_revision_mismatch">Kann die gegebene Firmware nicht installieren. Sie passt nicht zur Hardware Revision der Pebble.</string>
<string name="installer_activity_wait_while_determining_status">Bitte warten während der Installationsoption festgestellt wird…</string>
<string name="pbw_install_handler_hw_revision_mismatch">Kann die gegebene Firmware nicht installieren. Sie passt nicht zur Hardware-Revision der Pebble.</string>
<string name="installer_activity_wait_while_determining_status">Bitte warten, Installationsstatus wird festgestellt...</string>
<string name="notif_battery_low_title">Gadget Akkustand niedrig!</string>
<string name="notif_battery_low_percent">%1$s Akku übrig: %2$s%%</string>
<string name="notif_battery_low_bigtext_last_charge_time">Zuletzt aufgeladen: %s\n</string>
<string name="notif_battery_low_bigtext_number_of_charges">Anzahl Ladungen: %s</string>
<string name="sleepchart_your_sleep">Dein Schlaf</string>
<string name="weekstepschart_steps_a_week">Schritte der Woche</string>
<string name="weeksleepchart_sleep_a_week">Schlaf pro Woche</string>
<string name="weekstepschart_steps_a_week">Schritte pro Woche</string>
<string name="activity_sleepchart_activity_and_sleep">Deine Aktivität und Schlaf</string>
<string name="updating_firmware">Firmware wird aktualisiert…</string>
<string name="fwapp_install_device_not_ready">Datei kann nicht installiert werden, Gerät nicht bereit.</string>
@ -232,20 +252,20 @@
<string name="miband_fwinstaller_untested_version">Ungetestete Version!</string>
<string name="fwappinstaller_connection_state">Verbindung zum Gerät: %1$s</string>
<string name="pbw_installhandler_pebble_firmware">Pebble Firmware %1$s</string>
<string name="pbwinstallhandler_correct_hw_revision">Korrekte Hardware Revision</string>
<string name="pbwinstallhandler_incorrect_hw_revision">Falsche Hardware Revision!</string>
<string name="pbwinstallhandler_correct_hw_revision">Korrekte Hardware-Revision</string>
<string name="pbwinstallhandler_incorrect_hw_revision">Falsche Hardware-Revision!</string>
<string name="pbwinstallhandler_app_item">%1$s (%2$s)</string>
<string name="updatefirmwareoperation_updateproblem_do_not_reboot">Problem mit der Firmwareübertragung: NICHT das Mi Band neu starten!</string>
<string name="updatefirmwareoperation_updateproblem_do_not_reboot">Problem mit der Firmwareübertragung. NICHT das Mi Band neu starten!</string>
<string name="updatefirmwareoperation_metadata_updateproblem">Problem bei der Firmware Metadatenübertragung</string>
<string name="updatefirmwareoperation_update_complete">Firmware Installation erfolgreich beendet</string>
<string name="updatefirmwareoperation_update_complete_rebooting">Firmware Installation erfolgreich beendet, Gerät wird neu gestartet…</string>
<string name="updatefirmwareoperation_update_complete">Firmware-Installation erfolgreich beendet</string>
<string name="updatefirmwareoperation_update_complete_rebooting">Firmware-Installation erfolgreich beendet, Gerät wird neu gestartet…</string>
<string name="updatefirmwareoperation_write_failed">Schreiben der Firmware fehlgeschlagen</string>
<string name="chart_steps">Schritte</string>
<string name="liveactivity_live_activity">Live Aktivität</string>
<string name="weeksteps_today_steps_description">Schritte heute, Ziel: %1$s</string>
<string name="pref_title_dont_ack_transfer">Transfer von Aktivitätsdaten nicht bestätigen</string>
<string name="pref_summary_dont_ack_transfers">Wenn der Transfer der Aktivitätsdaten nicht bestätigt wird, werden die Daten nicht auf dem Mi Band gelöscht. Das ist Sinnvoll, wenn neben Gadgetbridge noch andere Apps auf das Mi Band zugreifen.</string>
<string name="pref_summary_keep_data_on_device">Aktivitätsdaten verbleiben auf dem Mi Band, auch nach der Synchronisierung. Hilfreich wenn das Mi Band mit weiteren Apps verwendet wird.</string>
<string name="pref_summary_dont_ack_transfers">Wenn der Transfer der Aktivitätsdaten nicht bestätigt wird, werden die Daten nicht auf dem Mi Band gelöscht. Das ist sinnvoll, wenn neben Gadgetbridge noch andere Apps auf das Mi Band zugreifen.</string>
<string name="pref_summary_keep_data_on_device">Aktivitätsdaten verbleiben auf dem Mi Band, auch nach der Synchronisierung. Hilfreich, wenn das Mi Band mit weiteren Apps verwendet wird.</string>
<string name="pref_title_low_latency_fw_update">Benutze Modus mit niedriger Latenz für FW-Updates</string>
<string name="pref_summary_low_latency_fw_update">Dies kann bei Geräten helfen, bei denen Firmwareupdates fehlschlagen</string>
<string name="live_activity_steps_history">Verlauf Schritte</string>
@ -257,14 +277,19 @@
<string name="abstract_chart_fragment_kind_light_sleep">Leichter Schlaf</string>
<string name="abstract_chart_fragment_kind_deep_sleep">Tiefschlaf</string>
<string name="abstract_chart_fragment_kind_not_worn">Nicht getragen</string>
<string name="device_not_connected">Nicht verbunden</string>
<string name="device_not_connected">Nicht verbunden.</string>
<string name="user_feedback_all_alarms_disabled">Alle Alarme deaktiviert</string>
<string name="pref_title_keep_data_on_device">Aktivitätsdaten auf dem Gerät lassen</string>
<string name="miband_fwinstaller_incompatible_version">Inkompatible Firmware</string>
<string name="fwinstaller_firmware_not_compatible_to_device">Diese Firmware ist nicht mit dem Gerät kompatibel</string>
<string name="miband_prefs_reserve_alarm_calendar">Wecker für zukünftige Ereignisse vormerken</string>
<string name="miband_prefs_hr_sleep_detection">Verwende den Herzfrequenzsensor um die Schlaferkennung zu verbessern</string>
<string name="miband_prefs_hr_sleep_detection">Verwende den Herzfrequenzsensor, um die Schlaferkennung zu verbessern</string>
<string name="miband_prefs_device_time_offset_hours">Zeitausgleich in Stunden (um den Schlaf von Schichtarbeitern zu erkennen)</string>
<string name="miband2_prefs_dateformat">Mi2: Datumsformat</string>
<string name="dateformat_time">Zeit</string>
<string name="dateformat_date_time"><![CDATA[Time & Date]]></string>
<string name="mi2_prefs_activate_display_on_lift">Display beim Anheben aktivieren</string>
<string name="FetchActivityOperation_about_to_transfer_since">Werde Daten ab %1$s übertragen.</string>
<string name="waiting_for_reconnect">warte auf Verbindung</string>
<string name="activity_prefs_about_you">Über Dich</string>
<string name="activity_prefs_year_birth">Geburtsjahr</string>
@ -285,31 +310,21 @@
<string name="updatefirmwareoperation_firmware_not_sent">Firmware wurde nicht gesendet</string>
<string name="charts_legend_heartrate">Herzfrequenz</string>
<string name="live_activity_heart_rate">Herzfrequenz</string>
<!--Strings related to Onboading Activity-->
<string name="title_activity_onboarding">Datenbankimport</string>
<string name="import_old_db_buttonlabel">Alte Aktivitätsdaten importieren</string>
<string name="import_old_db_information">Seit Gadgetbridge 0.12.0 benutzen wir ein neues Datenbankformat.
Du kannst alte Aktivitätsdaten dem zu verbindenden Gerär (%1$s.) zuordnen\n
\n
Wenn Du jetzt keine alten Aktivitätsdaten importierst, kannst Du das immer noch später in dem Datenbankverwaltung Bildschirm machen, indem Du dort den \"MERGE OLD ACTIVITY DATA\" Knopf drückst.\n
\n
Bitte beachte, dass Du Daten vom Mi Band, Pebble Health und Morpheuz importieren kannst - aber nicht von Pebble Misfit.
</string>
<string name="pref_title_pebble_health_store_raw">Rohdaten in der Datenbank speichern</string>
<string name="pref_summary_pebble_health_store_raw">Wenn eingeschaltet, werden Daten so wie sie eingehen gespeichrt, um später noch interpretiert werden zu können. Achtung: Die Datenbank wird dadurch größer!</string>
<string name="action_db_management">Datenbankmanagement</string>
<string name="title_activity_db_management">Datenbankmanagement</string>
<string name="activity_db_management_merge_old_explanation">Die Aktivitätsdaten, die mit Gadgetbridge Versionen vor 0.12.0 aufgezeichnet wurden, müssen in ein neues Format umgewandelt werden.\n
Du kannst das tun, indem du den Knopf unten drückst. Bitte beachte, dass Du mit dem Gerät verbunden sein musst, für das Du alten Aktivitätsdaten importieren willst.\n
Wenn Du schon deine Daten importiert hast und mit dem Ergebnis zufrieden bist, kannst du die alte Datenbank löschen.</string>
<string name="pref_summary_pebble_health_store_raw">Wenn eingeschaltet, werden Daten so wie sie eingehen für eine spätere analyse gespeichert. Achtung: Die Datenbank wird dadurch größer!</string>
<string name="action_db_management">Datenbankverwaltung</string>
<string name="title_activity_db_management">Datenbankverwaltung</string>
<string name="activity_db_management_import_export_explanation">Die Datenbankoperationen verwenden den folgenden Pfad auf dem Gerät. \nDieser Pfad ist von anderen Android-Apps und ihrem Computer aus zugreifbar. \nSie finden die exportierte Datenbank hier (bzw. legen die zu importierende dort ab):</string>
<string name="activity_db_management_merge_old_title">Legacy-Datenbank löschen</string>
<string name="dbmanagementactivvity_cannot_access_export_path">Kann nicht auf den Exportpfad zugreifen. Bitte die Entwickler kontaktieren.</string>
<string name="dbmanagementactivity_exported_to">Exportiert nach: %1$s</string>
<string name="dbmanagementactivity_error_exporting_db">Fehler beim Exportieren der DB: %1$s</string>
<string name="dbmanagementactivity_import_data_title">Daten importieren?</string>
<string name="dbmanagementactivity_overwrite_database_confirmation">Wirklich die aktuelle Datenbank überschreiben? Alle aktuellen Aktivitätsdaten (sofern vorhanden) gehen verloren!</string>
<string name="dbmanagementactivity_import_successful">Import erfolgreich.</string>
<string name="dbmanagementactivity_error_importing_db">Fehler beim Importieren der DB: %1$s</string>
<string name="dbmanagementactivity_merging_activity_data_title">Führe Aktivitätsdaten zusammen</string>
<string name="dbmanagementactivity_error_importing_old_activity_data">Beim Importieren der alten Aktivitätsdaten ist ein Fehler aufgetreten! </string>
<string name="dbmanagementactivity_delete_activity_data_title">Alte Daten löschen?</string>
<string name="dbmanagementactivity_delete_activity_data_title">Aktivitätsdaten löschen?</string>
<string name="dbmanagementactivity_really_delete_entire_db">Wirklich die komplette Datenbank löschen? Alle Aktivitätsdaten und Informationen über Deine Geräte gehen verloren!</string>
<string name="dbmanagementactivity_database_successfully_deleted">Daten erfolgreich gelöscht.</string>
<string name="dbmanagementactivity_db_deletion_failed">Löschen der Datenbank fehlgeschlagen.</string>
<string name="dbmanagementactivity_delete_old_activity_db">Alte Aktivitätsdatenbank löschen?</string>
@ -322,5 +337,13 @@ Wenn Du schon deine Daten importiert hast und mit dem Ergebnis zufrieden bist, k
<!--Strings related to Vibration Activity-->
<string name="title_activity_vibration">Vibration</string>
<!--Strings related to Pebble Pairing Activity-->
<string name="title_activity_pebble_pairing">Pebble-Kopplung</string>
<string name="pebble_pairing_hint">Ein Kopplungsdialog sollte auf dem Android-Gerät aufpoppen. Falls das nicht passiert, schau in die Benachrichtigungen und akzeptiere die Kopplungsanfrage. Akzeptiere danach die Kopplungsanfrage auf Deiner Pebble.</string>
<string name="pref_title_setup_bt_pairing">Bluetooth-Kopplung aktivieren</string>
<string name="pref_summary_setup_bt_pairing">Deaktiviere dies falls Du Probleme beim verbinden hast</string>
<string name="unit_metric">Metrisch</string>
<string name="unit_imperial">Imperial (US/UK)</string>
<string name="timeformat_24h">24h</string>
<string name="timeformat_am_pm">AM/PM</string>
<string name="pref_screen_notification_profile_alarm_clock">Wecker</string>
</resources>

View File

@ -163,7 +163,7 @@
<string name="action_discover">Conectar un nuevo dispositivo</string>
<string name="device_with_rssi">%1$s (%2$s)</string>
<string name="title_activity_android_pairing">Emparejar dispositivo</string>
<string name="android_pairing_hint">Usar el menú de emparejar Bluetooth de Android para emparejar el dispositivo.</string>
<string name="android_pairing_hint">Usar el menú de emparejamiento Bluetooth de Android para vincular el dispositivo.</string>
<string name="title_activity_mi_band_pairing">Emparejar tu MiBand</string>
<string name="pairing">Emparejando con %s...</string>
<string name="pairing_creating_bond_with">Creando emparejamiento con %1$s (%2$s)</string>
@ -241,6 +241,7 @@
<string name="notif_battery_low_bigtext_last_charge_time">Última carga: %s \n</string>
<string name="notif_battery_low_bigtext_number_of_charges">Número de cargas: %s</string>
<string name="sleepchart_your_sleep">Tu sueño</string>
<string name="weeksleepchart_sleep_a_week">Dormir una semana</string>
<string name="weekstepschart_steps_a_week">Pasos por semana</string>
<string name="activity_sleepchart_activity_and_sleep">Tu actividad y sueño</string>
<string name="updating_firmware">Actualizando firmware...</string>
@ -308,22 +309,12 @@
<string name="updatefirmwareoperation_firmware_not_sent">Firmware no enviado</string>
<string name="charts_legend_heartrate">Pulsaciones</string>
<string name="live_activity_heart_rate">Pulsaciones</string>
<!--Strings related to Onboading Activity-->
<string name="title_activity_onboarding">Importar Base de Datos</string>
<string name="import_old_db_buttonlabel">Importar datos de actividad antiguos</string>
<string name="import_old_db_information">Desde Gadgetbridge 0.12.0 usamos un nuevo formato de base de datos.
Se pueden importar los antiguos datos de actividad y asociarlos con el dispositivo al que se está conectando (%1$s).\n
\n
Si no importas los antiguos datos de actividad ahora, siempre lo podrás hacer después seleccionando \"MERGE OLD ACTIVITY DATA\" en el apartado de gestión de base de datos de actividad.\n
\n
Por favor, ten en cuenta que puedes importar datos desde Mi Band, Pebble Health y Morpheuz pero NO desde Pebble Misfit.</string>
<string name="pref_title_pebble_health_store_raw">Almacenar datos en bruto en la base de datos </string>
<string name="pref_summary_pebble_health_store_raw">Seleccionado, los datos archivados se guardan en bruto y están disponibles para ser interpretados más tarde. La base de datos será más grande. </string>
<string name="action_db_management">Administración de Bases de Datos</string>
<string name="title_activity_db_management">Administración de Bases de Datos</string>
<string name="activity_db_management_import_export_explanation">La base de datos usa la siguiente ubicación en su dispositivo. \nEsta ubicación está accesible para otras aplicaciones Android y para su ordenador. \nEncontrará sus bases de datos exportadas (o la que quiere importar) aquí:</string>
<string name="activity_db_management_merge_old_explanation">Los datos de actividad grabados con versiones anteriores de Gadgetbridge a 0.12 deben ser convertidos a un nuevo formato. \nPuede hacerlo utilizando el botón de abajo. ¡Tenga en cuenta que debe estar conectado con el dispositivo al que desea asociar los antiguos datos de la actividad! \nSi ya importó sus datos y está satisfecho con el resultado, es posible eliminar la base de datos antigua.</string>
<string name="activity_db_management_merge_old_title">Importar/Borrar Base de Datos Antigua</string>
<string name="activity_db_management_merge_old_title">Borrar la base de datos antigua</string>
<string name="dbmanagementactivvity_cannot_access_export_path">No se puede acceder a la ruta para exportar . Por favor, contacta con los desarrolladores.</string>
<string name="dbmanagementactivity_exported_to">Exportado a: %1$s</string>
<string name="dbmanagementactivity_error_exporting_db">Error exportando DB: %1$s</string>
@ -331,12 +322,6 @@ Por favor, ten en cuenta que puedes importar datos desde Mi Band, Pebble Health
<string name="dbmanagementactivity_overwrite_database_confirmation">¿Quiere sobreescribir la base de datos actual? Todos sus datos actuales (si los hay) se borrarán.</string>
<string name="dbmanagementactivity_import_successful">Importado con éxito.</string>
<string name="dbmanagementactivity_error_importing_db">Error importando DB: %1$s</string>
<string name="dbmanagementactivity_no_old_activitydatabase_found">No se ha encontrado una base de datos con actividad antigua, no se importará nada.</string>
<string name="dbmanagementactivity_no_connected_device">No hay ningún dispositivo conectado al que asociar la base de datos antigua.</string>
<string name="dbmanagementactivity_merging_activity_data_title">Fusionando los datos de actividad</string>
<string name="dbmanagementactivity_please_wait_while_merging">Por favor, espere mientras se unen las bases de datos.</string>
<string name="dbmanagementactivity_error_importing_old_activity_data">Error importando los datos antiguos a la nueva base de datos.</string>
<string name="dbmanagementactivity_associate_old_data_with_device">Asociar los datos antiguos al dispositivo</string>
<string name="dbmanagementactivity_delete_activity_data_title">¿Quieres borrar los datos de actividad?</string>
<string name="dbmanagementactivity_really_delete_entire_db">¿Quieres borrar la base de datos? Todos tus datos de actividad y la información sobre tus dispositivos se borrarán.</string>
<string name="dbmanagementactivity_database_successfully_deleted">Datos borrados.</string>

View File

@ -241,6 +241,7 @@
<string name="notif_battery_low_bigtext_last_charge_time">Dernière charge: %s \n</string>
<string name="notif_battery_low_bigtext_number_of_charges">Nombre de charges: %s</string>
<string name="sleepchart_your_sleep">Votre sommeil</string>
<string name="weeksleepchart_sleep_a_week">Dormir une semaine</string>
<string name="weekstepschart_steps_a_week">Pas de la semaine</string>
<string name="activity_sleepchart_activity_and_sleep">Votre activité et sommeil</string>
<string name="updating_firmware">Mise à jour du micrologiciel...</string>
@ -308,25 +309,13 @@
<string name="updatefirmwareoperation_firmware_not_sent">Échec lors de l\'écriture du micrologiciel</string>
<string name="charts_legend_heartrate">Rythme cardiaque</string>
<string name="live_activity_heart_rate">Rythme cardiaque</string>
<!--Strings related to Onboading Activity-->
<string name="title_activity_onboarding">Importer la base de donnée</string>
<string name="import_old_db_buttonlabel">Importer des données d\'activité anciennes</string>
<string name="import_old_db_information">Depuis Gadgetbridge 0.12.0, nous utilisons un nouveau format de base de données.
Vous êtes en mesure d\'importer des données d\'activité anciennes et de les associer à l\'appareil auquel vous vous connectez (%1$s).\n
\n
Si vous ne voulez pas importer les anciennes données maintenant, vous pouvez toujours le faire plus tard en appuyant sur le bouton \"FUSIONNER LES ANCIENNES DONNÉES DACTIVITÉ\" dans le gestionnaire de base de données\n
\n
Notez que vous pouvez importer des données de Mi Band, Pebble Health et Morpheuz mais PAS de Pebble Misfit.</string>
<string name="pref_title_pebble_health_store_raw">Stockez les enregistrements brut dans la base de données</string>
<string name="pref_summary_pebble_health_store_raw">Si coché, les données sont stockées \"telles quelles\" et seront disponibles pour une interprétation ultérieure.
NOTE: la base de données sera bien évidement plus grande !</string>
<string name="action_db_management">Gestion de base de données</string>
<string name="title_activity_db_management">Gestion de base de données</string>
<string name="activity_db_management_import_export_explanation">Les opérations sur la base de donnée ont utilisé le chemin suivant sur votre appareil.\n Ce chemin n\'est pas accessible par d\'autres applications Android ou par votre ordinateur./nVous trouverez votre base de données (ou celle que vous souhaitez importer) ici:</string>
<string name="activity_db_management_merge_old_explanation">Les données d\'activité enregistrées avec les versions antérieures à la 0.12 de Gadgetbridge doivent être converties en un nouveau format.\n
Vous pouvez le faire en utilisant le bouton ci-dessous. Soyez conscient que vous devez être connecté à l\'appareil que vous souhaitez associer avec les anciennes données d\'activité !\n
Si vous avez déjà importé vos données et êtes satisfait du résultat, vous pouvez supprimer l\'ancienne base de données.</string>
<string name="activity_db_management_merge_old_title">Import / Suppression des anciennes bases de données.</string>
<string name="activity_db_management_merge_old_title">Effacer l\'ancienne base de données</string>
<string name="dbmanagementactivvity_cannot_access_export_path">Impossible d\'accéder au fichier d\'export. Merci de contacter les développeurs.</string>
<string name="dbmanagementactivity_exported_to">Exporter vers : %1$s</string>
<string name="dbmanagementactivity_error_exporting_db">Erreur d\'exportation BD: %1$s</string>
@ -334,12 +323,6 @@ Si vous avez déjà importé vos données et êtes satisfait du résultat, vous
<string name="dbmanagementactivity_overwrite_database_confirmation">Voulez-vous vraiment effacer la base de données actuelle ? Toutes vos données (si vous en avez) seront perdues.</string>
<string name="dbmanagementactivity_import_successful">Importation réussie.</string>
<string name="dbmanagementactivity_error_importing_db">Erreur lors de l\'importation BD: %1$s</string>
<string name="dbmanagementactivity_no_old_activitydatabase_found">Aucune ancienne base de données trouvée, rien à importer.</string>
<string name="dbmanagementactivity_no_connected_device">Pas d\'appareil connecté à associer avec l\'ancienne base de données.</string>
<string name="dbmanagementactivity_merging_activity_data_title">Fusion des données d\'activité</string>
<string name="dbmanagementactivity_please_wait_while_merging">Merci d\'attendre pendant la fusion de vos données.</string>
<string name="dbmanagementactivity_error_importing_old_activity_data">Échec de l\'import des anciennes données d\'activité dans la nouvelle base de données.</string>
<string name="dbmanagementactivity_associate_old_data_with_device">Association des anciennes données avec le nouvel appareil.</string>
<string name="dbmanagementactivity_delete_activity_data_title">Détruire les anciennes données ?</string>
<string name="dbmanagementactivity_really_delete_entire_db">Voulez-vous vraiment détruire entièrement la base de données ? Toutes vos données d\'activité et vos informations issues de vos appareils seront perdues.</string>
<string name="dbmanagementactivity_database_successfully_deleted">Les données ont été effacées.</string>

View File

@ -0,0 +1,349 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="app_name">Gadgetbridge</string>
<string name="title_activity_controlcenter">Gadgetbridge</string>
<string name="action_settings">הגדרות</string>
<string name="action_debug">ניפוי שגיאות</string>
<string name="action_quit">יציאה</string>
<string name="controlcenter_fetch_activity_data">סנכרון</string>
<string name="controlcenter_start_sleepmonitor">מעקב שינה (בבדיקה)</string>
<string name="controlcenter_find_device">איתור התקן שאבד…</string>
<string name="controlcenter_take_screenshot">צילום המסך</string>
<string name="controlcenter_disconnect">ניתוק</string>
<string name="controlcenter_delete_device">מחיקת התקן</string>
<string name="controlcenter_delete_device_name">מחיקת %1$s</string>
<string name="controlcenter_delete_device_dialogmessage">פעולה זו תמחק את ההתקן ואת כל המידע המשויך אליו!</string>
<string name="title_activity_debug">ניפוי שגיאות</string>
<!--Strings related to AppManager-->
<string name="title_activity_appmanager">מנהל יישומונים</string>
<string name="appmanager_cached_watchapps_watchfaces">יישומונים במטמון</string>
<string name="appmanager_installed_watchapps">יישומונים מותקנים</string>
<string name="appmanager_installed_watchfaces">מסיכות שעון מותקנות</string>
<string name="appmananger_app_delete">מחיקה</string>
<string name="appmananger_app_delete_cache">מחיקה והסרה מהמטמון</string>
<string name="appmananger_app_reinstall">התקנה מחדש</string>
<string name="appmanager_app_openinstore">חיפוש בחנות היישומונים של Pebble</string>
<string name="appmanager_health_activate">הפעלה</string>
<string name="appmanager_health_deactivate">נטרול</string>
<string name="appmanager_hrm_activate">הפעלת </string>
<string name="appmanager_hrm_deactivate">נטרול </string>
<string name="appmanager_weather_activate">הפעלת יישומון מזג האוויר של המערכת</string>
<string name="appmanager_weather_deactivate">נטרול יישומון מזג האוויר של המערכת</string>
<string name="appmanager_weather_install_provider">התקנת יישומון דיווח מזג האוויר</string>
<string name="app_configure">הגדרה</string>
<string name="app_move_to_top">העברה למעלה</string>
<!--Strings related to AppBlacklist-->
<string name="title_activity_appblacklist">חסימת דיווחים</string>
<!--Strings related to FwAppInstaller-->
<string name="title_activity_fw_app_insaller">התקנת קושחה/יישומון</string>
<string name="fw_upgrade_notice">הקושחה המועמדת להתקנה היא %s במקום זו המותקנת על ה־Mi Band שלך נכון לעכשיו.</string>
<string name="fw_multi_upgrade_notice">הקושחות המועמדות להתקנה הנן %1$s ו־%2$s במקום אלו המותקנת על ה־Mi Band שלך נכון לעכשיו.</string>
<string name="miband_firmware_known">קושחה זו נבדקה וידוע כי היא נתמכת ב־Gadgetbridge.</string>
<string name="miband_firmware_unknown_warning">קושחה זו לא נבדקה ויתכן כי אינה נתמכת ב־Gadgetbridge.\n\nלא מומלץ להתקין אותה על ה־Mi Band שלך!</string>
<string name="miband_firmware_suggest_whitelist">אם בכל זאת בחרת להמשיך והדברים ממשיכים לעבוד כרגיל, נא לספר למפתחים של Gadgetbridge להוסיף לרשימת ההיתר את גרסת הקושחה: %s</string>
<!--Strings related to Settings-->
<string name="title_activity_settings">הגדרות</string>
<string name="pref_header_general">הגדרות כלליות</string>
<string name="pref_title_general_autoconnectonbluetooth">התחברות להתקן כאשר ה־Bluetooth פועל</string>
<string name="pref_title_general_autostartonboot">התחלה אוטומטית</string>
<string name="pref_title_general_autocreonnect">התחברות אוטומטית מחדש</string>
<string name="pref_title_audo_player">נגן מדיה מועדף</string>
<string name="pref_default">בררת מחדל</string>
<string name="pref_header_datetime">שעה ותאריך</string>
<string name="pref_title_datetime_syctimeonconnect">סנכרון השעה</string>
<string name="pref_summary_datetime_syctimeonconnect">סנכרון השעה בהתקן בעת ההתחברות וכאשר השעה או אזור הזמן משתנים באנדרואיד.</string>
<string name="pref_title_theme">ערכת עיצוב</string>
<string name="pref_theme_light">בהירה</string>
<string name="pref_theme_dark">כהה</string>
<string name="pref_title_language">שפה</string>
<string name="pref_title_minimize_priority">הסתרת ההתרעות של Gadgetbridge</string>
<string name="pref_summary_minimize_priority_off">הסמל בשורת המצב והדיווח במסך הנעילה מופיעים</string>
<string name="pref_summary_minimize_priority_on">הסמל בשורת המצב והדיווח במסך הנעילה מוסתרים</string>
<string name="pref_header_notifications">דיווחים</string>
<string name="pref_title_notifications_repetitions">חזרות</string>
<string name="pref_title_notifications_call">שיחות טלפון</string>
<string name="pref_title_notifications_sms">מסרונים</string>
<string name="pref_title_notifications_pebblemsg">הודעות </string>
<string name="pref_summary_notifications_pebblemsg">תמיכה ביישומונים ששולחים דיווחים ל־Pebble באמצעות PebbleKit.</string>
<string name="pref_title_notifications_generic">תמיכה בדיווחים גנריים</string>
<string name="pref_title_whenscreenon">…גם כאשר המסך פעיל</string>
<string name="pref_title_notification_filter">לא להפריע</string>
<string name="pref_summary_notification_filter">חסימת שליחה של דיווחים בלתי רצויים בהתבסס על המצב לא להפריע.</string>
<string name="pref_title_transliteration">תעתיק</string>
<string name="pref_summary_transliteration">יש להפעיל זו אם להתקן שלך אין תמיכה בגופן השפה שלך (קירילית ועברית בלבד)</string>
<string name="always">תמיד</string>
<string name="when_screen_off">כאשר המסך כבוי</string>
<string name="never">לעולם לא</string>
<string name="pref_header_privacy">פרטיות</string>
<string name="pref_title_call_privacy_mode">מצב פרטיות שיחה</string>
<string name="pref_call_privacy_mode_off">להציג שם ומספר</string>
<string name="pref_call_privacy_mode_name">להסתיר את השם אך להציג את המספר</string>
<string name="pref_call_privacy_mode_complete">להסתיר את השם והמספר</string>
<string name="pref_blacklist">רשימת יישומונים שחורה</string>
<string name="pref_header_cannned_messages">הודעות מוגדרות</string>
<string name="pref_title_canned_replies">תגובות</string>
<string name="pref_title_canned_reply_suffix">סיומת משותפת</string>
<string name="pref_title_canned_messages_dismisscall">התעלמות משיחות</string>
<string name="pref_title_canned_messages_set">עדכון ב־Pebble</string>
<string name="pref_header_development">אפשרויות פיתוח</string>
<string name="pref_title_development_miaddr">כתובת </string>
<string name="pref_title_pebble_settings">הגדרות </string>
<string name="pref_header_activitytrackers">עוקבי פעילות</string>
<string name="pref_title_pebble_activitytracker">עוקב פעילות מועדף</string>
<string name="pref_title_pebble_sync_health">סנכרון Pebble Health</string>
<string name="pref_title_pebble_sync_misfit">סנכרון Misfit</string>
<string name="pref_title_pebble_sync_morpheuz">סנכרון Morpheuz</string>
<string name="pref_title_enable_outgoing_call">תמיכה בשיחות יוצאות</string>
<string name="pref_summary_enable_outgoing_call">נטרול אפשרות זו גם תנטרל את הרטט לשיחות יוצאות ב־Pebble 2/LE</string>
<string name="pref_title_enable_pebblekit">לאפשר גישה ליישומוני צד שלישי באנדרואיד</string>
<string name="pref_summary_enable_pebblekit">הפעלת תמיכה ניסיונית ביישומוני אנדרואיד באמצעות PebbleKit</string>
<string name="pref_title_sunrise_sunset">זריחה ושקיעה</string>
<string name="pref_summary_sunrise_sunset">שליחת מועדי זריחה ושקיעה בהתבסס על המיקום לציר הזמן של pebble</string>
<string name="pref_title_autoremove_notifications">הסרה אוטומטית של דיווחים שהתעלמת מהם</string>
<string name="pref_summary_autoremove_notifications">דיווחים מוסרים אוטומטית מה־Pebble כשהתעלמת מהם בהתקן האנדרואיד</string>
<string name="pref_title_pebble_privacy_mode">מצב פרטיות</string>
<string name="pref_pebble_privacy_mode_off">דיווחים רגילים</string>
<string name="pref_pebble_privacy_mode_content">החלקת טקסט הדיווח אל מחוץ למסך</string>
<string name="pref_pebble_privacy_mode_complete">הצגת סמל הדיווח בלבד</string>
<string name="pref_header_location">מיקום</string>
<string name="pref_title_location_aquire">קבלת המיקום</string>
<string name="pref_title_location_latitude">רוחב</string>
<string name="pref_title_location_longitude">אורך</string>
<string name="pref_title_location_keep_uptodate">להשאיר את המיקום מעודכן</string>
<string name="pref_summary_location_keep_uptodate">לנסות לקבל את המיקום הנוכחי בזמן ההפעלה, יש להשתמש במיקום שנשמר רק כגיבוי</string>
<string name="toast_enable_networklocationprovider">נא להפעיל את החיבור לרשת</string>
<string name="toast_aqurired_networklocation">המיקום התקבל</string>
<string name="pref_title_pebble_forceprotocol">אילוץ פרוטוקול דיווח</string>
<string name="pref_summary_pebble_forceprotocol">אפשרות זו מאלצת את השימוש בפרוטוקול הדיווח העדכני ביותר בהתאם לגרסת החומרה. יש להפעיל רק אם ההשלכות ברורות לך לחלוטין!</string>
<string name="pref_title_pebble_forceuntested">הפעלת תכונות שלא נבדקו</string>
<string name="pref_summary_pebble_forceuntested">הפעלת תכונות שלא נבדקו. יש להפעיל רק אם ההשלכות ברורות לך לחלוטין!!</string>
<string name="pref_title_pebble_forcele">תמיד להעדיף BLE</string>
<string name="pref_summary_pebble_forcele">שימוש בתמיכה ניסיונית ב־Pebble LE עבור כל סוגי ה־Pebble במקום ה־Bluetooth הקלסי, נדרש צימוד „Pebble LE“ לאחר שנוצר חיבור שאינו LE בעבר.</string>
<string name="pref_title_pebble_mtu_limit">מגבלת ה־MTU של GATT ל־Pebble 2/LE</string>
<string name="pref_summary_pebble_mtu_limit">אם ה־Pebble 2/Pebble LE שלך אינו עובד כצפוי, יש לנסות אפשרות זאת כדי להגביל את כמות הנתונים המועברת - MTU (טווח תקני 20512)</string>
<string name="pref_title_pebble_enable_applogs">הפעלת מעקב רישום אחר יישומון השעון</string>
<string name="pref_summary_pebble_enable_applogs">יגרום לרישומים מיישומי השעון להיות מתועדים ב־Gadgetbridge (נדרשת הפעלה מחדש)</string>
<string name="pref_title_pebble_always_ack_pebblekit">אישור מסירה מוקדם מצד PebbleKit</string>
<string name="pref_summary_pebble_always_ack_pebblekit">יגרום להודעות שנשלחות ליישומוני צד שלישי לקבל אישור מסירה תמיד ובאופן מיידי</string>
<string name="pref_title_pebble_reconnect_attempts">ניסיונות חיבור מחדש</string>
<string name="pref_title_unit_system">יחידות</string>
<string name="pref_title_timeformat">תבנית הזמן</string>
<string name="pref_title_screentime">משך מסך פעיל</string>
<string name="prefs_title_all_day_heart_rate">מדידת דופק במשך כל היום</string>
<string name="preferences_hplus_settings">הגדרות HPlus/Makibes</string>
<string name="not_connected">לא מחובר</string>
<string name="connecting">מחובר</string>
<string name="connected">מתחבר</string>
<string name="unknown_state">מצב לא ידוע</string>
<string name="connectionstate_hw_fw">חומרה: %1$s קושחה: %2$s</string>
<string name="connectionstate_fw">קושחה: %1$s</string>
<string name="_unknown_">(לא ידוע)</string>
<string name="test">בדיקה</string>
<string name="test_notification">דיווח לבדיקה</string>
<string name="this_is_a_test_notification_from_gadgetbridge">זהו דיווח לבדיקה מ־Gadgetbridge</string>
<string name="bluetooth_is_not_supported_">אין תמיכה ב־Bluetooth.</string>
<string name="bluetooth_is_disabled_">ה־Bluetooth מנוטרל.</string>
<string name="tap_connected_device_for_app_mananger">נקישה על ההתקן המחובר למנהל היישומים</string>
<string name="tap_connected_device_for_activity">נקישה על ההתקן המחובר לפעילות</string>
<string name="tap_connected_device_for_vibration">נקישה על ההתקן המחובר לרטט</string>
<string name="tap_a_device_to_connect">יש לגעת בהתקן כדי להתחבר</string>
<string name="cannot_connect_bt_address_invalid_">לא ניתן להתחבר. כתובת ה־BT שגויה?</string>
<string name="gadgetbridge_running">Gadgetbridge פעיל</string>
<string name="installing_binary_d_d">התקנת הבינרי %1$d/%2$d</string>
<string name="installation_failed_">ההתקנה נכשלה!</string>
<string name="installation_successful">ההתקנה הצליחה</string>
<string name="firmware_install_warning">זהו ניסיון להתקנת קושחה, ניתן להמשיך אם ברורות לך ההשלכות.\n\n\n קושחה זו מיועדת לחומרה במהדורה: %s</string>
<string name="app_install_info">היישומון המועמד להתקנה הוא:\n\n\n%1$s גרסה %2$s מאת %3$s\n</string>
<string name="n_a">לא זמין</string>
<string name="initialized">מאותחל</string>
<string name="appversion_by_creator">%1$s מאת %2$s</string>
<string name="title_activity_discovery">גילוי התקנים</string>
<string name="discovery_stop_scanning">להפסיק את הסריקה</string>
<string name="discovery_start_scanning">להתחיל בסריקה</string>
<string name="action_discover">חיבור התקן חדש</string>
<string name="device_with_rssi">%1$s (%2$s)</string>
<string name="title_activity_android_pairing">צימוד התקן</string>
<string name="android_pairing_hint">יש להשתמש בדו־שיח צימוד ה־Bluetooth לאנדרואיד כדי ליצור צימוד להתקן.</string>
<string name="title_activity_mi_band_pairing">צימוד ה־Mi Band שלך</string>
<string name="pairing">מתבצע צימוד עם %s…</string>
<string name="pairing_creating_bond_with">נוצר איגוד עם %1$s (%2$s)</string>
<string name="pairing_unable_to_pair_with">לא ניתן ליצור צימוד עם %1$s (%2$s)</string>
<string name="pairing_in_progress">מתבצע איגוד: %1$s (%2$s)</string>
<string name="pairing_already_bonded">כבר נוצר איגוד עם %1$s (%2$s), מתבצעת התחברות…</string>
<string name="message_cannot_pair_no_mac">לא הועברה כתובת חומרה, לא ניתן לצמד.</string>
<string name="preferences_category_device_specific_settings">הגדרות ייעודיות להתקן</string>
<string name="preferences_miband_settings">הגדרות Mi Band</string>
<string name="male">זכר</string>
<string name="female">נקבה</string>
<string name="other">אחר</string>
<string name="left">שמא</string>
<string name="right">ימין</string>
<string name="miband_pairing_using_dummy_userdata">לא ניתנו נתוני משתמש, נעשה שימוש בנתוני דמה לבינתיים.</string>
<string name="miband_pairing_tap_hint">כאשר ה־Mi Band שלך רוטט ומהבהב, יש לגעת בו מספר פעמים ברצף.</string>
<string name="appinstaller_install">התקנה</string>
<string name="discovery_connected_devices_hint">נא לוודא שההתקן שלך פתוח לגילוי. התקנים שכבר חוברו לא יופיעו ברשימה. באנדרואיד 6 ומעלה, עליך להפעיל את המיקום (למשל GPS). אם ההתקן שלך לא מופיע לאחר למעלה משתי דקות, יש לנסות שוב לאחר הפעלה מחדש של הטלפון שלך.</string>
<string name="discovery_note">לתשומת לבך:</string>
<string name="candidate_item_device_image">תמונת ההתקן</string>
<string name="miband_prefs_alias">שם/כינוי</string>
<string name="pref_header_vibration_count">ספירת רטט</string>
<string name="title_activity_sleepmonitor">מעקב שינה</string>
<string name="pref_write_logfiles">כתיבת קובצי יומן</string>
<string name="initializing">מתבצע אתחול</string>
<string name="busy_task_fetch_activity_data">נתוני הפעילות מתקבלים</string>
<string name="sleep_activity_date_range">מ־%1$s עד %2$s</string>
<string name="miband_prefs_wearside">על יד ימין או שמאל?</string>
<string name="pref_screen_vibration_profile">פרופיל רטט</string>
<string name="vibration_profile_staccato">סטקטו</string>
<string name="vibration_profile_short">קצר</string>
<string name="vibration_profile_medium">בינוני</string>
<string name="vibration_profile_long">ארוך</string>
<string name="vibration_profile_waterdrop">טיפת מים</string>
<string name="vibration_profile_ring">צלצול</string>
<string name="vibration_profile_alarm_clock">שעון מעורר</string>
<string name="miband_prefs_vibration">רטט</string>
<string name="vibration_try">בדיקה</string>
<string name="pref_screen_notification_profile_sms">דיווח על מסרון</string>
<string name="pref_header_vibration_settings">הגדרות רטט</string>
<string name="pref_screen_notification_profile_generic">דיווחים כלליים</string>
<string name="pref_screen_notification_profile_email">דיווח על דוא״ל</string>
<string name="pref_screen_notification_profile_incoming_call">דיווח על שיחה נכנסת</string>
<string name="pref_screen_notification_profile_generic_chat">צ׳אט</string>
<string name="pref_screen_notification_profile_generic_navigation">ניווט</string>
<string name="pref_screen_notification_profile_generic_social">רשת חברתית</string>
<string name="control_center_find_lost_device">איתור התקן שאבד</string>
<string name="control_center_cancel_to_stop_vibration">יש לבטל כדי לעצור את הרטט.</string>
<string name="title_activity_charts">הפעילות שלך</string>
<string name="title_activity_set_alarm">הגדרת שעון מעורר</string>
<string name="controlcenter_start_configure_alarms">הגדרת שעון מעורר</string>
<string name="title_activity_alarm_details">פרטי ההתראה</string>
<string name="alarm_sun_short">יום א׳</string>
<string name="alarm_mon_short">יום ב׳</string>
<string name="alarm_tue_short">יום ג׳</string>
<string name="alarm_wed_short">יום ד׳</string>
<string name="alarm_thu_short">יום ה</string>
<string name="alarm_fri_short">יום ו׳</string>
<string name="alarm_sat_short">שבת</string>
<string name="alarm_smart_wakeup">השכמה חכמה</string>
<string name="user_feedback_miband_set_alarms_failed">אירעה שגיאה בעת הגדרת ההתראות, נא לנסות שוב!</string>
<string name="user_feedback_miband_set_alarms_ok">ההתראות נשלחו להתקן!</string>
<string name="chart_no_data_synchronize">אין נתונים. לסנכרן מול ההתקן?</string>
<string name="user_feedback_miband_activity_data_transfer">בהכנות להעברת %1$s של נתונים החל מ־%2$s</string>
<string name="miband_prefs_fitness_goal">יעד צעדים בכל יום</string>
<string name="dbaccess_error_executing">שגיאה בהפעלת %1$s</string>
<string name="controlcenter_start_activitymonitor">הפעילות שלך (ניסיוני)</string>
<string name="cannot_connect">לא ניתן להתחבר: %1$s</string>
<string name="installer_activity_unable_to_find_handler">לא ניתן למצוא מנגנון להתקנת הקובץ הזה.</string>
<string name="pbw_install_handler_unable_to_install">לא ניתן להתקין את הקובץ הנתון: %1$s</string>
<string name="pbw_install_handler_hw_revision_mismatch">לא ניתן להתקין את החומרה הנתונה: היא אינה תואמת את מהדורת החומרה של ה־Pebble שלך.</string>
<string name="installer_activity_wait_while_determining_status">נא להמתין בעת איתור מצב ההתקנה…</string>
<string name="notif_battery_low_title">הסוללה של הגאדג׳ט חלשה!</string>
<string name="notif_battery_low_percent">נותר בסוללה של %1$s: %2$s%%</string>
<string name="notif_battery_low_bigtext_last_charge_time">טעינה אחרונה: %s \n</string>
<string name="notif_battery_low_bigtext_number_of_charges">מספר טעינות: %s</string>
<string name="sleepchart_your_sleep">השינה שלך</string>
<string name="weeksleepchart_sleep_a_week">שינה של שבוע</string>
<string name="weekstepschart_steps_a_week">צעדים של שבוע</string>
<string name="activity_sleepchart_activity_and_sleep">הפעילות והשינה שלך</string>
<string name="updating_firmware">הקושחה מתעדכנת…</string>
<string name="fwapp_install_device_not_ready">לא ניתן להתקין את הקובץ, ההתקן לא מוכן.</string>
<string name="miband_installhandler_miband_firmware">הקושחה של ה־Mi Band %1$s</string>
<string name="miband_fwinstaller_compatible_version">גרסה תואמת</string>
<string name="miband_fwinstaller_untested_version">גרסה שלא נבדקה!</string>
<string name="fwappinstaller_connection_state">חיבור להתקן: %1$s</string>
<string name="pbw_installhandler_pebble_firmware">הקושחה של ה־Pebble %1$s</string>
<string name="pbwinstallhandler_correct_hw_revision">מהדורת החומרה הנכונה</string>
<string name="pbwinstallhandler_incorrect_hw_revision">מהדורת החומרה אינה תואמת!</string>
<string name="pbwinstallhandler_app_item">%1$s (%2$s)</string>
<string name="updatefirmwareoperation_updateproblem_do_not_reboot">אירעה תקלה עם העברת הקושחה. נא לא להפעיל מחדש את ה־Mi Band שלך!</string>
<string name="updatefirmwareoperation_metadata_updateproblem">אירעה תקלה עם העברת נתוני העל של הקושחה</string>
<string name="updatefirmwareoperation_update_complete">התקנת הקושחה הושלמה</string>
<string name="updatefirmwareoperation_update_complete_rebooting">התקנת הקושחה הושלמה, ההתקן מופעל מחדש…</string>
<string name="updatefirmwareoperation_write_failed">כתיבת הקושחה נכשלה</string>
<string name="chart_steps">צעדים</string>
<string name="liveactivity_live_activity">פעילות חיה</string>
<string name="weeksteps_today_steps_description">צעדים היום, יעד: %1$s</string>
<string name="pref_title_dont_ack_transfer">לא לשלוח אישור על העברת נתוני פעילות</string>
<string name="pref_summary_dont_ack_transfers">אם נתוני הפעילות לא יקבלו אישור על ההעברה הם לא יימחקו. שימושי אם נעשה שימוש ביישומונים שונים למעט Gadgetbridge.</string>
<string name="pref_summary_keep_data_on_device">תכונה זו תגרום לשמירת נתוני הפעילות על ה־Mi Band גם לאחר הסנכרון. שימושי אם נעשה שימוש ביישומונים שונים למעט Gadgetbridge.</string>
<string name="pref_title_low_latency_fw_update">שימוש במצב חיבור מהיר לעדכוני קושחה</string>
<string name="pref_summary_low_latency_fw_update">הפעלת אפשרות זו עשויה לסייע במקרים שבהם עדכון הקושחה נכשל</string>
<string name="live_activity_steps_history">היסטוריית הצעדים</string>
<string name="live_activity_current_steps_per_minute">צעדים/דקה נכון לעכשיו</string>
<string name="live_activity_total_steps">סך כל הצעדים</string>
<string name="live_activity_steps_per_minute_history">היסטוריית צעדים בדקה</string>
<string name="live_activity_start_your_activity">התחלת הפעילות שלך</string>
<string name="abstract_chart_fragment_kind_activity">פעילות</string>
<string name="abstract_chart_fragment_kind_light_sleep">שינה קלה</string>
<string name="abstract_chart_fragment_kind_deep_sleep">שינה עמוקה</string>
<string name="abstract_chart_fragment_kind_not_worn">לא נענד</string>
<string name="device_not_connected">לא מחובר.</string>
<string name="user_feedback_all_alarms_disabled">כל ההתראות מנוטרלות</string>
<string name="pref_title_keep_data_on_device">להשאיר את נתוני הפעילות בהתקן</string>
<string name="miband_fwinstaller_incompatible_version">קושחה בלתי נתמכת</string>
<string name="fwinstaller_firmware_not_compatible_to_device">קושחה זו אינה נתמכת בהתקן</string>
<string name="miband_prefs_reserve_alarm_calendar">התראות לשמירה עבור אירועים עתידיים</string>
<string name="miband_prefs_hr_sleep_detection">ניתן להשתמש בחיישן הדופק כדי לשפר את איתור השינה</string>
<string name="miband_prefs_device_time_offset_hours">הפרש זמן בהתקן בשעות (לזיהוי שינה של עובדי משמרות)</string>
<string name="miband2_prefs_dateformat">Mi2: תבנית זמן</string>
<string name="dateformat_time">זמן</string>
<string name="dateformat_date_time"><![CDATA[זמן ותאריך]]></string>
<string name="mi2_prefs_activate_display_on_lift">הפעלת התצוגה עם הנפת היד</string>
<string name="FetchActivityOperation_about_to_transfer_since">עומדת להתרחש העברה מאז %1$s</string>
<string name="waiting_for_reconnect">בהמתנה לחיבור מחדש</string>
<string name="activity_prefs_about_you">עליך</string>
<string name="activity_prefs_year_birth">שנת הלידה</string>
<string name="activity_prefs_gender">מגדר</string>
<string name="activity_prefs_height_cm">גובה בס״מ</string>
<string name="activity_prefs_weight_kg">משקל בק״ג</string>
<string name="authenticating">מתבצע אימות</string>
<string name="authentication_required">נדרש אימות</string>
<string name="appwidget_text">חררר</string>
<string name="add_widget">הוספת וידג׳ט</string>
<string name="activity_prefs_sleep_duration">משך השינה המועדף בשעות</string>
<string name="appwidget_alarms_set">הוגדרה התרעה לשעה %1$02d:%2$02d</string>
<string name="device_hw">חומרה: %1$s</string>
<string name="device_fw">קושחה: %1$s</string>
<string name="error_creating_directory_for_logfiles">אירעה שגיאה ביצירת תיקייה לקובצי הרישום: %1$s</string>
<string name="DEVINFO_HR_VER">דופק:</string>
<string name="updatefirmwareoperation_update_in_progress">מתבצע עדכון קושחה</string>
<string name="updatefirmwareoperation_firmware_not_sent">לא הוגדרה קושחה</string>
<string name="charts_legend_heartrate">דופק</string>
<string name="live_activity_heart_rate">דופק</string>
<string name="pref_title_pebble_health_store_raw">אחסון נתונים גולמיים במסד הנתונים</string>
<string name="pref_summary_pebble_health_store_raw">אם אפשרות זו מסומנת הנתונים מאוחסנים כמו שהם ויהיו זמינים לפרשנות עתידית. לתשומת לבך: מסד הנתונים יהיה גדול יותר במצב כזה!</string>
<string name="action_db_management">ניהול מסד נתונים</string>
<string name="title_activity_db_management">ניהול מסד נתונים</string>
<string name="activity_db_management_import_export_explanation">פעולות מסד הנתונים משתמשות בנתיב הבא בהתקן שלך. \nנתיב זה נגיש ליישומונים אחרים של אנדרואיד ולמחשב שלך. \nאת הנתונים שייצאת ממסד הנתונים (ואת מסדי הנתונים שמיועדים לייבוא) ניתן למצוא שם:</string>
<string name="activity_db_management_merge_old_title">מחיקת מסד נתונים מיושן</string>
<string name="dbmanagementactivvity_cannot_access_export_path">לא ניתן לגשת לנתיב הייצוא. נא ליצור קשר עם המפתחים.</string>
<string name="dbmanagementactivity_exported_to">ייוצא אל: %1$s</string>
<string name="dbmanagementactivity_error_exporting_db">שגיאה בייצוא מסד הנתונים: %1$s</string>
<string name="dbmanagementactivity_import_data_title">לייבא נתונים?</string>
<string name="dbmanagementactivity_overwrite_database_confirmation">באמת לשכתב על מסד הנתונים הנוכחי? כל נתונים הפעילות הנוכחיים שלך (אם יש כאלה) ילכו לאיבוד.</string>
<string name="dbmanagementactivity_import_successful">הייבוא הצליח.</string>
<string name="dbmanagementactivity_error_importing_db">שגיאה בייבוא מסד הנתונים: %1$s</string>
<string name="dbmanagementactivity_delete_activity_data_title">למחוק את נתוני הפעילות?</string>
<string name="dbmanagementactivity_really_delete_entire_db">באמת למחוק את כל מסד הנתונים? כל נתוני הפעילות והמידע על ההתקנים שלך ילך לאיבוד.</string>
<string name="dbmanagementactivity_database_successfully_deleted">הנתונים נמחקו בהצלחה.</string>
<string name="dbmanagementactivity_db_deletion_failed">מחיקת מסד הנתונים נכשלה.</string>
<string name="dbmanagementactivity_delete_old_activity_db">למחוק את מסד נתוני הפעילות המיושן?</string>
<string name="dbmanagementactivity_delete_old_activitydb_confirmation">ללמחוק את מסד נתוני הפעילות המיושן? נתוני פעילות שלא ייובאו ילכו לאיבוד.</string>
<string name="dbmanagementactivity_old_activity_db_successfully_deleted">נתוני פעילות ישנים נמחקו בהצלחה.</string>
<string name="dbmanagementactivity_old_activity_db_deletion_failed">מחיקת מסד נתוני הפעילות הישן נכשל.</string>
<string name="dbmanagementactivity_overwrite">שכתוב</string>
<string name="Cancel">ביטול</string>
<string name="Delete">מחיקה</string>
<!--Strings related to Vibration Activity-->
<string name="title_activity_vibration">רטטרטט</string>
<!--Strings related to Pebble Pairing Activity-->
<string name="title_activity_pebble_pairing">צימוד Pebble</string>
<string name="pebble_pairing_hint">במסך של התקן האנדרואיד שלך אמורה לקפוץ חלונית צימוד. אם החלונית לא מופיעה, יש לחפש במגירת הדיווחים ולאשר את בקשת הצימוד. לאחר מכן יש לאשר את בקשת הצימוד ב־Pebble שלך</string>
<string name="weather_notification_label">נא לוודא שערכת עיצוב זו מופעלת ביישומון דיווח מזג האוויר כדי לקבל נתוני מזג אוויר ל־Pebble שלך.\n\nלא נדרשות כאן הגדרות.\n\nניתן להפעיל את יישומון מזג האוויר המערכתי של ה־Pebble שלך ממנהל היישומונים.\n\nמסיכות השעון התומכות יציגו את מזג האוויר אוטומטית.</string>
<string name="pref_title_setup_bt_pairing">הפעלת צימוד Bluetooth</string>
<string name="pref_summary_setup_bt_pairing">יש לנטרל זאת אם עולות תקלות בחיבור</string>
<string name="unit_metric">מטרית</string>
<string name="unit_imperial">אימפריאלית</string>
<string name="timeformat_24h">24ש׳</string>
<string name="timeformat_am_pm">AM/PM</string>
<string name="pref_screen_notification_profile_alarm_clock">שעון מעורר</string>
</resources>

View File

@ -0,0 +1,347 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="app_name">Gadgetbridge</string>
<string name="title_activity_controlcenter">Gadgetbridge</string>
<string name="action_settings">Configurações</string>
<string name="action_debug">Depurar</string>
<string name="action_quit">Sair</string>
<string name="controlcenter_fetch_activity_data">Sincronizar</string>
<string name="controlcenter_start_sleepmonitor">Monitor de sono (ALPHA)</string>
<string name="controlcenter_find_device">Buscando dispositivo perdido...</string>
<string name="controlcenter_take_screenshot">Print da tela</string>
<string name="controlcenter_disconnect">Desconectar</string>
<string name="controlcenter_delete_device">Apagar dispositivo</string>
<string name="controlcenter_delete_device_name">Apagar %1$s</string>
<string name="controlcenter_delete_device_dialogmessage">Isto irá apagar o dispositivo e apagar os dados associados!</string>
<string name="title_activity_debug">Depurar</string>
<!--Strings related to AppManager-->
<string name="title_activity_appmanager">Administrador de App</string>
<string name="appmanager_cached_watchapps_watchfaces">Apps em cache</string>
<string name="appmanager_installed_watchapps">Apps instalados</string>
<string name="appmanager_installed_watchfaces">Visores instalados</string>
<string name="appmananger_app_delete">Apagar</string>
<string name="appmananger_app_delete_cache">Apagar e remover do cache</string>
<string name="appmananger_app_reinstall">Reinstalar</string>
<string name="appmanager_app_openinstore">Buscar na loja Pebble</string>
<string name="appmanager_health_activate">Ativar</string>
<string name="appmanager_health_deactivate">Desativar</string>
<string name="appmanager_hrm_activate">Ativar HRM</string>
<string name="appmanager_hrm_deactivate">Desativar HRM</string>
<string name="appmanager_weather_activate">Ativas app de clima do sistema</string>
<string name="appmanager_weather_deactivate">Desativar app de clima do sistema</string>
<string name="appmanager_weather_install_provider">Instalar notificações do app de clima</string>
<string name="app_configure">Configurar</string>
<string name="app_move_to_top">Mover para o topo</string>
<!--Strings related to AppBlacklist-->
<string name="title_activity_appblacklist">Blacklist de notificações</string>
<!--Strings related to FwAppInstaller-->
<string name="title_activity_fw_app_insaller">Instalador FW/App</string>
<string name="fw_upgrade_notice">Você está prestes a instalar o firmware %s no lugar do atual em sua Mi Band.</string>
<string name="fw_multi_upgrade_notice">Você está prestes a instalar os firmwares %1$s e %2$s no lugar dos que estão atualmente na sua Mi Band.</string>
<string name="miband_firmware_known">O firmware foi testado e é compatível com Gadgetbridge.</string>
<string name="miband_firmware_unknown_warning">Este firmware não foi testado e pode não ser compatível com o Gadgetbridge..\n\nNÃO recomendamos que instale em seu Mi Band!</string>
<string name="miband_firmware_suggest_whitelist">Se você ainda quiser continuar e as coisas continuarem a funcionar corretamente depois, informe os desenvolvedores do Gadgetbridge para autorizar a versão do firmware: %s</string>
<!--Strings related to Settings-->
<string name="title_activity_settings">Configurações</string>
<string name="pref_header_general">Configurações Gerais</string>
<string name="pref_title_general_autoconnectonbluetooth">Conecte o dispositivo com o ligar o Bluetooth</string>
<string name="pref_title_general_autostartonboot">Iniciar automaticamente</string>
<string name="pref_title_general_autocreonnect">Reconectar automaticamente</string>
<string name="pref_title_audo_player">Player de música preferencial</string>
<string name="pref_default">Padrão</string>
<string name="pref_header_datetime">Data e Hora</string>
<string name="pref_title_datetime_syctimeonconnect">Sincronizar hora</string>
<string name="pref_summary_datetime_syctimeonconnect">Sincronizar horário quando o dispositivo estiver conectando ou quando o fuso horário mudar no android</string>
<string name="pref_title_theme">Tema</string>
<string name="pref_theme_light">Claro</string>
<string name="pref_theme_dark">Escuro</string>
<string name="pref_title_language">Idioma</string>
<string name="pref_title_minimize_priority">Ocultar notificações do Gadgetbridge</string>
<string name="pref_summary_minimize_priority_off">Exibir ícone na barra de status e nas notificações na tela inicial</string>
<string name="pref_summary_minimize_priority_on">Ocultar ícone na barra de status e nas notificações na tela inicial</string>
<string name="pref_header_notifications">Notificações</string>
<string name="pref_title_notifications_repetitions">Repetições</string>
<string name="pref_title_notifications_call">Chamadas de telefone</string>
<string name="pref_title_notifications_sms">SMS</string>
<string name="pref_title_notifications_pebblemsg">Mensagens do Pebble</string>
<string name="pref_summary_notifications_pebblemsg">Suportar notificações de aplicações que enviam notificações pelo PebbleKit.</string>
<string name="pref_title_notifications_generic">Suportar notificações genéricas</string>
<string name="pref_title_whenscreenon">... e quando a tela estiver ligada</string>
<string name="pref_title_notification_filter">Não perturbe</string>
<string name="pref_summary_notification_filter">Parar com notificações indesejadas enquanto estiver no modo Não Perturbe.</string>
<string name="pref_title_transliteration">Representação</string>
<string name="pref_summary_transliteration">Ativar isso se o dispositivo não tiver suporte para seu idioma (Atualmente Cirílico apenas)</string>
<string name="always">sempre</string>
<string name="when_screen_off">quando a tela estiver desligada</string>
<string name="never">nunca</string>
<string name="pref_header_privacy">Privacidade</string>
<string name="pref_title_call_privacy_mode">Modo de chamada privada</string>
<string name="pref_call_privacy_mode_off">Exibir nome e número</string>
<string name="pref_call_privacy_mode_name">Ocultar nome e exibir número</string>
<string name="pref_call_privacy_mode_complete">Ocultar nome e número</string>
<string name="pref_blacklist">Apps em Blacklist</string>
<string name="pref_header_cannned_messages">Histórico de mensagens</string>
<string name="pref_title_canned_replies">Respostas</string>
<string name="pref_title_canned_reply_suffix">Sufixo comum</string>
<string name="pref_title_canned_messages_dismisscall">Chamadas recusadas</string>
<string name="pref_title_canned_messages_set">Atualizar no Pebble</string>
<string name="pref_header_development">Opções do desenvolvedor</string>
<string name="pref_title_development_miaddr">Endereço do Mi Band</string>
<string name="pref_title_pebble_settings">Configurações Pebble</string>
<string name="pref_header_activitytrackers">Ativar monitores</string>
<string name="pref_title_pebble_activitytracker">Monitor de atividades preferido</string>
<string name="pref_title_pebble_sync_health">Sincronizar com Pebble Health</string>
<string name="pref_title_pebble_sync_misfit">Sincronizar com Misfit</string>
<string name="pref_title_pebble_sync_morpheuz">Sincronizar com Morpheuz</string>
<string name="pref_title_enable_outgoing_call">Suporta originar chamadas</string>
<string name="pref_summary_enable_outgoing_call">Desabilitar isso também irá impedir o Pebble 2/LE vibrar ao originar chamadas</string>
<string name="pref_title_enable_pebblekit">Permitir acesso a APPs Android de terceiros</string>
<string name="pref_summary_enable_pebblekit">Habilitar suporte experimental ao App Android que use PebbleKit</string>
<string name="pref_title_sunrise_sunset">Despertar e pôr do sol</string>
<string name="pref_summary_sunrise_sunset">Enviar despertar e pôr do sol baseado na localização do pebble</string>
<string name="pref_title_autoremove_notifications">Auto remover notificações rejeitadas</string>
<string name="pref_summary_autoremove_notifications">Notificações são automaticamente removidas quando rejeitadas no Android</string>
<string name="pref_title_pebble_privacy_mode">Modo de privacidade</string>
<string name="pref_pebble_privacy_mode_off">Notificações</string>
<string name="pref_pebble_privacy_mode_content">Deslocar texto de notificações que extrapolar a tela </string>
<string name="pref_pebble_privacy_mode_complete">Apenas mostrar ícone de notificações</string>
<string name="pref_header_location">Localização</string>
<string name="pref_title_location_aquire">Obter localização</string>
<string name="pref_title_location_latitude">Latitude</string>
<string name="pref_title_location_longitude">Longitude</string>
<string name="pref_title_location_keep_uptodate">Mantenha a localização atualizada</string>
<string name="pref_summary_location_keep_uptodate">Tente obter a localização online, use dados armazenados como fallback</string>
<string name="toast_enable_networklocationprovider">Por favor, habilite localização de rede</string>
<string name="toast_aqurired_networklocation">localização obtida</string>
<string name="pref_title_pebble_forceprotocol">Forçar o protocolo de notificação</string>
<string name="pref_summary_pebble_forceprotocol">Esta opção força o uso do protocolo de notificação mais recente. HABILITE APENAS SE SABE O QUE ESTÁ FAZENDO!</string>
<string name="pref_title_pebble_forceuntested">Habilitar recursos não certificados</string>
<string name="pref_summary_pebble_forceuntested">Habilitar recursos não certificados. FAÇA ISSO SE SOUBER O QUE REALMENTE ESTÁ FAZENDO!</string>
<string name="pref_title_pebble_forcele">Sempre preferir BLE</string>
<string name="pref_summary_pebble_forcele">Use suporte experimental do Pebble LE em vez do Bluetooth clássico, requer parear um \"Pebble LE\" depois de que nenhum LE tenha sido conectado</string>
<string name="pref_title_pebble_mtu_limit">Pebble 2/LE GATT MTU limite</string>
<string name="pref_summary_pebble_mtu_limit">Se seu Pebble 2/Pebble LE não funciona como esperado, tente esta configuração para limitar o MTU (faixa válida 20512)</string>
<string name="pref_title_pebble_enable_applogs">Ativas registro de Log do App do Relógio</string>
<string name="pref_summary_pebble_enable_applogs">Faz com que os logs de aplicativos de monitoramento sejam registrados por Gadgetbridge (exige reconectar)</string>
<string name="pref_title_pebble_always_ack_pebblekit">Prematuramente ACK PebbleKit</string>
<string name="pref_summary_pebble_always_ack_pebblekit">Isso fará com que as mensagens enviadas para aplicativos de terceiros sejam reconhecidas sempre e imediatamente</string>
<string name="pref_title_pebble_reconnect_attempts">Tentativas de Reconexão</string>
<string name="pref_title_unit_system">Unidades</string>
<string name="pref_title_timeformat">Formato da hora</string>
<string name="pref_title_screentime">Duração de tela</string>
<string name="prefs_title_all_day_heart_rate">Medição da frequência cardíaca durante todo o dia</string>
<string name="preferences_hplus_settings">Configurações do HPlus/Makibes</string>
<string name="not_connected">desconectado</string>
<string name="connecting">conectando</string>
<string name="connected">conectado</string>
<string name="unknown_state">estado desconhecido</string>
<string name="connectionstate_hw_fw">HW: %1$s FW: %2$s</string>
<string name="connectionstate_fw">FW: %1$s</string>
<string name="_unknown_">(desconhecido)</string>
<string name="test">Teste</string>
<string name="test_notification">Teste de notificação</string>
<string name="this_is_a_test_notification_from_gadgetbridge">Esta é uma Notificação de Teste de Gadgetbridge</string>
<string name="bluetooth_is_not_supported_">Bluetooth não suportado</string>
<string name="bluetooth_is_disabled_">Bluetooth desabilitado</string>
<string name="tap_connected_device_for_app_mananger">Toque no dispositivo conectado</string>
<string name="tap_connected_device_for_activity">Toque no dispositivo conectado</string>
<string name="tap_connected_device_for_vibration">Toque no dispositivo conectado para Vibração</string>
<string name="tap_a_device_to_connect">Toque num dispositivo para ligar</string>
<string name="cannot_connect_bt_address_invalid_">Não pode conectar. Endereço BT inválido?</string>
<string name="gadgetbridge_running">Gadgetbridge em execução</string>
<string name="installing_binary_d_d">Instalação binária %1$d/%2$d</string>
<string name="installation_failed_">falha na instalação!</string>
<string name="installation_successful">instalação bem sucedida</string>
<string name="firmware_install_warning">VOCÊ ESTÁ TENTANDO INSTALAR UM FIRMWARE, A SEU PRÓPRIO RISCO. \n\n\nEste firmware é para HW Revisão: %s</string>
<string name="app_install_info">Você está prestes a instalar o seguinte aplicativo: \n\n\n %1$s Versão %2$s por %3$s\n</string>
<string name="n_a">N/A</string>
<string name="initialized">inicializado</string>
<string name="appversion_by_creator">%1$s de %2$s</string>
<string name="title_activity_discovery">Dispositivo encontrado</string>
<string name="discovery_stop_scanning">Parar com a busca</string>
<string name="discovery_start_scanning">Iniciar busca</string>
<string name="action_discover">Conecte novo dispositivo</string>
<string name="device_with_rssi">%1$s (%2$s)</string>
<string name="title_activity_android_pairing">Parear dispositivo</string>
<string name="android_pairing_hint">Use a caixa de diálogo Android Bluetooth para emparelhar o dispositivo.</string>
<string name="title_activity_mi_band_pairing">Parear sua Mi Band</string>
<string name="pairing">Pareando com %s...</string>
<string name="pairing_creating_bond_with">Criar vínculo com %1$s (%2$s)</string>
<string name="pairing_unable_to_pair_with">Não é possível emparelhar com %1$s (%2$s)</string>
<string name="pairing_in_progress">Vinculação em andamento: %1$s (%2$s)</string>
<string name="pairing_already_bonded">Já ligado com %1$s (%2$s), conectando ...</string>
<string name="message_cannot_pair_no_mac">Nenhum endereço do mac passou, não pode emparelhar.</string>
<string name="preferences_category_device_specific_settings">Configurações Específicas do Dispositivo</string>
<string name="preferences_miband_settings">Configurações da Mi Band</string>
<string name="male">masculino</string>
<string name="female">feminino</string>
<string name="other">outro</string>
<string name="left">esquerda</string>
<string name="right">direita</string>
<string name="miband_pairing_using_dummy_userdata">Nenhum dado válido informado, usando dados fictícios por enquanto.</string>
<string name="miband_pairing_tap_hint">Quando a sua Mi Band vibra e pisca, toque nele algumas vezes seguidas.</string>
<string name="appinstaller_install">Instalar</string>
<string name="discovery_connected_devices_hint">Torne o dispositivo detectável. Os dispositivos atualmente conectados provavelmente não serão descobertos. No Android 6 ou posterior, é necessário ativar o local (por exemplo, GPS). Se o dispositivo não aparecer após dois minutos, tente novamente após reiniciar o dispositivo móvel.</string>
<string name="discovery_note">Nota:</string>
<string name="candidate_item_device_image">Imagem do Dispositivo</string>
<string name="miband_prefs_alias">Nome/Apelido</string>
<string name="pref_header_vibration_count">Quantidade de vibrações</string>
<string name="title_activity_sleepmonitor">Monitor de sono</string>
<string name="pref_write_logfiles">Escrever arquivos de Log</string>
<string name="initializing">Inicializando</string>
<string name="busy_task_fetch_activity_data">Adquirindo Dados de Atividades</string>
<string name="sleep_activity_date_range">De %1$s a %2$s</string>
<string name="miband_prefs_wearside">Dispositivo na esquerda ou direita?</string>
<string name="pref_screen_vibration_profile">Prefil de Vibração</string>
<string name="vibration_profile_staccato">Destacado</string>
<string name="vibration_profile_short">Pequeno</string>
<string name="vibration_profile_medium">Médio</string>
<string name="vibration_profile_long">Longo</string>
<string name="vibration_profile_waterdrop">Pingo D\'água</string>
<string name="vibration_profile_ring">Anel</string>
<string name="vibration_profile_alarm_clock">Alarme</string>
<string name="miband_prefs_vibration">Vibração</string>
<string name="vibration_try">Tente</string>
<string name="pref_screen_notification_profile_sms">Notificações SMS</string>
<string name="pref_header_vibration_settings">Configurações de vibrações</string>
<string name="pref_screen_notification_profile_generic">Notificação genérica</string>
<string name="pref_screen_notification_profile_email">Notificação de email</string>
<string name="pref_screen_notification_profile_incoming_call">Notificações de chamadas</string>
<string name="pref_screen_notification_profile_generic_chat">Bate papo</string>
<string name="pref_screen_notification_profile_generic_navigation">Navegação</string>
<string name="pref_screen_notification_profile_generic_social">Rede social</string>
<string name="control_center_find_lost_device">Busca Dispositivo Perdido</string>
<string name="control_center_cancel_to_stop_vibration">Cancele para parar a vibração</string>
<string name="title_activity_charts">Sua atividade</string>
<string name="title_activity_set_alarm">Configurar Alarmes</string>
<string name="controlcenter_start_configure_alarms">Configurar alarmes</string>
<string name="title_activity_alarm_details">Detalhes do alarme</string>
<string name="alarm_sun_short">Dom</string>
<string name="alarm_mon_short">Seg</string>
<string name="alarm_tue_short">Ter</string>
<string name="alarm_wed_short">Qua</string>
<string name="alarm_thu_short">Qui</string>
<string name="alarm_fri_short">Sex</string>
<string name="alarm_sat_short">Sab</string>
<string name="alarm_smart_wakeup">despertar inteligente</string>
<string name="user_feedback_miband_set_alarms_failed">Tem algum erro ao definir o alarme, tente novamente!</string>
<string name="user_feedback_miband_set_alarms_ok">Alarme enviado para o dispositivo!</string>
<string name="chart_no_data_synchronize">Sem data. Sincronizar com dispositivo?</string>
<string name="user_feedback_miband_activity_data_transfer">Transferir %1$s dados a partir de %2$s</string>
<string name="miband_prefs_fitness_goal">Objetivo de passos por dia</string>
<string name="dbaccess_error_executing">Erro executando \'%1$s\'</string>
<string name="controlcenter_start_activitymonitor">Sua Atividade (ALPHA)</string>
<string name="cannot_connect">Impossível conectar: %1$s</string>
<string name="installer_activity_unable_to_find_handler">Não foi possível encontrar um manipulador para instalar o arquivo.</string>
<string name="pbw_install_handler_unable_to_install">Impossível instalar o arquivo fornecido: %1$s</string>
<string name="pbw_install_handler_hw_revision_mismatch">Não é possível instalar o firmware fornecido: ele não corresponde à revisão do hardware do seu Pebble.</string>
<string name="installer_activity_wait_while_determining_status">Aguarde enquanto é determinado o status da instalação ...</string>
<string name="notif_battery_low_title">Gadget com bateria baixa!</string>
<string name="notif_battery_low_percent">%1$s bateria a: %2$s%%</string>
<string name="notif_battery_low_bigtext_last_charge_time">Última carga: %s \n</string>
<string name="notif_battery_low_bigtext_number_of_charges">Número de cargas: %s</string>
<string name="sleepchart_your_sleep">Seu Sono</string>
<string name="weekstepschart_steps_a_week">Passos na semana</string>
<string name="activity_sleepchart_activity_and_sleep">Sua Atividade e Sono</string>
<string name="updating_firmware">Atualizando Firmware...</string>
<string name="fwapp_install_device_not_ready">Arquivo não pode ser instalado, o dispositivo não está pronto.</string>
<string name="miband_installhandler_miband_firmware">Mi Band Firmware %1$s</string>
<string name="miband_fwinstaller_compatible_version">Versão compatível</string>
<string name="miband_fwinstaller_untested_version">Versão não testada!</string>
<string name="fwappinstaller_connection_state">Conexão com o dispositivo: %1$s</string>
<string name="pbw_installhandler_pebble_firmware">Pebble Firmware %1$s</string>
<string name="pbwinstallhandler_correct_hw_revision">Corrigir a revisão do hardware</string>
<string name="pbwinstallhandler_incorrect_hw_revision">Incompatibilidade de revisão de hardware!</string>
<string name="pbwinstallhandler_app_item">%1$s (%2$s)</string>
<string name="updatefirmwareoperation_updateproblem_do_not_reboot">Problema com a transferência do firmware. NÃO REBOTAR sua Mi Band!</string>
<string name="updatefirmwareoperation_metadata_updateproblem">Problemas ao transferir os metadados do firmware</string>
<string name="updatefirmwareoperation_update_complete">Instalação do Firmware completa</string>
<string name="updatefirmwareoperation_update_complete_rebooting">Instalação do Firmware completa, reiniciando o dispositivo...</string>
<string name="updatefirmwareoperation_write_failed">Falha ao instalar o Firmware</string>
<string name="chart_steps">Passos</string>
<string name="liveactivity_live_activity">Atividade ao vivo</string>
<string name="weeksteps_today_steps_description">Etapas de hoje, meta: %1$s</string>
<string name="pref_title_dont_ack_transfer">Não transferir dados da atividade ack</string>
<string name="pref_summary_dont_ack_transfers">Se os dados da atividade não forem chamados para a pulseira, eles não serão apagados. Útil se GB for usado em conjunto com outros aplicativos.</string>
<string name="pref_summary_keep_data_on_device">Manterão os dados da atividade no Mi Band mesmo após a sincronização. Útil se GB for usado em conjunto com outros aplicativos.</string>
<string name="pref_title_low_latency_fw_update">Use o modo de baixa latência para atualizações FW</string>
<string name="pref_summary_low_latency_fw_update">Isso pode ajudar em dispositivos nos quais as atualizações de firmware falham</string>
<string name="live_activity_steps_history">Histórico de passos</string>
<string name="live_activity_current_steps_per_minute">Passos/min atuais</string>
<string name="live_activity_total_steps">Total de passos</string>
<string name="live_activity_steps_per_minute_history">Histórico de passos por minuto</string>
<string name="live_activity_start_your_activity">Iniciar sua atividade</string>
<string name="abstract_chart_fragment_kind_activity">Atividade</string>
<string name="abstract_chart_fragment_kind_light_sleep">Sono leve</string>
<string name="abstract_chart_fragment_kind_deep_sleep">Sono pesado</string>
<string name="abstract_chart_fragment_kind_not_worn">Não utilizado</string>
<string name="device_not_connected">Desconectado.</string>
<string name="user_feedback_all_alarms_disabled">Todos os alarmes desabilitados</string>
<string name="pref_title_keep_data_on_device">Manter dados de atividade no dispositivo</string>
<string name="miband_fwinstaller_incompatible_version">Firmware incompatível</string>
<string name="fwinstaller_firmware_not_compatible_to_device">Este firmware não é compatível com seu dispositivo</string>
<string name="miband_prefs_reserve_alarm_calendar">Alarmes reservados para eventos próximos</string>
<string name="miband_prefs_hr_sleep_detection">Use o sensor de freqüência cardíaca para melhorar a detecção do sono</string>
<string name="miband_prefs_device_time_offset_hours">Desvio do tempo do dispositivo em horas (para detectar o sono dos trabalhadores por turnos)</string>
<string name="miband2_prefs_dateformat">Mi2: Formato de data</string>
<string name="dateformat_time">Hora</string>
<string name="dateformat_date_time"><![CDATA[Time & Date]]></string>
<string name="mi2_prefs_activate_display_on_lift">Ativar exibição ao levantar</string>
<string name="FetchActivityOperation_about_to_transfer_since">Sobre para transferir dados desde %1$s</string>
<string name="waiting_for_reconnect">aguarde para reconectar</string>
<string name="activity_prefs_about_you">Sobre você</string>
<string name="activity_prefs_year_birth">Ano de anoversário</string>
<string name="activity_prefs_gender">Gênero</string>
<string name="activity_prefs_height_cm">Altura em cm</string>
<string name="activity_prefs_weight_kg">Peso em kg</string>
<string name="authenticating">autenticando</string>
<string name="authentication_required">autenticação requerida</string>
<string name="appwidget_text">Zzz</string>
<string name="add_widget">Adicionar widget</string>
<string name="activity_prefs_sleep_duration">Preferir duração de sono em horas</string>
<string name="appwidget_alarms_set">Um alarme foi definido para %1$02d:%2$02d</string>
<string name="device_hw">HW: %1$s</string>
<string name="device_fw">FW: %1$s</string>
<string name="error_creating_directory_for_logfiles">Erro ao criar o diretório para arquivos de log: %1$s</string>
<string name="DEVINFO_HR_VER">FC:</string>
<string name="updatefirmwareoperation_update_in_progress">Atualização de Firmware em progresso</string>
<string name="updatefirmwareoperation_firmware_not_sent">Firmware não enviado</string>
<string name="charts_legend_heartrate">Frequência cardíaca</string>
<string name="live_activity_heart_rate">Frequência cardíaca</string>
<string name="pref_title_pebble_health_store_raw">Armazenar registro bruto no banco de dados</string>
<string name="pref_summary_pebble_health_store_raw">Se marcado, os dados são armazenados \"como\" e estão disponíveis para interpretação posterior. NB: a base de dados será maior neste caso!</string>
<string name="action_db_management">Gerenciamento de banco de dados</string>
<string name="title_activity_db_management">Gerenciamento de banco de dados</string>
<string name="activity_db_management_import_export_explanation">As operações do banco de dados usam o seguinte caminho no dispositivo.\nEste caminho está acessível a outras aplicações Android e ao seu computador.\nApós encontrar o banco de dados exportado (ou colocar o banco de dados que você deseja importar):</string>
<string name="dbmanagementactivvity_cannot_access_export_path">Não é possível acessar o caminho de exportação. Entre em contato com os desenvolvedores.</string>
<string name="dbmanagementactivity_exported_to">Exportado para: %1$s</string>
<string name="dbmanagementactivity_error_exporting_db">Erro ao exportar BD: %1$s</string>
<string name="dbmanagementactivity_import_data_title">Importar dados?</string>
<string name="dbmanagementactivity_overwrite_database_confirmation">Realmente sobrescrever o banco de dados atual? Todos os seus dados atuais de atividade (se houver) serão perdidos.</string>
<string name="dbmanagementactivity_import_successful">Sucesso ao importar.</string>
<string name="dbmanagementactivity_error_importing_db">Erro ao importar BD: %1$s</string>
<string name="dbmanagementactivity_delete_activity_data_title">Excluir Dados de Atividade?</string>
<string name="dbmanagementactivity_really_delete_entire_db">Excluir realmente o banco de dados inteiro? Todos os seus dados de atividade e informações sobre seus dispositivos serão perdidos.</string>
<string name="dbmanagementactivity_database_successfully_deleted">Dados eliminados com êxito.</string>
<string name="dbmanagementactivity_db_deletion_failed">Falha na eliminação do banco de dados.</string>
<string name="dbmanagementactivity_delete_old_activity_db">Excluir antigo banco de dados de atividades?</string>
<string name="dbmanagementactivity_delete_old_activitydb_confirmation">Excluir realmente o banco de dados de atividade antigo? Os dados da atividade que não foram importados serão perdidos.</string>
<string name="dbmanagementactivity_old_activity_db_successfully_deleted">Dados de atividade antiga excluídos com êxito.</string>
<string name="dbmanagementactivity_old_activity_db_deletion_failed">Falha na eliminação da base de dados da Actividade Antiga.</string>
<string name="dbmanagementactivity_overwrite">Sobrepor</string>
<string name="Cancel">Cancelar</string>
<string name="Delete">Apagar</string>
<!--Strings related to Vibration Activity-->
<string name="title_activity_vibration">Vibração</string>
<!--Strings related to Pebble Pairing Activity-->
<string name="title_activity_pebble_pairing">Pareando Pebble</string>
<string name="pebble_pairing_hint">Espera-se que um diálogo de emparelhamento apareça no seu dispositivo Android. Se isso não acontecer, procure na gaveta de notificação e aceite o pedido de emparelhamento. Depois que aceitar o pedido de emparelhamento em seu Pebble</string>
<string name="weather_notification_label">Certifique-se de que esta capa está ativada no aplicativo Notificação de Tempo para obter informações sobre o tempo em seu Pebble.\n\nNão é necessário configurar aqui.\n\nVocê pode ativar o aplicativo de tempo do sistema de seu Pebble do gerenciamento de aplicativos.\n\nOs relógios assistidos mostrarão o tempo automaticamente.</string>
<string name="pref_title_setup_bt_pairing">Ativar o emparelhamento Bluetooth</string>
<string name="pref_summary_setup_bt_pairing">Desactive esta opção se tiver problemas para</string>
<string name="unit_metric">Métrico</string>
<string name="unit_imperial">Imperial</string>
<string name="timeformat_24h">24H</string>
<string name="timeformat_am_pm">AM/PM</string>
<string name="pref_screen_notification_profile_alarm_clock">Alarme</string>
</resources>

View File

@ -0,0 +1,228 @@
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="action_settings">Configurações</string>
<string name="action_debug">Depurar</string>
<string name="action_quit">Sair</string>
<string name="controlcenter_fetch_activity_data">Sincronizar</string>
<string name="controlcenter_start_sleepmonitor">Monitor de sono (ALPHA)</string>
<string name="controlcenter_find_device">Buscando dispositivo perdido...</string>
<string name="controlcenter_take_screenshot">Print da tela</string>
<string name="controlcenter_disconnect">Desconectar</string>
<string name="controlcenter_delete_device">Apagar dispositivo</string>
<string name="controlcenter_delete_device_name">Apagar %1$s</string>
<string name="controlcenter_delete_device_dialogmessage">Isto irá apagar o dispositivo e apagar os dados associados!</string>
<string name="title_activity_debug">Depurar</string>
<!--Strings related to AppManager-->
<string name="title_activity_appmanager">Administrador de App</string>
<string name="appmanager_cached_watchapps_watchfaces">Apps em cache</string>
<string name="appmanager_installed_watchapps">Apps instalados</string>
<string name="appmanager_installed_watchfaces">Visores instalados</string>
<string name="appmananger_app_delete">Apagar</string>
<string name="appmananger_app_delete_cache">Apagar e remover do cache</string>
<string name="appmananger_app_reinstall">Reinstalar</string>
<string name="appmanager_app_openinstore">Buscar na loja Pebble</string>
<string name="appmanager_health_activate">Ativar</string>
<string name="appmanager_health_deactivate">Desativar</string>
<string name="appmanager_hrm_activate">Ativar HRM</string>
<string name="appmanager_hrm_deactivate">Desativar HRM</string>
<string name="appmanager_weather_activate">Ativas app de clima do sistema</string>
<string name="appmanager_weather_deactivate">Desativar app de clima do sistema</string>
<string name="appmanager_weather_install_provider">Instalar notificações do app de clima</string>
<string name="app_configure">Configurar</string>
<string name="app_move_to_top">Mover para o topo</string>
<!--Strings related to AppBlacklist-->
<string name="title_activity_appblacklist">Blacklist de notificações</string>
<!--Strings related to FwAppInstaller-->
<string name="title_activity_fw_app_insaller">Instalador FW/App</string>
<string name="fw_upgrade_notice">Você está prestes a instalar o firmware %s no lugar do atual em sua Mi Band.</string>
<string name="miband_firmware_known">O firmware foi testado e é compatível com Gadgetbridge.</string>
<!--Strings related to Settings-->
<string name="title_activity_settings">Configurações</string>
<string name="pref_header_general">Configurações Gerais</string>
<string name="pref_title_general_autoconnectonbluetooth">Conecte o dispositivo com o ligar o Bluetooth</string>
<string name="pref_title_general_autostartonboot">Iniciar automaticamente</string>
<string name="pref_title_general_autocreonnect">Reconectar automaticamente</string>
<string name="pref_title_audo_player">Player de música preferencial</string>
<string name="pref_default">Padrão</string>
<string name="pref_header_datetime">Data e Hora</string>
<string name="pref_title_datetime_syctimeonconnect">Sincronizar hora</string>
<string name="pref_title_theme">Tema</string>
<string name="pref_theme_light">Claro</string>
<string name="pref_theme_dark">Escuro</string>
<string name="pref_title_language">Idioma</string>
<string name="pref_title_minimize_priority">Ocultar notificações do Gadgetbridge</string>
<string name="pref_summary_minimize_priority_off">Exibir ícone na barra de status e nas notificações na tela inicial</string>
<string name="pref_summary_minimize_priority_on">Ocultar ícone na barra de status e nas notificações na tela inicial</string>
<string name="pref_header_notifications">Notificações</string>
<string name="pref_title_notifications_repetitions">Repetições</string>
<string name="pref_title_notifications_call">Chamadas de telefone</string>
<string name="pref_title_notifications_sms">SMS</string>
<string name="pref_title_notifications_pebblemsg">Mensagens do Pebble</string>
<string name="pref_summary_notifications_pebblemsg">Suportar notificações de aplicações que enviam notificações pelo PebbleKit.</string>
<string name="pref_title_notifications_generic">Suportar notificações genéricas</string>
<string name="pref_title_whenscreenon">... e quando a tela estiver ligada</string>
<string name="pref_title_notification_filter">Não perturbe</string>
<string name="pref_summary_notification_filter">Parar com notificações indesejadas enquanto estiver no modo Não Perturbe.</string>
<string name="always">sempre</string>
<string name="when_screen_off">quando a tela estiver desligada</string>
<string name="never">nunca</string>
<string name="pref_header_privacy">Privacidade</string>
<string name="pref_title_call_privacy_mode">Modo de chamada privada</string>
<string name="pref_call_privacy_mode_off">Exibir nome e número</string>
<string name="pref_call_privacy_mode_name">Ocultar nome e exibir número</string>
<string name="pref_call_privacy_mode_complete">Ocultar nome e número</string>
<string name="pref_blacklist">Apps em Blacklist</string>
<string name="pref_header_cannned_messages">Histórico de mensagens</string>
<string name="pref_title_canned_replies">Respostas</string>
<string name="pref_title_canned_reply_suffix">Sufixo comum</string>
<string name="pref_title_canned_messages_dismisscall">Chamadas recusadas</string>
<string name="pref_title_canned_messages_set">Atualizar no Pebble</string>
<string name="pref_header_development">Opções do desenvolvedor</string>
<string name="pref_title_development_miaddr">Endereço do Mi Band</string>
<string name="pref_title_pebble_settings">Configurações Pebble</string>
<string name="pref_header_activitytrackers">Ativar monitores</string>
<string name="pref_title_pebble_activitytracker">Monitor de atividades preferido</string>
<string name="pref_title_pebble_sync_health">Sincronizar com Pebble Health</string>
<string name="pref_title_pebble_sync_misfit">Sincronizar com Misfit</string>
<string name="pref_title_pebble_sync_morpheuz">Sincronizar com Morpheuz</string>
<string name="pref_summary_enable_pebblekit">Habilitar suporte experimental ao App Android que use PebbleKit</string>
<string name="pref_title_sunrise_sunset">Despertar e pôr do sol</string>
<string name="pref_summary_sunrise_sunset">Enviar despertar e pôr do sol baseado na localização do pebble</string>
<string name="pref_title_autoremove_notifications">Auto remover notificações rejeitadas</string>
<string name="pref_summary_autoremove_notifications">Notificações são automaticamente removidas quando rejeitadas no Android</string>
<string name="pref_title_pebble_privacy_mode">Modo de privacidade</string>
<string name="pref_pebble_privacy_mode_off">Notificações</string>
<string name="pref_pebble_privacy_mode_content">Deslocar texto de notificações que extrapolar a tela </string>
<string name="pref_pebble_privacy_mode_complete">Apenas mostrar ícone de notificações</string>
<string name="pref_header_location">Localização</string>
<string name="pref_title_location_aquire">Obter localização</string>
<string name="pref_title_location_latitude">Latitude</string>
<string name="pref_title_location_longitude">Longitude</string>
<string name="pref_title_location_keep_uptodate">Mantenha a localização atualizada</string>
<string name="pref_summary_location_keep_uptodate">Tente obter a localização online, use dados armazenados como fallback</string>
<string name="toast_enable_networklocationprovider">Por favor, habilite localização de rede</string>
<string name="toast_aqurired_networklocation">localização obtida</string>
<string name="pref_title_pebble_forceprotocol">Forçar o protocolo de notificação</string>
<string name="pref_summary_pebble_forceprotocol">Esta opção força o uso do protocolo de notificação mais recente. HABILITE APENAS SE SABE O QUE ESTÁ FAZENDO!</string>
<string name="pref_title_pebble_forceuntested">Habilitar recursos não certificados</string>
<string name="pref_summary_pebble_forceuntested">Habilitar recursos não certificados. FAÇA ISSO SE SOUBER O QUE REALMENTE ESTÁ FAZENDO!</string>
<string name="pref_title_pebble_forcele">Sempre preferir BLE</string>
<string name="pref_title_unit_system">Unidades</string>
<string name="pref_title_timeformat">Formato da hora</string>
<string name="pref_title_screentime">Duração de tela</string>
<string name="not_connected">desconectado</string>
<string name="connecting">conectando</string>
<string name="connected">conectado</string>
<string name="unknown_state">estado desconhecido</string>
<string name="test">Teste</string>
<string name="test_notification">Teste de notificação</string>
<string name="bluetooth_is_not_supported_">Bluetooth não suportado</string>
<string name="bluetooth_is_disabled_">Bluetooth desabilitado</string>
<string name="installation_failed_">falha na instalação!</string>
<string name="installation_successful">instalação bem sucedida</string>
<string name="initialized">inicializado</string>
<string name="title_activity_discovery">Dispositivo encontrado</string>
<string name="discovery_stop_scanning">Parar com a busca</string>
<string name="discovery_start_scanning">Iniciar busca</string>
<string name="action_discover">Conecte novo dispositivo</string>
<string name="title_activity_android_pairing">Parear dispositivo</string>
<string name="pairing">Pareando com %s...</string>
<string name="male">masculino</string>
<string name="female">feminino</string>
<string name="other">outro</string>
<string name="left">esquerda</string>
<string name="right">direita</string>
<string name="appinstaller_install">Instalar</string>
<string name="discovery_note">Nota:</string>
<string name="miband_prefs_alias">Nome/Apelido</string>
<string name="pref_header_vibration_count">Quantidade de vibrações</string>
<string name="title_activity_sleepmonitor">Monitor de sono</string>
<string name="pref_write_logfiles">Escrever arquivos de Log</string>
<string name="initializing">Inicializando</string>
<string name="vibration_profile_short">Pequeno</string>
<string name="vibration_profile_medium">Médio</string>
<string name="vibration_profile_long">Longo</string>
<string name="vibration_profile_alarm_clock">Alarme</string>
<string name="miband_prefs_vibration">Vibração</string>
<string name="vibration_try">Tente</string>
<string name="pref_screen_notification_profile_sms">Notificações SMS</string>
<string name="pref_header_vibration_settings">Configurações de vibrações</string>
<string name="pref_screen_notification_profile_generic">Notificação genérica</string>
<string name="pref_screen_notification_profile_email">Notificação de email</string>
<string name="pref_screen_notification_profile_incoming_call">Notificações de chamadas</string>
<string name="pref_screen_notification_profile_generic_chat">Bate papo</string>
<string name="pref_screen_notification_profile_generic_navigation">Navegação</string>
<string name="pref_screen_notification_profile_generic_social">Rede social</string>
<string name="title_activity_charts">Sua atividade</string>
<string name="title_activity_set_alarm">Configurar Alarmes</string>
<string name="controlcenter_start_configure_alarms">Configurar alarmes</string>
<string name="title_activity_alarm_details">Detalhes do alarme</string>
<string name="alarm_sun_short">Dom</string>
<string name="alarm_mon_short">Seg</string>
<string name="alarm_tue_short">Ter</string>
<string name="alarm_wed_short">Qua</string>
<string name="alarm_thu_short">Qui</string>
<string name="alarm_fri_short">Sex</string>
<string name="alarm_sat_short">Sab</string>
<string name="alarm_smart_wakeup">despertar inteligente</string>
<string name="user_feedback_miband_set_alarms_failed">Tem algum erro ao definir o alarme, tente novamente!</string>
<string name="user_feedback_miband_set_alarms_ok">Alarme enviado para o dispositivo!</string>
<string name="chart_no_data_synchronize">Sem data. Sincronizar com dispositivo?</string>
<string name="miband_prefs_fitness_goal">Objetivo de passos por dia</string>
<string name="controlcenter_start_activitymonitor">Sua Atividade (ALPHA)</string>
<string name="installer_activity_unable_to_find_handler">Não foi possível encontrar um manipulador para instalar o arquivo.</string>
<string name="notif_battery_low_title">Gadget com bateria baixa!</string>
<string name="sleepchart_your_sleep">Seu Sono</string>
<string name="weekstepschart_steps_a_week">Passos na semana</string>
<string name="activity_sleepchart_activity_and_sleep">Sua Atividade e Sono</string>
<string name="updating_firmware">Atualizando Firmware...</string>
<string name="fwapp_install_device_not_ready">Arquivo não pode ser instalado, o dispositivo não está pronto.</string>
<string name="miband_fwinstaller_compatible_version">Versão compatível</string>
<string name="miband_fwinstaller_untested_version">Versão não testada!</string>
<string name="updatefirmwareoperation_metadata_updateproblem">Problemas ao transferir os metadados do firmware</string>
<string name="updatefirmwareoperation_update_complete">Instalação do Firmware completa</string>
<string name="updatefirmwareoperation_update_complete_rebooting">Instalação do Firmware completa, reiniciando o dispositivo...</string>
<string name="updatefirmwareoperation_write_failed">Falha ao instalar o Firmware</string>
<string name="chart_steps">Passos</string>
<string name="liveactivity_live_activity">Atividade ao vivo</string>
<string name="live_activity_steps_history">Histórico de passos</string>
<string name="live_activity_current_steps_per_minute">Passos/min atuais</string>
<string name="live_activity_total_steps">Total de passos</string>
<string name="live_activity_steps_per_minute_history">Histórico de passos por minuto</string>
<string name="live_activity_start_your_activity">Iniciar sua atividade</string>
<string name="abstract_chart_fragment_kind_activity">Atividade</string>
<string name="abstract_chart_fragment_kind_light_sleep">Sono leve</string>
<string name="abstract_chart_fragment_kind_deep_sleep">Sono pesado</string>
<string name="abstract_chart_fragment_kind_not_worn">Não utilizado</string>
<string name="device_not_connected">Desconectado.</string>
<string name="user_feedback_all_alarms_disabled">Todos os alarmes desabilitados</string>
<string name="pref_title_keep_data_on_device">Manter dados de atividade no dispositivo</string>
<string name="miband_fwinstaller_incompatible_version">Firmware incompatível</string>
<string name="fwinstaller_firmware_not_compatible_to_device">Este firmware não é compatível com seu dispositivo</string>
<string name="miband_prefs_reserve_alarm_calendar">Alarmes reservados para eventos próximos</string>
<string name="dateformat_time">Hora</string>
<string name="waiting_for_reconnect">aguarde para reconectar</string>
<string name="activity_prefs_about_you">Sobre você</string>
<string name="activity_prefs_year_birth">Ano de anoversário</string>
<string name="activity_prefs_gender">Gênero</string>
<string name="activity_prefs_height_cm">Altura em cm</string>
<string name="activity_prefs_weight_kg">Peso em kg</string>
<string name="authenticating">autenticando</string>
<string name="authentication_required">autenticação requerida</string>
<string name="add_widget">Adicionar widget</string>
<string name="activity_prefs_sleep_duration">Preferir duração de sono em horas</string>
<string name="updatefirmwareoperation_update_in_progress">Atualização de Firmware em progresso</string>
<string name="updatefirmwareoperation_firmware_not_sent">Firmware não enviado</string>
<string name="dbmanagementactivity_import_data_title">Importar dados?</string>
<string name="dbmanagementactivity_import_successful">Sucesso ao importar.</string>
<string name="dbmanagementactivity_overwrite">Sobrepor</string>
<string name="Cancel">Cancelar</string>
<string name="Delete">Apagar</string>
<!--Strings related to Vibration Activity-->
<string name="title_activity_vibration">Vibração</string>
<!--Strings related to Pebble Pairing Activity-->
<string name="title_activity_pebble_pairing">Pareando Pebble</string>
<string name="unit_metric">Métrico</string>
<string name="unit_imperial">Imperial</string>
<string name="pref_screen_notification_profile_alarm_clock">Alarme</string>
</resources>

View File

@ -10,19 +10,28 @@
<string name="controlcenter_find_device">Знайти загублений пристрій…</string>
<string name="controlcenter_take_screenshot">Зробити знімок екрану</string>
<string name="controlcenter_disconnect">Від\'єднатися</string>
<string name="controlcenter_delete_device">Вилучити пристрій</string>
<string name="controlcenter_delete_device_name">Вилучити %1$s</string>
<string name="controlcenter_delete_device_dialogmessage">Це вилучить пристрій та всі пов\'язані з ним дані!</string>
<string name="title_activity_debug">Зневадження</string>
<!--Strings related to AppManager-->
<string name="title_activity_appmanager">App Manager</string>
<string name="appmanager_installed_watchapps">Встановлені додатки</string>
<string name="appmananger_app_delete">Вилучити</string>
<string name="appmananger_app_delete_cache">Вилучити та очистити з кешу</string>
<string name="appmananger_app_reinstall">Перевстановити</string>
<string name="appmanager_app_openinstore">Пошук в Pebble Appstore</string>
<string name="appmanager_health_activate">Увімкнути</string>
<string name="appmanager_health_deactivate">Вимкнути</string>
<string name="appmanager_hrm_activate">Увімкнути HRM</string>
<string name="appmanager_hrm_deactivate">Вимкнути HRM</string>
<string name="app_configure">Конфігурація</string>
<!--Strings related to AppBlacklist-->
<string name="title_activity_appblacklist">Перелік заблокованих сповіщень</string>
<!--Strings related to FwAppInstaller-->
<string name="title_activity_fw_app_insaller">Встановлення мікропрограми</string>
<string name="fw_upgrade_notice">Ви збираєтесь встановити мікропрограму %s на заміну поточній Вашого MiBand</string>
<string name="fw_multi_upgrade_notice">Ви збираєтесь встановити мікропрограми %1$s та %2$s на заміну поточній Вашого MiBand</string>
<string name="miband_firmware_known">Ця мікропрограма була перевірена на сумісність із Gadgetbridge</string>
<string name="miband_firmware_unknown_warning">Ця мікропрограма не перевірялася і може бути не сумісною із Gadgetbridge.\n\nНе рекомендується встановлювати її на Ваш MiBand</string>
<string name="miband_firmware_suggest_whitelist">Якщо ж Ви вирішили продовжити та все працює, будь ласка, повідомте про це розробникам, аби відмітити цю версію мікропрограми сумісною: %s</string>
@ -30,6 +39,7 @@
<string name="title_activity_settings">Параметри</string>
<string name="pref_header_general">Загальні параметри</string>
<string name="pref_title_general_autoconnectonbluetooth">З\'єднання із пристроєм при активації Bluetooth</string>
<string name="pref_title_general_autostartonboot">Запускатися автоматично</string>
<string name="pref_title_general_autocreonnect">Перепід\'єднуватись автоматично</string>
<string name="pref_title_audo_player">Переважний музичний програвач</string>
<string name="pref_default">Типовий</string>
@ -51,6 +61,7 @@
<string name="always">завжди</string>
<string name="when_screen_off">коли екран вимкнуто</string>
<string name="never">ніколи</string>
<string name="pref_header_privacy">Приавтність</string>
<string name="pref_blacklist">Перелік заблокованих додатків</string>
<string name="pref_title_canned_replies">Відповіді</string>
<string name="pref_title_canned_reply_suffix">Загальний суфікс</string>
@ -74,6 +85,7 @@
<string name="pref_title_pebble_forceuntested">Увімкнути не перевірені можливості</string>
<string name="pref_summary_pebble_forceuntested">Увімкнути функції, які ще не перевірені. ВМИКАЙТЕ НА СВІЙ СТРАХ ТА РИЗИК!</string>
<string name="pref_title_pebble_reconnect_attempts">Спроби повторного з\'єднання</string>
<string name="pref_title_timeformat">Формат часу</string>
<string name="not_connected">немає з\'єднання</string>
<string name="connecting">з\'єднання…</string>
<string name="connected">з\'єднано</string>
@ -137,6 +149,9 @@
<string name="pref_header_vibration_settings">Параметри вібро</string>
<string name="pref_screen_notification_profile_generic">Загальні сповіщення</string>
<string name="pref_screen_notification_profile_incoming_call">Сповіщення під час вхідного дзвінку</string>
<string name="pref_screen_notification_profile_generic_chat">Чат</string>
<string name="pref_screen_notification_profile_generic_navigation">Навігація</string>
<string name="pref_screen_notification_profile_generic_social">Соціальні мережі</string>
<string name="control_center_find_lost_device">Знайти загублений пристрій</string>
<string name="control_center_cancel_to_stop_vibration">Скасуйте, аби зупинити вібро</string>
<string name="title_activity_charts">Ваша активність</string>
@ -214,8 +229,11 @@
<string name="add_widget">Додати віджет</string>
<string name="device_hw">Пристрій: %1$s</string>
<string name="device_fw">ПЗ: %1$s</string>
<!--Strings related to Onboading Activity-->
<string name="Cancel">Скасувати</string>
<string name="Delete">Вилучити</string>
<!--Strings related to Vibration Activity-->
<string name="title_activity_vibration">Вібрація</string>
<!--Strings related to Pebble Pairing Activity-->
<string name="timeformat_24h">24г</string>
<string name="timeformat_am_pm">ДП/ПП</string>
</resources>

View File

@ -220,7 +220,7 @@
<string name="miband_pairing_using_dummy_userdata">No valid user data given, using dummy user data for now.</string>
<string name="miband_pairing_tap_hint">When your Mi Band vibrates and blinks, tap it a few times in a row.</string>
<string name="appinstaller_install">Install</string>
<string name="discovery_connected_devices_hint">Make your device discoverable. Currently connected devices will likely not be discovered. On Android 6 or later, you need to activate location (e.g. GPS). If your device does not show up after two minutes, try again after rebooting your mobile device.</string>
<string name="discovery_connected_devices_hint">Make your device discoverable. Currently connected devices will likely not be discovered. Activate location (e.g. GPS) on Android 6+. Disable Privacy Guard for Gadgetbridge, because it may crash and reboot your phone. If no device is found after a few minutes, try again after rebooting your mobile device.</string>
<string name="discovery_note">Note:</string>
<string name="candidate_item_device_image">Device Image</string>
<string name="miband_prefs_alias">Name/Alias</string>
@ -285,6 +285,7 @@
<string name="notif_battery_low_bigtext_number_of_charges">Number of charges: %s</string>
<string name="sleepchart_your_sleep">Your Sleep</string>
<string name="weeksleepchart_sleep_a_week">Sleep a week</string>
<string name="weeksleepchart_today_sleep_description">Sleep today, target: %1$s</string>
<string name="weekstepschart_steps_a_week">Steps a week</string>
<string name="activity_sleepchart_activity_and_sleep">Your Activity and Sleep</string>
<string name="updating_firmware">Updating Firmware…</string>
@ -400,4 +401,7 @@
<string name="timeformat_24h">24H</string>
<string name="timeformat_am_pm">AM/PM</string>
<string name="pref_screen_notification_profile_alarm_clock">Alarm Clock</string>
<string name="StringUtils_sender"> (%1$s)</string>
<string name="find_device_you_found_it">You found it!</string>
<string name="miband2_prefs_timeformat">Mi2: Time Format</string>
</resources>

View File

@ -1,5 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<changelog>
<release version="0.18.0" versioncode="87">
<change>Add Portuguese pt_PT and pt_BR translations</change>
<change>Add Hebrew translation and transliteration</change>
<change>Consistently display device specific icons already during discovery</change>
<change>Add sleep chart diplaying the last week of sleep</change>
<change>Huge speedup for weekly charts when changing days</change>
<change>Drop support for pre Gadgetbride 0.12.0 database</change>
</release>
<release version="0.17.5" versioncode="86">
<change>Automatically start the service on boot (can be turned off)</change>
<change>Pebble: PebbleKit compatibility improvements (Datalogging)</change>

View File

@ -56,7 +56,6 @@
android:title="@string/miband2_prefs_dateformat"
android:summary="%s" />
</PreferenceCategory>
<PreferenceCategory

View File

@ -112,6 +112,6 @@ public class DeviceCommunicationServiceTestCase extends TestBase {
mDeviceService.invokeService(intent);
String result = intent.getStringExtra(EXTRA_NOTIFICATION_BODY);
assertTrue("Transliteration support fail!", result.equals("Prosto tekct"));
assertEquals("Transliteration support fail!", "Prosto tekct", result);
}
}

View File

@ -111,6 +111,46 @@ public class ArrayUtilsTest extends TestBase {
assertFalse(ArrayUtils.equals(DATA_5, new byte[] {3, 4, 6}, 2));
}
@Test
public void testStartsWith1() throws Exception {
assertTrue(ArrayUtils.startsWith(DATA_5, new byte[] {1}));
}
@Test
public void testStartsWith2() throws Exception {
assertTrue(ArrayUtils.startsWith(DATA_5, new byte[] {1, 2}));
}
@Test
public void testStartsWithAll() throws Exception {
assertTrue(ArrayUtils.startsWith(DATA_5, DATA_5.clone()));
}
@Test
public void testStartsWithEmpty() throws Exception {
assertTrue(ArrayUtils.startsWith(DATA_5, EMPTY));
}
@Test
public void testStartsWithFail1() throws Exception {
try {
ArrayUtils.startsWith(DATA_5, null);
fail("should have thrown an exception");
} catch (IllegalArgumentException ex) {
// expected
}
}
@Test
public void testStartsWithFail3() throws Exception {
assertFalse(ArrayUtils.startsWith(DATA_5, new byte[] {2, 3}));
}
@Test
public void testStartsWithFail4() throws Exception {
assertFalse(ArrayUtils.startsWith(DATA_5, new byte[] {1, 2, 3, 4, 5, 6}));
}
private byte[] b(int b) {
return new byte[] {(byte) b};
}

View File

@ -7,6 +7,7 @@ import org.junit.Test;
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
import nodomain.freeyourgadget.gadgetbridge.util.LanguageUtils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@ -15,13 +16,23 @@ import static org.junit.Assert.assertTrue;
*/
public class LanguageUtilsTest extends TestBase {
@Test
public void testStringTransliterate() throws Exception {
public void testStringTransliterateCyrillic() throws Exception {
//input with cyrillic and diacritic letters
String input = "Прõсто текčт";
String output = LanguageUtils.transliterate(input);
String result = "Prosto tekct";
assertTrue(String.format("Transliteration fail! Expected '%s', but found '%s'}", result, output), output.equals(result));
assertEquals("Transliteration failed", result, output);
}
@Test
public void testStringTransliterateHebrew() throws Exception {
//input with cyrillic and diacritic letters
String input = "בדיקה עברית";
String output = LanguageUtils.transliterate(input);
String result = "bdykh 'bryth";
assertEquals("Transliteration failed", result, output);
}
@Test
@ -31,7 +42,7 @@ public class LanguageUtilsTest extends TestBase {
SharedPreferences settings = GBApplication.getPrefs().getPreferences();
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean("transliteration", true);
editor.commit();
editor.apply();
assertTrue("Transliteration option fail! Expected 'On', but result is 'Off'", LanguageUtils.transliterate());
}

View File

@ -26,6 +26,13 @@ import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
import static org.junit.Assert.assertNotNull;
/**
* Base class for all testcases in Gadgetbridge that are supposed to run locally
* with robolectric.
*
* Important: To run them, create a run configuration and execute them in the Gadgetbridge/app/
* directory.
*/
@RunWith(RobolectricTestRunner.class)
@Config(constants = BuildConfig.class, sdk = 19)
// need sdk 19 because "WITHOUT ROWID" is not supported in robolectric/sqlite4java

View File

@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -1,6 +1,6 @@
#Tue Aug 16 21:39:39 CEST 2016
#Fri Mar 03 09:26:56 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip