React Native: Access to Clipboard History

145 views Asked by At

Android has a keyboard feature that allows a user to view their Clipboard History, up to one hour.

Is there a way to access this Clipboard History in React Native? The React Native Clipboard API has getString and setString, which only handle the most recent item copied. I believe getStrings just accesses the clipboard if it's an array, but I don't think it accesses the history (and it's iPhone only anyway).

Alternatively, I could theoretically have an event listener on the clipboard functionality, where it just listens for a Copy event and saves it to memory to be accessed later. I couldn't find a Copy event to listen to, and if I went that route I'd need the app to be open during startup (I think it's possible, but I haven't done it before).

Anyone have any ideas?

0

There are 0 answers