Advertisement
retnet

OkHttp https + http

Mar 5th, 2020
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. //OkHttp
  2. //Android 10(Api Level 29) and up
  3. //## adding dependencies
  4. //
  5. dependencies {
  6. ....
  7.   implementation 'org.conscrypt:conscrypt-android:2.2.1'
  8. ....
  9. }
  10.  
  11. ## After adding conscrypt dependency, in application class we just have to mention.
  12. //>>> Security.insertProviderAt(Conscrypt.newProvider(), 1);
  13. ///////////
  14. public class MyApplication extends Application {
  15. @Override
  16.     public void onCreate() {
  17.         super.onCreate();
  18.         Security.insertProviderAt(Conscrypt.newProvider(), 1);
  19.         .......................
  20.         ..................
  21.     }
  22. }
  23. /////////////////        
  24.  
  25.  
  26. ## This can be helpful to provide support and enable TLS 1.3 in older android version (Api level <29).
  27. ## https://square.github.io/okhttp/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement