kirillrakhman
10/10/2016, 9:36 AMclass TargetActivity {
val myExtra by extra<String>()
}
//call site:
intent.putExtra(TargetActivity::myExtra.name, myValue)
As you can see, the name of the property is never referenced as string. of course that doesn't enforce putting the correct type (or a value at all) in the intent.
For the extra()
delegate, there are a couple of open source solutions or you can throw one together yourself in 5 minutes.