As startActivityForResult() has been depreciated .How to get image from gallery in android with kotlin ?
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
As startActivityForResult() has been depreciated .How to get image from gallery in android with kotlin ?
2
Answers
You can use registerForActivityResult instead of startActivityForResult.
Here is my code to get image from gallery in kotlin:
// on button Lisnter put this code
// outside onCreate put this code