Android

Smart Visitor – Android App Documentation

Apps v1.0.0 · needs website v2.0+

Overview

Smart Visitor Mobile App is one Android app for the Smart Visitor SaaS visitor management website. The same app serves every role: owners, managers, reception, security, hosts and staff. Visitors without an account can open their pass with the pass code. The app talks only to your website, so all data stays on your server.

One app for every companyOne published build serves all your owners. On first use people scan the company QR code or type the company code; then they sign in with email and password and the app shows that company's logo and colour.
One app for every roleThe server tells the app who signed in; the app builds its menu from that. A host sees only their own visitors, reception also gets the scanner.
Same rules as the websiteEvery action runs the website's own code: permissions, plan limits, blacklist and notifications are identical.
Opens offlineWithout a connection the app opens with the last saved profile and home data, clearly marked as saved data.
Inbox and pushAn inbox with an unread badge works out of the box. Push messages while the app is closed need your own Firebase project (optional).
SecureLogin token in the phone's secure storage; two-factor and fingerprint / face lock supported; the token ends after 60 idle days.
Ready for Google PlayStep-by-step build, signing and store submission in this guide.

What is in the package

AppFolderApp idUsers
Smart Visitorandroid_app/com.smartvisitor.smart_visitorEverybody who signs in on the website (except the super admin), plus guests with a pass code

Inside the folder:

ItemWhat it is
lib/The Dart source code of the app.
android/The Android project, already set up (permissions, icons, signing hooks).
test/Unit and screen tests (flutter test), plus a contract test that runs against a real server.
pubspec.yamlThe app's name, version and packages.
The app needs the Smart Visitor SaaS website v2.0 or newer on an HTTPS address. The website is sold separately.

Features

Owner, manager, reception

Host / staff

Guest (no account)

Common to all

Not in this version: offline queue for actions, AI assistant, reports, blacklist screens, ID scan (OCR), badge printing and kiosk mode.

Requirements

ItemWhat you need
SystemWindows 10/11, macOS or Linux
Flutter SDKStable channel, Dart 3.13 or newer (sdk: ^3.13.5 in pubspec.yaml)
Android StudioWith the Android SDK, platform tools and a recent JDK (17)
Free disk spaceAbout 10 GB
Phones that can run the appAndroid 7.0 (API 24) or newer.
AccountsGoogle Play Console developer account (one-time fee) to publish. Firebase project (free) if you want push notifications.
WebsiteSmart Visitor SaaS v2.0 or newer on HTTPS, with the migrations run (php artisan migrate).

Install Flutter & Android Studio

  1. Install Flutter from docs.flutter.dev/get-started/install and add it to your PATH.
  2. Install Android Studio and, in SDK Manager, the latest Android SDK, platform tools and command-line tools.
  3. Accept the licences and check everything:
    flutter doctor --android-licenses
    flutter doctor
    Every line for Flutter and Android should have a green tick.

Prepare the website

  1. Install or update Smart Visitor SaaS v2.0 or newer on an HTTPS address.
  2. Run the database update once:
    php artisan migrate
    It adds the tables mobile_devices and app_notifications.
  3. Sign in as Super Admin and open Mobile Apps. Fill in the store links (after you publish), an optional minimum app version and defaults for colour and welcome text.
  4. Sign in as an Owner and open Mobile App: you see the company QR code, the company code and the branding form.
Staff sign in with the same email and password as on the website. Their role and permissions decide what the app shows. The super admin signs in on the website only.

Open the project

Unlike a bare Flutter source package, the Android project is already included, so there is no setup script. Unzip, then:

cd android_app
flutter pub get

The app id is com.smartvisitor.smart_visitor. Change it to your own before you publish:

The app name shown under the icon is Smart Visitor (android/app/src/main/AndroidManifest.xml, android:label).

Run on a phone or emulator

Point the app at your website

The server address is asked on the first screen and remembered. To pre-fill it for everybody, build with:

flutter run --dart-define=SERVER_URL=https://visitors.example.com

The default in lib/config.dart is only a development value (http://10.0.2.2/... is the computer's localhost as seen from the Android emulator).

On a real phone

  1. Switch on Developer options and USB debugging, connect the phone and accept the prompt.
  2. flutter devices
    flutter run

On the emulator

Create a device in Android Studio (Device Manager), start it and run flutter run. Camera scanning needs a real phone or a virtual scene camera.

Testing against a local website (http)

Debug builds allow plain http:// (the flag is in android/app/src/debug/AndroidManifest.xml). Release builds do not: use an https:// address.

A test APK to share

flutter build apk --release --dart-define=SERVER_URL=https://visitors.example.com

The file is build/app/outputs/flutter-apk/app-release.apk.

Sign-in: company code & QR

The first time, the app asks which company:

  1. Scan the company QR code (or type the company code, or paste the invite link). The owner finds both on the website under Mobile App; the page also has a print sheet for reception.
  2. The app looks the company up (GET /api/v1/mobile/company/{code}) and shows its logo, name and welcome text, with the email and password fields.
  3. Sign in with the same email and password as on the website. If the account uses two-factor authentication, enter the 6-digit code.

The phone remembers the company. Not your company? Change goes back to step 1. The company code is the owner's code (the same one in the pre-registration link).

Who can sign inDetails
Owner, manager, reception, security, host, staffEvery account of the company that is active and has a verified email.
Super adminCannot sign in on the phone; uses the website.
GuestNo account: "I'm a visitor: open my pass" with the pass code.

Sign-in is refused while the super admin has a maintenance message set, or when the app is switched off for the company (Mobile Apps console).

Company branding

Changes that need no new build (from the website)

Changes in the code (then build again)

Before sign-in the app can ask GET /api/v1/mobile/config?version=1.0.0 for the maintenance message, whether an update is required and the store links.

Push notifications (Firebase)

The Inbox works without any setup and refreshes every minute. Push messages while the app is closed are optional and need your own Firebase project. This is left out of the first build on purpose: the Android build fails without your own google-services.json.

Server

  1. Create a Firebase project and a service account key (JSON). Save the file on the server outside the web folder.
  2. In the website's .env set FCM_PROJECT_ID and FCM_CREDENTIALS (the full path of the JSON file). The website then sends a push for every inbox message to the phones registered with POST /api/v1/mobile/devices; dead phones are removed automatically.

App

  1. Add the app to your Firebase project (Android) and download google-services.json into android/app/.
  2. Add firebase_core and firebase_messaging to pubspec.yaml, call Firebase.initializeApp() at start, implement the PushService in lib/state/push_service.dart to return the device token, and open the right screen from a tapped message (type and ref_id are in the message data).

When users are notified

EventWho
New visit request / pre-registrationThe host
Visitor arrived ("I'm here")The host
Visitor past the planned exit timeOwner and reception
Leave approved or rejectedThe employee

AI features

The mobile app has no AI screens in this version. AI (assistant, dashboard briefing, category suggestion) is on the website: every owner connects their own AI service under Settings → AI Settings, and the plan decides whether AI is included. The app only reads the on / off flag, so nothing needs to be configured in the app.

Version numbers

In pubspec.yaml: version: 1.0.0+1. The part before + is the version people see; the number after + is the build number, which must go up with every upload to the store.

flutter build appbundle --build-name=1.0.1 --build-number=2

To make old apps update, set a minimum app version under Super Admin → Mobile Apps.

Signing key (keystore)

Every app you publish must be signed with a key only you own. Keep the file and its passwords safe: if you lose it you cannot update the app.

Create the key

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

Tell the build where the key is

Create android/key.properties (it is ignored by git; never share it):

storePassword=your-store-password
keyPassword=your-key-password
keyAlias=upload
storeFile=/full/path/to/upload-keystore.jks

android/app/build.gradle.kts already reads this file. Without it the release build is signed with the debug key, which is fine for testing but cannot be published.

Build the release

flutter build appbundle --release --dart-define=SERVER_URL=https://visitors.example.com
flutter build apk --release --dart-define=SERVER_URL=https://visitors.example.com

The app bundle (build/app/outputs/bundle/release/app-release.aab) is what Google Play wants. The APK is for testing and direct sharing.

Release builds only talk to https:// addresses. Plain http is allowed in debug builds only.

Publish on Google Play

  1. Create the app in the Play Console (name, language, free / paid).
  2. Fill in the App content forms: privacy policy URL, Data safety (see below), target audience, ads (none).
  3. Upload the .aab to Internal testing first, test with a few phones, then promote it to Production.
  4. Add screenshots, a short and a full description and the icon.
  5. Copy the Play Store link into Super Admin → Mobile Apps → Android: it then appears on the website landing page, the owner pages and company websites.

Privacy & data safety

DataWhyWhere it goes
Name, email, phone of staff and visitorsShowing and managing visitsOnly your own website. Not shared with anyone else.
Visitor photo (walk-in)Visitor recordUploaded to your website.
Login tokenStay signed inThe phone's secure storage; deleted on sign-out.
Saved profile and home dataOpening offlineThe phone's secure storage; deleted on sign-out.

The app has no ads and no analytics. Nothing about people or visitors stays on the phone after sign-out. Use this table for the Play Console Data safety answers.

Android permissions used

PermissionWhy
INTERNETTalk to your website.
CAMERAScan visitor passes and company QR codes, take visitor photos (optional feature).
USE_BIOMETRICFingerprint / face lock (optional, off by default).

Code structure

lib/
  main.dart, app.dart, config.dart     start-up, the root (sign-in / lock / app), settings
  api/        api_client (Dio, errors, token), models, repository (every server call), json helpers
  state/      auth_controller (company, sign-in, lock, session), session_store (secure storage),
              lock_service (fingerprint / face), push_service
  util/       theme (company colour), tabs (role-based bottom bar), format, launch (call, maps ...)
  screens/    login (company step + sign-in step), lock, home, visitors, visitor detail, scan,
              walk-in, inside, time, inbox, more, guest pass
  widgets/    shell (bottom bar), chrome (bell, tab switch), common (chips, loader, tiles, buttons)
test/         models, tabs, api client, auth / lock logic, screens and sign-in (fake server), e2e/ (real server)

Which tabs a person gets is decided by tabsFor() in lib/util/tabs.dart, from the capabilities the server sends at sign-in. Every server call lives in lib/api/repository.dart.

Run the tests

flutter analyze
flutter test                       # unit + screen tests, no server needed
E2E_SERVER=https://visitors.example.com flutter test test/e2e   # against a real server (see the file header for the test accounts)

Updating to a new version

  1. Update the website first and run php artisan migrate.
  2. Replace the app source (keep your key.properties, keystore and any Firebase files), run flutter pub get.
  3. Raise the version and build number, build and upload to Google Play.
  4. Set the minimum app version under Super Admin → Mobile Apps if old apps must update.

Troubleshooting

ProblemWhat to do
"No company was found for this code."Check the code on the website (Mobile App page) and the server address on the first screen.
"Cannot reach the server."Check the address starts with https://, the phone has internet and the website is up. Release builds refuse plain http.
"These credentials do not match our records."Wrong email / password, or the account belongs to another company than the one chosen. Use Not your company? Change.
Sign-in says the app is switched off or in maintenanceSuper Admin → Mobile Apps: check the company switch and clear the maintenance message.
"Your session has ended"A token that was not used for 60 days ends by itself, or the account was changed. Sign in again.
Camera does not openAllow the camera permission in the phone's settings. Simulators and emulators have no real camera: type the code.
No push messagesPush is optional and needs your Firebase project (see above). The Inbox works without it.
Gradle or SDK errorsRun flutter doctor -v, update the Android SDK and use JDK 17.

FAQ

Do I need to publish my own app?
One published build serves all your companies. Publish it once under your own developer account; owners and staff only need the company code.

Can a host see other people's visitors?
No. The server returns only their own visitors and checks every call with the website's permissions.

Does it work without internet?
It opens with the last saved data. Actions such as approve or check in need a connection.

Can I switch the app off for one company?
Yes, in Super Admin → Mobile Apps.

Is Firebase required to run the apps?
No. The Inbox works without it; push is optional.

Support & changelog

Create a support ticket at support.smartwebinfotech.com and our team will respond as soon as possible. Please include the app version and what you see on screen.

Changelog

Version 1.0.0 – 22 November 2026
 * First release: one app for owners, managers, reception, hosts and guests
 * Company QR / code step, then email + password sign-in with company logo and colour
 * Home, visitors, scan, walk-in, inside / expected, time and leave, inbox, guest pass
 * Fingerprint / face lock, two-factor sign-in, offline start