I'm getting a RealmQuery on a method getLastIndex(...
# android
a
I'm getting a RealmQuery on a method getLastIndex().max("serviceno")?.toLong() ?: -1. I get an TypeCastException while converting to long. max() returns a Number which i'm trying to convert toLong which throws the exception, not finding an solution in stackoverflow or elsewhere to resolve this. Please help