to write a file manager to write data to an SD card, now I have found on the Internet that there is only one feasible way, that is, to open an Activity, probably realizing that this Activity can be used to authorize new Intent (Intent.ACTION_OPEN_DOCUMENT_TREE for paths such as SD cards); this
app Activity