Off-Top-App / off-top-flutter

Repository for our mobile client application.
0 stars 2 forks source link

OT:ConfigureRecordingForAndroid | Set up a way for the front end to record and send data to the python consumer #40

Closed tonynguyen98 closed 4 years ago

tonynguyen98 commented 4 years ago

What I Did:

How to Setup:

  1. Run flutter clean.

  2. Run flutter pub upgrade.

  3. Run flutter pub get.

  4. Run flutter run as usual now!

Mac users may get a pod error with flutter run after following these steps. To fix this, you will need to locate the Pods folder located in off-top-flutter/ios/Pods and delete it. After deleting it, you will need to cd into off-top-flutter/ios and run pod install.

How to Test:

  1. Prerequisites: You need to test this branch alongside Off Top Java: OT-RemoveClosedSessions pull-request! This problem was mainly for Android devices but test on iOS as well to make sure functionality wasn't broken.

  2. You will need Zookeeper/Kafka, updated Spring-boot, and python consumer and producer running.

  3. Log into the front end app and record an audio session.

  4. There should be a system print in the terminal pointing to the path were the file is saved. Attempt to navigate to this path to see if the audio file is there.

    IMPORTANT: Make sure in the terminal there isn't an error for something along the lines of unable to load asset. This has been a bug that has been I've tried to resolve.

  5. To navigate to the path:

    • Android: you need to open Android Studio to access the phone's internal file system. You need to open View -> Tool Windows -> Device File Explorer. The full path is /data/{path from system print}. Right click the file and Save As to your desktop. Then test the audio file to see if it recorded. image
  • iOS: you should be able to just simply cd to the path (exclude the file, ie: 2020-June....) printed in the system terminal. Once you get to the folder, you can run open . to open the folder in Finder.
  1. Watch for the data getting passed from the front end after stopping the recording from both the producer and consumer in python. Make sure that the meter will still move in the front end using the mock data during recording .

  2. Switch between the pages on the front end (ie: switch to the Settings Tab and then back to Recording Tab) and watch for the closing and opening of connection. After the connection is opened again test step 3. again. Make sure you are able to send and receive data again and the server doesn't break.

  3. Perform a hot restart in the front end. Then test step 3 again. Make sure you are able to send and receive data again and the server doesn't break.

  4. If data is successfully produced and consumed, this branch is working properly.