Nice! I usually do something like this for getting the extras from the bundle in the onCreate. You can also do something like:
val myFoo = myBar as? Boo ?: RuntimeException("myBar should be Boo")
// myFoo is Boo here. Usually I do things like this when I know for sure that I should have a variable of type Boo. You can do things like this with Context or Bundle values.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice! I usually do something like this for getting the extras from the bundle in the onCreate. You can also do something like:
val myFoo = myBar as? Boo ?: RuntimeException("myBar should be Boo")
// myFoo is Boo here. Usually I do things like this when I know for sure that I should have a variable of type Boo. You can do things like this with Context or Bundle values.