use of org.prebid.mobile.rendering.utils.helpers.HandlerQueueManager in project prebid-mobile-android by prebid.
the class WebViewInterstitial method setMRAIDInterface.
public void setMRAIDInterface() {
BaseJSInterface mraid = new InterstitialJSInterface(getContext(), this, new JsExecutor(this, new Handler(Looper.getMainLooper()), new HandlerQueueManager()));
addJavascriptInterface(mraid, "jsBridge");
LogUtil.debug(TAG, "JS bridge initialized");
setBaseJSInterface(mraid);
}
use of org.prebid.mobile.rendering.utils.helpers.HandlerQueueManager in project prebid-mobile-android by prebid.
the class BaseJSInterface method javaScriptCallback.
@Override
@JavascriptInterface
public void javaScriptCallback(String handlerHash, String method, String value) {
HandlerQueueManager handlerQueueManager = mJsExecutor.getHandlerQueueManager();
Handler handler = handlerQueueManager.findHandler(handlerHash);
if (handler != null) {
Message responseMessage = new Message();
Bundle bundle = new Bundle();
bundle.putString(JSON_METHOD, method);
bundle.putString(JSON_VALUE, value);
responseMessage.setData(bundle);
handler.dispatchMessage(responseMessage);
handlerQueueManager.removeHandler(handlerHash);
}
}
use of org.prebid.mobile.rendering.utils.helpers.HandlerQueueManager in project prebid-mobile-android by prebid.
the class WebViewBanner method setMRAIDInterface.
public void setMRAIDInterface() {
BaseJSInterface mraid = new BannerJSInterface(getContext(), this, new JsExecutor(this, new Handler(Looper.getMainLooper()), new HandlerQueueManager()));
addJavascriptInterface(mraid, "jsBridge");
LogUtil.debug(TAG, "JS bridge initialized");
setBaseJSInterface(mraid);
}
Aggregations