diff --git a/SensorLib/app/.gitignore b/SensorLib/app/.gitignore deleted file mode 100644 index 796b96d1..00000000 --- a/SensorLib/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/SensorLib/app/app.iml b/SensorLib/app/app.iml deleted file mode 100644 index deaca8b9..00000000 --- a/SensorLib/app/app.iml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SensorLib/app/build.gradle b/SensorLib/app/build.gradle deleted file mode 100644 index dcd30a7b..00000000 --- a/SensorLib/app/build.gradle +++ /dev/null @@ -1,33 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'com.github.dcendents.android-maven' - -group='com.github.mad-lab-fau' - -android { - compileSdkVersion 27 - defaultConfig { - minSdkVersion 21 - targetSdkVersion 27 - versionCode 1 - versionName "1.0" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -repositories { - flatDir { - dirs 'libs' - } -} - -dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation project(path: ':sensorlib') - implementation project(':sls-tek') - implementation(name: 'androidplot-core-release', ext: 'aar') -} diff --git a/SensorLib/app/libs/androidplot-core-release.aar b/SensorLib/app/libs/androidplot-core-release.aar deleted file mode 100644 index 3bbd805b..00000000 Binary files a/SensorLib/app/libs/androidplot-core-release.aar and /dev/null differ diff --git a/SensorLib/app/proguard-rules.pro b/SensorLib/app/proguard-rules.pro deleted file mode 100644 index 35cc27eb..00000000 --- a/SensorLib/app/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in C:\Users\gradl\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/SensorLib/app/src/androidTest/java/de/fau/lme/sensorlibproject/ApplicationTest.java b/SensorLib/app/src/androidTest/java/de/fau/lme/sensorlibproject/ApplicationTest.java deleted file mode 100644 index 1737f1b5..00000000 --- a/SensorLib/app/src/androidTest/java/de/fau/lme/sensorlibproject/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package de.fau.lme.sensorlibproject; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/SensorLib/app/src/main/AndroidManifest.xml b/SensorLib/app/src/main/AndroidManifest.xml deleted file mode 100644 index a95bedc1..00000000 --- a/SensorLib/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/SensorLib/app/src/main/java/de/fau/sensorlibtest/MainActivity.java b/SensorLib/app/src/main/java/de/fau/sensorlibtest/MainActivity.java deleted file mode 100644 index 7168c9e4..00000000 --- a/SensorLib/app/src/main/java/de/fau/sensorlibtest/MainActivity.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (C) 2015-2016 Digital Sports Group, Friedrich-Alexander University Erlangen-Nuremberg (FAU). - *

- * This file 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. If you reuse - * this code you have to keep or cite this comment. - */ -package de.fau.sensorlibtest; - -import android.app.Activity; -import android.graphics.Color; -import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.util.Log; - -import com.androidplot.xy.LineAndPointFormatter; -import com.androidplot.xy.PointLabelFormatter; -import com.androidplot.xy.SimpleXYSeries; -import com.androidplot.xy.XYPlot; - -import java.util.List; - -import de.fau.sensorlib.BleSensorManager; -import de.fau.sensorlib.SensorDataProcessor; -import de.fau.sensorlib.SensorFoundCallback; -import de.fau.sensorlib.SensorInfo; -import de.fau.sensorlib.dataframe.AccelDataFrame; -import de.fau.sensorlib.dataframe.AmbientDataFrame; -import de.fau.sensorlib.dataframe.SensorDataFrame; -import de.fau.sensorlib.enums.HardwareSensor; -import de.fau.sensorlib.enums.KnownSensor; -import de.fau.sensorlib.sensors.GenericBleSensor; -import de.fau.sensorlib.sensors.TekSensor; - -/** - * A simple example application to demonstrate the use of the SensorLib. - */ -public class MainActivity extends AppCompatActivity { - - private static final String TAG = "SensorLib::TestApp"; - - GenericBleSensor mSensor; - - XYPlot mPlot; - SimpleXYSeries mPlotData; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - try - { - BleSensorManager.checkBtLePermissions(this, true); - } catch (Exception e) - { - // TODO Really handle exception - e.printStackTrace(); - } - - mPlot = (XYPlot) findViewById(R.id.plotViewA); - mPlotData = new SimpleXYSeries("Sensor Values"); - mPlotData.useImplicitXVals(); - mPlot.addSeries(mPlotData, new LineAndPointFormatter(Color.rgb(100, 100, 200), null, null, new PointLabelFormatter(Color.DKGRAY))); - mPlot.setDomainLabel("Sample Index"); - mPlot.setRangeLabel("Value"); - } - - SensorDataProcessor mDataHandler = new SensorDataProcessor() { - @Override - public void onNewData(SensorDataFrame data) { - if (mPlotData.size() > 99) { - mPlotData.removeFirst(); - } - - if (data instanceof AccelDataFrame) { - AccelDataFrame adf = (AccelDataFrame) data; - mPlotData.addLast(null, adf.getAccelX()); - } - if (data instanceof AmbientDataFrame) { - AmbientDataFrame adf = (AmbientDataFrame) data; - mPlotData.addLast(null, adf.getLight()); - } - - TekSensor.TekDataFrame df = (TekSensor.TekDataFrame) data; - Log.d(TAG, "DataFrame (" + df.getCounter() + "): " + df.toString()); - - // redraw the Plots: - mPlot.redraw(); - } - }; - - Activity getThis() { - return this; - } - - @Override - protected void onResume() { - super.onResume(); - - /*String tekMac = "52:4D:4B:5F:01:55"; - mSensor = new TekSensor(this, tekMac, mDataHandler); - mSensor.useHardwareSensor(HardwareSensor.ACCELEROMETER); - mSensor.useHardwareSensor(HardwareSensor.LIGHT); - try { - mSensor.connect(); - mSensor.startStreaming(); - } catch (Exception e) { - e.printStackTrace(); - }*/ - - - List list = BleSensorManager.getConnectableSensors(); - for (SensorInfo s : list) { - Log.d(TAG, "Sensor found: " + s.getName()); - } - - try { - BleSensorManager.searchBleDevices(new SensorFoundCallback() { - public boolean onKnownSensorFound(SensorInfo sensor) { - Log.d(TAG, "BLE Sensor found: " + sensor.getName()); - - // we check what kind of sensor we found - if (sensor.getDeviceClass() == KnownSensor.GENERIC_BLE) { - // ignore default/unknown BLE sensors - //if (sensor.getDeviceName().contains("miCoach")) { - - } else if (sensor.getDeviceClass() == KnownSensor.TEK) { - // this is a TEK sensor, create and connect it. - mSensor = new TekSensor(getThis(), sensor, mDataHandler); - mSensor.useHardwareSensor(HardwareSensor.ACCELEROMETER); - mSensor.useHardwareSensor(HardwareSensor.LIGHT); - try { - mSensor.connect(); - mSensor.startStreaming(); - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - return true; - } - }); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Override - protected void onPause() { - if (mSensor != null) { - mSensor.disconnect(); - } - super.onPause(); - } -} diff --git a/SensorLib/app/src/main/res/layout/activity_main.xml b/SensorLib/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 03a7b3db..00000000 --- a/SensorLib/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - diff --git a/SensorLib/app/src/main/res/mipmap-hdpi/ic_launcher.png b/SensorLib/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bcc..00000000 Binary files a/SensorLib/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/SensorLib/app/src/main/res/mipmap-mdpi/ic_launcher.png b/SensorLib/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0cb..00000000 Binary files a/SensorLib/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/SensorLib/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/SensorLib/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0e..00000000 Binary files a/SensorLib/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/SensorLib/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/SensorLib/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72cd..00000000 Binary files a/SensorLib/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/SensorLib/app/src/main/res/values-w820dp/dimens.xml b/SensorLib/app/src/main/res/values-w820dp/dimens.xml deleted file mode 100644 index 63fc8164..00000000 --- a/SensorLib/app/src/main/res/values-w820dp/dimens.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 64dp - diff --git a/SensorLib/app/src/main/res/values/dimens.xml b/SensorLib/app/src/main/res/values/dimens.xml deleted file mode 100644 index 47c82246..00000000 --- a/SensorLib/app/src/main/res/values/dimens.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - 16dp - 16dp - diff --git a/SensorLib/app/src/main/res/values/strings.xml b/SensorLib/app/src/main/res/values/strings.xml deleted file mode 100644 index 1c15f64b..00000000 --- a/SensorLib/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - SensorLibProject - diff --git a/SensorLib/app/src/main/res/values/styles.xml b/SensorLib/app/src/main/res/values/styles.xml deleted file mode 100644 index 766ab993..00000000 --- a/SensorLib/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - -