0

I am using VideoView to download and play video in my app. Server is communicating via tls 1.2 protocol and it is by default disabled on Android 4.4.2(KitKat) device. Since I am not using any special http client to download stream but android's VideoView component, I could not find a way to set ssl socket factory of the VideoView. Is there anyway to enable Tls 1.2 for VideoView http connection?

Phantômaxx
  • 37,352
  • 21
  • 80
  • 110

1 Answers1

0

please check below link:

Making SSLEngine use TLSv1.2 on Android (4.4.2)?.

I have faced this issue for Image, Hope this solution help you in video view also.

try {
            ProviderInstaller.installIfNeeded(getApplicationContext());
            SSLContext sslContext = null;
            sslContext = SSLContext.getInstance("TLSv1.2");
            try {
                sslContext.init(null, null, null);
                SSLEngine engine = sslContext.createSSLEngine();
                engine.getEnabledCipherSuites();
            } catch (KeyManagementException e) {
                e.printStackTrace();
            }
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        } catch (GooglePlayServicesNotAvailableException e) {
            e.printStackTrace();
        } catch (GooglePlayServicesRepairableException e) {
            e.printStackTrace();
        }   
Mobile Team ADR-Flutter
  • 12,062
  • 2
  • 29
  • 49