Class POBUrlHandler

  • All Implemented Interfaces:

    
    public class POBUrlHandler
    
                        

    Helper class to provide Url handling Responsible to open url in either internal browser, external browser or opens up specific application through deeplink.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface POBUrlHandler.UrlHandlerListener

      Interface to provide Url handler events

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void destroy() Clean up resources and remove listeners.
      void open(@Nullable() String url, @Nullable() String fallbackUrl) Open landing page, If the url is empty or null or "null" we will go to fallback url
      void open(@NonNull() String url) Handles URL opening with below mentioned rule DeepLinking is based on below mentioned URL structure :- pubmaticdeeplink://navigate?
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • destroy

         void destroy()

        Clean up resources and remove listeners. Should be called when the URL handler is no longer needed.

      • open

         void open(@Nullable() String url, @Nullable() String fallbackUrl)

        Open landing page, If the url is empty or null or "null" we will go to fallback url

        Parameters:
        url - the url on which open action to be performed
        fallbackUrl - the url which will be opened when the url is null, empty or "null"
      • open

         void open(@NonNull() String url)

        Handles URL opening with below mentioned rule

        DeepLinking is based on below mentioned URL structure :- pubmaticdeeplink://navigate?primaryUrl={encoded_deep_link}&primaryTrackingUrl={encoded_primary_tracker}&fallbackUrl={encoded_fallback_url}&fallbackTrackingUrl={encoded_fallback_tracker}

        Flow: 1. PubMatic Deep Links: Parse and handle with primary/fallback logic 2. Intent Deep Links: Attempt to open intent deep link (intent:// etc.) 3. Other Deep Links: Attempt to open direct deep link (tel, sms, etc.) 4. HTTPS URLs: Use internal or external browser based on configuration 5. Invalid URLs: Report error

        Parameters:
        url - the URL on which open action to be performed