|
|
|
|
@ -8,13 +8,10 @@ import android.view.MenuItem |
|
|
|
|
import androidx.appcompat.app.AppCompatActivity |
|
|
|
|
import androidx.core.app.ActivityCompat |
|
|
|
|
import androidx.core.content.ContextCompat |
|
|
|
|
import com.google.android.gms.common.ConnectionResult |
|
|
|
|
import com.google.android.gms.common.GoogleApiAvailability |
|
|
|
|
import com.google.android.libraries.places.api.model.PlaceLikelihood |
|
|
|
|
import io.realm.Realm |
|
|
|
|
import net.pokeranalytics.android.model.realm.Location |
|
|
|
|
import net.pokeranalytics.android.util.LocationManager |
|
|
|
|
import timber.log.Timber |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
open class PokerAnalyticsActivity : AppCompatActivity() { |
|
|
|
|
@ -145,22 +142,4 @@ open class PokerAnalyticsActivity : AppCompatActivity() { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Check the Google Play Services |
|
|
|
|
*/ |
|
|
|
|
fun checkPlayServices(): Boolean { |
|
|
|
|
val googleAPI = GoogleApiAvailability.getInstance() |
|
|
|
|
val result = googleAPI.isGooglePlayServicesAvailable(this) |
|
|
|
|
Timber.d("checkPlayServices: $result") |
|
|
|
|
if (result != ConnectionResult.SUCCESS) { |
|
|
|
|
if (googleAPI.isUserResolvableError(result)) { |
|
|
|
|
googleAPI.getErrorDialog(this, result, PLAY_SERVICES_RESOLUTION_REQUEST).show() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |