Added updated README file from master branch

This commit is contained in:
Graham Jones
2023-12-21 18:03:07 +00:00
parent f94673c5e7
commit 72018f7f28
2 changed files with 49 additions and 3 deletions

View File

@@ -1,8 +1,11 @@
OpenSeizureDetector - Android App OpenSeizureDetector - Android App
================================= =================================
This repository contains the source code for the main
(OpenSeizureDetector)[https://www.openseizuredetector.org.uk/]
Android App, which is published on
(Google Play Store)[https://play.google.com/store/apps/details?id=uk.org.openseizuredetector].
This seizure detector uses a Garmin smart watch. This seizure detector uses a Garmin smart watch to collect movement (acceleration) and heart rate data which is used to detect tonic-clonic epileptic seizures.
The watch has an accelerometer, heart rate sensor and a bluetooth radio to talk to another computer.
See (the OpenSeizureDetector Web Site)[https://www.openseizuredetector.org.uk/] for more details. See (the OpenSeizureDetector Web Site)[https://www.openseizuredetector.org.uk/] for more details.
Principle of Operation Principle of Operation
@@ -19,6 +22,49 @@ the threshold for a given period, it issues a warning beep.
If it remains above the threshold for a longer specified period, the unit If it remains above the threshold for a longer specified period, the unit
alarms (continuous tone rather than beep). alarms (continuous tone rather than beep).
Development
===========
Git Branches
------------
- The version which is currently published on Play Store is the 'master' branch.
- The development version which will be the next major release is the V4.2.x branch.
- The V4.3.x branch by user @aroonpro addresses deprecation warnings and a more modern coding style - this will become the development version once we have it working reliably.
So new developers wishing to implement features should use the V4.2.x branch
Compilation
-----------
- Install the latest version of Android Studio
- Clone this repository and checkout the V4.2.x branch
- In android studio, open the folder containing the cloned repository
- Android Studio will take quite a long time downloading dependencies ('Gradle Sync')
- Select the Build->Make Project menu option - the code should compile, leading to a 'Build Successful' message.
- There will be lots of warnings about use of deprecated libraries etc!
- Android Studio may complain about the version of the Android Gradle Plug-in - Try Build->Clean Project; Build->Make Project
- If this does not work, let Android Studio upgrade the project to the newer version of Gradle - it usually works without problems now.
Installation
------------
- You should be able to plug your phone into the computer running Android Studio and Android Studio will allow you to run the app on the phone (the drop down menu below the main menu bar lists available devices)
- If the phone does not appear, there are a few possibilities:
- Check the phone has Developer Mode enabled (there should be a Developer menu in the phone settings)
- Check that USB deugging is enabled in the developer menu on the phone.
- There may be a phone notification asking if you want to grant the computer access to the phone - select yes - if this has disappeared, try disconnecting then re-connecting the phone.
- On Linux you need to set a UDEV rule, and the user must be a member of the plugdev group (log out and back in again after changing the group membership to make sure it takes effect) (best check the Google documentation for how to do this rather than believe somethign I have written).
- The .apk file that is generated by 'make project' can be transferred to the phone, then the phone file browser should allow it to be installed (with warnings about installing apps from untrusted sources).
- If you have the official release from Play Store installed, it will refuse to install a development build - you have to uninstall the official version first.
Note that the Garmin watch app needs to be installed separately - see the (web site)[https://www.openseizuredetector.org.uk/?page_id=1128] for details.
Code Structure
--------------
- StartUpActivity is the entry point (This is the view that shows the checklist of things initialising, then exits)
- SdServer is started by StartUpActivity
- This creates an instance of SdDataSource for the particular data source in use (Garmin, BLE, Phone)
- SdDataSource collects data from the watch, and when a set of data is available, it calls the doAnalysis function to do the seizure detection.
- SdServer deals with raising the alarms based on the analysis results.
- SdServer also details with logging to the Data Sharing system.
- MainActivity provides a front end to view what is going on with SdServer
Licence Licence
======= =======

View File

@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:versionCode="128" android:versionCode="128"
android:versionName="4.2.1g"> android:versionName="4.2.1h">
<!-- android:allowBackup="false" --> <!-- android:allowBackup="false" -->
<uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />