Skip to main content

Troubleshooting

Intro

There are several implementation types and use cases of the Outbrain Android SDK. This page describes common implementation issues and possible solutions for them. This page is intended for app developers that are having issues with the SDK implementation. It is recommended to follow this guide before contacting the Outbrain Inc. representative. If you're encounter issues that are not described in this document please reach out to your Outbrain representative and describe the issue.

info

Before jumping into the possible issues and solutions it is always a good practice to make sure to update to the latest SDK version and follow the implementation guidelines.

Common issue - Viewability

Please note, the viewability is being reported when at least 50% of a recommendation is on the screen for at least 1 second.

Bridge use case

Bridge use case is used to show multiple recommendation cards in a feed format below article content embedded in a scroll type of layout. Bridge implementation is called SFWebViewWidget.

Activity(XML) based Layout issues

In the XML layout it is possible to implement the SFWebViewWidget in a few different ways (please refer to our sample apps for examples).

Inflated Page Views

One of the common issues is an unexpected high number of page views. Every time the SFWebViewWidget instance is created it is loading the Bridge URL which is counted as a separate page view IF the widget index is 0. So when facing the inflated page views issue it is important to understand if the widget is being re-created and fix the reason.

One of the common widget re-creation reasons could be a device orientation change which triggers the Activity to re-create. Please refer to the implementation guidelines.

Another possible fix would be to increase the widgetIndex on the next reload so that it won't be counted as an extra page view. Please note, the recommendations would still be reloaded, but the extra page view won't be counted. Also when the new content page is loaded the widgetIndex should be 0.

Second widget on the page is not loading

In some rare cases when two widgets are placed on the same page in a single content page the second widget is not loaded or is not loaded correctly. This is a known issue and if you encounter it please reach out to Outbrain representative and request assistance.

Jetpack Compose issues

Outbrain Android SDK has a separate component which can be used in the Jetpack Compose - OBComposeViewWidget.

Inflated Page Views

Inflated page views can be caused by a view recomposition which causes the widget to re-create. First please make sure this is indeed the issue by checking the content page with the OBComposeViewWidget implementation with layout inspector. If the recomposition count increases it could be the cause for the inflated page views. In order to prevent the OBComposeViewWidget to re-create please make sure you are using the remember technique as described in implementation guidelines.

Another possible widget re-creation issue could be when another content page is being opened from the organic recommendation. A cause to this could be that there are no strong references to the widget, and it's being destroyed when user leaves the page. In this case we recommend to keep a strong reference to the widget in the page's view model. We are aware this is not a good practice and can be resource inefficient and are currently working on a more robust solution.

Widget is not loading

In some cases the widget is not loaded at all. One of the causes to this issue could be that the widget is being destroyed before it's being rendered on the screen. This can be verified with putting some breakpoints or debug logs to the code. If this is the case we could recommend adding a strong reference to the widget to some external object that will make sure the widget would not be destroyed.

Viewability not reported

If you are seeing the viewability is not being reported from the OBComposeViewWidget, please make sure to implement the NestedScrollConnection as described in the implementation guidelines. In case the implementation looks correct, please reach out to the Outbrain representative and report the issue.

Regular SDK use case

Regular SDK use case is when publisher requests the recommendations from the Outbrain backend and renders it on the application side in their own UI.

Activity(XML) Layout issues

Viewability not reported

The viewability in Regular SDK is being reported with help of the OBFrameLayout. Please make sure to follow the implementation guidelines.

Jetpack Compose Layout issues

Viewability not reported

info

Please note, the Outbrain SDK doesn't currently have a Viewability solution for Regular SDK use case in Jetpack Compose layout. Please contact Outbrain representative in order to request this feature.