Made auto-start start SDServer rather than StartUpActivity so it works with phone screen locked.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
OpenSeizureDetector Android App - Change Log
|
||||
============================================
|
||||
|
||||
V2.3.1 - 19 Dec 2016
|
||||
- Changed auto-start feature to start the SDServer background service rather than the StartUpActvity so it will work
|
||||
when the phone screen is locked.
|
||||
|
||||
V2.3.0 - 14 Dec 2016
|
||||
- Added auto start on phone boot feature (selectable from general settings)
|
||||
- Added Location to SMS alarm notifications
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="uk.org.openseizuredetector"
|
||||
android:versionCode="31"
|
||||
android:versionName="2.3.0">
|
||||
android:versionCode="32"
|
||||
android:versionName="2.3.1">
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" />
|
||||
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/*
|
||||
Android_Pebble_SD - a simple accelerometer based seizure detector that runs on a
|
||||
Pebble smart watch (http://getpebble.com).
|
||||
|
||||
See http://openseizuredetector.org for more information.
|
||||
|
||||
Copyright Graham Jones, 2015.
|
||||
|
||||
This file is part of pebble_sd.
|
||||
|
||||
Android_Pebble_SD is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Android_Pebble_Sd is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Android_Pebble_SD. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
package uk.org.openseizuredetector;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
@@ -9,6 +33,8 @@ import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
/**
|
||||
* Broadcast Receiver responds to the BOOT_COMPLETED broadcast and if the 'AutoStart' preference is true,
|
||||
* will start the OpenSeizureDetector SDServer service.
|
||||
* Created by graham on 14/12/16.
|
||||
*/
|
||||
|
||||
@@ -23,9 +49,9 @@ public class BootBroadcastReceiver extends BroadcastReceiver {
|
||||
boolean autoStart = SP.getBoolean("AutoStart",false);
|
||||
Log.v(TAG,"onReceive() - autoStart = "+autoStart);
|
||||
if (autoStart && Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
||||
Intent startUpIntent = new Intent(context, StartupActivity.class);
|
||||
Intent startUpIntent = new Intent(context, SdServer.class);
|
||||
startUpIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(startUpIntent);
|
||||
context.startService(startUpIntent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user