mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-10 21:13:11 +02:00
Add BluetoothSensorManager toast message in strings.xml.
This commit is contained in:
@@ -172,8 +172,7 @@ public class ImportActivity extends Activity {
|
||||
if (success) {
|
||||
showDialog(DIALOG_RESULT_ID);
|
||||
} else {
|
||||
Toast.makeText(this, getString(R.string.sd_card_import_error), Toast.LENGTH_LONG)
|
||||
.show();
|
||||
Toast.makeText(this, R.string.sd_card_import_error, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ class DataSourcesWrapperImpl implements DataSourcesWrapper {
|
||||
}
|
||||
|
||||
// Let the user know we have only an approximate location:
|
||||
Toast.makeText(context, context.getString(toastResId), Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(context, toastResId, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
return loc;
|
||||
}
|
||||
|
||||
+5
-6
@@ -208,12 +208,11 @@ public class BluetoothSensorManager extends SensorManager {
|
||||
}
|
||||
break;
|
||||
case BluetoothConnectionManager.MESSAGE_DEVICE_NAME:
|
||||
// save the connected device's name
|
||||
connectedDeviceName =
|
||||
msg.getData().getString(BluetoothConnectionManager.DEVICE_NAME);
|
||||
Toast.makeText(context.getApplicationContext(),
|
||||
"Connected to " + connectedDeviceName, Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
// Save the connected device name
|
||||
connectedDeviceName = msg.getData().getString(BluetoothConnectionManager.DEVICE_NAME);
|
||||
Toast.makeText(context,
|
||||
context.getString(R.string.settings_sensor_bluetooth_connected, connectedDeviceName),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user