org.artoolkitx.arx.arxj

## Class AndroidUtils

- java.lang.Object
- - org.artoolkitx.arx.arxj.AndroidUtils

-     public class AndroidUtils
      extends java.lang.Object

  A collection of utility functions for performing common and useful operations specific to Android.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `VIEW_VISIBILITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AndroidUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `androidBuildVersion()` Returns a String summarising the Android build information.
    `static java.lang.String` | `formatBytes(long bytes)` Returns a formatted string representation of the number of bytes specified.
    `static long` | `getAvailableExternalMemorySize()` Returns the number of bytes of external storage available.
    `static long` | `getTotalExternalMemorySize()` Returns the total number of bytes of external storage.
    `static boolean` | `isSDCardMounted()` Returns whether or not there is an SD card mounted.
    `static void` | `reportDisplayInformation(Activity activity)` Reports to the log information about the device's display.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### VIEW_VISIBILITY

          public static final int VIEW_VISIBILITY

  - ### Constructor Detail

    - #### AndroidUtils

          public AndroidUtils()

  - ### Method Detail

    - #### androidBuildVersion

          public static java.lang.String androidBuildVersion()

      Returns a String summarising the Android build information.
      Returns:
        The Android build information.

    - #### isSDCardMounted

          public static boolean isSDCardMounted()

      Returns whether or not there is an SD card mounted.
      Returns:
        true if an SD card is mounted, otherwise false.

    - #### getAvailableExternalMemorySize

          public static long getAvailableExternalMemorySize()

      Returns the number of bytes of external storage available.
      Returns:
        Bytes of external storage available.

    - #### getTotalExternalMemorySize

          public static long getTotalExternalMemorySize()

      Returns the total number of bytes of external storage.
      Returns:
        Bytes of external storage in total, or -1 if no SD card mounted.

    - #### formatBytes

          public static java.lang.String formatBytes(long bytes)

      Returns a formatted string representation of the number of bytes specified. The largest suitable suffix up until GB will be used, with the returned value expressed to two decimal places.
      Parameters:
        `bytes` - The number of bytes to be reported.
      Returns:
        The specified number of bytes, formatted as a string, in bytes, KB, MB or GB.

    - #### reportDisplayInformation

          public static void reportDisplayInformation(Activity activity)

      Reports to the log information about the device's display. This information includes the width and height, and density (low, medium, high).
      Parameters:
        `activity` - The Activity to report on.