StationeryTrade is an Android application that provides a platform for users to trade stationery items. The app enables users to create accounts, list their stationery products for sale, browse available items, and manage their advertisementsβall through an intuitive mobile interface powered by Firebase real-time database.
Why StationeryTrade?
- π― Specialized marketplace focused on stationery items
- π Secure authentication with phone number verification
- πΈ Product listing with image uploads
- π¬ Real-time database synchronization
- π± Clean, material design UI
- User registration with email and phone verification
- Login with credentials and "Remember Me" functionality
- Password reset via phone number verification
- Firebase Phone Authentication integration
- Add new product listings with details and images
- View all available products in a grid layout
- Manage personal advertisements
- Update or delete existing product listings
- View and edit profile information
- Change password functionality
- Logout and account management
- Profile data persistence
- Bottom navigation with 4 main sections:
- Home (Browse products)
- Add Product
- My Ads
- Profile
- ViewPager integration for smooth transitions
| Technology | Purpose |
|---|---|
| Java | Primary programming language |
| Android SDK | Mobile application framework (API 23-29) |
| Firebase Realtime Database | Backend data storage and synchronization |
| Firebase Authentication | Phone and email authentication |
| Firebase Storage | Image and file storage |
| Picasso | Image loading and caching |
| PaperDB | Local data persistence |
| Material Components | Modern UI design |
| Lottie | Animations |
| RecyclerView & CardView | Efficient list display |
- Android Studio Arctic Fox or later
- JDK 8 or higher
- Android device/emulator with API level 23+
- Firebase account and project setup
-
Clone the repository
git clone https://github.com/AkshayKappala/StationeryTrade.git cd StationeryTrade -
Open in Android Studio
# Open Android Studio and select "Open an existing project" # Navigate to the cloned directory
-
Configure Firebase
- Create a new Firebase project at Firebase Console
- Add an Android app to your Firebase project
- Download
google-services.json - Place it in the
app/directory - Enable Firebase Authentication (Phone & Email)
- Enable Firebase Realtime Database
- Enable Firebase Storage
-
Sync Gradle
# Android Studio will prompt you to sync # Or manually: File β Sync Project with Gradle Files
-
Build and Run
# Connect your Android device or start an emulator # Click Run (Shift + F10) or use: ./gradlew assembleDebug ./gradlew installDebug
StationeryTrade/
βββ app/
β βββ src/
β β βββ main/
β β β βββ java/com/mainproject/stationerytrade/
β β β β βββ Splash.java # Splash screen activity
β β β β βββ prelogin.java # Pre-login welcome screen
β β β β βββ login.java # User login
β β β β βββ Registration.java # New user registration
β β β β βββ VerifyPhoneActivity.java # OTP verification
β β β β βββ forgot.java # Password recovery
β β β β βββ PasswordReset.java # Reset password
β β β β βββ Home.java # Main app container
β β β β βββ homeFragment.java # Product browsing
β β β β βββ Faddpro.java # Add product fragment
β β β β βββ myadds.java # My ads fragment
β β β β βββ fprofile.java # Profile fragment
β β β β βββ proedit.java # Edit profile
β β β β βββ onclickProduct. java # Product details
β β β β βββ updateinfo.java # Update product
β β β β βββ UserDetail.java # User data model
β β β β βββ pageAdapter.java # ViewPager adapter
β β β βββ res/
β β β β βββ layout/ # XML layouts
β β β β βββ drawable/ # Images and icons
β β β β βββ values/ # Strings, colors, styles
β β β βββ AndroidManifest.xml
β β βββ build. gradle
βββ gradle/
βββ build.gradle
βββ settings.gradle
{
"rules": {
"Users": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth. uid"
}
},
"Products": {
". read": true,
".write": "auth != null"
}
}
}service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read: if true;
allow write: if request.auth != null;
}
}
}
Update app/build.gradle if needed:
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.mainproject.stationerytrade"
minSdkVersion 23
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
}// User login with Firebase verification
DatabaseReference root = FirebaseDatabase.getInstance().getReference();
root.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
// Verify user credentials
// Navigate to Home activity on success
}
});// Send OTP to user's phone
PhoneAuthProvider.getInstance().verifyPhoneNumber(
mobile,
60,
TimeUnit.SECONDS,
TaskExecutors.MAIN_THREAD,
mCallbacks
);The app uses PaperDB for storing user session data:
// Remember user login
Paper.book().write("username", username);
Paper.book().write("password", password);- Material Design: Modern UI with Material Components
- Bottom Navigation: Easy access to 4 main sections
- Grid Layout: Products displayed in 2-column grid using RecyclerView
- Image Loading: Smooth image rendering with Picasso
- Animations: Lottie animations for enhanced UX
- Responsive: Supports various screen sizes (small to xlarge)
Issue: Gradle sync fails
# Solution: Clean and rebuild
./gradlew clean
./gradlew buildIssue: Firebase dependency conflicts
# Ensure google-services plugin is applied in app/build.gradle
apply plugin: 'com.google.gms.google-services'Issue: App crashes on login
- Verify
google-services.jsonis in the correct location - Check Firebase Realtime Database is enabled
- Ensure Firebase Authentication is configured
Issue: Images not loading
- Check internet permissions in AndroidManifest.xml
- Verify Firebase Storage rules allow read access
- Confirm Picasso dependency is included
Issue: Phone verification not working
- Enable Firebase Phone Authentication in Firebase Console
- Check if SHA-1 fingerprint is added to Firebase project
- Verify phone number format includes country code
This project is available for educational and personal use.
Akshay Kappala
- GitHub: @AkshayKappala
- Repository: StationeryTrade
Built with β€οΈ using Android & Firebase
β Star this repo if you find it helpful!