|
|
@@ -15,6 +15,8 @@ public class PopUpClass { |
|
|
|
PermissionRequest permission; |
|
|
|
TextView PopUpText; |
|
|
|
|
|
|
|
Button buttonEdit; |
|
|
|
|
|
|
|
|
|
|
|
public PopUpClass(MainActivity mainActivity) { |
|
|
|
this.mainActivity = mainActivity; |
|
|
@@ -47,7 +49,7 @@ public class PopUpClass { |
|
|
|
|
|
|
|
PopUpText = popupView.findViewById(R.id.titleText); |
|
|
|
|
|
|
|
Button buttonEdit = popupView.findViewById(R.id.RechteAnfordern); |
|
|
|
buttonEdit = popupView.findViewById(R.id.RechteAnfordern); |
|
|
|
buttonEdit.setOnClickListener(new View.OnClickListener() { |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
@@ -70,19 +72,25 @@ public class PopUpClass { |
|
|
|
public void RechtePrüfen(){ |
|
|
|
StringBuilder Text = permission.rechtePruefen(); |
|
|
|
PopUpText.setText(Text); |
|
|
|
buttonEdit.setVisibility(View.VISIBLE); |
|
|
|
|
|
|
|
} |
|
|
|
public void RechteAnfordern(){ |
|
|
|
permission.rechteAnfordern(); |
|
|
|
StringBuilder Text = permission.rechtePruefen(); |
|
|
|
PopUpText.setText(Text); |
|
|
|
|
|
|
|
} |
|
|
|
public void Sensoren(){ |
|
|
|
PopUpText.setText("Es können 3 verschiedene Sensoren verwendet werden \n -1. Beschleunigungssensor\n -2. Mikrofon\n -3. Kamera"); |
|
|
|
buttonEdit.setVisibility(View.GONE); |
|
|
|
} |
|
|
|
public void Impressum(){ |
|
|
|
PopUpText.setText("Die Ueberwachungsapp wurde im Rahmen eines Praktikums der TH-Nürnberg programmiert"); |
|
|
|
buttonEdit.setVisibility(View.GONE); |
|
|
|
} |
|
|
|
public void DetectionTotal(int num) { |
|
|
|
PopUpText.setText("Total Detektions:" +num); |
|
|
|
buttonEdit.setVisibility(View.GONE); |
|
|
|
} |
|
|
|
} |