Java Android Messenger (app name: Social Chat) is an AI-powered chat app for Android, built with Java. Every message you send is forwarded to Google's Gemini API, and the reply is shown as a chat bubble β with the full conversation history persisted locally in a SQLite database.
- Features
- Preview
- Project Structure
- Installation Guide
- Technologies Used
- License
- Contributing
- Connect with Me
β Gemini AI replies: Every message is sent to Google's Gemini API and answered in real time. β Persistent history: All messages are stored locally in a SQLite database and reloaded on launch. β Chat-style UI: User and bot messages are rendered as distinct, rounded message bubbles. β Clear conversation: Wipe the entire chat history with a single confirmation dialog. β Smooth animations: Input field and send button use subtle scale/overshoot animations, and new messages fade and slide in. β Automatic retries: Failed requests due to rate limiting are retried automatically before surfacing an error.
πΈ Screenshots of the running app aren't available in this repository yet β build and run the project in Android Studio to see it in action (see Installation Guide below).
java-android-messenger/
βββ app/
β βββ src/main/
β βββ java/uz/iqbolshoh/socialchat/
β β βββ MainActivity.java # Chat screen: input handling, message list, animations
β β βββ ApiService.java # Gemini API requests, retries, and response parsing
β β βββ Message.java # Message data model
β β βββ MessageDatabaseHelper.java # SQLite schema and CRUD operations
β βββ res/
β β βββ layout/activity_main.xml # Chat screen layout
β β βββ drawable/ # Message bubble, button, and background styles
β β βββ values/ # App name, colors, and theme
β βββ AndroidManifest.xml
βββ build.gradle
βββ README.md
git clone https://github.com/Iqbolshoh/java-android-messenger.gitOpen the java-android-messenger folder as a project and let Gradle sync.
Open app/src/main/java/uz/iqbolshoh/socialchat/ApiService.java and replace the placeholder with your own key:
private static final String API_KEY = "API_KEY";Get a free key from Google AI Studio.
Select an emulator or connect a physical device, then click Run.
This project is open-source and available under the MIT License.
π― Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.
π¬ I love meeting new people and discussing tech, business, and creative ideas. Let's connect! You can reach me on these platforms: