Skip to content
Stand with Ukraine flag

Getting Started with ThingsBoard Mobile Application

Welcome! This guide walks you through creating and configuring your own ThingsBoard PE mobile application from scratch for your ThingsBoard PE instance.

Before you begin, choose the mobile app version that matches your ThingsBoard platform using the compatibility matrix. Using incompatible versions is the most common cause of sign-in issues or unexpected behavior.

Step 1. Create a bundle in the Mobile center

Section titled “Step 1. Create a bundle in the Mobile center”

The Mobile center is your control hub to create, configure, and manage mobile apps. It lets you quickly launch a mobile app tailored to your ThingsBoard PE platform.

A bundle contains both your Android and/or iOS app configurations — including OAuth 2.0 settings, layout preferences, and self registration options — all in one place for easier setup.

  1. Go to the Mobile center page.
  2. On the Bundle tab, click + Add bundle in the top-right corner.
  1. Enter a bundle title.
  2. Click Create new next to your target mobile platform (Android or iOS). This opens the Add application dialog:
    • Enter the application package name.
    • An Application Secret is generated automatically (you can also set your own).
    • Set the Published application status — application is ready for release.
    • (Optional) Specify minimum and latest app versions along with release notes.
    • Add store information:
      • Android: Google Play Store link and SHA256 certificate fingerprints.
      • iOS: App Store link and App ID.
    • Click Add to save and continue.
  3. Click Next.
  • OAuth 2.0 providers — Configure external OAuth for the ThingsBoard PE mobile app if required. Click Next when done.
  • Configure layout — Customize the navigation menu for quick access to features and dashboards. Add menu items, set icons/labels, and reorder entries.
  • Self registration — Customize the self registration page for your new customers.

After adding the bundle, a step-by-step dialog appears to guide you through the remaining setup and deployment steps. Follow it carefully to complete ThingsBoard PE mobile application configuration.

When building or running the app, include the Dart define flag:

Terminal window
flutter run --dart-define-from-file configs.json

You can maintain multiple configuration files by using different names and passing the appropriate filename to --dart-define-from-file.

Depending on your mobile platform (Android or iOS), you should see a result similar to the following:

Step 2. [Optional] Configure push notifications

Section titled “Step 2. [Optional] Configure push notifications”

ThingsBoard uses Firebase to send notifications from your ThingsBoard instance directly to the mobile application. This setup requires each platform tenant to configure Firebase specifically for their account to begin distributing notifications to their mobile app.

  1. Sign in to your Firebase account and click Create a project.
  2. Enter your desired project name and click Continue.
  3. Decide on Google Analytics for your project (you can keep it enabled or disable it). Click Continue.
  4. Confirm project creation by clicking Create project.
  5. Once ready, click Continue to open the Firebase project control panel.
  6. In the left menu, go to Project OverviewProject settings.
  7. In Project settings, switch to the Cloud Messaging tab. Ensure the Firebase Cloud Messaging API is enabled.
  8. Go to the Service accounts tab. Under Admin SDK configuration snippet, select the Java section. Click Generate new private key. Keep this key safe — you’ll need it for ThingsBoard server-side operations.
  9. Confirm by clicking Generate key.
  10. Sign in to your ThingsBoard PE instance and open Settings. Navigate to the Notifications tab and uncheck Use system mobile settings (if logged in as a tenant) in the Mobile settings section. Upload the private key file and click Save.

Step 2.2: Add Firebase to your mobile application

Section titled “Step 2.2: Add Firebase to your mobile application”

To integrate Firebase into the mobile application, complete the initial two steps outlined in the Add Firebase to your Flutter app guide.

Upload an APNs authentication key to Firebase.

  1. Create an APNs authentication key in the Apple Developer Member Center using Apple’s official documentation.
  2. Inside your Firebase project, go to the Cloud Messaging tab of Project Settings. Scroll down to the Apple app configuration section.
  3. In APNs authentication key, click Upload.
  4. Add the key and enter the Key ID and Team ID in the corresponding fields.
  5. Click Upload.

After completing these steps, make sure your project contains the following files:

  • iOS: ios/Runner/GoogleService-Info.plist
  • Android: android/app/google-services.json

To confirm Firebase has been integrated properly, run your application:

Terminal window
flutter run --dart-define-from-file configs.json

If everything is configured correctly, the notifications menu in your mobile application should be active:

Learn more about notifications and how to configure them in the Notifications guide.

Step 3. [Optional] Build and release mobile application

Section titled “Step 3. [Optional] Build and release mobile application”

If you need to build and release the ThingsBoard PE mobile application for iOS or Android, refer to the Build and release guide.

ThingsBoard mobile app supports specific Flutter versions. A newer Flutter version may not yet be compatible with the current release.

How to check the required Flutter version:

  1. Check the release notes on GitHub: flutter_thingsboard_pe_app releases.
  1. Check the .fvmrc file in the project root:
{
"flutter": "3.24.4"
}

Installing the correct Flutter version:

Option 1 (Recommended): Use FVM — Flutter Version Manager

FVM lets you manage multiple Flutter versions across projects and switch between them per project. Install it following the official guide, then prefix Flutter commands with fvm:

Terminal window
fvm flutter run --dart-define-from-file configs.json
fvm flutter build apk --dart-define-from-file configs.json

Option 2: Manually set the global Flutter version (not recommended if you work on multiple projects)

Terminal window
cd ~/dev/flutter
git checkout 3.24.4

Warning “Push notifications are not configured”

Section titled “Warning “Push notifications are not configured””

This usually means Firebase wasn’t set up correctly.

  1. Delete the file: lib/firebase_options.dart
  2. Re-run the FlutterFire CLI:
    Terminal window
    flutterfire configure
  3. Ensure firebase_options.dart is regenerated and contains configuration for Android, iOS, or both.

The mobile app opens the dashboard in a WebView — the ThingsBoard platform handles all actual loading. For the dashboard to work, the app and platform must be able to communicate.

Check the log for this message:

Terminal window
Invoked tbMobileReadyHandler

Include credentials to your instance privately via ThingsBoard Support — never post them publicly.

Check the compatibility matrix between your platform and mobile app versions. Mismatches are the most common cause of sign-in issues.

If versions are aligned and you’re still stuck, open an issue in the flutter_thingsboard_pe_app repository and include:

  • Platform version
  • Mobile app version
  • Logs and screenshots
  • Device details (OS, version)

Open an issue in the flutter_thingsboard_pe_app repository with as much context as possible: screenshots, logs, versions, and platform setup.