An Android photo gallery app powered by Gemini AI. SmartGallery lets you browse your device photos with AI-generated labels, organize images into custom collections, protect private photos in a secure vault, and back up your library to Google Drive.
- AI Labeling — Gemini automatically tags photos with descriptive labels for fast search and filtering
- Secure Folder — PIN-protected vault for private photos, with PIN stored as a SHA-256 hash
- Google Drive Sync — Back up photos to a chosen Drive folder with automatic retry on token expiry
- Trash — Soft-delete with restore support before permanent removal
- Custom Labels — Create and manage your own photo collections alongside AI-generated ones
- Image Layers — Compose and view layered image edits in the photo detail view
- Android Studio (latest stable)
- Android device or emulator running API 24 (Android 7.0) or higher
- A Gemini API key
-
Clone the repository:
git clone https://github.com/your-username/SmartGallery.git
-
Open Android Studio, select Open, and choose the cloned directory. Let Gradle sync complete.
-
Create a
.envfile in the project root (next tobuild.gradle.kts) and add your Gemini API key:GEMINI_API_KEY=your_key_hereSee
.env.examplefor the full list of supported variables. -
Connect a physical device (with USB debugging enabled) or start an emulator via Device Manager.
-
Run the app using one of the options below:
Android Studio (recommended): Click Run ▶ or press
Shift+F10.Command line:
# Mac / Linux ./gradlew installDebug # Windows gradlew.bat installDebug
Google Drive sync requires signing in with a Google account that has Google Play Services. No additional setup is needed — the app requests Drive access at runtime.
Requires the Android SDK installed with ANDROID_HOME set, or an sdk.dir entry in local.properties.
# Build debug APK
./gradlew assembleDebug # Mac / Linux
gradlew.bat assembleDebug # Windows
# Install on connected device / running emulator
./gradlew installDebug # Mac / Linux
gradlew.bat installDebug # Windows
# Run unit tests
./gradlew test # Mac / Linux
gradlew.bat test # WindowsThe built APK is written to app/build/outputs/apk/debug/.
| Variable | Required | Description |
|---|---|---|
GEMINI_API_KEY |
Yes | Gemini API key for AI labeling |
KEYSTORE_PATH |
Release only | Path to upload keystore .jks |
STORE_PASSWORD |
Release only | Keystore password |
KEY_PASSWORD |
Release only | Key password |
This project is open source. See LICENSE for details.