An Android image viewer with lock functionality, gesture controls, and automatic device-unlock integration that prevents accidental interactions.
Built in collaboration with Claude Code
When entering a client's factory for work, a digital contractor ID (an image) is required for access. The process involves opening the contractor ID image, handing the phone to the security guard to scan the barcode on the image, and then having a security sticker applied to the phone's camera. During this procedure, the phone is often accidentally touched, sometimes nearly resulting in the deletion of the contractor ID image or the exposure of personal photos. These issues occur due to accidental gestures triggering the back function or pressing buttons unintentionally. This led to the decision to develop this application, which has successfully resolved this troublesome issue.
- Lock Protection: Secure your images with a single tap - all gestures and interactions are disabled when locked
- Auto-Unlock: Automatically unlocks when you unlock your device
- Persistent State: Lock state is maintained across app restarts and screen rotations
- Gesture Controls: Intuitive pinch-to-zoom, pan, and double-tap zoom
- Smart Boundaries: Intelligent pan limits prevent images from moving off-screen
- High Performance: Smooth animations and responsive controls
- Format Support: Works with all common image formats (JPG, PNG, GIF, etc.)
- Theme Options: Choose between Light, Dark, or System theme
- Dynamic Colors: Material You support on Android 12+ for personalized theming
- Multi-Language: English and Traditional Chinese with instant language switching
- No Restart Required: Theme and language changes apply immediately
- Built with Jetpack Compose and Material 3
- Follows Android best practices and architecture guidelines
- Optimized for Android 7.0 (API 24) through Android 15 (API 36)
-
Clone the repository:
git clone https://github.com/zac15987/LockView.git cd LockView
-
Open the project in Android Studio
-
Build and run:
- For Windows/WSL:
cmd.exe /c "gradlew installDebug"
- For Mac/Linux:
./gradlew installDebug
- For Windows/WSL:
- Download the latest APK from the Releases page
- Enable "Install from Unknown Sources" in your device settings
- Install the APK
- Select an Image: Tap the "Select Image" button to choose an image from your gallery
- Lock/Unlock: Use the lock button to secure your image
- Zoom & Pan: When unlocked, use pinch gestures to zoom and drag to pan
- Auto-Unlock: Lock your device and unlock it - the image will automatically unlock
- Settings: Access theme and language options from the menu
- Android Studio Ladybug or newer
- JDK 11 or higher
- Android SDK with API 36
- UI Framework: Jetpack Compose with Material 3
- Architecture Pattern: MVVM with Repository pattern
- State Management: StateFlow and Compose state
- Dependency Injection: Manual DI with ViewModel factories
- Data Persistence: DataStore Preferences
# Windows/WSL
cmd.exe /c "gradlew assembleDebug" # Debug build
cmd.exe /c "gradlew assembleRelease" # Release build
# Mac/Linux
./gradlew assembleDebug
./gradlew assembleRelease
For release builds, you'll need to configure signing:
-
Copy
keystore.properties.template
tokeystore.properties
:cp keystore.properties.template keystore.properties
-
Edit
keystore.properties
with your signing information:storePassword=your_keystore_password keyPassword=your_key_password keyAlias=your_key_alias storeFile=path/to/your/keystore.keystore
-
Place your keystore file in the specified location
Important: Never commit keystore.properties
or your .keystore
files to version control. These files are already added to .gitignore
for security.
# Run all tests
cmd.exe /c "gradlew test"
# Run lint checks
cmd.exe /c "gradlew lint"
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Jetpack Compose
- Image loading by Coil
- Icons from Material Design Icons
This app uses the following open-source libraries:
- Author: ZhangKe (0xZhangKe)
- Repository: https://github.com/0xZhangKe/ImageViewer
- License: Apache License 2.0
- Usage: Gesture detection and zoom/pan functionality adapted for LockView's requirements
- AndroidX Core, Lifecycle, Activity Compose
- Jetpack Compose UI & Material 3
- DataStore Preferences
- License: Apache License 2.0
- Coil - Image loading library (Apache License 2.0)
- Accompanist Permissions - Permission handling (Apache License 2.0)
For detailed license information, see docs/licenses/THIRD_PARTY_LICENSES.md
LockView respects your privacy:
- No data collection or analytics
- No network permissions required
- Images remain on your device
- No cloud storage or sharing features
For bug reports and feature requests, please open an issue.