mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Android: Try to fix install issues
This commit is contained in:
parent
8c9016dde4
commit
d98e3b4d40
2 changed files with 11 additions and 10 deletions
|
@ -10,20 +10,16 @@
|
|||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="32"/>
|
||||
|
||||
<application android:icon="@mipmap/ccicon"
|
||||
android:label="ClassiCube"
|
||||
android:usesCleartextTraffic="true">
|
||||
<application android:icon="@mipmap/ccicon" android:label="ClassiCube">
|
||||
<provider
|
||||
android:name="com.classicube.CCFileProvider"
|
||||
android:authorities="com.classicube.android.client.provider"
|
||||
android:exported="true"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true" >
|
||||
</provider>
|
||||
|
||||
<activity android:name="com.classicube.MainActivity"
|
||||
android:label="ClassiCube"
|
||||
android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
|
||||
android:exported="true">
|
||||
<activity android:name="com.classicube.MainActivity" android:label="ClassiCube"
|
||||
android:configChanges="orientation|screenSize|keyboard|keyboardHidden">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
@ -913,6 +913,11 @@ public class MainActivity extends Activity
|
|||
static byte[] readCache = new byte[8192];
|
||||
|
||||
public static int httpInit(String url, String method) {
|
||||
// newer android versions block cleartext traffic by default
|
||||
if (android.os.Build.VERSION.SDK_INT >= 26) {
|
||||
url = url.replace("http://", "https://");
|
||||
}
|
||||
|
||||
try {
|
||||
conn = (HttpURLConnection)new URL(url).openConnection();
|
||||
conn.setDoInput(true);
|
||||
|
|
Loading…
Reference in a new issue