Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //OkHttp
- //Android 10(Api Level 29) and up
- //## adding dependencies
- //
- dependencies {
- ....
- implementation 'org.conscrypt:conscrypt-android:2.2.1'
- ....
- }
- ## After adding conscrypt dependency, in application class we just have to mention.
- //>>> Security.insertProviderAt(Conscrypt.newProvider(), 1);
- ///////////
- public class MyApplication extends Application {
- @Override
- public void onCreate() {
- super.onCreate();
- Security.insertProviderAt(Conscrypt.newProvider(), 1);
- .......................
- ..................
- }
- }
- /////////////////
- ## This can be helpful to provide support and enable TLS 1.3 in older android version (Api level <29).
- ## https://square.github.io/okhttp/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement