|
|
@@ -1,8 +1,11 @@ |
|
|
|
package com.example.ueberwachungssystem.Detection; |
|
|
|
|
|
|
|
import android.annotation.SuppressLint; |
|
|
|
import android.util.Log; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.Calendar; |
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
/** Detection Report Class */ |
|
|
|
public class DetectionReport { |
|
|
@@ -12,7 +15,11 @@ public class DetectionReport { |
|
|
|
public boolean detectionState; |
|
|
|
|
|
|
|
public DetectionReport(boolean detectionState, String detectionType, float detectedAmplitude) { |
|
|
|
this.timeStamp = String.valueOf(Calendar.getInstance().getTime()); |
|
|
|
// New Date Format |
|
|
|
@SuppressLint("SimpleDateFormat") SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); |
|
|
|
Date curDate = new Date(System.currentTimeMillis()); |
|
|
|
this.timeStamp = formatter.format(curDate); |
|
|
|
//Old Date Format: this.timeStamp = String.valueOf(Calendar.getInstance().getTime()); |
|
|
|
this.detectionType = detectionType; |
|
|
|
this.detectedValue = detectedAmplitude; |
|
|
|
this.detectionState = detectionState; |