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.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
chromePackageName
public final static Array<String>
chromeSignatures
public final static String
firefoxPackageName
public final static Array<String>
firefoxSignatures
public final static String
samsungBrowserPackageName
public final static Array<String>
samsungBrowserSignatures
public final static String
edgePackageName
public final static Array<String>
edgeSignatures
public String
version
public Array<String>
signatures
public String
packageName
-
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.
-
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. -
-
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.
-
-
-
-