LightSys Code-a-Thon 2026 Upgrades to API 36#17
LightSys Code-a-Thon 2026 Upgrades to API 36#17GroveOfGraves wants to merge 38 commits intosillsdev:masterfrom
Conversation
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5>
* Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5>
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Changing the spacing to give small padding for both sides of the screen and hopefully removing some inconsistency in the UI Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Properly centering the bottom buttons within the bottom section Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Added constants for hardcoded values within the project - mainly from menu_record.xml and added to strings.xml (I have been doing this through previous commits) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Update to newer Gradle version * Update scanner and camera libraries
Updated the server from the old library to the new library nanohttpd
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Updated hardcoded strings, warnings, and added onTimeout function to handle a service timeout, as well as cleaned up errors in the manifest Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Made a ton of updates to deprecated systems including color selection and other fun stuff :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Initial update of tests * Remove some warnings * Remove additional warnings
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Many, many updates to warnings, java standards, and better code for updated versions and cleaner running Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Many, many updates to warnings, java standards, and better code for updated versions and cleaner running Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Many warnings fixed plus addition of FloatPreference.java, which handles some issues with how floats were being handled Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Fixed problems with merge (oops) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Fixing various warnings throughout files Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Clean up http server Cleaned up the http server. Had some memory leak issues and some double server calls that should be fixed * Fix live sync Fixed an issue where the app didn't display the file being downloaded and then moving to the book view * Clean up audio The audio functions need a bit of cleanup. This commit cleans a little up
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Fixing various warnings throughout files caused by the merge, as well as changing deprecated functions Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Fixing various warnings throughout files, making lambda functions, and cleaning up some unused functions and variables Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
Added spanish, french, german, and chinese (simplified) as available languages
* Add tests for RecordActivity * Add BookSelection test * Add SyncActivity tests * Add several new tests * Remove references to Mockito * Remove runtime warnings * Move some tests * Move RealScriptProviderTest and update to remove warnings
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Making a lot of changes to clean up warnings and errors in the IDE, making sure to avoid Test files as they were being worked on by others Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Cleaned up the merge :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Fixed the last of the warnings and feelin GOOD Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * I just trying to fix the scan screen Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * I fixed it Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Fixed the last of the warnings and feelin GOOD Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Changing the banner and the background for sync activity and made the banner static Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Changing the banner and the background for sync activity and made the banner static Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Update play button The play button never stopped listening for a trigger, this caused an error when trigger with no recording to play. This has been fixed and the play button doesn't listen for a trigger when there is no recording to play. * Play button update Fixed potential memory leak, where the arrow.reset function is never called
* Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups * Updating Edge-to-Edge and various other useful updates :) Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Add a service that forwards the necessary ports for the desktop app (#1) * Changes to versioning, hardcoded strings, and logic updates (#2) * Moved hardcoded strings to strings.xml and gave many methods Edge-to-Edge display capabilities. Additionally, updated gradle scripts to target proper versions and changed SyncService to properly channel for newer versions * Minor updates and error cleanups --------- Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> * Feat/foreground service changes (#3) * Initial changes to ensure foreground operation compliancy * Patch out small issues * Stop sync automatically, add content intent from notification * Fixed the last of the warnings and feelin GOOD Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * Why won't the status bar change Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> * I FIXED IT WOOOOOOOOOO Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> --------- Signed-off-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: elith <elith@DESKTOP-9R0HDQ5> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
* Initial commit of patched tests * Patch SyncActivityTest for Android 12 * Ensure wide compatibility, remove warnings * Fix unit tests
…ndroid Studio requirements (#33) * Initial plan * Add Camera/Scanning, Build System, and Testing documentation sections to README Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com> * Add missing sections and update stale Testing notes in README Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com> * Rewrite #Building section to reflect current SDK 36 build configuration Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com> * Update #Building section: name Android Studio Panda 2 and explain simple setup workflow Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
…onsistency (#34) * Initial plan * docs: consolidate duplicate Testing sections in README Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com> * docs: fix heading style consistency in README (add missing spaces after #) Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: GroveOfGraves <113633048+GroveOfGraves@users.noreply.github.com>
| arrow.moveTo(midX + thick / 2, deltaY); // upper right corner of stem | ||
| arrow.lineTo(midX - thick / 2, deltaY); // upper left corner of stem | ||
| arrow.lineTo(midX - thick / 2, stemY); // left junction of stem and arrow | ||
| arrow.lineTo(deltaX, stemY); // left point of arrow | ||
| arrow.lineTo(size/2 + deltaX, size + deltaY); // tip of arrow | ||
| arrow.lineTo(size + deltaX, stemY); // right point of arrow | ||
| arrow.lineTo(midX + thick / 2, stemY); // right junction of stem and arrow | ||
| arrow.lineTo(midX + thick / 2, deltaY); // back to start |
There was a problem hiding this comment.
🔴 NextButton arrow Path never reset, causing visual corruption on redraw
In NextButton.onDraw(), the arrow field is a reusable Path instance (line 41), but arrow.reset() is never called before new path segments are added at lines 57-64. Each call to onDraw() appends new line segments to the existing path, causing the shape to accumulate garbage and become visually corrupted over successive redraws. By contrast, PlayButton.onDraw() (PlayButton.java:45) correctly calls arrow.reset() before building its shape.
| arrow.moveTo(midX + thick / 2, deltaY); // upper right corner of stem | |
| arrow.lineTo(midX - thick / 2, deltaY); // upper left corner of stem | |
| arrow.lineTo(midX - thick / 2, stemY); // left junction of stem and arrow | |
| arrow.lineTo(deltaX, stemY); // left point of arrow | |
| arrow.lineTo(size/2 + deltaX, size + deltaY); // tip of arrow | |
| arrow.lineTo(size + deltaX, stemY); // right point of arrow | |
| arrow.lineTo(midX + thick / 2, stemY); // right junction of stem and arrow | |
| arrow.lineTo(midX + thick / 2, deltaY); // back to start | |
| arrow.reset(); | |
| arrow.moveTo(midX + thick / 2, deltaY); // upper right corner of stem | |
| arrow.lineTo(midX - thick / 2, deltaY); // upper left corner of stem | |
| arrow.lineTo(midX - thick / 2, stemY); // left junction of stem and arrow | |
| arrow.lineTo(deltaX, stemY); // left point of arrow | |
| arrow.lineTo(size/2 + deltaX, size + deltaY); // tip of arrow | |
| arrow.lineTo(size + deltaX, stemY); // right point of arrow | |
| arrow.lineTo(midX + thick / 2, stemY); // right junction of stem and arrow | |
| arrow.lineTo(midX + thick / 2, deltaY); // back to start |
Was this helpful? React with 👍 or 👎 to provide feedback.
| ArrayList<String> result = new ArrayList<>(); | ||
| File directory = new File(path); | ||
| for (File file : directory.listFiles()){ | ||
| for (File file : Objects.requireNonNull(directory.listFiles())){ |
There was a problem hiding this comment.
🔴 RealFileSystem.getDirectories crashes with NPE when directory doesn't exist
Objects.requireNonNull(directory.listFiles()) at line 44 will throw a NullPointerException if the directory doesn't exist or the path doesn't point to a directory, because File.listFiles() returns null in those cases. The old code simply iterated the array directly (which also would have thrown NPE, but the new code explicitly adds requireNonNull making the crash intentional). This method is called from ServiceLocator.getScriptProvider() and MainActivity.getProjectRootDirectories(), where the path may not yet exist (e.g., before first sync).
| for (File file : Objects.requireNonNull(directory.listFiles())){ | |
| File[] files = directory.listFiles(); | |
| if (files == null) return result; | |
| for (File file : files){ |
Was this helpful? React with 👍 or 👎 to provide feedback.
| private final Object startingLock = new Object(); | ||
| volatile boolean starting = false; | ||
|
|
||
| String _recordingFilePath; |
There was a problem hiding this comment.
🔴 RecordActivity._recordingFilePath initialized to null instead of empty string, causing NPE
The field _recordingFilePath is declared without initialization at line 84 (String _recordingFilePath;), defaulting to null. The old code initialized it to "" (String _recordingFilePath = "";). If _lineCount is 0 (e.g., empty chapter), setActiveLine() is never called (line 173-174: if (_lineCount > 0) setActiveLine(_activeLine)), so _recordingFilePath remains null. If the user then touches the record button, startWaveRecorder() calls new File(_recordingFilePath) at line 342, which throws NPE.
| String _recordingFilePath; | |
| String _recordingFilePath = ""; |
Was this helpful? React with 👍 or 👎 to provide feedback.
| } else { | ||
| try (FileOutputStream out = new FileOutputStream(file)) { | ||
| out.write(contentOrPath.getBytes(StandardCharsets.UTF_8)); | ||
| } |
There was a problem hiding this comment.
🔴 AcceptFileHandler corrupts binary file uploads by converting through UTF-8 String
When NanoHTTPD provides raw POST data as a string (the else branch at line 83-86), binary file content (e.g., .wav audio files) is written via contentOrPath.getBytes(StandardCharsets.UTF_8). This round-trips binary data through a Java String, which corrupts non-UTF-8 byte sequences. The original Apache HTTP handler used EntityUtils.toByteArray(entity) which preserved raw bytes. For small binary uploads that NanoHTTPD stores directly as a string (rather than saving to a temp file), the audio data will be silently corrupted during sync.
Prompt for agents
In AcceptFileHandler.java, lines 83-86, when NanoHTTPD stores POST body content directly as a string rather than a temp file path, the code writes it via contentOrPath.getBytes(StandardCharsets.UTF_8). This corrupts binary data like .wav files. The fix should ensure binary data is preserved. Consider: (1) Checking the Content-Type header to distinguish binary uploads, (2) Using NanoHTTPD's temp file mechanism which stores large uploads as files (the isPath branch already handles this), (3) For the raw string case, consider whether binary content can actually reach this branch, and if so, store it differently. The key issue is that NanoHTTPD's parseBody may put binary content through String encoding. You may need to configure NanoHTTPD's tmpdir and ensure all binary uploads go through the temp-file path.
Was this helpful? React with 👍 or 👎 to provide feedback.
| Intent serviceIntent = new Intent(this, SyncService.class); | ||
| startService(serviceIntent); |
There was a problem hiding this comment.
🔴 SyncActivity uses startService() instead of startForegroundService() on Android 8+
In SyncActivity.startSyncServer() at line 145, startService(serviceIntent) is called. On Android 8.0+ (API 26+), if the app is in the background, startService() will throw an IllegalStateException for background services. Since SyncService.onStartCommand() calls startForeground(), it should be started via startForegroundService() (or ContextCompat.startForegroundService()) on API 26+ to comply with Android's background execution limits. Although the activity is likely in the foreground when this is called, edge cases (e.g., rapid permission dialog interactions) could cause the service start to fail.
| Intent serviceIntent = new Intent(this, SyncService.class); | |
| startService(serviceIntent); | |
| Intent serviceIntent = new Intent(this, SyncService.class); | |
| ContextCompat.startForegroundService(this, serviceIntent); |
Was this helpful? React with 👍 or 👎 to provide feedback.
Please refer to the README of our fork for the full details of our contributions. It was a privilege to get to work on this project!
This change is