Class POBUrlHandler
-
- All Implemented Interfaces:
public class POBUrlHandlerHelper 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 interfacePOBUrlHandler.UrlHandlerListenerInterface to provide Url handler events
-
Constructor Summary
Constructors Constructor Description POBUrlHandler(Context appContext, POBUrlHandler.UrlHandlerListener listener)Constructor
-
Method Summary
Modifier and Type Method Description voiddestroy()Clean up resources and remove listeners. voidopen(@Nullable() String url, @Nullable() String fallbackUrl)Open landing page, If the url is empty or null or "null" we will go to fallback url voidopen(@NonNull() String url)Handles URL opening with below mentioned rule DeepLinking is based on below mentioned URL structure :- pubmaticdeeplink://navigate? -
-
Constructor Detail
-
POBUrlHandler
POBUrlHandler(Context appContext, POBUrlHandler.UrlHandlerListener listener)
Constructor- Parameters:
appContext- Application contextlistener- Instance of UrlHandlerListener
-
-
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 performedfallbackUrl- 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
-
-
-
-