Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
94f1e79
Fix typo
pmaanen Apr 9, 2025
bc33b5a
Improve spelling and grammar in README
pmaanen Apr 10, 2025
044e838
Add in-app tutorial
pmaanen Apr 16, 2025
1289fdb
Rename last page of tutorial.
pmaanen Apr 17, 2025
f366de8
Rename shared preferences
pmaanen Apr 17, 2025
6a78f6b
Remove dead code. Explicitly return unknown when sensor type is not k…
pmaanen Apr 17, 2025
2934099
Add descriptions to tutorial pages 2-4
pmaanen Apr 23, 2025
6cfcf3d
Reduce code duplication in github actions
pmaanen Apr 24, 2025
6f8d066
Use newest versions of actions
pmaanen Apr 24, 2025
e96e0c0
Fix yaml error
pmaanen Apr 24, 2025
9822068
Fix yaml error
pmaanen Apr 24, 2025
5cddedb
Bump setup-gradle to v4
pmaanen Apr 24, 2025
1f4bfdc
Migrate to Kotlin
pmaanen Apr 24, 2025
651359b
Remove unneeded file
pmaanen May 13, 2025
3899b1d
Stop service on swipe up
pmaanen May 15, 2025
08396c6
Update to Gradle plugin 8.1.2 and compile-sdk 34
pmaanen May 15, 2025
639180f
Migrate to MVVM architecture with ViewModel and repository pattern
pmaanen May 15, 2025
99fd493
Reorganize package structure for improved modularity and clarity
pmaanen May 15, 2025
56e27c5
Add minor improvements: Remove unused imports, etc...
pmaanen May 15, 2025
473cc2f
Simplify MainActivity and ViewModel lifecycle, state, and service han…
pmaanen May 15, 2025
c938934
Unify sync status reporting with sealed class, Start Movella bridges …
pmaanen May 16, 2025
cdc9745
Add unit test for MainViewModel
pmaanen May 16, 2025
80d77cd
Fix crash on startup in LocationBridge
pmaanen May 16, 2025
4eeca4e
Remove unneccessary non-null assertions in MovellaBridge
pmaanen May 16, 2025
9e85ba2
Fix possible crash when sensor update arrived before sensor outlet wa…
pmaanen May 16, 2025
9d95b52
Fix crash in MainActivity by lazy-initializing ViewModel when context…
pmaanen May 16, 2025
9806e56
Fix minor rendering mistakes
pmaanen May 16, 2025
893f1ba
Update gradle to 8.10
pmaanen May 22, 2025
a358a9a
Add close, question mark and settings icons
pmaanen May 22, 2025
e788aef
Simplify main layout to LinearLayout, remove old landscape/splash lay…
pmaanen May 22, 2025
899d73f
Add About dialog, add Actionbar
pmaanen May 22, 2025
0e571bb
Streamline permission handling, add new transient starting and stoppi…
pmaanen May 22, 2025
845cb9a
Connect once when a movella device is discovered to find out its huma…
pmaanen May 22, 2025
ed9df2f
Refactor sensor bridges and LSL service for safe concurrent control
pmaanen May 22, 2025
bfeacf2
Add top bar tutorial
pmaanen May 22, 2025
340d4e1
Re-add movella synchronisation
pmaanen May 22, 2025
7f94cb0
Merge pull request #1 from NeuropsyOL/development
s4rify Feb 16, 2026
3f8beef
Update constraints for tutorial text in layout
s4rify Feb 17, 2026
db0d344
fix tutorial_page_three.xml
s4rify Feb 17, 2026
2e6e002
fix reference in tutorial_page_one.xml
s4rify Feb 17, 2026
08f8ef3
Add signingConfigs for release build type
s4rify Feb 17, 2026
31339fa
adding info for signing the apk on master
s4rify Feb 17, 2026
6af68a2
Merge remote-tracking branch 'origin/master'
s4rify Feb 17, 2026
6ab8dec
adding info for signing the apk on master, exchanged secret on github
s4rify Feb 17, 2026
c09ba30
Add steps to build and upload APKs in workflow
s4rify Feb 17, 2026
4953b08
Refactor Android build workflow by removing keystore step
s4rify Feb 17, 2026
50a1743
fix secrets for signing app and adapt build file to include feature b…
s4rify Feb 24, 2026
3b6c988
Improve signing configuration handling by checking for keystore exist…
s4rify Feb 24, 2026
86c459f
Merge branch 'master' into fix_signature
s4rify Feb 24, 2026
cc833e6
Fix signature (#2)
s4rify Feb 24, 2026
7553e71
Refactor build workflow to separate debug and release APK builds for …
s4rify Feb 25, 2026
a250906
Merge remote-tracking branch 'origin/fix_signature' into fix_signature
s4rify Feb 25, 2026
0ec1b42
merge workflow files
s4rify Feb 25, 2026
552dcc6
adapt dark theme
s4rify Apr 29, 2026
946e135
adapt our files to 16KB compatibility, movella libs are not compatibl…
s4rify Apr 29, 2026
c73aa1b
Refactor foreground service handling and update permissions for targe…
s4rify Apr 29, 2026
8cb440a
Update stream availability text and adjust layout margins in activity…
s4rify Apr 29, 2026
5278efb
Merge branch 'master' into development
s4rify May 6, 2026
3489e7b
Development into main (#5)
s4rify May 6, 2026
6ef6bb4
remove settings wheel since we don't have any settings
s4rify May 7, 2026
d238324
Bump version to 2.0.0, add CHANGELOG, update README
s4rify May 22, 2026
bb4d4e3
Merge development into master for v2.0.0 release
s4rify May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 30 additions & 53 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,78 +3,57 @@ name: Android Build
on:
push:
branches:
- master # Change this to your main branch name (e.g., master)
- development
- '**' # Trigger on push to any branch

jobs:
build-debug:
name: Build debug
# Build debug APK for all feature branches and not master
if: github.ref_name != 'master'
runs-on: ubuntu-latest
if: github.ref =='refs/heads/development'
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup JDK
uses: actions/setup-java@v3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 7.4.2

- name: Setup Android NDK
uses: nttld/setup-ndk@v1.2.0
with:
ndk-version: r25c

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- uses: gradle/actions/setup-gradle@v4
with: { gradle-version: 7.4.2 }
- uses: nttld/setup-ndk@v1.2.0
with: { ndk-version: r25c }
- run: chmod +x ./gradlew

- name: Build debug APK
run: ./gradlew assembleDebug

- name: Upload APK artifact
- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: SENDA-debug # Change this to your desired artifact name
path: ./app/build/outputs/apk/debug/*.apk
name: SENDA-debug
path: app/build/outputs/apk/debug/*.apk

build-master:
name: Build master
build-release:
# Build release APK ONLY for master branch
if: github.ref_name == 'master'
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup JDK
uses: actions/setup-java@v3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17' # Change this to the required Java version for your Android project

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 7.4.2

- name: Setup Android NDK
uses: nttld/setup-ndk@v1.2.0
with:
ndk-version: r25c

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
java-version: '17'
- uses: gradle/actions/setup-gradle@v4
with: { gradle-version: 7.4.2 }
- uses: nttld/setup-ndk@v1.2.0
with: { ndk-version: r25c }
- run: chmod +x ./gradlew

- name: Build release APK
run: ./gradlew assembleRelease

- name: Sign app APK
uses: r0adkll/sign-android-release@v1
# ID used to access action output
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
Expand All @@ -83,12 +62,10 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
# override default build-tools version (33.0.0) -- optional
BUILD_TOOLS_VERSION: "34.0.0"

- name: Upload APK artifact
- name: Upload release APK
uses: actions/upload-artifact@v4
with:
name: SENDA-release # Change this to your desired artifact name
path: ${{steps.sign_app.outputs.signedReleaseFile}} # Change the path to the location of your APK file

name: SENDA-release
path: ${{ steps.sign_app.outputs.signedReleaseFile }}
3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Changelog

All notable changes to SENDA are documented in this file.

## [v2.0.0] – 2026-05-22

This is a major release representing a complete overhaul of the SENDA codebase
and a significant expansion of features since v1.3.0.

### Breaking changes
- The app has been **fully rewritten in Kotlin** (previously Java). The minimum
supported Android version remains Android 11.
- The internal package structure was reorganised for improved modularity.

### New features
- **Dark theme** support (follows system setting).
- **In-app tutorial** with multiple pages guiding new users through setup.
- **About dialog** accessible from the action bar.
- **Movella DOT** sensor support: connects once on discovery to resolve the
human-readable name, then reconnects for measurement.

### Improvements & refactoring
- Migrated to **MVVM architecture** with ViewModel and Repository pattern.
- Foreground service and wakelock handling refactored for `targetSdk 34+`.
- Permissions handling streamlined; new transient *starting* / *stopping*
UI states provide clearer feedback.
- **16 KB ELF page-size compatibility**: native code compiled with the required
alignment flags (Google Play requirement since November 2025). Note that the
bundled Movella SDK library is not yet compatible.
- Main layout simplified to `LinearLayout`; old landscape / splash layouts and
unused preference XMLs removed.
- `compileSdk` / `targetSdk` raised to **35**; NDK updated to **r28**.
- Gradle plugin updated to **8.1.2 / 8.10**; `setup-gradle` action bumped; CI
workflow split into separate debug and release APK jobs.
- LSL service start/stop made concurrency-safe.
- LocationBridge crash on startup fixed.
- MainActivity crash fixed by lazy-initialising the ViewModel.
- Sensor outlet race condition fixed (sensor stream now starts only after the
LSL outlet is initialised).
- Unit test added for `MainViewModel`.
- App correctly stops the foreground service when swiped away from recents.

### UI / UX
- Stream availability status text updated.
- Layout margins adjusted in `activity_main.xml`.
- Settings/gear menu icon removed (no configurable settings at this time).
- Tutorial layout constraints and text corrected.

### Build & CI
- APK signed correctly via GitHub Actions using repository secrets.
- Separate CI jobs for debug builds (feature branches) and signed release APKs
(master branch).
- Signing configuration now checks for keystore existence before applying
settings, preventing local-build failures.

---

## [v1.3.0] – see [NeuropsyOL/SENDA](https://github.com/NeuropsyOL/SENDA/releases/tag/v1.3.0)

Previous releases are tagged in the public repository at
https://github.com/NeuropsyOL/SENDA/releases.

43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
---
# SENDA Android Application to stream out sensor data directly from the Phone

SENDA(Sensor Data Streamer) is an android application to stream real time sensor reading using LSL (Lab Streaming Layer). Along with the sensors it streams real time audio as well. This is a fork from the original author's Git [Ali Ayub Khan's SENDA](https://github.com/AliAyub007/SENDA), which contains additional features and support for Samsung phones.
SENDA (Sensor Data Streamer) is an android application to stream real-time sensor reading using LSL (Lab Streaming Layer). Along with the sensors it streams real-time audio as well. This is a fork from the original author's Git [Ali Ayub Khan's SENDA](https://github.com/AliAyub007/SENDA), which contains additional features and support for Samsung phones.

## Features
The following sensors are included:
- Accelerometer
- Gyroscope
- Light
- Proximity
- Gravity
Expand All @@ -16,6 +17,10 @@ The following sensors are included:
- Location
- Movella DOT (via Bluetooth)

Additional capabilities:
- Dark theme (follows system setting)
- In-app setup tutorial

## Data formats

### Location
Expand All @@ -35,10 +40,10 @@ For details about the data format and the orientation of the axes, see the Movel

## Getting Started

#### Installation
Download the [latest release](https://github.com/NeuropsyOL/SENDA/releases/latest) and install the apk on your smartphone or tablet running Android 11 or higher.
### Installation
Download the [latest release](https://github.com/NeuropsyOL/SENDA/releases/latest) and install the APK on your smartphone or tablet running Android 11 or higher.

#### Usage:
### Usage
Upon launching the app, the user is presented with a main screen displaying a list of available device sensors. Each sensor can be individually selected using check buttons, allowing the user to choose which data to stream. The list of sensors can be refreshed with a swipe-down gesture.

Some sensors—such as audio classification and recording, GPS, and Movella sensors—require special permissions to function properly. When necessary, a permission request dialog is shown when a sensor is selected. GPS requires access to precise location at all times in order to operate correctly. If a permission is repeatedly denied, Android may block further requests. In such cases, the app opens the system settings screen, allowing the user to grant the required permission manually.
Expand All @@ -47,25 +52,25 @@ To start streaming, the user must press the **START LSL** button. To stop stream

The LSL streams transmitted by SENDA can be recorded using any LSL-compatible application, such as the [LabRecorder](https://github.com/labstreaminglayer/App-LabRecorder) on PC or [RECORDA](https://github.com/NeuropsyOL/RECORDA) on Android.

On newer versions of Android, it may be necessary to prevent the system from limiting the app's processing time to conserve battery. This can be done by navigating to **Settings → Battery optimization ** and disabling battery optimization for SENDA.
On newer versions of Android, it may be necessary to prevent the system from limiting the app's processing time to conserve battery. This can be done by navigating to **Settings → Battery optimization** and disabling battery optimization for SENDA.

## Development

#### Prerequisites:
- Android Studio Giraffe | 2022.3.1 Patch 2
- Android API 34 SDK platform
- Android NDK 25.2.9519653
### Prerequisites
- Android Studio Meerkat | 2024.3.1 (or newer)
- Android API 35 SDK platform
- Android NDK r28 (28.0.12433566)
- CMake 3.22.1

Other version may work, the above listed versions are the ones used for development and testing.
Other versions may work, the above listed versions are the ones used for development and testing.

#### Development:
### Development

In order to start with development you need to follow these steps:

- Clone this repository
- Open project with Android Studio
- Import the project
- - Clone the repository
- - Open the project with Android Studio
- - Import the project

## Contributing
Please feel free to contribute to this project by creating an issue first and then sending a pull request respectively.
Expand All @@ -76,12 +81,12 @@ Please feel free to contribute to this project by creating an issue first and th
* **Paul Maanen** - [pmaanen](https://github.com/pmaanen)

## License
This project is licensed under GNU General Public License License - see the [LICENSE.md](LICENSE.md) file for details
This project is licensed under GNU General Public License - see the [LICENSE.md](LICENSE.md) file for details

## Known Issues
- Sometimes the app complains about mission bluetooth permissions but does the scan for Movella sensors anyway.
- On a new installation multiple restarts of the app might be necessary until it asks for and notices newly granted permissions
- Some phones don't respect the foreground service and wakelock. A possible workaround is to set the app to unlimited background power usage in the app settings.
- Sometimes the app reports missing Bluetooth permissions but does the scan for Movella sensors anyway.
- After a fresh installation, multiple restarts may be required before the app detects newly granted permissions.
- Some devices may not properly honor foreground service or wakelock settings. A potential workaround is to allow unlimited background power usage for the app in the system settings.


## Acknowledgments
Expand All @@ -90,4 +95,4 @@ This project is licensed under GNU General Public License License - see the [LIC
[Google Mediapipe](https://developers.google.com/mediapipe), Apache v2.0 license.

## Cite As:

- Blum S, Hölle D, Bleichner MG, Debener S. Pocketable Labs for Everyone: Synchronized Multi-Sensor Data Streaming and Recording on Smartphones with the Lab Streaming Layer. Sensors. 2021; 21(23):8135. https://doi.org/10.3390/s21238135
Loading
Loading