Skip to content

SCRUM-76: Android: let the release APK reach the API - #32

Open
nawailkhan wants to merge 2 commits into
mainfrom
fix/android-internet-permission
Open

nawailkhan wants to merge 2 commits into
mainfrom
fix/android-internet-permission

Conversation

@nawailkhan

Copy link
Copy Markdown
Collaborator

What and why

The release APK (the one we share with the team) showed "Network error" on every login. Two causes:

  1. The INTERNET permission was only declared in the debug and profile Android settings (used by flutter run), not in the main one used by release builds. The app was blocked before sending anything.
  2. The app waited only 10 s for the server. The Render free plan sleeps after 15 min idle and takes ~30-50 s to wake, so the first request after a quiet spell always failed.

What's in it

  • android/app/src/main/AndroidManifest.xml: adds the INTERNET permission.
  • lib/core/api_client.dart: connect and receive timeouts raised from 10 s to 60 s.

How to test

  1. flutter build apk --release --dart-define=API_BASE_URL=https://iniba-api.onrender.com, then install the APK.
  2. Wait 15+ minutes so the server sleeps, then log in. It takes longer the first time, but works.

Type of change

  • Feature
  • Bug fix
  • Chore / CI / docs

Checklist

  • Branched from an up-to-date main
  • Tests added or updated, CI is green
  • Database changes come with an Alembic migration (none)
  • No secrets, .env files or generated files committed
  • API changes match docs/api-doc.pdf (no API changes)
  • At least one teammate has reviewed and approved

@nawailkhan
nawailkhan requested a review from fatzzi November 29, 2026 17:17
@nawailkhan nawailkhan changed the title Fix/android internet permission SCRUM-76: Android: let the release APK reach the API Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant