// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int NOT_AVAILABLE = -100000;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_DISABLED                = 0;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_OUTOFSERVICE            = 1;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_TEMPORARYUNAVAILABLE    = 2;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_SEARCHING               = 3;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_STABILIZING             = 4;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_OK                      = 5;


import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TextView;
import java.util.Locale;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_DISABLED;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_OUTOFSERVICE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_TEMPORARYUNAVAILABLE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_SEARCHING;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_STABILIZING;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_OK;
                    Intent callAppSettingIntent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
                    Uri uri = Uri.fromParts("package", getContext().getPackageName(), null);
                    callAppSettingIntent.setData(uri);

                    try {
                        startActivityForResult(callAppSettingIntent, 0);
                    } catch (Exception e) {
                        isAWarningClicked = false;
                        // Unable to open Intent
                    }
                }
            }
        });

        cvWarningLocationDenied.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (!isAWarningClicked) {
                    //isAWarningClicked = true;
                    GPSActivity gpsActivity = (GPSActivity) getActivity();
                    gpsActivity.checkLocationPermission();
                }
            }
        });

        return view;
    }

    @Override
    public void onResume() {
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int NOT_AVAILABLE = -100000;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_DISABLED                = 0;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_OUTOFSERVICE            = 1;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_TEMPORARYUNAVAILABLE    = 2;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_SEARCHING               = 3;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_STABILIZING             = 4;
// 
// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSApplication.java
// public static final int GPS_OK                      = 5;


// Path: app/src/main/java/eu/basicairdata/graziano/gpslogger/FragmentGPSFix.java
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TextView;
import java.util.Locale;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.NOT_AVAILABLE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_DISABLED;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_OUTOFSERVICE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_TEMPORARYUNAVAILABLE;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_SEARCHING;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_STABILIZING;
import static eu.basicairdata.graziano.gpslogger.GPSApplication.GPS_OK;

                    Intent callAppSettingIntent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
                    Uri uri = Uri.fromParts("package", getContext().getPackageName(), null);
                    callAppSettingIntent.setData(uri);

                    try {
                        startActivityForResult(callAppSettingIntent, 0);
                    } catch (Exception e) {
                        isAWarningClicked = false;
                        // Unable to open Intent
                    }
                }
            }
        });

        cvWarningLocationDenied.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (!isAWarningClicked) {
                    //isAWarningClicked = true;
                    GPSActivity gpsActivity = (GPSActivity) getActivity();
                    gpsActivity.checkLocationPermission();
                }
            }
        });

        return view;
    }

    @Override
    public void onResume() {
        super.onResume();