You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download from [here](https://docs.flutter.dev/install)
166
-
### Flutter development setup (VS Code)
158
+
Follow the official Flutter install guide for Linux: https://docs.flutter.dev/get-started/install/linux
167
159
168
-
The instructions below explain how to install the Flutter SDK, set up Visual Studio Code with the Flutter and Dart extensions, and run the project using `flutter run`. These steps avoid Android Studio-specific instructions and focus on a minimal, cross-platform Flutter workflow.
169
-
170
-
Prerequisites
171
-
- A supported operating system (Windows, macOS, or Linux).
172
-
- A working internet connection to download the Flutter SDK and extensions.
173
-
174
-
1) Install the Flutter SDK
175
-
- Download the Flutter SDK from https://flutter.dev and follow the platform-specific instructions. On Windows, extract the SDK (for example to `C:\src\flutter`) and add the `bin` folder to your PATH environment variable. On macOS/Linux, follow the steps on the Flutter website for adding `flutter` to your PATH.
176
-
- After installation, open a terminal (PowerShell on Windows) and run:
177
-
178
-
```powershell
179
-
flutter --version
180
-
flutter doctor
181
-
```
182
-
183
-
Resolve any missing components suggested by `flutter doctor`. If you plan to build desktop apps, follow the platform-specific toolchain steps suggested by `flutter doctor` (e.g., install Visual Studio on Windows for Windows desktop builds).
184
-
185
-
2) Set up Visual Studio Code
186
-
- Install VS Code (if you don't have it) and open the project folder in VS Code.
187
-
- Install the following extensions from the Extensions view:
188
-
- Flutter (includes the Dart extension)
189
-
- Dart (if the Flutter extension did not install it automatically)
190
-
- (Optional) If VS Code cannot find the Flutter SDK, set the `dart.flutterSdkPath` setting to the SDK location in your VS Code settings.
191
-
192
-
3) Prepare the project and run
193
-
- In the project root, fetch packages and generate any code:
194
-
195
-
```powershell
196
-
flutter pub get
197
-
flutter pub run build_runner build --delete-conflicting-outputs # if the project uses code generation
198
-
```
199
-
200
-
- Run the app on the default device (emulator, connected device, or desktop target):
201
-
202
-
```powershell
203
-
flutter run
204
-
```
205
-
206
-
If you want to run on a specific device, list available devices and pass `-d`:
207
-
208
-
```powershell
209
-
flutter devices
210
-
flutter run -d windows # example: run on Windows desktop
211
-
```
212
-
213
-
Notes and troubleshooting
214
-
- If you see issues related to missing SDKs or tools, run `flutter doctor` and follow the recommended fixes.
215
-
- Building Android APKs or running on Android devices may require Android SDK tools. If you need Android targets later, install the Android SDK separately; Android Studio is not required for Flutter development but can simplify SDK installation.
216
-
- For fast iteration in VS Code, use the Debug panel (press F5) or the Flutter toolbar (Run and Debug).
160
+
#### Windows
217
161
218
-
---
162
+
Follow the official Flutter install guide for Windows: https://docs.flutter.dev/install/windows
219
163
220
164
### Flutter development setup (VS Code)
221
165
@@ -269,7 +213,6 @@ Notes and troubleshooting
269
213
- Building Android APKs or running on Android devices may require Android SDK tools. If you need Android targets later, install the Android SDK separately; Android Studio is not required for Flutter development but can simplify SDK installation.
270
214
- For fast iteration in VS Code, use the Debug panel (press F5) or the Flutter toolbar (Run and Debug).
- Tests pass: `flutter test` to the repository and click clone or download button.
467
-
4. From the dropdown that appeared, copy the link.
468
-
5. Paste the URL that you copied and press clone.
469
-
6. Android studio should now begin building the project with gradle.
470
-
7. Once this process is complete and Android Studio opens, check the Console for any build errors.
405
+
### Verify Setup
406
+
407
+
Follow the steps below to confirm that your local development environment is correctly configured.
408
+
409
+
#### 1. Check Flutter installation
410
+
```bash
411
+
flutter doctor
412
+
```
413
+
Resolve any critical issues reported by the command.
414
+
415
+
#### 2. Install dependencies and run tests
416
+
```bash
417
+
flutter pub get
418
+
flutter test
419
+
```
471
420
472
-
-_Note:_ If you receive a Gradle sync error titled, "failed to find ...", you should click on the link below the error message (if available) that says _Install missing platform(s) and sync project_ and allow Android studio to fetch you what is missing.
421
+
#### 3. Run the application
422
+
```bash
423
+
flutter run
424
+
```
425
+
Run the app on a connected physical device, emulator, or desktop target.
473
426
474
-
8. Once all build errors have been resolved, you should be all set to build the app and test it.
475
-
9. To Build the app, go to _Build>Make Project_ (or alternatively press the Make Project icon in the toolbar).
476
-
10. If the app was built successfully, you can test it by running it on either a real device or an emulated one by going to _Run>Run 'app'_ or pressing the Run icon in the toolbar.
427
+
#### 4. (Optional) Using Android Studio
428
+
If you prefer Android Studio:
429
+
- Open the project directory in Android Studio.
430
+
- Wait for the Gradle sync to complete.
431
+
- Check the Build and Run windows for errors.
477
432
478
-
If you want build apk only, go to Build>Build apk and apk would be build and directory where apk is generated would be prompted by Android Studio.
433
+
Note: If you encounter a Gradle sync error such as
434
+
“failed to find …”, use the suggested action (for example, Install missing platform(s) and sync project) to allow Android Studio to download the required components.
479
435
480
-
You can't debug the usual way as PSLab device is connected to micro-USB port through OTG cable. So Android Device is not connected to PC through USB cable.
436
+
Once the app builds successfully and launches on your target device or emulator, the setup is complete.
481
437
482
-
To debug over Wi-Fi follow the steps given in this [Blog](http://blog.fossasia.org/android-app-debugging-over-wifi-for-pslab/).
438
+
The currently supported Flutter, Dart, and platform versions are defined in the project configuration files (for example `pubspec.yaml`, Android Gradle files, and iOS project settings).
483
439
484
-
***Note :**
485
-
If you built your own hardware, change VendorID and/or ProductID in [CommunicationHandler.java](https://github.com/fossasia/pslab-app/blob/master/app/src/main/java/io/pslab/communication/CommunicationHandler.java).
440
+
### Permission manifests
486
441
487
-
### Permissions Required
442
+
Permissions are declared in the platform manifests:
1. Record_Audio : It is required for oscilloscope to accept inputs from the phone inbuilt microphone. You can find its implementation in [AudioJack.java](https://github.com/fossasia/pslab-app/blob/development/app/src/main/java/io/pslab/others/AudioJack.java).
490
-
2. Access_Fine_Location and Internet : It is required for use in lux meter and compass to get the coordinates for tagging the data on the map. You can find its implementation in [GPSLogger.java](https://github.com/fossasia/pslab-app/blob/development/app/src/main/java/io/pslab/others/GPSLogger.java).
491
-
3. Write_External_Storage : It is required for storing log files from instruments that can be transferred out for future analysis.
492
-
4. Read_External_Storage : While writing logs in the storage, [CSVLogger.java](https://github.com/fossasia/pslab-app/blob/development/app/src/main/java/io/pslab/others/CSVLogger.java) first checks whether there is any CSVLogger directory exist or not and that require this read permission.
446
+
The app may request permissions at runtime depending on the instrument/features being used (e.g., location, microphone, storage, USB).
493
447
494
448
## Setup to use PSLab with Android App
495
449
To use PSLab device with Android, you simply need an OTG cable, an Android Device with USB Host feature enabled ( most modern phones have OTG support ) and PSLab Android App. Connect PSLab device to Android Phone via OTG cable. Rest is handled by App itself.
0 commit comments