Conversation
- Add CHANGE_WIFI_MULTICAST_STATE permission and MulticastLock for LSL stream discovery on Android - Add useLegacyPackaging=true so JNA can load liblsl.so under AGP 8.x - Upgrade build system: AGP 8.3.2, Gradle 8.7, Kotlin 1.9.22, NDK 25 - Refactor ResolveStreamsTask from deprecated AsyncTask to Thread - Update primary color to red (#C62727) for both light and dark theme - Update citation in README Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Android project’s UI branding (red primary colors), modernizes the Gradle/Android plugin toolchain, and adjusts LSL stream discovery behavior (threading + WiFi multicast).
Changes:
- Update Android build tooling (Gradle wrapper, AGP, Kotlin) and module Android configs (namespace/compileSdk).
- Change primary UI colors to a red theme for day/night resources.
- Replace
AsyncTask-based LSL stream resolution with a background thread approach and enable WiFi multicast for discovery; update README citation.
Reviewed changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates the paper citation text. |
| liblsl-Java/build.gradle | Updates JNA version; adds namespace/compileSdk/NDK settings. |
| gradle/wrapper/gradle-wrapper.properties | Bumps Gradle wrapper to 8.7. |
| build.gradle | Updates AGP + Kotlin plugin versions and removes legacy buildscript block. |
| app/src/main/res/values/colors.xml | Changes primary colors to red (day theme). |
| app/src/main/res/values-night/colors.xml | Changes primary colors to red (night theme). |
| app/src/main/java/de/uol/neuropsy/recorda/util/ResolveStreamsTask.java | Reworks stream resolution off AsyncTask and adds logging/error handling. |
| app/src/main/java/de/uol/neuropsy/recorda/MainActivity.kt | Acquires/releases WiFi multicast lock for LSL discovery lifecycle. |
| app/src/main/AndroidManifest.xml | Adds multicast permission for WiFi discovery. |
| app/build.gradle | Sets Java/Kotlin target to 11 and adjusts packaging for JNA under AGP 8.x. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| android { | ||
| compileSdkVersion 33 | ||
| namespace 'edu.ucsd.sccn' | ||
| compileSdkVersion 34 |
Comment on lines
+198
to
+201
| val wifiManager = applicationContext.getSystemService(Context.WIFI_SERVICE) as WifiManager | ||
| multicastLock = wifiManager.createMulticastLock("RECORDA_lsl_discovery") | ||
| multicastLock!!.setReferenceCounted(true) | ||
| multicastLock!!.acquire() |
Comment on lines
+12
to
+16
| public void execute(final MainActivity activity) { | ||
| new Thread(() -> { | ||
| LSL.StreamInfo[] resolved; | ||
| try { | ||
| resolved = LSL.resolve_streams(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.