Skip to content

Commit

Permalink
Merge pull request #583 from yurark/fix/android-user-and-selfsigned-c…
Browse files Browse the repository at this point in the history
…erts

Android: support users certificates and fix video play with selfsigned proxy
  • Loading branch information
lamarios authored Sep 15, 2024
2 parents 2216360 + 897afaa commit 352f6ad
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 46 deletions.
6 changes: 3 additions & 3 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ steps:
- ./submodules/flutter/bin/flutter config --no-analytics
- ./submodules/flutter/bin/flutter pub get
- ./submodules/flutter/bin/flutter pub run flutter_native_splash:create
- ./submodules/flutter/bin/flutter build apk --split-per-abi
- ./submodules/flutter/bin/flutter build apk
- ./submodules/flutter/bin/flutter build appbundle
- ./submodules/flutter/bin/flutter build apk --split-per-abi --dart-define=cronetHttpNoPlay=true
- ./submodules/flutter/bin/flutter build apk --dart-define=cronetHttpNoPlay=true
- ./submodules/flutter/bin/flutter build appbundle --dart-define=cronetHttpNoPlay=true
- cd /drone/src/
- mkdir -p build/app/outputs/flutter-apk
- mkdir -p build/app/outputs/bundle/release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# - name: Run tests with nix (starts postgres and invidious server)
# run: nix-shell --run './submodules/flutter/bin/flutter test'
- run: ./submodules/flutter/bin/flutter pub run flutter_native_splash:create
- run: ./submodules/flutter/bin/flutter build apk --profile --split-per-abi
- run: ./submodules/flutter/bin/flutter build apk --profile --split-per-abi --dart-define=cronetHttpNoPlay=true
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ jobs:
./submodules/flutter/bin/flutter config --no-analytics
./submodules/flutter/bin/flutter pub get
./submodules/flutter/bin/flutter pub run flutter_native_splash:create
./submodules/flutter/bin/flutter build apk --split-per-abi
./submodules/flutter/bin/flutter build apk
./submodules/flutter/bin/flutter build appbundle
./submodules/flutter/bin/flutter build apk --split-per-abi --dart-define=cronetHttpNoPlay=true
./submodules/flutter/bin/flutter build apk --dart-define=cronetHttpNoPlay=true
./submodules/flutter/bin/flutter build appbundle --dart-define=cronetHttpNoPlay=true
- name: Moving build artifacts
run: |
mkdir -p build/app/outputs/flutter-apk
Expand Down
7 changes: 5 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
android:label="Clipious"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:banner="@drawable/banner">
android:banner="@drawable/banner"
android:networkSecurityConfig="@xml/network_security_config" >

<meta-data android:name="io.flutter.network-policy"
android:resource="@xml/network_security_config" />
<!-- android:enableOnBackInvokedCallback="true"-->
<activity
android:name="com.linusu.flutter_web_auth.CallbackActivity"
Expand Down
9 changes: 9 additions & 0 deletions android/app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
Loading

0 comments on commit 352f6ad

Please sign in to comment.