mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-02 20:33:50 +07:00
Fixed being unable to get log in low android versions
This commit is contained in:
parent
4fc8e321af
commit
7a22ca2841
@ -10,6 +10,7 @@ repositories {
|
||||
dependencies {
|
||||
implementation 'com.android.support:support-v4:22.1.1'
|
||||
implementation 'org.sufficientlysecure:donations:2.5'
|
||||
implementation 'com.google.android.gms:play-services-auth:11.8.0'
|
||||
}
|
||||
|
||||
task deploy(type: Copy){
|
||||
@ -58,8 +59,8 @@ android {
|
||||
}
|
||||
|
||||
applicationId "io.anuke.mindustry"
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 26
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 27
|
||||
versionCode code
|
||||
versionName versionNameResult
|
||||
}
|
||||
|
@ -8,9 +8,14 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings.Secure;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.Log;
|
||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
||||
import com.badlogic.gdx.utils.Base64Coder;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
|
||||
import com.google.android.gms.common.GooglePlayServicesRepairableException;
|
||||
import com.google.android.gms.security.ProviderInstaller;
|
||||
import io.anuke.kryonet.DefaultThreadImpl;
|
||||
import io.anuke.kryonet.KryoClient;
|
||||
import io.anuke.kryonet.KryoServer;
|
||||
@ -134,6 +139,15 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
ProviderInstaller.installIfNeeded(this);
|
||||
} catch (GooglePlayServicesRepairableException e) {
|
||||
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
|
||||
apiAvailability.getErrorDialog(this, e.getConnectionStatusCode(), 0).show();
|
||||
} catch (GooglePlayServicesNotAvailableException e) {
|
||||
Log.e("SecurityException", "Google Play Services not available.");
|
||||
}
|
||||
|
||||
if(doubleScaleTablets && isTablet(this.getContext())){
|
||||
Unit.dp.addition = 0.5f;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user