This StackOverflow question https://stackoverflow.com/questions/59903001/how-to-access-c... suggests that it was possible to read the clipboard in the background in Android versions before Q(10). Although it doesn't explicitly say how, maybe the example code given is how you'd do it.