Package 

Object UrlHandler

    • 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 checked
        context - the current activity context
        view - 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 checked
        context - the current activity context
        view - the webView which will be loaded witth he fallback url, this argument is nullable
      • 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