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.
What is in the package
| App | Folder | App id | Users |
|---|---|---|---|
| Smart Visitor | android_app/ | com.smartvisitor.smart_visitor | Everybody who signs in on the website (except the super admin), plus guests with a pass code |
Inside the folder:
| Item | What 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.yaml | The app's name, version and packages. |
Features
Owner, manager, reception
- Home – inside now, pending approval, today and overstay; lists with one-tap Approve, Reject, Check in, Check out.
- Visitors – search, status filters and paging; visitor details with Call, WhatsApp and Email buttons, the QR pass, history, previous visits and internal notes.
- Scan – camera QR scan or a typed ID / code / link, a clear warning for blacklisted people, check in and out.
- Walk-in – register a visitor with a photo and check them in at once.
- Inside / expected – roll call lists of who is inside and who is expected.
- Time & leave – clock in / out with a running timer, hours this week, leave requests, and (for approvers) approve or reject the team's leave.
- Inbox – new visit requests, visitor arrived, overstay and leave decisions, with an unread badge.
Host / staff
- See and approve their own visitors, get notified when a visitor arrives, clock in / out and request leave.
Guest (no account)
- Open the pass from a link or code: QR pass, status, host, directions, call reception, and "I'm here" which tells the host.
Common to all
- Sign-in in two steps: company QR / code, then email and password; two-factor code when the account has one.
- Fingerprint / face lock after the app was away for 30 seconds (switch it on in More).
- Company name, logo and colour, set by the owner on the website (Mobile App page).
- Opens offline with the last saved data.
Not in this version: offline queue for actions, AI assistant, reports, blacklist screens, ID scan (OCR), badge printing and kiosk mode.
Requirements
| Item | What you need |
|---|---|
| System | Windows 10/11, macOS or Linux |
| Flutter SDK | Stable channel, Dart 3.13 or newer (sdk: ^3.13.5 in pubspec.yaml) |
| Android Studio | With the Android SDK, platform tools and a recent JDK (17) |
| Free disk space | About 10 GB |
| Phones that can run the app | Android 7.0 (API 24) or newer. |
| Accounts | Google Play Console developer account (one-time fee) to publish. Firebase project (free) if you want push notifications. |
| Website | Smart Visitor SaaS v2.0 or newer on HTTPS, with the migrations run (php artisan migrate). |
Install Flutter & Android Studio
- Install Flutter from docs.flutter.dev/get-started/install and add it to your PATH.
- Install Android Studio and, in SDK Manager, the latest Android SDK, platform tools and command-line tools.
- Accept the licences and check everything:
Every line for Flutter and Android should have a green tick.flutter doctor --android-licenses flutter doctor
Prepare the website
- Install or update Smart Visitor SaaS v2.0 or newer on an HTTPS address.
- Run the database update once:
It adds the tablesphp artisan migratemobile_devicesandapp_notifications. - 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.
- Sign in as an Owner and open Mobile App: you see the company QR code, the company code and the branding form.
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:
android/app/build.gradle.kts:namespaceandapplicationId- the folder
android/app/src/main/kotlin/…if you rename the package
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
- Switch on Developer options and USB debugging, connect the phone and accept the prompt.
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:
- 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.
- 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. - 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 in | Details |
|---|---|
| Owner, manager, reception, security, host, staff | Every account of the company that is active and has a verified email. |
| Super admin | Cannot sign in on the phone; uses the website. |
| Guest | No 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)
- Owner → Mobile App → App branding: name shown in the app, colour, welcome text, support phone and email. The logo comes from Settings.
- Super Admin → Mobile Apps: store links, minimum app version, maintenance message, default colour and welcome text, and an on / off switch for each company (people of a switched-off company are signed out).
Changes in the code (then build again)
- App name and icon:
AndroidManifest.xml/Info.plistand the launcher icons inandroid/app/src/main/res/mipmap-*. - Default colours and widgets:
lib/util/theme.dart. - Pre-filled server address:
lib/config.dartor--dart-define=SERVER_URL=....
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
- Create a Firebase project and a service account key (JSON). Save the file on the server outside the web folder.
- In the website's
.envsetFCM_PROJECT_IDandFCM_CREDENTIALS(the full path of the JSON file). The website then sends a push for every inbox message to the phones registered withPOST /api/v1/mobile/devices; dead phones are removed automatically.
App
- Add the app to your Firebase project (Android) and download
google-services.jsonintoandroid/app/. - Add
firebase_coreandfirebase_messagingtopubspec.yaml, callFirebase.initializeApp()at start, implement thePushServiceinlib/state/push_service.dartto return the device token, and open the right screen from a tapped message (typeandref_idare in the message data).
When users are notified
| Event | Who |
|---|---|
| New visit request / pre-registration | The host |
| Visitor arrived ("I'm here") | The host |
| Visitor past the planned exit time | Owner and reception |
| Leave approved or rejected | The 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.
Publish on Google Play
- Create the app in the Play Console (name, language, free / paid).
- Fill in the App content forms: privacy policy URL, Data safety (see below), target audience, ads (none).
- Upload the
.aabto Internal testing first, test with a few phones, then promote it to Production. - Add screenshots, a short and a full description and the icon.
- 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
| Data | Why | Where it goes |
|---|---|---|
| Name, email, phone of staff and visitors | Showing and managing visits | Only your own website. Not shared with anyone else. |
| Visitor photo (walk-in) | Visitor record | Uploaded to your website. |
| Login token | Stay signed in | The phone's secure storage; deleted on sign-out. |
| Saved profile and home data | Opening offline | The 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
| Permission | Why |
|---|---|
INTERNET | Talk to your website. |
CAMERA | Scan visitor passes and company QR codes, take visitor photos (optional feature). |
USE_BIOMETRIC | Fingerprint / 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
- Update the website first and run
php artisan migrate. - Replace the app source (keep your
key.properties, keystore and any Firebase files), runflutter pub get. - Raise the version and build number, build and upload to Google Play.
- Set the minimum app version under Super Admin → Mobile Apps if old apps must update.
Troubleshooting
| Problem | What 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 maintenance | Super 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 open | Allow the camera permission in the phone's settings. Simulators and emulators have no real camera: type the code. |
| No push messages | Push is optional and needs your Firebase project (see above). The Inbox works without it. |
| Gradle or SDK errors | Run 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