io.crossbar.autobahn.utils.Platform Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autobahn-java Show documentation
Show all versions of autobahn-java Show documentation
WebSocket & WAMP for Java8+
The newest version!
///////////////////////////////////////////////////////////////////////////////
//
// AutobahnJava - http://crossbar.io/autobahn
//
// Copyright (c) Crossbar.io Technologies GmbH and contributors
//
// Licensed under the MIT License.
// http://www.opensource.org/licenses/mit-license.php
//
///////////////////////////////////////////////////////////////////////////////
package io.crossbar.autobahn.utils;
public class Platform {
private static boolean IS_PLATFORM_CHECKED = false;
private static boolean IS_ANDROID = false;
/**
* Checks if code is running on Android.
*
* @return boolean representing whether the underlying platform
* is Android based
*/
public static boolean isAndroid() {
if (!IS_PLATFORM_CHECKED) {
IS_ANDROID = System.getProperty("java.vendor").equals("The Android Project");
IS_PLATFORM_CHECKED = true;
}
return IS_ANDROID;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy