Skip to content

Commit d5e0716

Browse files
committed
Add SK prefix in all source files
1 parent 400b3e7 commit d5e0716

Some content is hidden

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

51 files changed

+429
-436
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Changelog
22

3-
### 0.1.1
4-
- Added support for Bluetooth sensor module
3+
### 0.2.0
4+
- Added support for Bluetooth sensor module.
55
- DataInterface Method getDataInString() has been renamed to getDataInCSV()
6+
- Add SK prefix in all source files
67

78
### 0.1.0
89
- Initial Release

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ SensingKitLibInterface mSensingKitLib = SensingKitLib.getSensingKitLib(this);
7373
- Register a sensor module (e.g. a Light sensor) as shown bellow:
7474

7575
```java
76-
mSensingKitLib.registerSensorModule(SensorModuleType.LIGHT);
76+
mSensingKitLib.registerSensorModule(SKSensorModuleType.LIGHT);
7777
```
7878

7979

8080
- Subscribe a sensor data listener:
8181

8282
```java
83-
mSensingKitLib.subscribeSensorDataListener(SensorModuleType.LIGHT, new SKSensorDataListener() {
83+
mSensingKitLib.subscribeSensorDataListener(SKSensorModuleType.LIGHT, new SKSensorDataListener() {
8484
@Override
85-
public void onDataReceived(final SensorModuleType moduleType, final DataInterface moduleData) {
85+
public void onDataReceived(final SKSensorModuleType moduleType, final SKDataInterface moduleData) {
8686
System.out.println(moduleData.getDataInCSV()); // Print data in CSV format
8787
}
8888
});
@@ -92,16 +92,16 @@ mSensingKitLib.subscribeSensorDataListener(SensorModuleType.LIGHT, new SKSensorD
9292
- You can cast the data object into the actual sensor data object in order to access all the sensor data properties:
9393

9494
```java
95-
LightData lightData = (LightData)moduleData;
95+
SKLightData lightData = (SKLightData)moduleData;
9696
```
9797

9898

9999

100100
- You can Start and Stop the Continuous Sensing using the following commands:
101101

102102
```java
103-
mSensingKitLib.startContinuousSensingWithSensor(SensorModuleType.LIGHT);
104-
mSensingKitLib.stopContinuousSensingWithSensor(SensorModuleType.LIGHT);
103+
mSensingKitLib.startContinuousSensingWithSensor(SKSensorModuleType.LIGHT);
104+
mSensingKitLib.stopContinuousSensingWithSensor(SKSensorModuleType.LIGHT);
105105
```
106106

107107

SensingKitLib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
minSdkVersion 16
99
targetSdkVersion 22
1010
versionCode 1
11-
versionName "0.1.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
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.model.data.SKDataInterface;
25+
import org.sensingkit.sensingkitlib.modules.SKSensorModuleType;
2626

2727
public interface SKSensorDataListener {
2828

29-
void onDataReceived(final SensorModuleType moduleType, final DataInterface moduleData);
29+
void onDataReceived(final SKSensorModuleType moduleType, final SKDataInterface moduleData);
3030

3131
}

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
import android.content.Context;
2525
import android.os.PowerManager;
2626

27-
import org.sensingkit.sensingkitlib.model.data.DataInterface;
28-
import org.sensingkit.sensingkitlib.modules.SensorModuleType;
29-
import org.sensingkit.sensingkitlib.modules.SensorModuleManager;
27+
import org.sensingkit.sensingkitlib.model.data.SKDataInterface;
28+
import org.sensingkit.sensingkitlib.modules.SKSensorModuleType;
29+
import org.sensingkit.sensingkitlib.modules.SKSensorModuleManager;
3030

3131

3232
public class SensingKitLib implements SensingKitLibInterface {
@@ -39,7 +39,7 @@ public class SensingKitLib implements SensingKitLibInterface {
3939
private final Context mApplicationContext;
4040
private PowerManager.WakeLock mWakeLock;
4141

42-
private SensorModuleManager mSensorModuleManager;
42+
private SKSensorModuleManager mSensorModuleManager;
4343

4444
@SuppressWarnings("unused")
4545
public static SensingKitLibInterface getSensingKitLib(final Context context) throws SKException {
@@ -57,56 +57,56 @@ public static SensingKitLibInterface getSensingKitLib(final Context context) thr
5757

5858
private SensingKitLib(final Context context) throws SKException {
5959
mApplicationContext = context;
60-
mSensorModuleManager = SensorModuleManager.getSensorManager(context);
60+
mSensorModuleManager = SKSensorModuleManager.getSensorManager(context);
6161
}
6262

6363
@Override
64-
public void registerSensorModule(SensorModuleType moduleType) throws SKException {
64+
public void registerSensorModule(SKSensorModuleType moduleType) throws SKException {
6565
mSensorModuleManager.registerSensorModule(moduleType);
6666
}
6767

6868
@Override
69-
public void deregisterSensorModule(SensorModuleType moduleType) throws SKException {
69+
public void deregisterSensorModule(SKSensorModuleType moduleType) throws SKException {
7070
mSensorModuleManager.deregisterSensorModule(moduleType);
7171
}
7272

7373
@Override
74-
public boolean isSensorModuleRegistered(SensorModuleType moduleType) throws SKException {
74+
public boolean isSensorModuleRegistered(SKSensorModuleType moduleType) throws SKException {
7575
return mSensorModuleManager.isSensorModuleRegistered(moduleType);
7676
}
7777

7878
@Override
79-
public DataInterface getDataFromSensor(SensorModuleType moduleType) throws SKException {
79+
public SKDataInterface getDataFromSensor(SKSensorModuleType moduleType) throws SKException {
8080
return mSensorModuleManager.getDataFromSensor(moduleType);
8181
}
8282

8383
@Override
84-
public void subscribeSensorDataListener(SensorModuleType moduleType, SKSensorDataListener dataListener) throws SKException {
84+
public void subscribeSensorDataListener(SKSensorModuleType moduleType, SKSensorDataListener dataListener) throws SKException {
8585
mSensorModuleManager.subscribeSensorDataListener(moduleType, dataListener);
8686
}
8787

8888
@Override
89-
public void unsubscribeSensorDataListener(SensorModuleType moduleType, SKSensorDataListener dataListener) throws SKException {
89+
public void unsubscribeSensorDataListener(SKSensorModuleType moduleType, SKSensorDataListener dataListener) throws SKException {
9090
mSensorModuleManager.unsubscribeSensorDataListener(moduleType, dataListener);
9191
}
9292

9393
@Override
94-
public void unsubscribeAllSensorDataListeners(SensorModuleType moduleType) throws SKException {
94+
public void unsubscribeAllSensorDataListeners(SKSensorModuleType moduleType) throws SKException {
9595
mSensorModuleManager.unsubscribeAllSensorDataListeners(moduleType);
9696
}
9797

9898
@Override
99-
public void startContinuousSensingWithSensor(SensorModuleType moduleType) throws SKException {
99+
public void startContinuousSensingWithSensor(SKSensorModuleType moduleType) throws SKException {
100100
mSensorModuleManager.startContinuousSensingWithSensor(moduleType);
101101
}
102102

103103
@Override
104-
public void stopContinuousSensingWithSensor(SensorModuleType moduleType) throws SKException {
104+
public void stopContinuousSensingWithSensor(SKSensorModuleType moduleType) throws SKException {
105105
mSensorModuleManager.stopContinuousSensingWithSensor(moduleType);
106106
}
107107

108108
@Override
109-
public boolean isSensorModuleSensing(SensorModuleType moduleType) throws SKException {
109+
public boolean isSensorModuleSensing(SKSensorModuleType moduleType) throws SKException {
110110
return mSensorModuleManager.isSensorModuleSensing(moduleType);
111111
}
112112

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,42 @@
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.model.data.SKDataInterface;
25+
import org.sensingkit.sensingkitlib.modules.SKSensorModuleType;
2626

2727
@SuppressWarnings("unused")
2828
public interface SensingKitLibInterface {
2929

3030
/** Sensor Registration */
3131

32-
void registerSensorModule(SensorModuleType moduleType) throws SKException;
32+
void registerSensorModule(SKSensorModuleType moduleType) throws SKException;
3333

34-
void deregisterSensorModule(SensorModuleType moduleType) throws SKException;
34+
void deregisterSensorModule(SKSensorModuleType moduleType) throws SKException;
3535

36-
boolean isSensorModuleRegistered(SensorModuleType moduleType) throws SKException;
36+
boolean isSensorModuleRegistered(SKSensorModuleType moduleType) throws SKException;
3737

3838
/** Configuration */
3939
// TODO: Add Configuration
4040

4141

4242
/** One Shot Sensing */
4343

44-
DataInterface getDataFromSensor(SensorModuleType moduleType) throws SKException;
44+
SKDataInterface getDataFromSensor(SKSensorModuleType moduleType) throws SKException;
4545

4646

4747
/** Continuous Sensing */
4848

49-
void subscribeSensorDataListener(SensorModuleType moduleType, SKSensorDataListener dataListener) throws SKException;
49+
void subscribeSensorDataListener(SKSensorModuleType moduleType, SKSensorDataListener dataListener) throws SKException;
5050

51-
void unsubscribeSensorDataListener(SensorModuleType moduleType, SKSensorDataListener dataListener) throws SKException;
51+
void unsubscribeSensorDataListener(SKSensorModuleType moduleType, SKSensorDataListener dataListener) throws SKException;
5252

53-
void unsubscribeAllSensorDataListeners(SensorModuleType moduleType) throws SKException;
53+
void unsubscribeAllSensorDataListeners(SKSensorModuleType moduleType) throws SKException;
5454

55-
void startContinuousSensingWithSensor(SensorModuleType moduleType) throws SKException;
55+
void startContinuousSensingWithSensor(SKSensorModuleType moduleType) throws SKException;
5656

57-
void stopContinuousSensingWithSensor(SensorModuleType moduleType) throws SKException;
57+
void stopContinuousSensingWithSensor(SKSensorModuleType moduleType) throws SKException;
5858

59-
boolean isSensorModuleSensing(SensorModuleType moduleType) throws SKException;
59+
boolean isSensorModuleSensing(SKSensorModuleType moduleType) throws SKException;
6060

6161
/** Time */
6262

SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/model/data/AbstractData.java renamed to SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/model/data/SKAbstractData.java

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

2222
package org.sensingkit.sensingkitlib.model.data;
2323

24-
public abstract class AbstractData implements DataInterface
24+
public abstract class SKAbstractData implements SKDataInterface
2525
{
2626
@SuppressWarnings("unused")
27-
private static final String TAG = "AbstractData";
27+
private static final String TAG = "SKAbstractData";
2828

2929
protected final long timestamp;
3030

31-
public AbstractData(long timestamp) {
31+
public SKAbstractData(long timestamp) {
3232
this.timestamp = timestamp;
3333
}
3434

SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/model/data/MagnetometerData.java renamed to SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/model/data/SKAccelerometerData.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323

2424
import java.util.Locale;
2525

26-
public class MagnetometerData extends AbstractData {
26+
public class SKAccelerometerData extends SKAbstractData {
2727

2828
@SuppressWarnings("unused")
29-
private static final String TAG = "MagnetometerData";
29+
private static final String TAG = "SKAccelerometerData";
3030

3131
protected final float x;
3232
protected final float y;
3333
protected final float z;
3434

35-
public MagnetometerData(long timestamp, float x, float y, float z) {
35+
public SKAccelerometerData(long timestamp, float x, float y, float z) {
3636

3737
super(timestamp);
3838

SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/model/data/ActivityData.java renamed to SensingKitLib/src/main/java/org/sensingkit/sensingkitlib/model/data/SKActivityData.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525

2626
import java.util.Locale;
2727

28-
public class ActivityData extends AbstractData {
28+
public class SKActivityData extends SKAbstractData {
2929

3030
@SuppressWarnings("unused")
31-
private static final String TAG = "ActivityData";
31+
private static final String TAG = "SKActivityData";
3232

3333
protected final int activityType;
3434
protected final int confidence;
3535

36-
public ActivityData(long timestamp, int activityType, int confidence) {
36+
public SKActivityData(long timestamp, int activityType, int confidence) {
3737

3838
super(timestamp);
3939

0 commit comments

Comments
 (0)