Crop Advisor is an Android application that uses Google Gemini AI to recommend the best crops based on soil and environmental conditions. It includes an AI chat assistant, task checklist, and Firebase Authentication—all wrapped in a clean, modern UI.
- Enter soil type, nitrogen level, pH, rainfall, temperature, and humidity.
- Gemini AI analyzes the values and suggests suitable crops.
- Displays a clean, readable summary on a dedicated result screen.
- Chat with an AI about farming, soil, fertilizers, pests, and crops.
- Gemini AI generates smart agricultural answers.
- Clean chat interface with sent/received message bubbles.
- Add your own farming tasks.
- Mark tasks as completed or delete them.
- Lightweight and fast agricultural to-do manager.
- Email/Password Login & Signup powered by Firebase.
- Secure session handling.
- Profile page with user info and logout option.
- Bottom navigation bar with:
- Home (Crop Recommendation Input)
- AgriChat
- Checklist
- Profile
- Kotlin
- Firebase Authentication
- Google Gemini AI API
- Retrofit + OkHttp
- Gson
- Material Design Components
- Android Jetpack (Fragments, ViewModel, Navigation)
-
Clone the repository:
git clone https://github.com/yourusername/CropAdvisor.git -
Open the project in Android Studio.
-
Add your Gemini API Key in:
-
HomeFragment.kt (for crop analysis)
-
RetrofitClient.kt (for chat/AI content)
-
Add your google-services.json for Firebase Authentication.
-
Let Gradle sync.
-
Run the app on a physical device or emulator.
Android Studio Hedgehog or newer
Minimum SDK: 24+
Gemini API Key
Firebase Project with Authentication enabled