Support Forum
Error when upgrading from Android v2 to v3: "E/TBLWebUnit: setUnitExtraProperties got unrecognized property."
over 2 years ago by Simon Ludwig
I'm currently upgrading from v2 to v3 in an Android App, but cannot see any taboola feed.
These errors are thrown in the logs:
TBLWebUnit: setUnitExtraProperties got unrecognized property. key = mediatedVia
TBLWebUnit: setUnitExtraProperties got unrecognized property. key = isUsedInTaboolaWidget
How can I resolve these errors?
Should the taboola feed be visible nevertheless, and I'm missing out on something else?
My taboola code looks like this:
build.gradle:
//Include the Taboola SDK binary
implementation 'com.taboola:android-sdk:3.6.3'
//Taboola: Include the following dependencies (mandatory)
implementation 'androidx.browser:browser:1.4.0'
Application.kt:
Taboola.init(TBLPublisherInfo("[my-published-id]"))
ViewController.kt:
{
private var taboolaPage: TBLClassicPage? = null
private var taboolaUnit: TBLClassicUnit? = null
fun init()
{
if (taboolaPage == null)
{
taboolaUnit = findViewById<TBLClassicUnit>(R.id.taboolaView)
// Dark mode disabled for now
// taboolaUnit?.setUnitExtraProperties(HashMap<String, String>().apply { put("darkMode", "true") })
taboolaPage = Taboola.getClassicPage("[my-url]", "article ")
taboolaPage?.addUnitToPage(
taboolaUnit,
"Below Article Thumbnails",
"thumbnails-a",
TBL_PLACEMENT_TYPE.PAGE_BOTTOM,
object :
TBLClassicListener()
{
// None of the callbacks are being called
override fun onItemClick(
placementName: String?,
itemId: String?,
clickUrl: String?,
isOrganic: Boolean,
customData: String?
): Boolean
{
return true
}
override fun onTaboolaWidgetOnTop() {}
override fun onAdReceiveSuccess() {}
override fun onAdReceiveFail(error: String?) {}
override fun onResize(height: Int) {}
override fun onUpdateContentCompleted() {}
override fun onEvent(actionType: Int, data: String?) {}
})
}
}
private fun refreshView()
{
taboolaUnit?.fetchContent()
}
}
taboola_wiget.xml (I've also tried the way without declaring TBLClassicUnit via XML)
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:taboola="http://schemas.android.com/apk/res-auto"
android:id="@+id/taboolaWrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.taboola.android.TBLClassicUnit
android:id="@+id/taboolaView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/elementBackground"
taboola:tb_mode="thumbnails-a"
taboola:tb_page_type="article"
taboola:tb_placement="Below Article Thumbnails"
taboola:tb_publisher="[my-publisher-id]"
taboola:tb_target_type="mix"
taboola:tb_url="[my-url]" />
</FrameLayout>
Any help would be appreciated.
Thanks!
Simon