I want to know how to send 3 variables to another activity with intent in kotlin, I would like to know how the other intent should also be, not only the sending, but how it would have to receive it in the other activity activity with the 3 variables:
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.yr.iolite.R
class RestrictionsActivity : AppCompatActivity()
{
override fun onCreate(savedInstanceState: Bundle?)
{
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_restrictions)
var a = 10
var b = 5
var c = "2.5"
}
}
activity where I want to receive it:
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.yr.iolite.R
class home : AppCompatActivity()
{
override fun onCreate(savedInstanceState: Bundle?)
{
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home)
}
}