Android: Try to fix install issues

This commit is contained in:
UnknownShadow200 2024-08-27 19:15:55 +10:00
parent 8c9016dde4
commit d98e3b4d40
2 changed files with 11 additions and 10 deletions

View file

@ -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" />

View file

@ -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);