Check out example codes for "kotlin copy text android 10". It will help you in understanding the concepts better.

Code Example 1

fun copyText(text:String){
            val myClipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
            val myClip: ClipData = ClipData.newPlainText("Label", text)
            myClipboard.setPrimaryClip(myClip)
        }

Learn ReactJs, React Native from akashmittal.com