Skip to content

Instantly share code, notes, and snippets.

View Karewan's full-sized avatar

Florent VIALATTE Karewan

  • Nancy, France
View GitHub Profile
@Karewan
Karewan / version_compare_forandroid.java
Last active October 22, 2022 20:08
PHP version_compare ported to Java and Android
import androidx.annotation.NonNull;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
public class Versions {
/**
* Compare two versions
@Karewan
Karewan / Android: TLS 1.3 with OkHttp + Conscrypt on all Android versions (Tested on 4.1+)
Last active September 19, 2024 10:55
Android: TLS 1.3 with OkHttp and Conscrypt on all Android versions (Tested on 4.1+)
// Android 4.1+
dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
implementation 'org.conscrypt:conscrypt-android:2.5.2'
}
// Android 5.0+
dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'org.conscrypt:conscrypt-android:2.5.2'