Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to send a value from Activity back to a Kotlin class. I would really appreciate your help!

What I have tried:

I tried doing something like this, but I get an exception (snippet of code in a Kotlin class):
private lateinit var main: MainActivity
var img = ""
...
img = main.str2

img - stands for value in a Kotlin class, main stands for Activity
Posted
Updated 8-Jan-22 4:52am
v2
Comments
Richard Deeming 10-Jan-22 5:03am    
If you want someone to help you fix an error in your code, you need to provide the full details of the error.

Click the green "Improve question" link and update your question to include the full exception details, including any inner exceptions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900