feature/android/favorites-weatherstation #79
@@ -67,10 +67,19 @@ public class ApiObservableRegistry {
|
||||
@Override
|
||||
protected List<Device> map(Integer v) {
|
||||
final UserWithPassword userWithPassword = app.getRepository().user.getValue();
|
||||
int pageOffset=0;
|
||||
int pageSize=20;
|
||||
if (userWithPassword == null || userWithPassword.getUser() == null || userWithPassword.getUser().getLogin() == null ||userWithPassword.getPassword() == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return app.getApiClient(userWithPassword.getUser().getLogin(), userWithPassword.getPassword()).getCurrentUserDevices(0, 20).getElements();
|
||||
List<Device> deviceList = app.getApiClient(userWithPassword.getUser().getLogin(), userWithPassword.getPassword()).getCurrentUserDevices(pageOffset, pageSize).getElements();
|
||||
while(deviceList.size()==pageSize){
|
||||
List<Device> newdeviceList = app.getApiClient(userWithPassword.getUser().getLogin(), userWithPassword.getPassword()).getCurrentUserDevices(pageOffset+20, pageSize+20).getElements();
|
||||
for (Device device : newdeviceList){
|
||||
deviceList.add(device);
|
||||
}
|
||||
}
|
||||
return deviceList;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -78,11 +87,22 @@ public class ApiObservableRegistry {
|
||||
@Override
|
||||
protected List<Measurement> map (Long id) {
|
||||
final UserWithPassword userWithPassword = app.getRepository().user.getValue();
|
||||
int pageOffset=0;
|
||||
int pageSize=20;
|
||||
if (userWithPassword == null || userWithPassword.getUser() == null || userWithPassword.getUser().getLogin() == null ||userWithPassword.getPassword() == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return app.getApiClient(userWithPassword.getUser().getLogin(), userWithPassword.getPassword()).getDeviceMeasurements(id, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(24 * 7), TimeUnit.HOURS.toMillis(24 * 7), 0, 20)
|
||||
.getElements();
|
||||
|
||||
List<Measurement> measurementList = app.getApiClient(userWithPassword.getUser().getLogin(), userWithPassword.getPassword()).getDeviceMeasurements(id, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(24 *3 ), TimeUnit.HOURS.toMillis(24*3 ), pageOffset, pageSize)
|
||||
.getElements();
|
||||
while(measurementList.size()==pageSize){
|
||||
List<Measurement> newmeasurementList = app.getApiClient(userWithPassword.getUser().getLogin(), userWithPassword.getPassword()).getDeviceMeasurements(id, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(24*3 ), TimeUnit.HOURS.toMillis(24*3 ), pageOffset+20, pageSize+20)
|
||||
.getElements();
|
||||
for (Measurement measurement: newmeasurementList){
|
||||
measurementList.add(measurement);
|
||||
}
|
||||
}
|
||||
return measurementList;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.activity.OnBackPressedCallback;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@@ -30,9 +32,12 @@ import com.google.android.material.navigation.NavigationView;
|
||||
import com.mowesta.android.app.fragment.ChooseWeatherFragment;
|
||||
import com.mowesta.android.app.fragment.LoginCreateFragment;
|
||||
import com.mowesta.android.app.fragment.LoginUpdateFragment;
|
||||
import com.mowesta.android.app.fragment.LoginUserFragment;
|
||||
import com.mowesta.android.app.fragment.SettingsFragment;
|
||||
import com.mowesta.android.app.fragment.ShowDeviceWeatherFragment;
|
||||
import com.mowesta.android.app.fragment.ShowDevicesFragment;
|
||||
import com.mowesta.android.app.fragment.ShowHomeFragment;
|
||||
import com.mowesta.android.app.fragment.ShowWeatherFragment;
|
||||
import com.mowesta.android.app.fragment.TermsFragment;
|
||||
import com.mowesta.android.app.model.UserWithPassword;
|
||||
import com.mowesta.android.app.repository.IValueListener;
|
||||
@@ -81,13 +86,22 @@ public class MainActivity extends AppCompatActivity implements SettingsFragment.
|
||||
@Override
|
||||
public void onValueChanged(Value<UserWithPassword> source, UserWithPassword oldValue, UserWithPassword newValue) {
|
||||
DeviceHandle handle = source.getRepository().deviceHandle.getValue();
|
||||
MenuItem logout = navigationView.getMenu().findItem(R.id.menu_logout);
|
||||
MenuItem devices = navigationView.getMenu().findItem(menu_devices);
|
||||
if(newValue!=null){
|
||||
devices.setVisible(true);
|
||||
} else devices.setVisible(false);
|
||||
|
||||
logout.setTitle("Login");
|
||||
if (newValue != null) {
|
||||
usernameView.setText(newValue.getUser().getName());
|
||||
logout.setTitle("Logout");
|
||||
} else if (handle != null && handle.getUser() == null) {
|
||||
usernameView.setText(R.string.nav_user_none);
|
||||
} else {
|
||||
usernameView.setText(R.string.nav_user_error);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -97,12 +111,11 @@ public class MainActivity extends AppCompatActivity implements SettingsFragment.
|
||||
private IValueListener<DeviceHandle> deviceListener = new IValueListener<DeviceHandle>() {
|
||||
@Override
|
||||
public void onValueChanged(Value<DeviceHandle> source, DeviceHandle oldValue, DeviceHandle newValue) {
|
||||
if (newValue != null) {
|
||||
MenuItem connect = navigationView.getMenu().findItem(R.id.menu_connect);
|
||||
MenuItem logout = navigationView.getMenu().findItem(R.id.menu_logout);
|
||||
MenuItem connect = navigationView.getMenu().findItem(R.id.menu_connect);
|
||||
/*if (newValue != null) {
|
||||
connect.setVisible(newValue.getUser() == null);
|
||||
logout.setVisible(app.getRepository().user.getValue()!= null);
|
||||
}
|
||||
}*/
|
||||
connect.setVisible(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -135,6 +148,7 @@ public class MainActivity extends AppCompatActivity implements SettingsFragment.
|
||||
*/
|
||||
private GoogleApiClient googleApiClient;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -153,8 +167,12 @@ public class MainActivity extends AppCompatActivity implements SettingsFragment.
|
||||
createNavigationDrawer();
|
||||
checkPermissions();
|
||||
new UpdateUserTask(app, null).execute();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void settingsrequest()
|
||||
{
|
||||
googleApiClient = new GoogleApiClient.Builder(getApplicationContext()) .addApi(LocationServices.API) .build(); googleApiClient.connect();
|
||||
@@ -252,10 +270,10 @@ public class MainActivity extends AppCompatActivity implements SettingsFragment.
|
||||
showSettings();
|
||||
break;
|
||||
case R.id.menu_connect:
|
||||
showLogin();
|
||||
//showLogin();
|
||||
break;
|
||||
case R.id.menu_logout:
|
||||
// logout();
|
||||
logout();
|
||||
break;
|
||||
}
|
||||
closeDrawerIfNeeded();
|
||||
@@ -395,6 +413,7 @@ public class MainActivity extends AppCompatActivity implements SettingsFragment.
|
||||
private void showSettings() {
|
||||
closeViews(TAG_SLAVE);
|
||||
showSlave(new SettingsFragment());
|
||||
setTitle(R.string.settings);
|
||||
}
|
||||
|
||||
private void showLogin() {
|
||||
@@ -413,16 +432,32 @@ public class MainActivity extends AppCompatActivity implements SettingsFragment.
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
Fragment f = getSupportFragmentManager().findFragmentById(R.id.container);
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
if (f instanceof TermsFragment) {
|
||||
if (((TermsFragment)f).canGoBack()) {
|
||||
((TermsFragment) f).goBack();
|
||||
return;
|
||||
}
|
||||
} else if(f instanceof ShowHomeFragment){
|
||||
ft.remove(f);
|
||||
ft.replace(R.id.container, new ShowHomeFragment());
|
||||
ft.commit();
|
||||
} else if(f instanceof ShowDeviceWeatherFragment){
|
||||
ft.replace(R.id.container, new ShowDevicesFragment()).commit();
|
||||
}else if(f instanceof ShowWeatherFragment){
|
||||
ft.replace(R.id.container, new ShowWeatherFragment());
|
||||
}
|
||||
else {
|
||||
ft.remove(f);
|
||||
ft.replace(R.id.container, new ShowHomeFragment());
|
||||
ft.commit();
|
||||
}
|
||||
super.onBackPressed();
|
||||
|
||||
}
|
||||
|
||||
private void closeViews(String tag) {
|
||||
@@ -442,7 +477,10 @@ public class MainActivity extends AppCompatActivity implements SettingsFragment.
|
||||
private void logout(){
|
||||
Log.d(TAG, "logout the user");
|
||||
app.getRepository().user.setValue(null);
|
||||
showLogin();
|
||||
app.getRepository().deviceHandle.setValue(null);
|
||||
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.container, new LoginUserFragment(R.string.login, R.string.login_text, R.string.login));
|
||||
ft.commit();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -555,7 +555,7 @@ public class MeasureService extends Service implements SensorEventListener {
|
||||
|
||||
data.put("BATTERY_TEMPERATURE", String.valueOf(calculatedtemperature));
|
||||
|
||||
if (sensorManager.getDefaultSensor(Sensor.TYPE_PRESSURE) != null) {
|
||||
if (sensorManager.getDefaultSensor(Sensor.TYPE_PRESSURE) != null && millibarsOfPressure!=0) {
|
||||
data.put("SENSOR_PRESSURE", String.valueOf(millibarsOfPressure));
|
||||
}
|
||||
|
||||
@@ -569,15 +569,22 @@ public class MeasureService extends Service implements SensorEventListener {
|
||||
|
||||
if (hasDeviceHandle()) {
|
||||
device = app.getRepository().deviceHandle.getValue();
|
||||
|
||||
Log.d(TAG, "DeviceID"+device.getId());
|
||||
measurement.setDevice(device.getId());
|
||||
}
|
||||
|
||||
measurement.setVersion((long) BuildConfig.VERSION_CODE);
|
||||
|
||||
data.put("BATTERY_CHARGING", String.valueOf(batterycharging));
|
||||
|
||||
data.put("CPU_TEMPERATURE", String.valueOf(getCpuTemperature()));
|
||||
data.put("CPU_FREQUENCY", String.valueOf(getCpuFrequency()));
|
||||
if(getCpuFrequency()!=null) {
|
||||
data.put("CPU_FREQUENCY", String.valueOf(getCpuFrequency()));
|
||||
}
|
||||
if(getCpuTemperature()!=null) {
|
||||
data.put("CPU_TEMPERATURE", String.valueOf(getCpuTemperature()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
boolean isScreenOn = powerManager.isScreenOn();
|
||||
data.put("SCREEN_ENABLED", String.valueOf(isScreenOn));
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.text.method.PasswordTransformationMethod;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
@@ -96,6 +97,7 @@ public abstract class AbstractLoginFragment extends AbstractFragment {
|
||||
builder.create().show();
|
||||
} else {
|
||||
onLogin(username, password);
|
||||
view.clearFocus();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -123,6 +125,7 @@ public abstract class AbstractLoginFragment extends AbstractFragment {
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
public abstract void onLogin(String username, String password);
|
||||
|
||||
public abstract void onContinue();
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.mowesta.android.feign.model.DeviceHandle;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
/**
|
||||
* Fragment that handles the login.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.mowesta.android.app.fragment;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.mowesta.android.app.MainActivity;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.model.UserWithPassword;
|
||||
import com.mowesta.android.app.repository.IValueListener;
|
||||
import com.mowesta.android.app.repository.Repository;
|
||||
import com.mowesta.android.app.repository.Value;
|
||||
import com.mowesta.android.app.task.CreateDeviceTask;
|
||||
import com.mowesta.android.app.task.LoginUserTask;
|
||||
import com.mowesta.android.feign.model.DeviceHandle;
|
||||
|
||||
public class LoginUserFragment extends AbstractLoginFragment {
|
||||
|
||||
/**
|
||||
* The listener that keeps track of the device creation.
|
||||
*/
|
||||
private IValueListener<UserWithPassword> userWithPasswordIValueListener = new IValueListener<UserWithPassword>() {
|
||||
@Override
|
||||
public void onValueChanged(Value<UserWithPassword> source, UserWithPassword oldValue, UserWithPassword newValue) {
|
||||
if (newValue != null) {
|
||||
FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.container, new ShowHomeFragment());
|
||||
ft.commit();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Creates a login fragment with the specified title resource,
|
||||
* explanation resource and login button resource.
|
||||
*
|
||||
* @param title The string resource with the title.
|
||||
* @param explanation The string resource with the explanation.
|
||||
* @param login The string resource with the login button.
|
||||
*/
|
||||
public LoginUserFragment(int title, int explanation, int login) {
|
||||
super(title, explanation, login);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogin(String username, String password) {
|
||||
LoginUserTask loginUserTask = new LoginUserTask(getApp(), username, password);
|
||||
loginUserTask.execute();
|
||||
//CreateDeviceTask task = new CreateDeviceTask(getApp(), username, password);
|
||||
//task.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContinue() {
|
||||
FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
|
||||
ft.replace(R.id.container, new ShowHomeFragment());
|
||||
ft.commit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
Repository repository = getRepository();
|
||||
repository.user.addValueListener(userWithPasswordIValueListener, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
Repository repository = getRepository();
|
||||
repository.user.removeValueListener(userWithPasswordIValueListener);
|
||||
super.onPause();
|
||||
}
|
||||
}
|
||||
+71
-13
@@ -1,6 +1,7 @@
|
||||
package com.mowesta.android.app.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.AnimatedStateListDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -55,6 +56,8 @@ public class ShowDeviceWeatherFragment extends AbstractObservableFragment {
|
||||
app = getApp();
|
||||
final View view = inflater.inflate(R.layout.fragment_show_deviceweather, container, false);
|
||||
|
||||
setLoadingSpinner(view.findViewById(R.id.loadingSpinnerShowDevicesWeather));
|
||||
|
||||
final RecyclerView recyclerView = view.findViewById(R.id.deviceWeather);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
List<Measurement> measurementList = new ArrayList<>();
|
||||
@@ -62,7 +65,7 @@ public class ShowDeviceWeatherFragment extends AbstractObservableFragment {
|
||||
recyclerView.setAdapter(devicesAdapter);
|
||||
|
||||
|
||||
addDisposable("getDeviceMeasurements", getApiObservableRegistry()
|
||||
addDisposableWithLoading("getDeviceMeasurements", getApiObservableRegistry()
|
||||
.getDeviceMeasurements.getObservable(device.getId(), true).subscribe(measurements ->
|
||||
{
|
||||
measurementList.clear();
|
||||
@@ -111,24 +114,35 @@ public class ShowDeviceWeatherFragment extends AbstractObservableFragment {
|
||||
public void onBindViewHolder(DevicesAdapter.ViewHolder viewHolder, int position) {
|
||||
// Get the data model based on position
|
||||
Measurement condition = measurementList.get(position);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("DD.MM.yyyy \n HH:mm");
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd.MM.yyyy \n HH:mm");
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#0.0");
|
||||
|
||||
// Set item views based on your views and data model
|
||||
viewHolder.deviceModel.setText(device.getModel()+ "\n" + condition.getDevice());
|
||||
if(condition.getTime()!=null) viewHolder.date.setText(simpleDateFormat.format(new Date(condition.getTime())));
|
||||
if(condition.getData().get("BATTERY_TEMPERATURE")!=null && device.getOs()!= Device.OsEnum.ARDUINO) viewHolder.deviceTemperature.setText(decimalFormat.format(getTemperatureOfDevice(Double.parseDouble(condition.getData().get("BATTERY_TEMPERATURE"))))+"°C");
|
||||
if(condition.getData().get("SENSOR_TEMPERATURE")!=null && device.getOs()== Device.OsEnum.ARDUINO) viewHolder.deviceTemperature.setText(decimalFormat.format(Double.parseDouble(condition.getData().get("SENSOR_TEMPERATURE")))+"°C");
|
||||
if(condition.getData().get("SENSOR_HUMIDITY")!=null) viewHolder.deviceHumidity.setText(decimalFormat.format(Integer.parseInt(condition.getData().get("SENSOR_HUMIDITY")))+"%");
|
||||
if(condition.getData().get("SENSOR_PRESSURE")!=null) viewHolder.devicePressure.setText(decimalFormat.format(Double.parseDouble(condition.getData().get("SENSOR_PRESSURE")))+"mbar");
|
||||
|
||||
if(device.getOs()!= Device.OsEnum.ARDUINO){
|
||||
Drawable smartphone = getResources().getDrawable(R.drawable.ic_androidsmartphone);
|
||||
viewHolder.deviceImage.setImageDrawable(smartphone);
|
||||
} else {
|
||||
if(device.getOs()== Device.OsEnum.ARDUINO){
|
||||
Drawable weatherstation = getResources().getDrawable(R.drawable.ic_weatherstation_dp);
|
||||
viewHolder.deviceImage.setImageDrawable(weatherstation);
|
||||
if(condition.getTemperature()!=null) viewHolder.deviceTemperature.setText(decimalFormat.format(condition.getTemperature())+"°C");
|
||||
if(condition.getHumidity()!=null) viewHolder.deviceHumidity.setText(decimalFormat.format(condition.getHumidity())+"%");
|
||||
if(condition.getPressure()!=null) viewHolder.devicePressure.setText(decimalFormat.format(condition.getPressure())+"hPA");
|
||||
|
||||
|
||||
} else {
|
||||
Drawable smartphone = getResources().getDrawable(R.drawable.ic_androidsmartphone);
|
||||
viewHolder.deviceImage.setImageDrawable(smartphone);
|
||||
if(condition.getData().get("BATTERY_TEMPERATURE")!=null) viewHolder.deviceTemperature.setText(decimalFormat.format(Double.parseDouble(condition.getData().get("BATTERY_TEMPERATURE")))+"°C");
|
||||
if(condition.getData().get("SENSOR_TEMPERATURE")!=null) viewHolder.deviceTemperature.setText(decimalFormat.format(Double.parseDouble(condition.getData().get("SENSOR_TEMPERATURE")))+"°C");
|
||||
if(condition.getData().get("SENSOR_HUMIDITY")!=null) viewHolder.deviceHumidity.setText(decimalFormat.format(Integer.parseInt(condition.getData().get("SENSOR_HUMIDITY")))+"%");
|
||||
if(condition.getData().get("SENSOR_PRESSURE")!=null) viewHolder.devicePressure.setText(decimalFormat.format(Double.parseDouble(condition.getData().get("SENSOR_PRESSURE")))+"hPA");
|
||||
|
||||
/*if(condition.getTemperature()!=null) viewHolder.deviceTemperature.setText(decimalFormat.format(condition.getTemperature())+"°C");
|
||||
if(condition.getHumidity()!=null) viewHolder.deviceHumidity.setText(decimalFormat.format(condition.getHumidity())+"%");
|
||||
if(condition.getPressure()!=null) viewHolder.devicePressure.setText(decimalFormat.format(condition.getPressure())+"hPA");*/
|
||||
}
|
||||
|
||||
viewHolder.itemView.setOnClickListener(view -> showInformations(condition));
|
||||
}
|
||||
|
||||
// Returns the total count of items in the list
|
||||
@@ -161,16 +175,60 @@ public class ShowDeviceWeatherFragment extends AbstractObservableFragment {
|
||||
deviceModel = itemView.findViewById(R.id.deviceModel);
|
||||
deviceTemperature = itemView.findViewById(R.id.deviceTemperature);
|
||||
devicePressure = itemView.findViewById(R.id.devicePressure);
|
||||
deviceHumidity = itemView.findViewById(R.id.devicePressure);
|
||||
deviceHumidity = itemView.findViewById(R.id.deviceHumidity);
|
||||
date = itemView.findViewById(R.id.date);
|
||||
deviceImage = itemView.findViewById(R.id.deviceimage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void showInformations(Measurement measurement){
|
||||
|
||||
public double getTemperatureOfDevice(double batterytemperature){
|
||||
return (0.4776 + 0.8765*batterytemperature);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
builder.setTitle(R.string.detail);
|
||||
builder.setMessage(getDetails(measurement));
|
||||
builder.setPositiveButton(R.string.close, (dialog,id)->{
|
||||
});
|
||||
|
||||
AlertDialog showDeviceInfo = builder.create();
|
||||
showDeviceInfo.show();
|
||||
}
|
||||
|
||||
private String getDetails(Measurement measurement){
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#0");
|
||||
String details="";
|
||||
|
||||
if(measurement.getCoordinate().getLatitude()!=null && measurement.getCoordinate().getLongitude()!=null ){
|
||||
details+="Longitude: " + measurement.getCoordinate().getLongitude() +
|
||||
"\nLatitude: " + measurement.getCoordinate().getLatitude();
|
||||
}
|
||||
if(measurement.getData().get("CPU_FREQUENCY")!=null){
|
||||
details+="\nCPU-Frequency: " + (decimalFormat.format(Double.parseDouble(measurement.getData().get("CPU_FREQUENCY"))/1000)) +" MHz";
|
||||
}
|
||||
if(measurement.getData().get("CPU_TEMPERATURE")!=null){
|
||||
details+="\nCPU-Temperature: " + measurement.getData().get("CPU_TEMPERATURE") + " °C";
|
||||
}
|
||||
if( measurement.getData().get("BATTERY_VOLTAGE")!= null){
|
||||
details+= "\nBattery-Voltage: " + measurement.getData().get("BATTERY_VOLTAGE")+" Volt";
|
||||
}
|
||||
if(measurement.getData().get("SOLAR_VOLTAGE")!=null){
|
||||
details+= "\nSolar-Voltage: " + measurement.getData().get("SOLAR_VOLTAGE") +" Volt";
|
||||
}
|
||||
if(measurement.getData().get("BATTERY_TEMPERATURE")!=null) {
|
||||
details+="\nBattery-Temperature: "+ decimalFormat.format(Double.parseDouble(measurement.getData().get("BATTERY_TEMPERATURE")))+"°C";
|
||||
}
|
||||
if(measurement.getData().get("SENSOR_TEMPERATURE")!=null) {
|
||||
details+="\nAmbient Temperature: "+decimalFormat.format(Double.parseDouble(measurement.getData().get("SENSOR_TEMPERATURE")))+"°C";
|
||||
}
|
||||
if(measurement.getData().get("SENSOR_HUMIDITY")!=null) {
|
||||
details+="\nHumidity: "+decimalFormat.format(Integer.parseInt(measurement.getData().get("SENSOR_HUMIDITY")))+"%";
|
||||
}
|
||||
if(measurement.getData().get("SENSOR_PRESSURE")!=null) {
|
||||
details+="\nPressure: "+decimalFormat.format(Double.parseDouble(measurement.getData().get("SENSOR_PRESSURE")))+"hPA";
|
||||
}
|
||||
|
||||
return details;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -94,9 +94,7 @@ public class ShowDevicesFragment extends AbstractPositionObservableFragment {
|
||||
List<Device> deviceList = new ArrayList<>();
|
||||
final ShowDevicesFragment.DevicesAdapter devicesAdapter = new ShowDevicesFragment.DevicesAdapter(deviceList);
|
||||
recyclerView.setAdapter(devicesAdapter);
|
||||
|
||||
Log.d(TAG, "onCreateView: your device" + app.getRepository().deviceHandle.getValue().getId());
|
||||
|
||||
|
||||
addDisposableWithLoading("getCurrentUserDevices", getApiObservableRegistry()
|
||||
.getCurrentUserDevices.getObservable(0, true).subscribe(devices ->
|
||||
{
|
||||
|
||||
@@ -10,12 +10,14 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.model.UserWithPassword;
|
||||
import com.mowesta.android.feign.model.*;
|
||||
import io.reactivex.Observable;
|
||||
|
||||
@@ -175,6 +177,11 @@ public class ShowWeatherFragment extends AbstractObservableFragment {
|
||||
}
|
||||
|
||||
private void toggleFavorite(View v) {
|
||||
final UserWithPassword userWithPassword = getRepository().user.getValue();
|
||||
if (userWithPassword == null || userWithPassword.getUser() == null || userWithPassword.getUser().getLogin() == null || userWithPassword.getPassword() == null) {
|
||||
Toast.makeText(requireContext(), getText(R.string.favorites_no_account), Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
addDisposableWithLoading("getSettings", getApiObservableRegistry()
|
||||
.getSettings
|
||||
.getObservable(0L, true)
|
||||
|
||||
@@ -80,7 +80,7 @@ public class TermsFragment extends AbstractFragment {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
webView.loadUrl("file:///android_asset/terms.html");
|
||||
webView.loadUrl("https://www.mowesta.com/terms-of-service/");
|
||||
View acceptView = view.findViewById(R.id.fragment_terms_accept);
|
||||
acceptView.setVisibility(getRepository().isTermsAccepted()?View.GONE:View.VISIBLE);
|
||||
final Button continueButton = (Button) view.findViewById(R.id.start_button_continue);
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.mowesta.android.app.task;
|
||||
|
||||
|
||||
import android.util.Log;
|
||||
import com.mowesta.android.app.MowestaApp;
|
||||
import com.mowesta.android.app.R;
|
||||
import com.mowesta.android.app.model.UserWithPassword;
|
||||
import com.mowesta.android.app.repository.AsyncError;
|
||||
import com.mowesta.android.app.repository.AsyncInteraction;
|
||||
import com.mowesta.android.feign.model.User;
|
||||
|
||||
import java.net.HttpURLConnection;
|
||||
|
||||
import feign.FeignException;
|
||||
|
||||
|
||||
public class LoginUserTask extends AbstractApiTask<Void, Void, AsyncError> {
|
||||
|
||||
/**
|
||||
* The log tag for the task.
|
||||
*/
|
||||
private static final String TAG = "LoginUserTask";
|
||||
|
||||
/**
|
||||
* The error code for network errors.
|
||||
*/
|
||||
public static final int ERROR_NETWORK = 1;
|
||||
/**
|
||||
* The error code for login errors.
|
||||
*/
|
||||
public static final int ERROR_LOGIN = 2;
|
||||
/**
|
||||
* The username.
|
||||
*/
|
||||
private String username;
|
||||
/**
|
||||
* The password.
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* A flag that determines whether there is a user.
|
||||
*/
|
||||
private boolean authenticated;
|
||||
|
||||
/**
|
||||
* The User.
|
||||
*/
|
||||
private User user;
|
||||
|
||||
/**
|
||||
* Creates a new LoginUserTask.
|
||||
*
|
||||
* @param app The app.
|
||||
* @param username The username.
|
||||
* @param password The password.
|
||||
*/
|
||||
public LoginUserTask(MowestaApp app, String username, String password) {
|
||||
super(app);
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
authenticated = (username != null && password != null);
|
||||
if (authenticated) {
|
||||
apiClient = app.getApiClient(username, password);
|
||||
} else {
|
||||
apiClient = app.getApiClient();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the task.
|
||||
*/
|
||||
public void execute() {
|
||||
super.execute(new Void[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected AsyncError doInBackground(Void... voids) {
|
||||
if (authenticated) {
|
||||
try {
|
||||
user = apiClient.getCurrentUser();
|
||||
Log.d(TAG, "Login success for " + username + " with id " + (user==null?"":user.getId()) + ".");
|
||||
} catch (FeignException e) {
|
||||
Log.d(TAG, "Login failure: " + e.status() + " " + e.getMessage());
|
||||
return getError(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(AsyncError asyncError) {
|
||||
|
||||
UserWithPassword userWithPassword = new UserWithPassword();
|
||||
|
||||
userWithPassword.setUser(user);
|
||||
userWithPassword.setPassword(password);
|
||||
app.getRepository().user.setValue(userWithPassword);
|
||||
app.getRepository().deviceHandle.setValue(null);
|
||||
}
|
||||
|
||||
private AsyncError getError(FeignException e) {
|
||||
if (e.status() == HttpURLConnection.HTTP_FORBIDDEN) {
|
||||
return new AsyncError(ERROR_LOGIN, R.string.login_failed_msg);
|
||||
} else {
|
||||
return new AsyncError(ERROR_NETWORK, R.string.login_device_failed);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,10 +28,10 @@
|
||||
android:id="@+id/deviceModel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Modell"
|
||||
android:text="-"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/deviceTemperature"
|
||||
app:layout_constraintHorizontal_bias="0.088"
|
||||
app:layout_constraintHorizontal_bias="0.04"
|
||||
app:layout_constraintStart_toEndOf="@+id/deviceimage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.513" />
|
||||
@@ -40,7 +40,7 @@
|
||||
android:id="@+id/deviceTemperature"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0°C"
|
||||
android:text="-"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/deviceimage"
|
||||
@@ -50,7 +50,7 @@
|
||||
android:id="@+id/devicePressure"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0mbar"
|
||||
android:text="-"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/deviceHumidity"
|
||||
app:layout_constraintStart_toEndOf="@+id/deviceTemperature"
|
||||
@@ -60,9 +60,9 @@
|
||||
android:id="@+id/deviceHumidity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:text="0%"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:text="-"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -72,7 +72,7 @@
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Date"
|
||||
android:text="-"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/deviceTemperature"
|
||||
|
||||
@@ -6,6 +6,22 @@
|
||||
tools:context="com.mowesta.android.app.fragment.ShowDeviceWeatherFragment"
|
||||
android:id="@+id/linearLayout">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loadingSpinnerShowDevicesWeather"
|
||||
style="?android:attr/progressBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorControlHighlight"
|
||||
android:clickable="false"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateOnly="true"
|
||||
android:padding="128dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/deviceWeather"
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/home"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/homelayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="89dp"
|
||||
android:background="#439889"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
@@ -28,9 +32,14 @@
|
||||
android:id="@+id/textView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:text="@string/welcome"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageView5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/imageView5"
|
||||
@@ -42,6 +51,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:textColor="@color/black"
|
||||
android:text="@string/welcomeextend"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -49,6 +59,46 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView4" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/helptext"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/homelayout"
|
||||
app:layout_constraintVertical_bias="0.0">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/help"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#439889"
|
||||
android:text="@string/helpus"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.066" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcomehelp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:text="@string/helpwelcome"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/help" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/weather"
|
||||
android:layout_width="match_parent"
|
||||
@@ -57,7 +107,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/homelayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/helptext"
|
||||
app:layout_constraintVertical_bias="0.0">
|
||||
|
||||
<TextView
|
||||
@@ -69,17 +119,20 @@
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.13999999" />
|
||||
app:layout_constraintVertical_bias="0.16" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcomeweather"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/weatherwelcome"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/weatherview" />
|
||||
@@ -95,7 +148,7 @@
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/weather"
|
||||
app:layout_constraintVertical_bias="0.009">
|
||||
app:layout_constraintVertical_bias="0.0">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/devicewelcome"
|
||||
@@ -106,21 +159,28 @@
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/black"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.13" />
|
||||
app:layout_constraintVertical_bias="0.084" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcomedevice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:textColor="@color/black"
|
||||
android:text="@string/deviceswelcome"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/devicewelcome" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
@@ -7,26 +7,30 @@
|
||||
android:id="@+id/linearLayout2">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintWidth_percent="0.15"
|
||||
android:id="@+id/teTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:textSize="28sp"
|
||||
tools:text="00:00"
|
||||
android:gravity="start|center_vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/viHorizontalLine"/>
|
||||
app:layout_constraintBottom_toTopOf="@+id/viHorizontalLine"
|
||||
app:autoSizeTextType="uniform"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/teDate"
|
||||
tools:text="01.01.2018"
|
||||
tools:text="01.01.20"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/teTime"
|
||||
android:gravity="center_horizontal"/>
|
||||
android:gravity="center_horizontal"
|
||||
android:singleLine="true"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
@@ -123,7 +127,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/teCloudCoverage"
|
||||
app:layout_constraintTop_toTopOf="@+id/teTemperature"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imWeatherIcon"
|
||||
app:layout_constraintEnd_toEndOf="@+id/imWeatherIcon"
|
||||
app:layout_constraintStart_toStartOf="@+id/imTemperature"
|
||||
tools:text="95%"/>
|
||||
|
||||
@@ -142,7 +146,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/teRain"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tePressure"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imWeatherIcon"
|
||||
app:layout_constraintEnd_toEndOf="@+id/imWeatherIcon"
|
||||
app:layout_constraintStart_toStartOf="@+id/imTemperature"
|
||||
tools:text="3cm"/>
|
||||
|
||||
@@ -190,6 +194,7 @@
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintWidth_percent="0.1"
|
||||
android:id="@+id/imWeatherIcon"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<string name="measure_channel_description">Benachrichtigungen des Messungsdiensts.</string>
|
||||
|
||||
<string name="placeholder_temperature">\?°C</string>
|
||||
<string name="favorites_no_account">Du musst dich in einem Account einloggen um Favoriten speichern zu können.</string>
|
||||
|
||||
<!-- navigation drawer -->
|
||||
<string name="drawer_open">Navigationsmenü öffnen</string>
|
||||
@@ -26,6 +27,7 @@
|
||||
<string name="nav_user_none">Nutzung ohne Konto</string>
|
||||
<string name="nav_user_error">Verbindungsfehler</string>
|
||||
<string name="logout">Ausloggen</string>
|
||||
<string name="settings">Einstellungen</string>
|
||||
|
||||
<!-- login and register -->
|
||||
<string name="login_title_create">Geräteeinrichtung</string>
|
||||
@@ -33,6 +35,8 @@
|
||||
<string name="login_explain_create">Hallo! Damit wir Deinen Standort vor unbefugtem Zugriff schützen können, müssen wir Dein Gerät einrichten. Falls Du ein Konto hast, können wir das Gerät damit verbinden. Dadurch kannst Du über einen Webbrowser auf Deine Daten auch ohne App zugreifen.</string>
|
||||
<string name="login_explain_update">Falls Du ein Konto hast, können wir Dein Gerät damit verbinden. Dadurch kannst Du über einen Webbrowser auf den Gerätestandort und den Standortverlauf jederzeit zugreifen.</string>
|
||||
<string name="login_hint_user">Login</string>
|
||||
<string name="login">Login</string>
|
||||
<string name="login_text">Bitte logge dich ein.</string>
|
||||
<string name="login_hint_password">Passwort</string>
|
||||
<string name="login_button_create">Anmelden und Gerät einrichten</string>
|
||||
<string name="login_button_update">Anmelden und Gerät verbinden</string>
|
||||
@@ -92,15 +96,22 @@
|
||||
<string name="addDevice">Welches Gerät möchten Sie hinzufügen?</string>
|
||||
<string name="devices">Geräte</string>
|
||||
<string name="gotDevice">Es gibt Ihr Gerät schon!</string>
|
||||
<string name="close">Schließen</string>
|
||||
<string name="detail">Details</string>
|
||||
|
||||
<!-- Home -->
|
||||
<string name="welcome">Willkommen zu MoWeSta!</string>
|
||||
<string name="welcomeextend">Ihrer mobilen Wetterstation</string>
|
||||
<string name="weatherwelcome">Diese App ermöglicht es Ihnen das Wetter Ihrer Stadt sich anzeigen zulassen.
|
||||
Zudem können Sie sich Ihre Lieblingsstädte als Favoriten abspeichern und so immer direkt auf Ihre Stadt zugreifen!</string>
|
||||
<string name="deviceswelcome">Mit MoWeSta ist es möglich mit Ihrem Android Gerät Wetterdaten zu sammeln.
|
||||
Sie können dazu unter dem Navigationsmenü, unter dem Punkt Geräte ihr Android Gerät hinzufügen.
|
||||
Des Weiteren ist es dort auch möglich Ihre eigenen Wetterstation von MoWeSta hinzuzufügen.
|
||||
Anschließend können Sie sich Ihre Messungen, die Sie mit Ihren Geräte durchgeführt haben, dort anzeigen lassen.
|
||||
<string name="weatherwelcome">Im Menüpunkt Wetter ist es Ihnen möglich das Wetter Ihrer Stadt sich anzeigen zulassen.
|
||||
Zudem können Sie sich Ihre Lieblingsstädte als Favoriten abspeichern indem Sie das Herz aktivieren und so immer direkt auf Ihre Stadt zugreifen!
|
||||
Um Ihre Lieblingsstadt als Favorit speichern zu können, müssen sie registriert und eingeloggt sein.</string>
|
||||
<string name="deviceswelcome">Mit MoWeSta ist es außerdem möglich mit Ihrem Android Gerät oder einer Wetterstation von MoWeSta Wetterdaten zu sammeln.
|
||||
Sie können dazu im Navigationsmenü, unter dem Punkt Geräte ihr Android Gerät oder Ihre eigene Wetterstation von MoWeSta mit dem "+" hinzuzufügen.
|
||||
Anschließend können Sie sich Ihre Messungen, die Sie mit Ihren Geräte durchgeführt haben, dort anzeigen lassen. Sie können zudem weitere Details Ihrer Messung
|
||||
sich anzeigen lassen, wenn Sie auf die jeweilige Messung klicken.
|
||||
Um Ihre Geräte sehen und hinzufügen zu können müssen Sie registriert sein!</string>
|
||||
<string name="helpwelcome">Mit Ihrer Hilfe können, durch das Sammeln von weiteren Wetterdaten über Ihr Smartphone oder Ihrer Wetterstation
|
||||
von MoWeSta, zukünftig die Wettervorhersagen verbessert werden! Somit wird es möglich sein mit Ihren gesammelten Daten
|
||||
präzisere Vorhersagen zu erreichen.</string>
|
||||
<string name="helpus">Helfen Sie uns!</string>
|
||||
</resources>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<string name="measure_channel_description">Notifications of the measurement service.</string>
|
||||
|
||||
<string name="placeholder_temperature">\?°C</string>
|
||||
<string name="favorites_no_account">You need to be logged into an account to save favorites.</string>
|
||||
|
||||
<!-- navigation drawer -->
|
||||
<string name="drawer_open">Open navigation</string>
|
||||
@@ -35,6 +36,8 @@
|
||||
<string name="login_explain_create">Hi there! To protect your location, we must register your device. If you have an account, we can link your device to it, so you can access its location through a web browser.</string>
|
||||
<string name="login_explain_update">If you have an account, we can link your device to it. This allows you to access the device location and its location history through a web browser at any time.</string>
|
||||
<string name="login_hint_user">Username</string>
|
||||
<string name="login">Login</string>
|
||||
<string name="login_text">Please login.</string>
|
||||
<string name="login_hint_password">Password</string>
|
||||
<string name="login_button_create">Register with account</string>
|
||||
<string name="login_button_update">Link with account</string>
|
||||
@@ -45,6 +48,7 @@
|
||||
<string name="login_device_failed">Please check your internet connection.</string>
|
||||
<string name="login_conflict_msg">Your device is already connected with an account.</string>
|
||||
<string name="login_password_show">Show or hide password</string>
|
||||
<string name="settings">Settings</string>
|
||||
|
||||
|
||||
<!-- Settings -->
|
||||
@@ -95,15 +99,23 @@
|
||||
<string name="addDevice">Which device do you want to add?</string>
|
||||
<string name="devices">Devices</string>
|
||||
<string name="gotDevice">Your device already exists!</string>
|
||||
<string name="close">Close</string>
|
||||
<string name="detail">Details</string>
|
||||
|
||||
<!-- Home -->
|
||||
<string name="welcome">Welcome to MoWeSta!</string>
|
||||
<string name="welcomeextend">Your mobile Weatherstation</string>
|
||||
<string name="weatherwelcome">This app allows you to view the weather of your city.
|
||||
You can also save your favorite cities as favorites and always have direct access to your city!</string>
|
||||
<string name="deviceswelcome">With MoWeSta it is possible to collect weather data with your Android device.
|
||||
You can add your Android device in the navigation menu under Devices.
|
||||
Furthermore, it is also possible to add your own MoWeSta weather station.
|
||||
You can then have your measurements that you carried out with your devices displayed there.
|
||||
To see and add your devices you have to be registered!</string>
|
||||
<string name="weatherwelcome">In the menu item Weather it is possible for you to display the weather of your city.
|
||||
In addition, you can save your favorite cities as favorites, compensate the heart and so always directly to your city base!
|
||||
In order to have your favorite city as a favorite, they have to take care of themselves and be.</string>
|
||||
<string name="deviceswelcome">With MoWeSta it is also possible to collect weather data with your Android device or a MoWeSta weather station.
|
||||
You can add your Android device or your own MoWeSta weather station with the "+" in the navigation menu under Devices.
|
||||
You can then have your measurements that you carried out with your devices displayed there.
|
||||
You can also see more details of your measurement
|
||||
can be displayed when you click on the respective measurement.
|
||||
To see and add your devices you have to be registered!</string>
|
||||
<string name="helpwelcome">With your help, you can collect additional weather data using your smartphone or your weather station
|
||||
MoWeSta will improve the weather forecasts in the future! So it will be possible with your collected data
|
||||
to achieve more precise predictions.</string>
|
||||
<string name="helpus">Help us!</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user