Nano Banana Pro
Agent skill for nano-banana-pro
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
AndroidAIChatClientBasic is a native Android chat client that integrates with OpenAI's API for AI-powered conversations. The app is built with:
./gradlew build
# Unit tests ./gradlew test # Instrumented tests (requires emulator or device) ./gradlew connectedAndroidTest
./gradlew clean
./gradlew installDebug
./gradlew assembleRelease
The app uses Hilt for dependency injection. Key modules:
NetworkModule (di/NetworkModule.kt): Provides OkHttpClient and Json serializer with custom timeouts (30s connect, 60s read/write)DataStoreModule (di/DataStoreModule.kt): Provides DataStore repository for persistent storageThe application class is
MyApplication annotated with @HiltAndroidApp.
Navigation is managed by Jetpack Compose Navigation with type-safe routes using Kotlinx Serialization:
NavHome: Main chat screenNavSettingApiKey: API key configuration screenNavigation setup is in
MyAppNavigation.kt.
Repository Pattern:
OpenAIRepository: Handles OpenAI API communication with streaming support using SSE (Server-Sent Events)
streamChat() returns a FlowData Models:
ChatRequest, ChatMessage, ChatStreamResponse, ChatStreamChoice, ChatDelta (data/model/ChatModels.kt): OpenAI API request/response modelsChatHistory, ChatMessage (data/ChatHistory.kt): Local chat history modelsPersistence:
DataStoreRepository interface with PreferencesDataStoreImpl: Stores API key securelyapiKeyFlow: Flow<String?> for reactive API key observationScreens:
HomeScreen (ui/home/HomeScreen.kt): Main chat interface with modal drawer navigation
SettingApiKeyScreen: API key configuration with password masking
SettingApiKeyViewModel for state managementThe OpenAI integration uses Server-Sent Events (SSE) for streaming chat responses:
stream: true in ChatRequestEventSourceListener processes incoming SSE eventsorg.nunocky.androidaichatclientbasicKey libraries: