|
@@ -1,8 +1,10 @@
|
|
|
package de.tudarmstadt.informatik.hostage.ui2.fragment;
|
|
|
|
|
|
import android.app.Activity;
|
|
|
+import android.app.AlertDialog;
|
|
|
import android.app.Fragment;
|
|
|
import android.app.FragmentManager;
|
|
|
+import android.content.DialogInterface;
|
|
|
import android.graphics.Color;
|
|
|
import android.location.Location;
|
|
|
import android.os.Bundle;
|
|
@@ -29,6 +31,7 @@ import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import de.tudarmstadt.informatik.hostage.R;
|
|
|
+import de.tudarmstadt.informatik.hostage.commons.HelperUtils;
|
|
|
import de.tudarmstadt.informatik.hostage.logging.Record;
|
|
|
import de.tudarmstadt.informatik.hostage.logging.UglyDbHelper;
|
|
|
import de.tudarmstadt.informatik.hostage.ui.LogFilter;
|
|
@@ -295,6 +298,20 @@ public class ThreatMapFragment extends Fragment implements GoogleMap.OnInfoWindo
|
|
|
sMap.setOnInfoWindowClickListener(this);
|
|
|
}
|
|
|
|
|
|
+ // tell the user to enable wifi so map data can be streamed
|
|
|
+ if (!HelperUtils.isWifiConnected(activity)) {
|
|
|
+ new AlertDialog.Builder(activity)
|
|
|
+ .setTitle(R.string.information)
|
|
|
+ .setMessage(R.string.no_network_connection_threatmap_msg)
|
|
|
+ .setPositiveButton(android.R.string.ok,
|
|
|
+ new DialogInterface.OnClickListener() {
|
|
|
+ public void onClick(DialogInterface dialog,
|
|
|
+ int which) {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .setIcon(android.R.drawable.ic_dialog_info).show();
|
|
|
+ }
|
|
|
+
|
|
|
return sView;
|
|
|
}
|
|
|
|