contentresolver.insert in fragment
snippet in kotlin

contentresolver.insert in fragment

user5581

//kotlin
Uri uri = activity!!.contentResolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values)
//or
Uri uri = requiredActivity().contentResolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values)