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