T BookingDOCUMENTATION

Build the Android apps

Open the project, connect it to your website, make it yours and build the APK (to install on phones) and the App Bundle (to upload to Google Play) β€” for both apps.

Flutter 3.47+Android StudioWindows, macOS or Linux⏱ first build ~30 minutes
On this page
  1. The two apps
  2. Install the tools
  3. Open the project
  4. Connect your website
  5. Name, package ID and icon
  6. Run on your phone
  7. Create your signing key
  8. Build the APK and App Bundle
  9. Publish on Google Play
  10. Optional: push, Google sign-in
  11. If something goes wrong

1. The two apps

🎫 T Booking passengers

Search buses, pick seats, pay, QR ticket, live tracking, cancel & refund, reviews, wallet. Folder apps/tbooking.

🚌 T Booking Business staff

For admins, operators and agents: dashboard, trips, manifest, QR ticket scanner, bus GPS, bookings, earnings. Folder apps/tbooking_business.

Passenger app home
T Booking
Passenger app seat map
Seat map
Business app dashboard
T Booking Business
Business app manifest
Passenger manifest

Both apps share one package with the API client, design and translations:

mobile-apps/ β”œβ”€β”€ packages/tb_core/ shared code (website address, API, theme, translations) β”‚ └── lib/src/config.dart ← your website address β”œβ”€β”€ apps/tbooking/ passenger app β”‚ β”œβ”€β”€ android/ Android project (package ID, signing) β”‚ β”œβ”€β”€ ios/ iPhone project β”‚ β”œβ”€β”€ assets/icon/ app icon and launch screen images β”‚ └── pubspec.yaml version number β”œβ”€β”€ apps/tbooking_business/ business app (same structure) β”œβ”€β”€ codemagic.yaml optional cloud builds └── README.md

2. Install the tools (once)

  1. Flutter SDK
    Download from docs.flutter.dev/get-started/install (choose your system β†’ Android), unzip it (e.g. C:\src\flutter or ~/flutter) and add its bin folder to your PATH.
  2. Android Studio
    Install from developer.android.com/studio. In the setup wizard accept the Android SDK. Then Settings β†’ Plugins β†’ install Flutter (Dart is added automatically) β†’ restart.
  3. Android licenses and check
    Open a terminal (Command Prompt / Terminal) and run:
    flutter doctor --android-licenses
    flutter doctor
    Press y to accept each license. flutter doctor must show a green tick for Flutter and Android toolchain (Xcode and Chrome are not needed for Android).

Prefer VS Code? Install the Flutter extension β€” Android Studio is still needed once for the Android SDK.

3. Open the project

  1. Copy the folder
    Copy mobile-apps from the download to a simple path without spaces, e.g. C:\projects\mobile-apps.
  2. Open one app
    Android Studio β†’ File β†’ Open β†’ select mobile-apps/apps/tbooking (the folder that contains pubspec.yaml) β†’ OK. Open apps/tbooking_business the same way in a second window when you build the business app.
  3. Get the packages
    Android Studio shows β€œPub get” at the top of pubspec.yaml β€” click it. Or in the Terminal tab at the bottom:
    flutter pub get

Open apps/tbooking, not apps/tbooking/android. Opening the android folder alone starts a plain Android project without Flutter.

4. Connect your website

Open packages/tb_core/lib/src/config.dart and put your website address (with https://, no slash at the end):

static const String defaultBaseUrl = 'https://booking.example.com';

This one line is used by both apps. The website must run T Booking 1.2.0 or newer with SSL.

Alternatively pass it when building, without editing the file: --dart-define=API_BASE_URL=https://booking.example.com

5. Name, package ID and icon

App name

android/app/src/main/AndroidManifest.xml β†’ android:label="T Booking" β†’ your name.

Package ID (must be unique on Google Play)

android/app/build.gradle.kts β†’ change applicationId, e.g.:

applicationId = "com.yourcompany.booking"            // passenger app
applicationId = "com.yourcompany.booking.business"   // business app

Choose it before the first upload β€” Google Play never allows changing it later.

Icon and launch screen

Replace the images in assets/icon/ with yours (same names and sizes: icon.png 1024Γ—1024 without transparency, foreground.png and background.png 1024Γ—1024 for Android's adaptive icon, splash.png 512Γ—512), then run in the app folder:

dart run flutter_launcher_icons
dart run flutter_native_splash:create

Version

pubspec.yaml β†’ version: 1.0.0+1. The number after + must go up with every Google Play upload (1.0.1+2, 1.0.2+3 …).

6. Run on your phone

  1. Developer options
    On the phone: Settings β†’ About phone β†’ tap Build number 7 times. Then Settings β†’ System β†’ Developer options β†’ turn on USB debugging.
  2. Connect with USB and allow the computer on the phone.
  3. Run
    Android Studio: choose your phone in the device list at the top β†’ press β–Ά. Or:
    flutter run

No phone? Android Studio β†’ Device Manager β†’ create a virtual device (emulator).

7. Create your signing key (once)

Google Play needs every upload signed with the same key. Create it once and keep it safe (with a backup) β€” if you lose it you must ask Google to reset it.

Windows (in Command Prompt):

keytool -genkey -v -keystore C:\keys\upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload

macOS / Linux:

keytool -genkey -v -keystore ~/keys/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload

Answer the questions and choose a password. keytool comes with Android Studio (…/Android Studio/jbr/bin) if the command is not found.

Then create the file android/key.properties inside the app folder (apps/tbooking/android/key.properties, and the same for the business app):

storeFile=C:/keys/upload-keystore.jks
storePassword=your-keystore-password
keyAlias=upload
keyPassword=your-key-password

The project is already set up to use this file for release builds. Without it, release builds are signed with a debug key (fine for testing, rejected by Google Play). Never share key.properties or the .jks file.

8. Build the APK and App Bundle

In the Terminal inside the app folder (apps/tbooking, then apps/tbooking_business):

APK β€” to install on phones directly

flutter build apk --release

Result: build/app/outputs/flutter-apk/app-release.apk. Send it to a phone and open it (allow β€œInstall unknown apps”).

App Bundle β€” for Google Play

flutter build appbundle --release

Result: build/app/outputs/bundle/release/app-release.aab β€” this is the file you upload to Google Play.

Tip: Android Studio β†’ Build β†’ Flutter β†’ Build APK / Build App Bundle does the same.

9. Publish on Google Play

  1. Developer account
    Register at play.google.com/console (one-time fee).
  2. Create app
    App name, default language, App, Free. Accept the declarations.
  3. Test first
    Testing β†’ Internal testing β†’ Create new release β†’ upload the .aab β†’ add testers (e-mail list) β†’ roll out. Testers install it from the Play Store link.
  4. App content (Policy β†’ App content): privacy policy URL (your site's Privacy page), App access β€” give a demo login so Google can review, ads (No), content rating questionnaire, target audience (18+), Data safety (answers in mobile-apps/README.md), and for the business app the location permission explanation.
  5. Store listing
    Short and full description, 512Γ—512 icon, 1024Γ—500 feature graphic and at least 2 phone screenshots.
  6. Production
    When testing is fine: Production β†’ Create new release β†’ upload β†’ send for review.

Payments: bus tickets are a real-world service, so your own payment gateways are allowed β€” no Google Play billing needed. Account deletion is inside the app (Account β†’ Delete account), as Google requires.

Business app: it is for your staff. Publish it the same way (it can also stay on a closed testing track), or just share the APK with your staff.

10. Optional: push notifications and Google sign-in

The apps work without these. Step-by-step instructions are in mobile-apps/README.md:

11. If something goes wrong

ProblemSolution
flutter is not recognisedAdd flutter/bin to PATH and open a new terminal.
β€œThe current Dart SDK version is …” / version solving failedUpdate Flutter: flutter upgrade (3.47 or newer is needed).
Android licenses not acceptedflutter doctor --android-licenses
App opens but shows β€œSomething went wrong”Check the website address in config.dart, that it uses https:// and that the site is on 1.2.0 or newer.
Play Console: β€œsigned in debug mode”android/key.properties is missing or the path in storeFile is wrong.
Play Console: β€œversion code already used”Increase the number after + in pubspec.yaml.
Gradle errors after changing filesflutter clean then flutter pub get and build again.