◉GEMINI LABJP
●ARGON — gemini-4-argon is generally available as of 10/13, aimed at complex coding, agents, math and science●DEEP RES — deep-research-pro-preview-12-2025 shuts down 10/23, 6 days left. Move to deep-research-preview-04-2026●NANO — gemini-nano-banana-2.1 is GA (10/06). gemini-3.1-flash-image is deprecated with no shutdown date yet●MCP — One write-up cut an 85,000-token tool result to 310 tokens by wrapping it in an ADK FunctionTool●FLASH — gemini-3.7-flash and 3.5-flash now route automatically to newer Flash models (10/08)●NEW — Stop Re-Reading Every Crash Report: Gre…●ARGON — gemini-4-argon is generally available as of 10/13, aimed at complex coding, agents, math and science●DEEP RES — deep-research-pro-preview-12-2025 shuts down 10/23, 6 days left. Move to deep-research-preview-04-2026●NANO — gemini-nano-banana-2.1 is GA (10/06). gemini-3.1-flash-image is deprecated with no shutdown date yet●MCP — One write-up cut an 85,000-token tool result to 310 tokens by wrapping it in an ADK FunctionTool●FLASH — gemini-3.7-flash and 3.5-flash now route automatically to newer Flash models (10/08)●NEW — Stop Re-Reading Every Crash Report: Gre…
Articles/Dev Tools
⟐ Dev Tools/2026-03-31Advanced

Gemini API × React Native Operational Notes — Indie Mobile App in Production

Operational notes from running Gemini API inside a React Native/Expo indie mobile app on iOS and Android: real device pitfalls, AdMob coexistence, Cold Start mitigation, AsyncStorage TTL design, and cost realities at 65,000 monthly requests

gemini-api286react-nativeexpomobile-app3streaming28vision5production140

✦ Premium Article

Calling Gemini API From Inside an Indie Mobile App

I'm Hirokawa (@dolice). I've been shipping iOS and Android apps as a solo developer since 2014. AdMob has been the revenue base the whole time, so I instinctively pay attention to server cost whenever I add a new dependency — AI included.

Since early 2026 I've been integrating Gemini API into two of my apps: a wallpaper app and a relaxation app. Nothing flashy — short text generation tailored to a chosen image, three recommended wallpaper categories from a mood input. Lightweight AI touches.

Honestly, the first few weeks did not go smoothly. Things worked in the simulator and broke on the device. TestFlight builds would freeze for eight seconds on first launch. Streaming would hang the moment Wi-Fi dropped. AdMob requests collided with Gemini ones and pushed low-RAM Android devices into memory pressure.

These are the notes from working through those problems. If you're writing a production React Native / Expo app with Gemini API, this is where I'd want to put the cache, which model I'd reach for, and where I'd insert a Cloud Functions proxy — backed by code and the actual numbers I measure from my own apps.

Development Environment Setup

Prerequisites

  • Node.js 18 or higher — Required for Expo CLI with Expo SDK 51+
  • Expo CLI — Install with npm install -g expo-cli
  • iOS or Android device/emulator — For testing
  • Gemini API key — Get free from Google AI Studio

Project Initialization

# Create a new Expo project
npx create-expo-app GeminiAIChat
 
# Navigate to project directory
cd GeminiAIChat
 
# Install required dependencies
npm install \
  @google/generative-ai \
  react-native-async-storage \
  expo-camera \
  expo-image-picker \
  expo-network \
  @react-navigation/native \
  @react-navigation/bottom-tabs \
  react-native-screens \
  react-native-safe-area-context
 
# Optional: Add TypeScript support
npm install --save-dev typescript @types/react-native

Project Structure

GeminiAIChat/
├── app.json
├── App.tsx
├── src/
│   ├── config/
│   │   └── gemini.ts
│   ├── hooks/
│   │   ├── useNetwork.ts
│   │   ├── useGeminiChat.ts
│   │   └── useStorage.ts
│   ├── components/
│   │   ├── ChatScreen.tsx
│   │   ├── CameraScreen.tsx
│   │   ├── MessageBubble.tsx
│   │   └── LoadingIndicator.tsx
│   ├── services/
│   │   ├── geminiService.ts
│   │   ├── cacheService.ts
│   │   └── imageService.ts
│   └── types/
│       └── index.ts
└── package.json
✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Real-world Gemini API integration into an indie iOS/Android app monetized with AdMob — what actually broke and how I fixed it
✦Seven implementation insights you won't find in the docs (streaming JS-thread jank, AsyncStorage TTL, SecureStore failure on Android, Cold Start long tail, camera permission revocation, Base64 memory blowup, bundle size)
✦How I split Gemini Flash and Pro in an AdMob-funded app, why I route everything through a Cloud Functions proxy, and the monthly-budget / 30 × 1.3 alert formula I use
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

◈ API / SDK2026-05-15
Building an AI Chat App with Expo and Gemini API: From First Commit to App Store Approval
An implementation record of shipping an Expo + Gemini API chat app through both store reviews — measured streaming latency, the chunk-boundary JSON bug, image payload limits, cost ceilings, and the pre-release checklist I run.
⟐ Dev Tools2026-04-18
Building Cross-Platform AI Desktop Apps with Gemini API and Tauri 2.0
A practical guide to building macOS, Windows, and Linux desktop AI apps using Tauri 2.0 and Gemini API. Learn secure API key management with a Rust backend, real-time streaming via Tauri's event system, and native OS integration with working production code.
⟐ Dev Tools2026-03-29
Gemini API Production Notes — Quiet Defenses Against 429, 500, and 503 Under Real Traffic
Operational notes from running Gemini API in production on an indie wallpaper app: exponential backoff, jitter, circuit breakers, token buckets, and model cascades — with the pitfalls I actually hit and measured retry success rates.