Skip to content

Commit f180e4d

Browse files
committed
Merge branch 'develop'
2 parents f7298a5 + 7d88f75 commit f180e4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+940
-594
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# Changelog
22

3+
### 0.2.0
4+
- Added support for Bluetooth sensor module.
5+
- DataInterface method getDataInString() has been renamed to getDataInCSV()
6+
- SKDataInterface has been renamed to SKSensorData
7+
- Added getSensorModuleType() to SKSensorData
8+
- Added SK prefix to all source files
9+
- Added support for Android Studio 1.3
10+
- Updated Build Tools version to 22.0.1
11+
312
### 0.1.0
413
- Initial Release

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ An Android library that provides Continuous Sensing functionality to your applic
55

66
## Supported Sensors
77

8-
The following sensor modules are currently supported in SensingKit-Android, (listed in [SensorModuleType](SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/modules/SensorModuleType.java) enum):
8+
The following sensor modules are currently supported in SensingKit-Android, (listed in [SKSensorModuleType](SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/modules/SKSensorModuleType.java) enum):
99

1010
- Accelerometer
1111
- Gravity
@@ -23,6 +23,7 @@ The following sensor modules are currently supported in SensingKit-Android, (lis
2323
- Screen Status
2424
- Audio Recorder
2525
- Audio Level
26+
- Bluetooth
2627

2728
## Configuring the Library
2829

@@ -51,9 +52,9 @@ repositories {
5152
```
5253
dependencies {
5354
compile fileTree(dir: 'libs', include: ['*.jar'])
54-
compile 'org.sensingkit:SensingKitLib-release:0.1@aar'
55-
compile 'com.android.support:appcompat-v7:21.0.3
56-
compile 'com.google.android.gms:play-services-location:6.5.87'
55+
compile 'org.sensingkit:SensingKitLib-release@aar'
56+
compile 'com.android.support:appcompat-v7:22.2.1
57+
compile 'com.google.android.gms:play-services-location:7.5.0'
5758
}
5859
```
5960

@@ -72,17 +73,17 @@ SensingKitLibInterface mSensingKitLib = SensingKitLib.getSensingKitLib(this);
7273
- Register a sensor module (e.g. a Light sensor) as shown bellow:
7374

7475
```java
75-
mSensingKitLib.registerSensorModule(SensorModuleType.LIGHT);
76+
mSensingKitLib.registerSensorModule(SKSensorModuleType.LIGHT);
7677
```
7778

7879

7980
- Subscribe a sensor data listener:
8081

8182
```java
82-
mSensingKitLib.subscribeSensorDataListener(SensorModuleType.LIGHT, new SKSensorDataListener() {
83+
mSensingKitLib.subscribeSensorDataListener(SKSensorModuleType.LIGHT, new SKSensorDataListener() {
8384
@Override
84-
public void onDataReceived(final SensorModuleType moduleType, final DataInterface moduleData) {
85-
System.out.println(moduleData); // Print data
85+
public void onDataReceived(final SKSensorModuleType moduleType, final SKSensorData sensorData) {
86+
System.out.println(sensorData.getDataInCSV()); // Print data in CSV format
8687
}
8788
});
8889
```
@@ -91,16 +92,16 @@ mSensingKitLib.subscribeSensorDataListener(SensorModuleType.LIGHT, new SKSensorD
9192
- You can cast the data object into the actual sensor data object in order to access all the sensor data properties:
9293

9394
```java
94-
LightData lightData = (LightData)moduleData;
95+
SKLightData lightData = (SKLightData)sensorData;
9596
```
9697

9798

9899

99100
- You can Start and Stop the Continuous Sensing using the following commands:
100101

101102
```java
102-
mSensingKitLib.startContinuousSensingWithSensor(SensorModuleType.LIGHT);
103-
mSensingKitLib.stopContinuousSensingWithSensor(SensorModuleType.LIGHT);
103+
mSensingKitLib.startContinuousSensingWithSensor(SKSensorModuleType.LIGHT);
104+
mSensingKitLib.stopContinuousSensingWithSensor(SKSensorModuleType.LIGHT);
104105
```
105106

106107

SensingKit-Android.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</configuration>
99
</facet>
1010
</component>
11-
<component name="NewModuleRootManager" inherit-compiler-output="true">
11+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
1212
<exclude-output />
1313
<content url="file://$MODULE_DIR$">
1414
<excludeFolder url="file://$MODULE_DIR$/.gradle" />

SensingKitLib/SensingKitLib.iml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
1313
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
1414
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
15-
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
1615
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
1716
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
18-
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
17+
<afterSyncTasks>
18+
<task>generateDebugAndroidTestSources</task>
19+
<task>generateDebugSources</task>
20+
</afterSyncTasks>
1921
<option name="ALLOW_USER_CONFIGURATION" value="false" />
2022
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
2123
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
@@ -25,7 +27,7 @@
2527
</configuration>
2628
</facet>
2729
</component>
28-
<component name="NewModuleRootManager" inherit-compiler-output="false">
30+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
2931
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
3032
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
3133
<exclude-output />

SensingKitLib/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 22
5-
buildToolsVersion "22"
5+
buildToolsVersion "22.0.1"
66

77
defaultConfig {
88
minSdkVersion 16
99
targetSdkVersion 22
10-
versionCode 0
11-
versionName "0.1"
10+
versionCode 1
11+
versionName "0.2.0"
1212
}
1313
buildTypes {
1414
release {

SensingKitLib/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
1010

11-
<service android:name=".modules.ActivityRecognitionIntentService" />
11+
<service android:name=".modules.SKActivityRecognitionIntentService" />
1212

1313
</application>
1414

SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/SKSensorDataListener.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@
2121

2222
package org.sensingkit.sensingkitlib;
2323

24-
import org.sensingkit.sensingkitlib.model.data.DataInterface;
25-
import org.sensingkit.sensingkitlib.modules.SensorModuleType;
24+
import org.sensingkit.sensingkitlib.data.SKSensorData;
2625

2726
public interface SKSensorDataListener {
2827

29-
void onDataReceived(final SensorModuleType moduleType, final DataInterface moduleData);
28+
void onDataReceived(final SKSensorModuleType moduleType, final SKSensorData sensorData);
3029

3130
}

0 commit comments

Comments
 (0)