Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

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

https://github.com/egovernments/punjab-mgramseva/blob/develop/frontend/mgramseva/pubspec.yaml

Steps to setup the Project

  1. Download the flutter sdk 2.5.2 from https://docs.flutter.dev/development/tools/sdk/releases

  2. Install Android Studio for setting the IDE.

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

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

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

  6. Open a new terminal and run the flutter doctor command, this will download the respective Dart sdk version, run flutter doctor --android-licenses to accept the android licenses.

  7. Below steps will guide us to run the project in both Web and Mobile
    1. Clone the project from Git repo.
    2. Open the project in android studio by selecting (File > open), select the flutter project (punjab-mgramseva/frontend/mgramseva) from cloned path as shown in below.


    Running on Android Emulator
    Select the AVD manager from right side top corner as shown in image, from their select any device by tapping on play button, therefore android studio will the launch the emulator and device will be auto selected, two modes will be there for running the application play and debug, we can tap on any one of the mode, this will launch the mgramseva application in emulator as shown in image.


Running on Web
Select the chrome option from device selection and tap on play button it will the launch the application on a chrome window.

Note : To resolve cors error follow the steps in this link.


Steps to build Prod App Bundle

  1.  Clone the Repo → git clone https://github.com/misdwss/punjab-mgramseva.git

  2. Navigate to mgramseva Folder → cd punjab-mgramseva/frontend/mgramseva

  3. .upgrading the version in the pubspec.yml ( version: 1.0.2+3)
    1.0.2 => version name (which displayed in playstore)

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

  4. Replace the base Url with Prod Url.
    File → app.config.dart
    _baseUrl: window.location.origin + "/", =>    _baseUrl:  "https://mgramseva-dwss.punjab.gov.in/ "

  5. Comment the below line
    File → link
    export 'dart:js' show allowInterop, allowInteropCaptureThis;

  6. Executing flutter clean command →    flutter clean

  7. Execute the flutter pub get command. →  flutter pub get

  8. Download the key-store from the below link 
    https://drive.google.com/file/d/14teTA0nqHaFLEkgg_LCHTcji5cRJDnXR/view?usp=sharing
    Add this properties file to the android app folder as shown in below image
    android → key.properties

  9. Download the google service json from below link
    https://drive.google.com/file/d/1USBY0a2sluHh2VwWxVcKhR7nzjkYnAmW/view?usp=sharing
    Add this json file to the android app folder as shown in below image
    android → app → google-services.json

  10. Build the prod app bundle → flutter build appbundle
    Kindly check the attached drive link below which includes key-store, version tracker and also updated the version and release date in sheet.
    Path → D:\mgramseva_prod\punjab-mgramseva\frontend\mgramseva\build\app\outputs\bundle\release\app-release.aab
    https://docs.google.com/spreadsheets/d/1aH596FxtPISIlQzxw9jO_Ex1dttpJJvweib2F9nJj9o/edit#gid=0

prod_appbundle.mp4




Steps to Run the Integration Test in your Android Device :
1. Enable USB debugging option in your Mobile Phone. ( Reference Link )

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

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

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

5. Integration test will start on your device.

  • No labels