-3

I am integrating the Mesibo Android SDK (version 2.7.19) into my Kotlin application. I need to implement the Mesibo.MessageListener interface to receive real-time messages, but I am facing a compilation error where Mesibo.MessageParams cannot be resolved.

Dependencies:

kotlin
implementation("com.mesibo.api:mesibo:2.7.19")
Code:
kotlin
import com.mesibo.api.Mesibo
// import com.mesibo.api.Mesibo.MessageParams // Fails: Unresolved reference
class MyActivity : AppCompatActivity(), Mesibo.MessageListener {
    // Compilation Error: Unresolved reference: MessageParams
    override fun Mesibo_onMessage(params: Mesibo.MessageParams?, data: ByteArray?): Boolean {
        val message = String(data ?: ByteArray(0))
        Log.d("Mesibo", "Received: $message")
        return true
    }
    override fun Mesibo_onMessageStatus(params: Mesibo.MessageParams?) {}
    override fun Mesibo_onActivity(params: Mesibo.MessageParams?, activity: Int) {}
    override fun Mesibo_onLocation(params: Mesibo.MessageParams?, location: Mesibo.Location?) {}
    override fun Mesibo_onFile(params: Mesibo.MessageParams?, file: Mesibo.FileInfo?) {}
}

What I've Tried:

Explicit Imports: Tried importing

  1. com.mesibo.api.Mesibo.MessageParams but the compiler says "Unresolved reference".
    
  2. Java Implementation: I created a Java test class to implement the interface. The compiler error suggested I was missing Mesibo_onMessageUpdate(MesiboMessage), implying the type is MesiboMessage. However, I cannot find or import com.mesibo.api.MesiboMessage.

  3. Downgrading: Tried version 2.5.0 but faced similar resolution issues.

Question: What is the correct parameter type for Mesibo_onMessage

in Mesibo SDK 2.7.19 for Kotlin? Is MessageParams deprecated or moved to a different package?

New contributor
user3606728 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • 1
    Where did you learn about Mesibo.MessageParams? mesibo does not have any class by that name. Please refer to the official documentation: docs.mesibo.com/tutorials/get-started Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.