|
|
@@ -69,7 +69,8 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
//########################################################################################################################################################################## |
|
|
|
//################################################################## vvv SensorParameter vvv ############################################################################## |
|
|
|
private SensorManager mSensorManager; |
|
|
|
private static final float mUpperThreshold = 1.0f; // für Emulator auf 1.5 setzen |
|
|
|
private static final float mUpperThreshold = 1.0f; // für Emulator auf 1.5 setzen //Für passende Empfindlichkeit auf 0.025f setzen ohne Smartphonehülle |
|
|
|
//private static final float mUpperThreshold = 1.0f; // für Emulator auf 1.5 setzen //Für passende Empfindlichkeit auf 0.025f setzen ohne Smartphonehülle |
|
|
|
private static final float mLowerThreshold = 0.5f; // für Emulator auf 0.5 setzen |
|
|
|
private static final long mShakeDetectionLockTimeMicroSeconds = 3500; |
|
|
|
private float mAccel; |
|
|
@@ -390,6 +391,7 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
|
|
|
|
if(takenIDG>=1 && takenIDG <=5) |
|
|
|
{ |
|
|
|
System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"); |
|
|
|
//Kommt bei einer neuen vollen IDG ins Display |
|
|
|
for(writtenDevices = writtenDevices; writtenDevices <= takenIDG; writtenDevices++) |
|
|
|
{ |
|
|
@@ -549,6 +551,203 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
btnReadyToDetect.setEnabled(false); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO Benötigt für Testzwecke (Epizentrum) für Jan |
|
|
|
|
|
|
|
Button btnGerichtet = (Button) findViewById(R.id.btnGerichtet1); |
|
|
|
btnGerichtet.setOnClickListener(new View.OnClickListener() { |
|
|
|
@RequiresApi(api = Build.VERSION_CODES.O) |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
|
getDataBaseValuesWithListener(); |
|
|
|
mDatenbank = FirebaseDatabase.getInstance().getReference().child("overviewdetection"); |
|
|
|
mDatenbank.child("IDG1").child("a_androidid").setValue("ID1"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG1").child("b_localdatetime").setValue("2021-06-25T19:00:00.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG1").child("d_breitengrad").setValue(49.448290362613854); |
|
|
|
mDatenbank.child("IDG1").child("e_laengengrad").setValue(11.097272994499544); |
|
|
|
mDatenbank.child("IDG1").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG1").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG1").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG2").child("a_androidid").setValue("ID2"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG2").child("b_localdatetime").setValue("2021-06-25T19:01:40.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG2").child("d_breitengrad").setValue(49.44466671859845); |
|
|
|
mDatenbank.child("IDG2").child("e_laengengrad").setValue(11.11073498515257); |
|
|
|
mDatenbank.child("IDG2").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG2").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG2").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG3").child("a_androidid").setValue("ID3"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG3").child("b_localdatetime").setValue("2021-06-25T19:03:20.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG3").child("d_breitengrad").setValue(49.44263735292373); |
|
|
|
mDatenbank.child("IDG3").child("e_laengengrad").setValue(11.124199910730779); |
|
|
|
mDatenbank.child("IDG3").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG3").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG3").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
Button btnDreiGoogle = (Button) findViewById(R.id.btnDreieckGoogle); |
|
|
|
btnDreiGoogle.setOnClickListener(new View.OnClickListener() { |
|
|
|
@RequiresApi(api = Build.VERSION_CODES.O) |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
|
mDatenbank = FirebaseDatabase.getInstance().getReference().child("overviewdetection"); |
|
|
|
mDatenbank.child("IDG1").child("a_androidid").setValue("ID1"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG1").child("b_localdatetime").setValue("2021-06-25T19:00:00.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG1").child("d_breitengrad").setValue(49.449588027612); |
|
|
|
mDatenbank.child("IDG1").child("e_laengengrad").setValue(11.069961699379434); |
|
|
|
mDatenbank.child("IDG1").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG1").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG1").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG2").child("a_androidid").setValue("ID2"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG2").child("b_localdatetime").setValue("2021-06-25T19:01:40.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG2").child("d_breitengrad").setValue(49.45813339772139); |
|
|
|
mDatenbank.child("IDG2").child("e_laengengrad").setValue(11.105891230575331); |
|
|
|
mDatenbank.child("IDG2").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG2").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG2").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG3").child("a_androidid").setValue("ID3"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG3").child("b_localdatetime").setValue("2021-06-25T19:03:20.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG3").child("d_breitengrad").setValue(49.42208575064953); |
|
|
|
mDatenbank.child("IDG3").child("e_laengengrad").setValue(11.096983614292839); |
|
|
|
mDatenbank.child("IDG3").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG3").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG3").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
Button btnDreiEigen = (Button) findViewById(R.id.btnDreieckEigen); |
|
|
|
btnDreiEigen.setOnClickListener(new View.OnClickListener() { |
|
|
|
@RequiresApi(api = Build.VERSION_CODES.O) |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
|
mDatenbank = FirebaseDatabase.getInstance().getReference().child("overviewdetection"); |
|
|
|
mDatenbank.child("IDG1").child("a_androidid").setValue("ID1"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG1").child("b_localdatetime").setValue("2021-06-25T19:00:00.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG1").child("d_breitengrad").setValue(49.44796056728842); |
|
|
|
mDatenbank.child("IDG1").child("e_laengengrad").setValue(11.069682589518582); |
|
|
|
mDatenbank.child("IDG1").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG1").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG1").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG2").child("a_androidid").setValue("ID2"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG2").child("b_localdatetime").setValue("2021-06-25T19:01:40.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG2").child("d_breitengrad").setValue(49.445169649958295); |
|
|
|
mDatenbank.child("IDG2").child("e_laengengrad").setValue(11.110874403601176); |
|
|
|
mDatenbank.child("IDG2").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG2").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG2").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG3").child("a_androidid").setValue("ID3"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG3").child("b_localdatetime").setValue("2021-06-25T19:03:20.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG3").child("d_breitengrad").setValue(49.42197662865119); |
|
|
|
mDatenbank.child("IDG3").child("e_laengengrad").setValue(11.07097763125116); |
|
|
|
mDatenbank.child("IDG3").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG3").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG3").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
Button btnLinieGoogle= (Button) findViewById(R.id.btnLinieGoogle); |
|
|
|
btnLinieGoogle.setOnClickListener(new View.OnClickListener() { |
|
|
|
@RequiresApi(api = Build.VERSION_CODES.O) |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
|
mDatenbank = FirebaseDatabase.getInstance().getReference().child("overviewdetection"); |
|
|
|
mDatenbank.child("IDG1").child("a_androidid").setValue("ID1"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG1").child("b_localdatetime").setValue("2021-06-25T19:00:00.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG1").child("d_breitengrad").setValue(49.439093816961254); |
|
|
|
mDatenbank.child("IDG1").child("e_laengengrad").setValue(11.087992224141008); |
|
|
|
mDatenbank.child("IDG1").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG1").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG1").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG2").child("a_androidid").setValue("ID2"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG2").child("b_localdatetime").setValue("2021-06-25T19:01:40.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG2").child("d_breitengrad").setValue(49.43058961031174); |
|
|
|
mDatenbank.child("IDG2").child("e_laengengrad").setValue(11.092487606432716); |
|
|
|
mDatenbank.child("IDG2").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG2").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG2").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG3").child("a_androidid").setValue("ID3"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG3").child("b_localdatetime").setValue("2021-06-25T19:03:20.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG3").child("d_breitengrad").setValue(49.42208989434345); |
|
|
|
mDatenbank.child("IDG3").child("e_laengengrad").setValue(11.096991470517569); |
|
|
|
mDatenbank.child("IDG3").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG3").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG3").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
Button btnLinieEigen = (Button) findViewById(R.id.btnLinieEigen); |
|
|
|
btnLinieEigen.setOnClickListener(new View.OnClickListener() { |
|
|
|
@RequiresApi(api = Build.VERSION_CODES.O) |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
|
mDatenbank = FirebaseDatabase.getInstance().getReference().child("overviewdetection"); |
|
|
|
mDatenbank.child("IDG1").child("a_androidid").setValue("ID1"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG1").child("b_localdatetime").setValue("2021-06-25T19:00:00.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG1").child("d_breitengrad").setValue(49.44709382725857); |
|
|
|
mDatenbank.child("IDG1").child("e_laengengrad").setValue(11.069646529622538); |
|
|
|
mDatenbank.child("IDG1").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG1").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG1").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG2").child("a_androidid").setValue("ID2"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG2").child("b_localdatetime").setValue("2021-06-25T19:01:40.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG2").child("d_breitengrad").setValue(49.446938212388574); |
|
|
|
mDatenbank.child("IDG2").child("e_laengengrad").setValue(11.055889659014166); |
|
|
|
mDatenbank.child("IDG2").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG2").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG2").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
|
|
|
|
mDatenbank.child("IDG3").child("a_androidid").setValue("ID3"); |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { |
|
|
|
mDatenbank.child("IDG3").child("b_localdatetime").setValue("2021-06-25T19:03:20.000"); |
|
|
|
} |
|
|
|
mDatenbank.child("IDG3").child("d_breitengrad").setValue(49.447447927483005); |
|
|
|
mDatenbank.child("IDG3").child("e_laengengrad").setValue(11.042050722727316); |
|
|
|
mDatenbank.child("IDG3").child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis()); |
|
|
|
mDatenbank.child("IDG3").child("i_amplitude").setValue(1000); |
|
|
|
mDatenbank.child("IDG3").child("w_wellengeschwindigkeit").setValue(10); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|