Migrated flutter_sound to the newest version available to allow for Android recording.
Made the minimum Android version to be 24 and iOS version to be 9.3 since it's required for the new flutter_sound.
Fixed the problem where Mac users needed to redirect their GoogleService-Info.plist.
[Josh] Added dispose() to any file that has an initState().
Modified websocket.dart to open the file first then convert it to ByteData, rather than previously where it converted to ByteData from the get-go. Doing this will prevent the unable to load asset bug.
Note: I accidentally created this branch from OT-AccountCreation rather than the master so you may see AccountCreation.dart. That file needs to be updated since OT-AccountCreation is in review with updates! I did not work on this file.
How to Setup:
Because I have migrated flutter_sound to the newest version, these following steps are important!!
Run flutter clean.
Run flutter pub upgrade.
Run flutter pub get.
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:
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.
You will need Zookeeper/Kafka, updated Spring-boot, and python consumer and producer running.
Log into the front end app and record an audio session.
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.
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.
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.
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 .
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.
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.
If data is successfully produced and consumed, this branch is working properly.
What I Did:
Migrated flutter_sound to the newest version available to allow for Android recording.
Made the minimum Android version to be 24 and iOS version to be 9.3 since it's required for the new flutter_sound.
Fixed the problem where Mac users needed to redirect their GoogleService-Info.plist.
[Josh] Added dispose() to any file that has an initState().
Modified websocket.dart to open the file first then convert it to ByteData, rather than previously where it converted to ByteData from the get-go. Doing this will prevent the
unable to load asset
bug.Note: I accidentally created this branch from OT-AccountCreation rather than the master so you may see AccountCreation.dart. That file needs to be updated since OT-AccountCreation is in review with updates! I did not work on this file.
How to Setup:
Run
flutter clean
.Run
flutter pub upgrade
.Run
flutter pub get
.Run
flutter run
as usual now!How to Test:
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.
You will need Zookeeper/Kafka, updated Spring-boot, and python consumer and producer running.
Log into the front end app and record an audio session.
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.
To navigate to the path:
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 .
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.
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.
If data is successfully produced and consumed, this branch is working properly.