I have a Java interface:
public interface NonHindiQuery {
void onNonHindiQueryReceived(String Query);
}
I want to implement it on Kotlin class:
class MainActivity : AppCompatActivity() {...}
Q: How can I do it?
It's simple:
class MainActivity : AppCompatActivity(), NonHindiQuery {
override fun onNonHindiQueryReceived(q: String) {
// <...>
}
}
To get rid of kotlin.NotImplementedError
remove TODO("not implemented")
from the method body:
@kotlin.internal.InlineOnly
public inline fun TODO(reason: String): Nothing =
throw NotImplementedError("An operation is not implemented: $reason")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With