Flutter ThingsBoard PE Mobile Application

Overview

Flutter ThingsBoard PE Mobile Application

Getting Started

This project is a starting point for a ThingsBoard PE Mobile application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Comments
  • No login after thingsboard cloud 3.4 update.

    No login after thingsboard cloud 3.4 update.

    It was available normally before the update, but suddenly it doesn't work normally after the update. Help me.

    Symptom: Enter ID, password and press login button -> return to login screen

    2022-08-17 145852

    DEBUG :

    Exception Occurrences

    tb_context.dart - onUserLoaded Method userPermissions = await tbClient.getUserPermissionsService().getAllowedPermissions();


    An exception occurs when you enter the getAllowedPermissions method and run the next part.

    security_models.dart - MergedUserPermissions Class

    readEntityPermissions = (json['readEntityPermissions'] as Map).map(
                (key, value) => MapEntry(resourceFromString(key),
                    MergedGroupTypePermissionInfo.fromJson(value))),
    

    exception caught in catch statement of onUserLoaded method of TbContext class in tb_context.dart

    e: Bad state: No Element

    #0      ListMixin.firstWhere (dart:collection/list.dart:167:5)
    #1      resourceFromString (package:thingsboard_pe_client/src/model/security_models.dart:95:26)
    #2      new MergedUserPermissions.fromJson.<anonymous closure> (package:thingsboard_pe_client/src/model/security_models.dart:192:38)
    #3      MapMixin.map (dart:collection/maps.dart:170:28)
    #4      new MergedUserPermissions.fromJson (package:thingsboard_pe_client/src/model/security_models.dart:191:72)
    #5      new AllowedPermissionsInfo.fromJson (package:thingsboard_pe_client/src/model/security_models.dart:239:35)
    #6      UserPermissionsService.getAllowedPermissions (package:thingsboard_pe_client/src/service/user_permissions_service.dart:20:35)
    <asynchronous suspension>
    #7      TbContext.onUserLoaded (package:nesics_by_tb/core/context/tb_context.dart:303:31)
    <asynchronous suspension>
    

    The console log has no specific content:

    I/flutter ( 7401):   DEBUG ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    I/flutter ( 7401):   DEBUG │ 🐛 onUserLoaded: isAuthenticated=true
    I/flutter ( 7401):   DEBUG └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    I/flutter ( 7401):   DEBUG ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    I/flutter ( 7401):   DEBUG │ 🐛 authUser: AuthUser{sub: ###@###.com, scopes: [CUSTOMER_USER], userId: ###, firstName: #, lastName: #, enabled: true, tenantId: #, customerId: #, isPublic: false, authority: CUSTOMER_USER, additionalData: {iss: thingsboard.cloud, iat: 1660714849, exp: 1660743649, isBillingService: false, privacyPolicyAccepted: true, termsOfUseAccepted: true}
    I/flutter ( 7401):   DEBUG └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    I/flutter ( 7401):   DEBUG ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    I/flutter ( 7401):   DEBUG │ 🐛 On load started.
    I/flutter ( 7401):   DEBUG └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    I/flutter ( 7401):   DEBUG ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    I/flutter ( 7401):   DEBUG │ 🐛 onUserLoaded: isAuthenticated=false
    I/flutter ( 7401):   DEBUG └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
    
    
    opened by sarguments 3
  • Added android:exported

    Added android:exported

    It is necessary to install the apk on Android 12

    https://cafonsomota.medium.com/android-12-dont-forget-to-set-android-exported-on-your-activities-services-and-receivers-3bee33f37beb

    opened by Backdraft007 0
  • Session expired!  on Login Page

    Session expired! on Login Page

    I got a following messages.

    E/FrameEvents(15376): updateAcquireFence: Did not find frame. D/EGL_emulation(15376): app_time_stats: avg=162.49ms min=100.26ms max=394.59ms count=7 D/EGL_emulation(15376): app_time_stats: avg=161.49ms min=86.15ms max=409.14ms count=7 I/flutter (15376): ERROR ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── I/flutter (15376): ERROR │ ThingsboardError: message: [Session expired!], errorCode: 11, status: null I/flutter (15376): ERROR │ #0 toThingsboardError package:thingsboard_pe_client/…/error/_thingsboard_error_handler_io.dart:89 I/flutter (15376): ERROR │ #1 HttpInterceptor._handleError package:thingsboard_pe_client/…/interceptor/http_interceptor.dart:201 I/flutter (15376): ERROR │ #2 HttpInterceptor._refreshTokenAndRetry package:thingsboard_pe_client/…/interceptor/http_interceptor.dart:142 I/flutter (15376): ERROR │ I/flutter (15376): ERROR │ I/flutter (15376): ERROR ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter (15376): ERROR │ #0 ThingsboardClient.get package:thingsboard_pe_client/src/thingsboard_client_base.dart:250 I/flutter (15376): ERROR │ #1 I/flutter (15376): ERROR │ #2 WhiteLabelingService.getWhiteLabelParams package:thingsboard_pe_client/…/service/white_labeling_service.dart:28 I/flutter (15376): ERROR │ #3 I/flutter (15376): ERROR │ #4 WlService._loadUserWhiteLabelingParams package:thingsboard_app/…/services/wl_service.dart:252 I/flutter (15376): ERROR │ #5 I/flutter (15376): ERROR │ #6 WlService.updateWhiteLabeling package:thingsboard_app/…/services/wl_service.dart:169 I/flutter (15376): ERROR │ #7 I/flutter (15376): ERROR ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter (15376): ERROR │ ⛔ Error: ThingsboardError: message: [Session expired!], errorCode: 11, status: null I/flutter (15376): ERROR │ ⛔ #0 toThingsboardError package:thingsboard_pe_client/…/error/_thingsboard_error_handler_io.dart:89 I/flutter (15376): ERROR │ ⛔ #1 HttpInterceptor._handleError package:thingsboard_pe_client/…/interceptor/http_interceptor.dart:201 I/flutter (15376): ERROR │ ⛔ #2 HttpInterceptor._refreshTokenAndRetry package:thingsboard_pe_client/…/interceptor/http_interceptor.dart:142 I/flutter (15376): ERROR │ ⛔ I/flutter (15376): ERROR │ ⛔ I/flutter (15376): ERROR └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

    opened by ockum12 3
  • Unable to login and view dashboard

    Unable to login and view dashboard

    Hey guys,

    I've followed all the steps from the setup tutorial (https://thingsboard.io/docs/pe/mobile/getting-started/) accurately. If I set the endpoint to the ThingsBoard cloud (https://thingsboard.cloud/) then the app works perfectly, but if I set the endpoint to my ThingsBoard PE server instance, then I can't login to the app. On the server, under audit logs, it does indicate a successful login however nothing changes on the app. Has anyone experienced this problem or could they advise on a solution? Thanks

    opened by MM-06 4
  • unauthorised and session expired

    unauthorised and session expired

    I am getting below error saying unauthorized for the first time and later session expired. I am providing right credentials.

    I/flutter ( 4917): ERROR ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── I/flutter ( 4917): ERROR │ ThingsboardError: message: [Unauthorized!], errorCode: null, status: null I/flutter ( 4917): ERROR │ #0 toThingsboardError (package:thingsboard_pe_client/src/error/_thingsboard_error_handler_io.dart:89:18) I/flutter ( 4917): ERROR │ #1 HttpInterceptor.onError (package:thingsboard_pe_client/src/interceptor/http_interceptor.dart:104:19) I/flutter ( 4917): ERROR │ #2 DioMixin.fetch._errorInterceptorWrapper... (package:dio/src/dio_mixin.dart:574:28) I/flutter ( 4917): ERROR │ #3 DioMixin.checkIfNeedEnqueue (package:dio/src/dio_mixin.dart:789:22) I/flutter ( 4917): ERROR │ #4 DioMixin.fetch._errorInterceptorWrapper.. (package:dio/src/dio_mixin.dart:572:22) I/flutter ( 4917): ERROR │ #5 new Future. (dart:async/future.dart:253:37) I/flutter ( 4917): ERROR │ #6 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15) I/flutter ( 4917): ERROR │ #7 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19) I/flutter ( 4917): ERROR │ #8 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5) I/flutter ( 4917): ERROR │ #9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12) I/flutter ( 4917): ERROR │ I/flutter ( 4917): ERROR

    opened by BluRanger 8
  • Unable to connect 'thingsboard.cloud'

    Unable to connect 'thingsboard.cloud'

    I got a ERROR messge.
    I/flutter (12221): ERROR ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter (12221): ERROR │ ⛔ Error: ThingsboardError: message: [Unable to connect], errorCode: 2, status: null I/flutter (12221): ERROR │ ⛔ #0 toThingsboardError (package:thingsboard_pe_client/src/error/_thingsboard_error_handler_io.dart:89:18) I/flutter (12221): ERROR │ ⛔ #1 HttpInterceptor.onError (package:thingsboard_pe_client/src/interceptor/http_interceptor.dart:104:19) I/flutter (12221): ERROR │ ⛔ #2 DioMixin.fetch._errorInterceptorWrapper... (package:dio/src/dio_mixin.dart:574:28) I/flutter (12221): ERROR │ ⛔ #3 DioMixin.checkIfNeedEnqueue (package:dio/src/dio_mixin.dart:789:22) I/flutter (12221): ERROR │ ⛔ #4 DioMixin.fetch._errorInterceptorWrapper.. (package:dio/src/dio_mixin.dart:572:22) I/flutter (12221): ERROR │ ⛔ #5 new Future. (dart:async/future.dart:253:37) I/flutter (12221): ERROR │ ⛔ #6 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15) I/flutter (12221): ERROR │ ⛔ #7 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19) I/flutter (12221): ERROR │ ⛔ #8 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5) I/flutter (12221): ERROR │ ⛔ #9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12) I/flutter (12221): ERROR │ ⛔ I/flutter (12221): ERROR └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── My app_constants.dart is abstract class ThingsboardAppConstants { static final thingsBoardApiEndpoint = 'https://thingsboard.cloud';

    static final thingsboardOAuth2CallbackUrlScheme ='org.thingsboard.pe.app.auth';

    /// Not for production (only for debugging) static final thingsboardOAuth2AppSecret = '';

    /// Not for production (only for debugging) static final thingsboardSignUpAppSecret = ''; }

    Do I need more setup on 'thingsboard.cloud'?

    opened by ockum12 1
  • Self Registration flow

    Self Registration flow

    When self registering from the mobile PE app the user is created but the activation email won't work but when self registering from the web it succeeds. I narrowed it down that when I get the activate email after signing up on the mobile app it sends the below API link to activate. When I register via the web it sends same API but does not include the optional pkgName parameter. I also tested this in Swagger and it does appear that the API call fails when I include the pkgName. Wondering if anyone else has experienced this and found a work around? I submitted a ticket with Thingsboard as well as I assume this API might have an issue accepting the pkgName unless I'm missing something else.

    [:443/api/noauth/activateEmail?emailCode=qu3TkHiFpvnoErc6WO01U50BVGcVaM&pkgName=santafe.telkonet.app']

    opened by jsobieski 0
Owner
ThingsBoard - Open-source IoT Platform
IoT device management, data collection, processing and visualization for your IoT projects.
ThingsBoard - Open-source IoT Platform
🚀 This is mobile application using Flutter for develop Tiktok

Flutter Tiktok Clone Description: ?? This is mobile application using Flutter for develop Tiktok How I can run it? ?? Clone this repo ?? Run below cod

Dao Hong Vinh 12 Feb 8, 2022
This is mobile application fortune telling using Flutter for development.

Flutter Tarot Card Description: This is mobile application fortune telling using Flutter for development. How I can run it? ?? Clone this repository ?

Dao Hong Vinh 17 Sep 25, 2022
This is project using flutter and firebase for develop a mobile application about online school

This is project using flutter and firebase for develop a mobile application about online school

Hackathon 4 May 17, 2021
🏃Lossy is a mobile application built using flutter framework and firebase for android.

Lossy The Weight and Fitness Tracker App. Lossy is a mobile application built using flutter framework and firebase for android. Track your daily weigh

LakhanKumawat ᵖ⁺ 8 Nov 26, 2022
A new Flutter application. Done for mobile computing lab practical

Notes-app-using-flutter A new Flutter application. Done for mobile computing lab

Trevor Aaron Robert Dcosta 1 Feb 7, 2022
Movies Mobile Application to demonstrate Network calls in Flutter using with Chopper library

Movies Mobile Application to demonstrate Network calls in Flutter using with Chopper library. For API TMDB API console is used.

Varun Verma 1 Nov 7, 2022
ChitChat - a mobile application built using flutter framework and firebase for android

This is a flutter app made using dart programming language . It uses firebase api to store and fetch data . It also uses native devices features such as library and camera . You can signup or login through your mail and can chat easily with your colleagues .

LakhanKumawat ᵖ⁺ 5 Nov 6, 2022
A Mobile Application for NITT students to digitally unlock/lock shared-cycles in stands.

CycleLock App A Mobile Application for NITT students to digitally unlock/lock shared-cycles in stands. Requirements Java-Version - '12.x' Flutter-Vers

Delta Force 6 Nov 6, 2022
A mobile travel app is a software application that has been developed specifically for use on smaller devices

A mobile travel app is a software application that has been developed specifically for use on smaller devices, such as smartphones and tablets, and can be used by business travellers to book and manage their travel whilst on the move

Behruz Hurramov 4 Apr 27, 2022
Clock app - A mobile application where to set alarm, timer and stopwatch

Clock App Mobile application to check the time, set alarm, timer and stop watch

navee-ramesh 14 Dec 31, 2022
A simple pokedex mobile application

A simple pokedex mobile application. That contains provider for state management, custom routing, find dominat color with palette generator, send request to api and get response from api.

GorkemTok33 1 Feb 22, 2022
Drishti is a simple mobile application created as a project for YIP KDISC and Google Devs Solution Challenge

Drishti is a simple mobile application created as a project for YIP KDISC and Google Devs Solution Challenge. This app aims to make reporting and spreading the news of accidents and dangers easier and effective.

Friendly Neighbourhood Tekys 1 Nov 29, 2022
ReverseHand is a mobile application that was created with the vision of helping to reduce any power imbalances that consumers may face when seeking trade services.

ReverseHand is a mobile application that was created with the vision of helping to reduce any power imbalances that consumers may face when seeking trade services. To achieve this, the mobile application allows consumers to make their needs for services known in the form of job listings, where tradesmen are able to place bids in order to be chosen and hired.

COS 301 - 2022 7 Nov 2, 2022
Travel-Application-Ui-design - A Simple Travel Application Ui design For Flutter

Flutter Simple Travel Application UI Design A part of #flutter100daysofcode. Let

Lutfur Rahman 0 Jan 28, 2022
gceditor - a client/server application for creating a persistent data of an application

gceditor - a client/server application for creating a persistent data of an application

Sergey Tarasenko 8 Dec 17, 2022
A flutter plugin for integrating Mobile Money Payments to your flutter apps

Add Mobile Money payments to your flutter apps using the FlutterWave api gateway. Features Recieve Payments through Mobile Money in Uganda Supports MT

null 5 Nov 9, 2022
A tourism mobile app using flutter

Palghar Tourism project_description Explore the docs » View Demo · Report Bug · Request Feature Table of Contents About The Project Built With Getting

Sahil Kargutkar 8 Dec 9, 2022
This is the semester 6 Mobile App Development Course project. So maybe the final project may not make sense ;) but it is a good place to start learning Flutter.

?? Overview MAD-Sem6 is a Mobile Development Course Project that contains Basic ➡️ Medium implementation of different widgets. As a whole it doesn't m

Muhammad Tayyab Asghar 3 Aug 9, 2021
Flutter quiz mobile app

game A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Mobile & Backend developer 3 May 18, 2021