DIGIT Docs
  • DIGIT Knowledge Base
  • Local Governance
  • Introducing NalJalSeva
  • ๐ŸšฐNalJal
    • Approach
    • Demo Video
    • Value Proposition
  • ๐ŸŒŠProduct Specifications
    • Features & Functions
    • Workflows
      • Login & Forgot Password
      • View Consumer
      • Update Consumer
      • Water Charges
      • Generate Bulk Demand & Raise Bills
      • Generate Bills For Metered Connections
      • Collect Revenue Offline
      • Add Expense
      • Update Expense
      • Send SMS Notifications
      • Edit User Profile
      • View Household Register
      • View Tabular Dashboard For Expense
      • Download Bills & Receipts
      • View & Download Reports
      • HRMS
        • Login, Reset & Forgot Password
        • Create Employee
        • Update Employee
        • Search Employee
        • Search Department Employee
        • Edit Scheme Rate Master
        • Edit Penalty Master
        • State Dashboard
        • Rollout Dashboard
        • Rate Dashboard
    • User Manual
      • Common Functions
        • Login To App
        • Edit Profile & Change Password
      • Division User
        • View & Edit Consumer
      • Village Water & Sanitation Committee (VWSC) User
        • Generate Bills
        • Search Consumer & Generate Payment
        • Record & Modify Expense Bill
        • View Dashboards
      • State User
  • Reference Implementations
    • Punjab
      • mGramSeva
  • โš’๏ธNalJalSeva Platform
    • Architecture
    • Technology
  • ๐Ÿ’งSetup NalJalSeva
    • Setup NalJalSeva
      • Install AWS
        • Setup AWS Account
        • Purchase Certificate
        • Setup Git Repository
        • Configure Domain Name
        • Create Git Account In The Client Name
      • Enable Application Permissions
      • Get Started With DIGIT
      • Create Users
      • Load Employees For NalJalSeva
      • Load Consumers For NalJalSeva
      • Configure Module Localisation
      • Update Master Rate
      • Create Consumer API
      • Create User API
      • Configure SMS Template
      • Configure Master Data Management System
      • Create New Tenant
      • Create Workflow
    • Configure NalJalSeva
      • Configure Core Services
      • Configure Backend Services
        • Advance Changes
        • Apportion
        • Billing
        • Dashboard
        • eChallan
        • iFIX Adapter
          • Push Events To iFIX Adapter
        • Penalty Changes
        • Property
        • Reindexing
        • Rollout Dashboard
        • Scheduler
        • User
        • User OTP
        • User Events
        • Vendor Registry
        • Water
        • Water Calculator
      • Configure UI Screens
        • UI Design
        • Select Language
        • Login
        • Change Password
        • Edit Profile
        • Home Page
        • Forgot Password
        • Update Password
        • Generate Bill
        • Search Connection
        • Consumer Screens
          • Create Consumer
          • Update Consumer
        • Expense Screens
          • Add Expense
          • Search Expense Bills
          • Modify Expenses
        • Dashboards Screens
          • Monthly Dashboard
          • Collections Dashboard
          • Expenditure Dashboard
        • Collect Payment
        • Consumer Feedback
        • Household Register
        • UI Mockup Screens
      • Update App
    • Integration Details
      • Integrate Firebase Analytics
      • Integrate Bluetooth Thermal Printer
      • Integration Testing
      • Integration Testing With Github Actions
    • Go Live
Powered by GitBook

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page
  • Code Snippet
  • Steps To Setup The Project
  • Running On an Android Emulator
  • Running On Web
  • Build Prod App Bundle - Steps
  • Steps To Run The Integration Test On Android Device

Was this helpful?

Export as PDF
  1. Setup NalJalSeva
  2. Setup NalJalSeva

Enable Application Permissions

PreviousCreate Git Account In The Client NameNextGet Started With DIGIT

Last updated 3 months ago

Was this helpful?

Make sure the below-mentioned permissions are allowed or accepted:

  1. Internet access

  2. FileStore read and write

  3. Bluetooth connection

  4. Request packages

  5. Query all packages

Code Snippet

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>

Steps To Setup The Project

Download the Flutter sdk from

Install for setting the IDE.

Open Android Studio. Open plugin preferences (File > Settings > Plugins) and select Marketplace. Select the Flutter plugin and click Install as shown in the image below. Click Yes when prompted to install the Dart plugin.

Set the Flutter SDK path in Android Studio by navigating to (File > Settings > Plugins > Language & Frameworks >> Flutter) flutter as shown in the image below.

Add the flutter path to the system path variable for running the flutter commands as shown in the image below.

Open a new terminal and run the flutter doctor command. This downloads the respective Dart SDK version and runs flutter doctor--android-licenses to accept the Android licenses.

The steps below guide us to run the project on both Web and Mobile

  1. Open the project in Android Studio by selecting (File > open), and select the flutter project (punjab-mgramseva/frontend/mgramseva) from the cloned path as shown in the image below.

Running On an Android Emulator

Select the AVD manager from the right-side top corner as shown in the image. Now, select any device by tapping on the play button. The Android Studio launches the emulator and the device is auto-selected. There are two modes for running the application - play and debug. Tap on any one of the modes to launch the mGramSeva application in the emulator as shown in the image.

Running On Web

Select the Chrome option from the device selection and tap on the play button. This launches the application on a Chrome window.

Build Prod App Bundle - Steps

  1. Navigate to mgramseva folder โ†’ cd punjab-mgramseva/frontend/mgramseva

  2. +3 => version code (increment by +1 every time)

  3. Execute the flutter clean command โ†’ flutter clean

  4. Execute the flutter pub get command โ†’ flutter pub get

  1. Build the prod app bundle โ†’ flutter build appbundle Check the attached drive link below which includes the key-store, and version tracker. Update the version and release date in the sheet. Path โ†’ D:\mgramseva_prod\punjab-mgramseva\frontend\mgramseva\build\app\outputs\bundle\release\app-release.aab

Steps To Run The Integration Test On Android Device

2. Connect your Phone to the system and enable File transfer.

3. Select the AVD manager(your Phone) from the right side top corner in Android Studio

4. Go to the frontend/mgramseva/utils/execute_integration.sh file and run it.

5. The integration test will start on your device.

Clone the project from the .

Note: To resolve the cors error follow the steps provided in this

key storeGoogleClone the Repo โ†’ git clone

Upgrade the version in the (version: 1.0.2+3) 1.0.2 => version name (which is displayed in the playstore)

Replace the base Url with Prod Url File โ†’ _baseUrl: window.location.origin + "/", => _baseUrl: " "

Comment the below line File โ†’ export 'dart:js' show allowInterop, allowInteropCaptureThis;

Download the key store from the below link Add this properties file to the android app folder as shown in the image below - android โ†’ key.properties

Download the Google service JSON from the link below Add this JSON file to the Android app folder as shown in the image below android โ†’ app โ†’ google-services.json

1. Enable the USB debugging option on your Mobile Phone. ( )

๐Ÿ’ง
Git repo
link.
pubspec.yml
link
https://docs.google.com/spreadsheets/d/1aH596FxtPISIlQzxw9jO_Ex1dttpJJvweib2F9nJj9o/edit#gid=0 - Restricted link, try another account
Reference Link
punjab-mgramseva/pubspec.yaml at develop ยท egovernments/punjab-mgramseva
2.8.1
Flutter SDK releases
Android Studio
GitHub - misdwss/punjab-mgramseva
app.config.dart
mgramseva
https://drive.google.com/file/d/14teTA0nqHaFLEkgg_LCHTcji5cRJDnXR/view?usp=sharing - Restricted link, try another account
google-services.json