Commit a6d03621 authored by aringot's avatar aringot

Show Toast on no location at the right place (on 0,0 location but only if the...

Show Toast on no location at the right place (on 0,0 location but only if the option chosen was an Always one)
parent c921829d
......@@ -1142,10 +1142,16 @@ public class MainActivity extends BaseActivity implements Scan.DetectionListener
if(saveJsonFile && locationTrack) {
//Log.d("SearchForJson", "addWithLoc");
jsonMan.addJsonObject(locationFinder.getDetectedDBEntry(), sigType.toString(), spoofDecision, locationFinder.getDetectedDBEntryAddres()); //adding the found signal in the JSON file
double[] detectedSignalPosition = locationFinder.getDetectedDBEntry();
jsonMan.addJsonObject(detectedSignalPosition, sigType.toString(), spoofDecision, locationFinder.getDetectedDBEntryAddres()); //adding the found signal in the JSON file
if (detectedSignalPosition[0] == 0 && detectedSignalPosition[1] == 0) {
Toast toast = Toast.makeText(MainActivity.this, R.string.toast_no_location_text, Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
}
}
if(saveJsonFile&&!locationTrack){
showToastOnNoLocation();
//showToastOnNoLocation(); NOTE: Already shown in the Always options
double[] noLocation = new double[2];
noLocation[0] = 0;
noLocation[1] = 0;
......
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