Class BrowserDetails

  • All Implemented Interfaces:
    java.io.Serializable

    
    public class BrowserDetails
     implements Serializable
                        

    Contains details about a browser. This class is meant to be used with BrowserWhitelist. For convenience, this class has static functions returning browser details for common Android browsers.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      BrowserDetails(String packageName, Array<String> signatureStrings, String version) Constructs a BrowserDetails object with the given details.
      BrowserDetails(String packageName, Array<String> signatureStrings) Constructs a BrowserDetails object with the given details.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getVersion() Returns the version.
      Array<String> getSignatures() Returns the signatures.
      String getPackageName() Returns the package name.
      String toString() Returns a String representation of this BrowserDetails object.
      static BrowserDetails chrome() Returns a BrowserDetails object matching any version of the Chrome browser.
      static BrowserDetails chrome(@Nullable() String version) Returns a BrowserDetails object matching a Chrome browser of greater or equal version.
      static BrowserDetails firefox() Returns a BrowserDetails object matching any version of the Firefox browser.
      static BrowserDetails firefox(@Nullable() String version) Returns a BrowserDetails object matching a Firefox browser of greater or equal version.
      static BrowserDetails samsungBrowser() Returns a BrowserDetails object matching any version of the Samsung Browser.
      static BrowserDetails samsungBrowser(@Nullable() String version) Returns a BrowserDetails object matching a Samsung Browser of greater or equal version.
      static BrowserDetails edge() Returns a BrowserDetails object matching any version of the Edge browser.
      static BrowserDetails edge(@Nullable() String version) Returns a BrowserDetails object matching an Edge browser of greater or equal version.
      • Methods inherited from class java.lang.Object

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

      • BrowserDetails

        BrowserDetails(String packageName, Array<String> signatureStrings, String version)
        Constructs a BrowserDetails object with the given details.
        Parameters:
        packageName - The package name.
        signatureStrings - The signature strings.
        version - The version.
      • BrowserDetails

        BrowserDetails(String packageName, Array<String> signatureStrings)
        Constructs a BrowserDetails object with the given details.
        Parameters:
        packageName - The package name.
        signatureStrings - The signature strings.
    • Method Detail

      • getVersion

        @Nullable() String getVersion()

        Returns the version.

      • getSignatures

        @NonNull() Array<String> getSignatures()

        Returns the signatures.

      • getPackageName

        @NonNull() String getPackageName()

        Returns the package name.

      • toString

        @NonNull() String toString()

        Returns a String representation of this BrowserDetails object. For readability, the signatures will be truncated in the returned String.

      • chrome

        @NonNull() static BrowserDetails chrome()

        Returns a BrowserDetails object matching any version of the Chrome browser.

      • chrome

        @NonNull() static BrowserDetails chrome(@Nullable() String version)

        Returns a BrowserDetails object matching a Chrome browser of greater or equal version.

      • firefox

        @NonNull() static BrowserDetails firefox()

        Returns a BrowserDetails object matching any version of the Firefox browser.

      • firefox

        @NonNull() static BrowserDetails firefox(@Nullable() String version)

        Returns a BrowserDetails object matching a Firefox browser of greater or equal version.

      • samsungBrowser

        @NonNull() static BrowserDetails samsungBrowser()

        Returns a BrowserDetails object matching any version of the Samsung Browser.

      • samsungBrowser

        @NonNull() static BrowserDetails samsungBrowser(@Nullable() String version)

        Returns a BrowserDetails object matching a Samsung Browser of greater or equal version.

      • edge

        @NonNull() static BrowserDetails edge()

        Returns a BrowserDetails object matching any version of the Edge browser.

      • edge

        @NonNull() static BrowserDetails edge(@Nullable() String version)

        Returns a BrowserDetails object matching an Edge browser of greater or equal version.