Package com.pubmatic.sdk.common.utility
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 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 check if Url is deeplink supported then executes deeplink on the url and redirects to specific app and notify onLeaveApp event, if not, then check isInternalBrowser flag is true, open Url in internal browser and notify onInternalBrowserOpen event if not, then check open Url in external browser and notify onLeaveApp event In case if url is invalid or null, do nothing and notify onErrorOpenUrl event -
-
Constructor Detail
-
POBUrlHandler
POBUrlHandler(Context appContext, POBUrlHandler.UrlHandlerListener listener)
Constructor- Parameters:
appContext- Application contextlistener- Instance of UrlHandlerListener
-
-
Method Detail
-
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 check if Url is deeplink supported then executes deeplink on the url and redirects to specific app and notify onLeaveApp event, if not, then check isInternalBrowser flag is true, open Url in internal browser and notify onInternalBrowserOpen event if not, then check open Url in external browser and notify onLeaveApp event In case if url is invalid or null, do nothing and notify onErrorOpenUrl event
- Parameters:
url- the url on which open action to be performed
-
-
-
-