Mi Band: Display hint about starting Activity Activity instead of App Manager
TODO: Fix the string, I have no idea how to properly name the Activity Activity
This commit is contained in:
parent
827e10f49e
commit
619a17425f
|
@ -390,7 +390,8 @@ public class ControlCenter extends GBActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connected) {
|
if (connected) {
|
||||||
hintTextView.setText(R.string.tap_connected_device_for_app_mananger);
|
DeviceCoordinator coordinator = DeviceHelper.getInstance().getCoordinator(selectedDevice);
|
||||||
|
hintTextView.setText(coordinator.getTapString());
|
||||||
} else if (!deviceList.isEmpty()) {
|
} else if (!deviceList.isEmpty()) {
|
||||||
hintTextView.setText(R.string.tap_a_device_to_connect);
|
hintTextView.setText(R.string.tap_a_device_to_connect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,4 +107,6 @@ public interface DeviceCoordinator {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean supportsAlarmConfiguration();
|
boolean supportsAlarmConfiguration();
|
||||||
|
|
||||||
|
int getTapString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,4 +88,9 @@ public class UnknownDeviceCoordinator extends AbstractDeviceCoordinator {
|
||||||
public boolean supportsAlarmConfiguration() {
|
public boolean supportsAlarmConfiguration() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTapString() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.charts.ChartsActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.charts.ChartsActivity;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||||
|
@ -78,6 +79,11 @@ public class MiBandCoordinator extends AbstractDeviceCoordinator {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTapString() {
|
||||||
|
return R.string.tap_connected_device_for_activity;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean hasValidUserInfo() {
|
public static boolean hasValidUserInfo() {
|
||||||
String dummyMacAddress = MiBandService.MAC_ADDRESS_FILTER_1_1A + ":00:00:00";
|
String dummyMacAddress = MiBandService.MAC_ADDRESS_FILTER_1_1A + ":00:00:00";
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.content.Context;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.AppManagerActivity;
|
import nodomain.freeyourgadget.gadgetbridge.activities.AppManagerActivity;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
|
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractDeviceCoordinator;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
import nodomain.freeyourgadget.gadgetbridge.devices.InstallHandler;
|
||||||
|
@ -80,4 +81,9 @@ public class PebbleCoordinator extends AbstractDeviceCoordinator {
|
||||||
public boolean supportsAlarmConfiguration() {
|
public boolean supportsAlarmConfiguration() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTapString() {
|
||||||
|
return R.string.tap_connected_device_for_app_mananger;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,7 @@
|
||||||
<string name="bluetooth_is_not_supported_">Bluetooth is not supported.</string>
|
<string name="bluetooth_is_not_supported_">Bluetooth is not supported.</string>
|
||||||
<string name="bluetooth_is_disabled_">Bluetooth is disabled.</string>
|
<string name="bluetooth_is_disabled_">Bluetooth is disabled.</string>
|
||||||
<string name="tap_connected_device_for_app_mananger">Tap connected device for App Manager</string>
|
<string name="tap_connected_device_for_app_mananger">Tap connected device for App Manager</string>
|
||||||
|
<string name="tap_connected_device_for_activity">Tap connected device for Activiy</string>
|
||||||
<string name="tap_a_device_to_connect">Tap a device to connect</string>
|
<string name="tap_a_device_to_connect">Tap a device to connect</string>
|
||||||
<string name="cannot_connect_bt_address_invalid_">Cannot connect. BT address invalid?</string>
|
<string name="cannot_connect_bt_address_invalid_">Cannot connect. BT address invalid?</string>
|
||||||
<string name="gadgetbridge_running">Gadgetbridge running</string>
|
<string name="gadgetbridge_running">Gadgetbridge running</string>
|
||||||
|
|
Loading…
Reference in New Issue