All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bloxbean.cardano.client.util.OSUtil Maven / Gradle / Ivy

The newest version!
package com.bloxbean.cardano.client.util;

public class OSUtil {
    private static boolean android = false;

    public static void setAndroid(boolean flag) {
        android = flag;
    }

    public static boolean isAndroid() {
        //If isAndroid is set programmatically
        if (android)
            return true;

        String javaVendor = System.getProperty("java.vm.vendor");

        if (javaVendor != null && "The Android Project".equalsIgnoreCase(javaVendor)) {
            return true;
        } else {
            return false;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy