Skip to content
Cnone-Tech Documentation

Android

Cnone-Tech DocsVeldriq Field

Veldriq Field

Builder page. Flavors development and production. No demo flavor. Produce an APK for sideload or an AAB for Play. Firebase JSON is not required to compile.

Paths are from the Flutter root mobile/. minSdk product target 24. compileSdk 37. JDK 17. AGP 9.0.1. Gradle wrapper 9.1.0.

Copy android/buyer.properties.example → android/buyer.properties (gitignored). Only two keys are read:

applicationId=com.example.field
app_name=Veldriq Field

Replace applicationId with an ID you own before a store upload. app_name is the launcher label (default Veldriq Field if the file is absent). Gradle namespace in this template: com.cnonetech.veldriq.field. If buyer.properties is absent, fallback applicationId is also com.cnonetech.veldriq.field.

APP_DISPLAY_NAME does not change the launcher label. Set app_name here and pass the dart-define so the in-app title matches. Home-screen icon is @mipmap/ic_launcher — see Branding.

Flavor applicationId versionName Use
development your id + .dev suffix -dev QA, emulator, local Laravel
production your id unchanged unchanged Play / sideload release

Always pass a flavor. flutter run / flutter build apk without --flavor fails because both flavors are defined.

From mobile/. Production URL must be https://… origin only.

Terminal window
flutter build apk --flavor production --release \
--dart-define=APP_ENV=production \
--dart-define=API_BASE_URL=https://fsm.example.com \
--dart-define=APP_DISPLAY_NAME=Veldriq Field
flutter build appbundle --flavor production --release \
--dart-define=APP_ENV=production \
--dart-define=API_BASE_URL=https://fsm.example.com \
--dart-define=APP_DISPLAY_NAME=Veldriq Field

Use appbundle for Play. Development against the Android emulator:

Terminal window
flutter run --flavor development \
--dart-define=APP_ENV=development \
--dart-define=API_BASE_URL=http://10.0.2.2:8000 \
--dart-define=APP_DISPLAY_NAME=Field\ Dev

Outputs: APK build/app/outputs/flutter-apk/app-production-release.apk. AAB build/app/outputs/bundle/productionRelease/app-production-release.aab. Do not judge store size from a fat APK.

You supply the upload key. This documentation does not publish author keystores or passwords.

  1. Copy android/keystore.properties.example → android/keystore.properties (not key.properties).
  2. Point storeFile at a local .jks / .keystore (paths relative to mobile/android/).
  3. Fill storePassword, keyAlias, and keyPassword.

Gradle treats signing as ready only when that file exists, all four keys are non-blank, and storeFile resolves. Otherwise the release variant is debug-signed — QA only. Do not upload a debug-signed AAB to Play as a production first release.

INTERNET, CAMERA, POST_NOTIFICATIONS (runtime, after a Field session, for optional FCM). Gallery uses the system Photo Picker — no READ_MEDIA_*. No GPS, microphone, contacts, or broad storage.

  • “flavor not found” → you omitted --flavor.
  • Gradle Java errors → JDK 17.
  • HTTP in production → Invalid configuration.
  • Missing google-services.json is normal — the Google Services plugin applies only if that file exists.
  • Play “wrong upload key” → you shipped debug then a real key (or the reverse).

This documentation does not promise Play review.