import android.support. v4.app. DialogFragment;
import android.support.v4.widget.NestedScrollView;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.support.design.widget.NavigationView;
import android.support.v4.view.GravityCompat;
import android.support. v4.widget. DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support. v7.app. AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.Manifest;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorManager;
import android. location. Location;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.ProgressBar;
import android. widget. RadioButton;
import android. widget. RadioGroup;
import android.widget.Toast;
import com.beyondar.android.fragment.BeyondarFragmentSupport;
import com.beyondar.android.plugin. radar. RadarView;
import com.beyondar.android.plugin. radar. RadarWorldPlugin;
import com.beyondar.android.sensor.BeyondarSensorListener;
import com.beyondar.android.sensor.BeyondarSensorManager;
import com.beyondar.android. world. World;
import com.beyondar.android. opengl. util. LowPassFilter;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common. api. GoogleApiClient;
import com.google.android.gms. location. LocationListener;
import com.google.android.gms. location. LocationRequest;
import com.google.android.gms. location. LocationServices;
import org. json. JSONArray;
import org. json. JSONObject;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
public class MainActivity extends AppCompatActivity
implements NavigationView. OnNavigationItemSelectedListener, BeyondarSensorListener, LocationListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient. OnConnectionFailedListener {
private BeyondarFragmentSupport mBeyondarFragment;
private World mWorld;