Why var foss = intent.getStringExtra("fossID") instead of var foss = intent.getIntExtra("fossID",-1)
Title
Question
Thanks in advance. please help me.
In Activity-1 whare we passing int values using intent to next activity but Activity-2 we are using intent.getStringExtra("fossID")
it throwing an typecasting error, to solve this i change code as below its works for me.
var foss=intent.getIntExtra("RefferFossId", -1)
var language=intent.getIntExtra("RefferLanguageId",-1)
Android-app-using-Kotlin Creating-a-Search-App 11-12 min 0-10 sec
Answers:
var foss = intent.getStringExtra("fossID")
var language = intent.getStringExtra("languageID")
selectedOption.text = "Foss ID : " + foss + "\nLanguage ID : " + language
We are using to display the selected option as a string.
You may check the code that is given in the code file link below the video of this tutorial.
Login to add comment