Skip to content

Commit 36d37d7

Browse files
committed
update readme and added task for data from service to fragment
1 parent 0b476d3 commit 36d37d7

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ And the manifest needs to contain:
6060

6161
* complete sensor listing and data visualisation
6262
* add grahps for data view
63-
* implement the wake device on wave or other use case
63+
* communicate sensor readings from service to configuration fragment
64+
* add check for threshold values, should go beyond threshold before triggering again
6465

6566
## Version History
6667

app/src/main/java/be/hcpl/android/sensors/service/SensorBackgroundService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ public void onSensorChanged(SensorEvent event) {
128128
// we need to enable the screen
129129
if (sensorValue < mThresholdMin || sensorValue > mThresholdMax) {
130130

131+
// and a check in between that there should have been a non triggering value before
132+
// we can mark a given value as trigger. This is to overcome unneeded wakeups during
133+
// night for instance where the sensor readings for a light sensor would always be below
134+
// the threshold needed for day time use.
135+
136+
131137
// TODO we could even make the actions configurable...
132138

133139
// wake screen here

app/src/main/res/layout/fragment_schedule.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
android:layout_below="@+id/btnStart"
2626
android:text="@string/stop" />
2727

28+
<!-- TODO communicate current sensor value from service to activity using handler -->
29+
2830
<!-- some configurable options -->
2931

3032
<TextView

0 commit comments

Comments
 (0)