-
public class UrlHandler
-
-
Field Summary
Fields Modifier and Type Field Description public final static UrlHandlerINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleanisSingpassQrCode(Uri uri)Function that determines if a uri is a Singpass uri final BooleanisSingpassQrCode(String url)Function that determines if a url String is a Singpass url final UnithandleSingpassQrCode(Uri uri, Context context, WebView view)this function should only be called after checking the uri via isSingpassQrCode final UnithandleSingpassQrCode(String url, Context context, WebView view)this function should only be called after checking the uri via isSingpassQrCode final BooleanhandleableBySingpassApp(Uri uri, WebView view)final StringgetFallbackUrl(Uri uri)This functions returns the appropriate fallback URL in the case where Singpass app is not installed or un-launchable final StringgetFallbackUrl(String url)This functions returns the appropriate fallback URL in the case where Singpass app is not installed or un-launchable -
-
Method Detail
-
isSingpassQrCode
final Boolean isSingpassQrCode(Uri uri)
Function that determines if a uri is a Singpass uri
- Parameters:
uri- The uri to be tested
-
isSingpassQrCode
final Boolean isSingpassQrCode(String url)
Function that determines if a url String is a Singpass url
- Parameters:
url- The url string to be tested
-
handleSingpassQrCode
final Unit handleSingpassQrCode(Uri uri, Context context, WebView view)
this function should only be called after checking the uri via isSingpassQrCode
- Parameters:
uri- the uri to be checkedcontext- the current activity contextview- the webView which will be loaded witth he fallback url, this argument is nullable
-
handleSingpassQrCode
final Unit handleSingpassQrCode(String url, Context context, WebView view)
this function should only be called after checking the uri via isSingpassQrCode
- Parameters:
url- the url String to be checkedcontext- the current activity contextview- the webView which will be loaded witth he fallback url, this argument is nullable
-
handleableBySingpassApp
final Boolean handleableBySingpassApp(Uri uri, WebView view)
-
getFallbackUrl
final String getFallbackUrl(Uri uri)
This functions returns the appropriate fallback URL in the case where Singpass app is not installed or un-launchable
- Parameters:
uri- the uri to be checked
-
getFallbackUrl
final String getFallbackUrl(String url)
This functions returns the appropriate fallback URL in the case where Singpass app is not installed or un-launchable
- Parameters:
url- the url string to be checked
-
-
-
-