A Python program that can transfer text copied on a phone to a laptop
can be used as a combination of web service, mobile and desktop applications.
For this purpose, we use Flask for the backend to create a small server that can receive the copied texts and then display these texts on the laptop.
$ python -m venv venv
$ source venv/bin/activate
$ pip install flask pyperclip requests
-
install Termux in your android device : https://github.com/termux/termux-app/releases/tag/v0.118.0
-
install python and requests lib :
pkg install python git && pip install requests
-
clone LapCopy from github :
git clone https://github.com/mehranalam/LapCopy.git
-
run server.py
-
go to termux app in android
-
run mobile/clipboard_sender.py
-
back to your system
-
run desktop/display_clipboard.py
Tip: Be sure to enter mobile/clipboard sender.py and enter the ip part of your system:
server_url = 'http://<ip>:5000/update_clipboard'