termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

termux-clipboard-get is null

Open xcccdjsn opened this issue 11 months ago • 0 comments

Problem description

Is the latest android, app can not get the clipboard content after the app running in bakcend.

Steps to reproduce

  1. Run the following script.
termux-clipboard-set "\$"
while true; do
    sleep 3
    content=`termux-clipboard-get`
    echo "The clipboard content is: $content"
    if [ "${content:0:1}" != "\$" ]; then
        termux-clipboard-set "\$ $(date)"
    fi
done
  1. Let termux running in backend.
  2. The results including content like this "The clipboard content is : " Expected behavior

Some ways to read the clipboard content while termux running in backend. Additional information

  • termux-api application version: latest
  • termux-api package version (installed through apt): latest
  • Android OS version: android 14,
  • Device model: realme gt6

xcccdjsn avatar Feb 04 '25 11:02 xcccdjsn