Clipy is a bidirectional clipboard synchronization tool that allows seamless clipboard sharing between your computer and Android device. The tool consists of a lightweight server written in Go and a native Android app. It enables clipboard sync via WebSocket communication, ensuring that content copied on one device can be easily accessed and pasted on the other.
- Bidirectional Clipboard Sync: Copy and paste seamlessly between Android and PC.
- Lightweight: Optimized Android app and Go-based server.
- Background Sync: Clipboard data is synced in the background, with foreground notifications on Android for service persistence.
- Share Functionality: Easily share clipboard content from Android to PC without opening the app.
- Cross-Platform: Works on both Android and PC, with future plans for additional platform support.
The Clipy project consists of three main components:
-
Server (Go):
- Handles WebSocket communication between devices.
- Synchronizes clipboard content between Android and PC.
-
Android Client (Kotlin):
- Provides a simple UI to toggle clipboard sync.
- Implements services to keep the clipboard sync running in the background.
-
UI:
- Simple user interfaces for both the PC client (running the server) and the Android app.
- Allows starting and stopping clipboard synchronization and viewing sync status.
-
Clone the repository:
git clone https://github.com/aryanpnd/clipy-client-pc.git cd clipy/server -
Install Go (if you don’t have it installed yet):
- Follow the instructions at https://go.dev/doc/install.
-
Build the Go server:
go build -o clipy-server . -
Run the server:
./clipy-server
The server will automatically start and listen for WebSocket connections from the Android device.
The Android client allows you to connect to the PC server and sync your devices over your local host. You can find the Android client repository here: Clipy Android Client.
- Open the Android project in Android Studio.
- Build and install the app on your Android device.
- Grant necessary permissions for clipboard access and notifications.
- Start the clipboard sync via the app, connecting to the server running on your PC.
In the build.gradle file for the Android project, the following configuration should be set:
android {
compileSdkVersion 34
defaultConfig {
applicationId "com.example.clipy"
minSdkVersion 34
targetSdkVersion 34
}
...
}
dependencies {
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.activity:activity-ktx:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}The Android app requires the following permissions:
SYSTEM_ALERT_WINDOWINTERNETFOREGROUND_SERVICEPOST_NOTIFICATIONSREAD_CLIPBOARD
- Starting the Sync: After installing the Android app and starting the server, click the 'Start Clipboard Sync' button in the app to initiate synchronization.
- Sharing Clipboard Data: On Android, use the 'Share' functionality to send clipboard data to the PC without opening the app.
- Stopping the Sync: The clipboard sync can be stopped by clicking the 'Stop Clipboard Sync' button in the app.
- Multi-platform support: Adding support for additional platforms such as macOS or Linux.
- Performance optimization: Refactoring the server into a more performance-efficient language like Go or Rust if needed.
- Customizable UI: Providing options for users to customize how clipboard sync is handled.
This project is licensed under the MIT License - see the LICENSE file for details.