Commit 221ce2fd authored by Florian's avatar Florian
Browse files

check micAvailability on RequestPermissionResult

parent 4c2b094f
......@@ -395,9 +395,13 @@ public class MainActivity extends BaseActivity implements Scan.DetectionListener
for (int i = 0; i < permissions.length; i++) {
if (Manifest.permission.RECORD_AUDIO.equals(permissions[i])) {
if (grantResults[i] == PackageManager.PERMISSION_GRANTED) {
startService();
checkForActivatedLocation();
startDetection();
if(locationFinder.validateMicAvailability()){
startService();
checkForActivatedLocation();
startDetection();
}else{
activateNoMicrophoneAccessAlertDialog();
}
}
else if (grantResults[i] == PackageManager.PERMISSION_DENIED) {
showRequestPermissionExplanation();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment