A modern Android client for the UrlShortener service, built with Java, OkHttp, and Material Design. This app allows users to shorten URLs, manage links, and handle authentication (email/password + Google Sign-In).
The backend API is shared with the web application: 👉 https://github.com/tajimz/url-shortener-spa
- 🔐 Email/password authentication
- 🔑 Google Sign-In support
- ✂️ Create short URLs instantly
- 📋 Copy shortened links to clipboard
- 📊 View all created URLs in dashboard
- 👤 User profile management
- 🔄 Pull-to-refresh URL list
- 🚦 Auto session handling with token-based auth
⚠️ Email verification flow support
👉 APK available on APKPure:
https://apkpure.com/com.tajim.urlshortener
| Landing | Login | Dashboard | Modern Menu |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
The app follows a clean modular structure:
api/ → Network layer (OkHttp, endpoints, interceptors)
auth/ → Authentication screens & logic
ui/ → Activities + Fragments (UI layer)
adapter/ → RecyclerView adapters
model/ → Data models
utils/ → Shared helpers (Session, UI utilities)
- ApiClient → OkHttp client with authentication interceptor
- AuthApi / UrlApi → API endpoints wrapper
- SessionManager → Handles login state & token storage
- AuthInterceptor → Handles 401/403 auto-routing
- DashboardFragment → Main URL list view
This app uses a shared backend API with the web version.
👉 Full API documentation & backend source: https://github.com/tajimz/url-shortener-spa
Base endpoints:
/login/social-login/register/logout/urls/me/verification/send
- Java (Android)
- OkHttp 4.12
- AndroidX Libraries
- Material Design Components
- Google Identity Services (Sign-In)
- ViewBinding
- SharedPreferences (Session management)
-
User launches app
-
Session check in
MainActivity -
Redirect to:
LandingActivity→ if not logged inVerifyEmailActivity→ if email not verifiedMainActivity→ if authenticated
-
Dashboard loads user URLs from API
-
User can create and manage short links
- Android Studio Hedgehog or later
- Minimum SDK: 29
- Internet connection
git clone https://github.com/tajimz/url-shortener-android.git- Open project in Android Studio
- Sync Gradle dependencies
- Set backend URL in
build.gradle:
buildConfigField "String", "SERVER_BASE_URL", "\"https://your-api-url.com\""- Run on emulator or physical device
Change in:
buildTypes {
debug {
buildConfigField "String", "SERVER_BASE_URL", "\"http://192.168.1.6:8000\""
}
release {
buildConfigField "String", "SERVER_BASE_URL", "\"https://your-server.xyz\""
}
}com.tajim.urlshortener/
├── api/
├── auth/
├── adapter/
├── model/
├── ui/
│ ├── activities/
│ └── fragments/
└── utils/
- JWT-based authentication
- Token stored securely in SharedPreferences
- Auto logout on 401 responses
- Email verification required for full access
- Debug build uses local backend server
- Release build uses production API
- Tested on Android 10+
- Clipboard copy is enabled for all shortened URLs
- Opening URLs directly in browser is currently optional (can be enabled in adapter)
ViewUrlActivityis reserved for future detailed URL view screen
Pull requests are welcome.
- Keep changes small and focused
- Follow existing architecture
- Include screenshots for UI changes
Copyright © 2026 Tajim All rights reserved unless stated otherwise in a LICENSE file.
Built by Tajim 🌐 https://tajimz.xyz



