Skip to content

Commit

Permalink
Fix "Cleartext HTTP traffic not permitted"
Browse files Browse the repository at this point in the history
Since Android P cleartext http trafic is not allowed by default. You can solve this by adding a flag to AndroidManifest.xml
  • Loading branch information
iscle committed Feb 23, 2019
1 parent 2449aca commit 3cd8ea6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/DarkTheme">
android:theme="@style/DarkTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ru.meefik.linuxdeploy;

import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
Expand All @@ -13,7 +12,6 @@
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageView;
Expand Down Expand Up @@ -225,6 +223,7 @@ protected Boolean doInBackground(String... params) {
try {
downloadUrl(params[0]);
} catch (Exception e) {
e.printStackTrace();
return false;
}
return true;
Expand Down

0 comments on commit 3cd8ea6

Please sign in to comment.