Class DynamicSdkUtils

java.lang.Object
com.pranavpandey.android.dynamic.util.DynamicSdkUtils

public class DynamicSdkUtils extends Object
Helper class to detect the Android SDK version at runtime so that we can provide the user experience accordingly.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Detects if the current API version is 14 or above.
    static boolean
    is14(boolean equals)
    Detects if the current API version is 14 or above.
    static boolean
    Detects if the current API version is 15 or above.
    static boolean
    is15(boolean equals)
    Detects if the current API version is 15 or above.
    static boolean
    Detects if the current API version is 16 or above.
    static boolean
    is16(boolean equals)
    Detects if the current API version is 16 or above.
    static boolean
    Detects if the current API version is 17 or above.
    static boolean
    is17(boolean equals)
    Detects if the current API version is 17 or above.
    static boolean
    Detects if the current API version is 18 or above.
    static boolean
    is18(boolean equals)
    Detects if the current API version is 18 or above.
    static boolean
    Detects if the current API version is 19 or above.
    static boolean
    is19(boolean equals)
    Detects if the current API version is 19 or above.
    static boolean
    Detects if the current API version is 20 or above.
    static boolean
    is20(boolean equals)
    Detects if the current API version is 20 or above.
    static boolean
    Detects if the current API version is 21 or above.
    static boolean
    is21(boolean equals)
    Detects if the current API version is 21 or above.
    static boolean
    Detects if the current API version is 22 or above.
    static boolean
    is22(boolean equals)
    Detects if the current API version is 22 or above.
    static boolean
    Detects if the current API version is 23 or above.
    static boolean
    is23(boolean equals)
    Detects if the current API version is 23 or above.
    static boolean
    Detects if the current API version is 24 or above.
    static boolean
    is24(boolean equals)
    Detects if the current API version is 24 or above.
    static boolean
    Detects if the current API version is 25 or above.
    static boolean
    is25(boolean equals)
    Detects if the current API version is 25 or above.
    static boolean
    Detects if the current API version is 26 or above.
    static boolean
    is26(boolean equals)
    Detects if the current API version is 26 or above.
    static boolean
    Detects if the current API version is 27 or above.
    static boolean
    is27(boolean equals)
    Detects if the current API version is 27 or above.
    static boolean
    Detects if the current API version is 28 or above.
    static boolean
    is28(boolean equals)
    Detects if the current API version is 28 or above.
    static boolean
    Detects if the current API version is 29 or above.
    static boolean
    is29(boolean equals)
    Detects if the current API version is 29 or above.
    static boolean
    Detects if the current API version is 30 or above.
    static boolean
    is30(boolean equals)
    Detects if the current API version is 30 or above.
    static boolean
    Detects if the current API version is 31 or above.
    static boolean
    is31(boolean equals)
    Detects if the current API version is 31 or above.
    static boolean
    Detects if the current API version is 32 or above.
    static boolean
    is32(boolean equals)
    Detects if the current API version is 32 or above.
    static boolean
    Detects if the current API version is 33 or above.
    static boolean
    is33(boolean equals)
    Detects if the current API version is 33 or above.
    static boolean
    Detects if the current API version is 34 or above.
    static boolean
    is34(boolean equals)
    Detects if the current API version is 34 or above.
    static boolean
    Detects if the current API version is 35 or above.
    static boolean
    is35(boolean equals)
    Detects if the current API version is 35 or above.
    static boolean
    Detects if the current API version is a preview.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DynamicSdkUtils

      public DynamicSdkUtils()
  • Method Details

    • isPreview

      public static boolean isPreview()
      Detects if the current API version is a preview.
      Returns:
      true if the current API version is a preview.
    • is14

      public static boolean is14(boolean equals)
      Detects if the current API version is 14 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 14 or above.
    • is14

      public static boolean is14()
      Detects if the current API version is 14 or above.
      Returns:
      true if the current API version is 14 or above.
    • is15

      public static boolean is15(boolean equals)
      Detects if the current API version is 15 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 15 or above.
    • is15

      public static boolean is15()
      Detects if the current API version is 15 or above.
      Returns:
      true if the current API version is 15 or above.
    • is16

      public static boolean is16(boolean equals)
      Detects if the current API version is 16 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 16 or above.
    • is16

      public static boolean is16()
      Detects if the current API version is 16 or above.
      Returns:
      true if the current API version is 16 or above.
    • is17

      public static boolean is17(boolean equals)
      Detects if the current API version is 17 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 17 or above.
    • is17

      public static boolean is17()
      Detects if the current API version is 17 or above.
      Returns:
      true if the current API version is 17 or above.
    • is18

      public static boolean is18(boolean equals)
      Detects if the current API version is 18 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 18 or above.
    • is18

      public static boolean is18()
      Detects if the current API version is 18 or above.
      Returns:
      true if the current API version is 18 or above.
    • is19

      public static boolean is19(boolean equals)
      Detects if the current API version is 19 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 19 or above.
    • is19

      public static boolean is19()
      Detects if the current API version is 19 or above.
      Returns:
      true if the current API version is 19 or above.
    • is20

      public static boolean is20(boolean equals)
      Detects if the current API version is 20 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 20 or above.
    • is20

      public static boolean is20()
      Detects if the current API version is 20 or above.
      Returns:
      true if the current API version is 20 or above.
    • is21

      public static boolean is21(boolean equals)
      Detects if the current API version is 21 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 21 or above.
    • is21

      public static boolean is21()
      Detects if the current API version is 21 or above.
      Returns:
      true if the current API version is 21 or above.
    • is22

      public static boolean is22(boolean equals)
      Detects if the current API version is 22 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 22 or above.
    • is22

      public static boolean is22()
      Detects if the current API version is 22 or above.
      Returns:
      true if the current API version is 22 or above.
    • is23

      public static boolean is23(boolean equals)
      Detects if the current API version is 23 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 23 or above.
    • is23

      public static boolean is23()
      Detects if the current API version is 23 or above.
      Returns:
      true if the current API version is 23 or above.
    • is24

      public static boolean is24(boolean equals)
      Detects if the current API version is 24 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 24 or above.
    • is24

      public static boolean is24()
      Detects if the current API version is 24 or above.
      Returns:
      true if the current API version is 24 or above.
    • is25

      public static boolean is25(boolean equals)
      Detects if the current API version is 25 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 25 or above.
    • is25

      public static boolean is25()
      Detects if the current API version is 25 or above.
      Returns:
      true if the current API version is 25 or above.
    • is26

      public static boolean is26(boolean equals)
      Detects if the current API version is 26 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 26 or above.
    • is26

      public static boolean is26()
      Detects if the current API version is 26 or above.
      Returns:
      true if the current API version is 26 or above.
    • is27

      public static boolean is27(boolean equals)
      Detects if the current API version is 27 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 27 or above.
    • is27

      public static boolean is27()
      Detects if the current API version is 27 or above.
      Returns:
      true if the current API version is 27 or above.
    • is28

      public static boolean is28(boolean equals)
      Detects if the current API version is 28 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 28 or above.
    • is28

      public static boolean is28()
      Detects if the current API version is 28 or above.
      Returns:
      true if the current API version is 28 or above.
    • is29

      public static boolean is29(boolean equals)
      Detects if the current API version is 29 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 29 or above.
    • is29

      public static boolean is29()
      Detects if the current API version is 29 or above.
      Returns:
      true if the current API version is 29 or above.
    • is30

      public static boolean is30(boolean equals)
      Detects if the current API version is 30 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is R or above.
    • is30

      public static boolean is30()
      Detects if the current API version is 30 or above.
      Returns:
      true if the current API version is R or above.
    • is31

      public static boolean is31(boolean equals)
      Detects if the current API version is 31 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 31 or above.
    • is31

      public static boolean is31()
      Detects if the current API version is 31 or above.
      Returns:
      true if the current API version is 31 or above.
    • is32

      public static boolean is32(boolean equals)
      Detects if the current API version is 32 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 32 or above.
    • is32

      public static boolean is32()
      Detects if the current API version is 32 or above.
      Returns:
      true if the current API version is 32 or above.
    • is33

      public static boolean is33(boolean equals)
      Detects if the current API version is 33 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 33 or above.
    • is33

      public static boolean is33()
      Detects if the current API version is 33 or above.
      Returns:
      true if the current API version is 33 or above.
    • is34

      public static boolean is34(boolean equals)
      Detects if the current API version is 34 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 34 or above.
    • is34

      public static boolean is34()
      Detects if the current API version is 34 or above.
      Returns:
      true if the current API version is 34 or above.
    • is35

      public static boolean is35(boolean equals)
      Detects if the current API version is 35 or above.
      Parameters:
      equals - true to check for equality.

      false to match greater than or equal.

      Returns:
      true if the current API version is 35 or above.
    • is35

      public static boolean is35()
      Detects if the current API version is 35 or above.
      Returns:
      true if the current API version is 35 or above.