Tealium/tealium-kotlin

Unresolved reference errors in the sample helper class

Closed this issue · 0 comments

I am using the sample helper class given at https://github.com/Tealium/tealium-kotlin/blob/main/mobile/src/main/java/com/tealium/mobile/TealiumHelper.kt to initialize Tealium. But it's throwing some Unresolved reference errors.

Given below is my helper class:

package com.something

import android.app.Application
import com.tealium.core.*

object TealiumHelper {

    lateinit var tealium: Tealium

    fun init(application: Application) {
        val tealiumConfig = TealiumConfig(
                application,
                "test",
                "test",
                Environment.DEV,
                collectors = mutableSetOf(
                        Collectors.App,
                        Collectors.Device,
                        Collectors.Connectivity
                ),
                modules = mutableSetOf(
                        Modules.Lifecycle,
                        Modules.VisitorService,
                        Modules.Location
                ),
                dispatchers = mutableSetOf(Dispatchers.Collect)
        )
        tealium = Tealium.create("tealium_instance", tealiumConfig)
    }
}

I am getting the below import error with the above code:

image

On updating the imports as given below, the issue is solved:

import android.app.Application
import com.tealium.core.Collectors
import com.tealium.core.Environment
import com.tealium.core.Modules
import com.tealium.core.Tealium
import com.tealium.core.TealiumConfig
import com.tealium.core.collection.App
import com.tealium.core.collection.Connectivity
import com.tealium.core.collection.Device

But I am not able to get rid of the errors corresponding to modules and dispatchers of the TealiumConfig. Screenshot of the error is given below:

image

It would be great help if someone could share the correct imports.

Additional info:

  • SDK version: com.tealium:kotlin-core:1.5.5.
  • All set up done as per the latest Tealium document