From 22e88d08a7d6e1ec2b3932a09aaaae459b450355 Mon Sep 17 00:00:00 2001 From: kalynstricklin Date: Wed, 8 Apr 2026 14:56:50 -0500 Subject: [PATCH] added template directory and readme --- sensorhub-android-app/build.gradle | 20 ++- .../res/xml/pref_sensors.xml | 25 ++++ .../org/sensorhub/android/MainActivity.java | 22 +++- .../sensorhub/android/SensorsFragment.java | 30 ++--- .../AndroidManifest.xml | 21 ++++ sensorhub-android-template/README.md | 91 ++++++++++++++ sensorhub-android-template/build.gradle | 47 +++++++ .../impl/sensor/template/Descriptor.java | 76 +++++++++++ .../impl/sensor/template/Output.java | 101 +++++++++++++++ .../impl/sensor/template/Sensor.java | 118 ++++++++++++++++++ .../impl/sensor/template/TemplateConfig.java | 51 ++++++++ .../org.sensorhub.api.module.IModuleProvider | 1 + .../src/test/java/empty | 0 .../src/test/resources/empty | 0 14 files changed, 585 insertions(+), 18 deletions(-) create mode 100644 sensorhub-android-template/AndroidManifest.xml create mode 100644 sensorhub-android-template/README.md create mode 100644 sensorhub-android-template/build.gradle create mode 100644 sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Descriptor.java create mode 100644 sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Output.java create mode 100644 sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Sensor.java create mode 100644 sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/TemplateConfig.java create mode 100644 sensorhub-android-template/src/main/resources/META-INF/services/org.sensorhub.api.module.IModuleProvider create mode 100644 sensorhub-android-template/src/test/java/empty create mode 100644 sensorhub-android-template/src/test/resources/empty diff --git a/sensorhub-android-app/build.gradle b/sensorhub-android-app/build.gradle index b1862e07..986801df 100644 --- a/sensorhub-android-app/build.gradle +++ b/sensorhub-android-app/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.application' description = 'OSH Android App' -ext.details = 'OSH app for Android' +ext.details = 'OSH app for Android' repositories { // maven { @@ -29,6 +29,7 @@ dependencies { implementation project(':sensorhub-android-polar') implementation project(':sensorhub-android-wardriving') implementation project(':sensorhub-android-controller') + implementation project(':sensorhub-android-template') implementation project(':sensorhub-driver-android') implementation 'org.slf4j:slf4j-api:2.0.9' implementation 'com.github.tony19:logback-android:3.0.0' @@ -59,8 +60,24 @@ android { targetSdkVersion rootProject.targetSdkVersion versionCode 1 versionName rootProject.version + applicationId "com.georobotix.android" } + //https://developer.android.com/build/build-variants#groovy +// flavorDimensions += "version" // maybe dont need +// productFlavors { +// create("free") { +// dimension = "version" +// applicationIdSuffix = ".free" +// buildConfigField("boolean", "IS_PREMIUM", "false") +// } +// create("premium") { +// dimension = "version" +// applicationIdSuffix = ".premium" +// buildConfigField("boolean", "IS_PREMIUM", "true") +// } +// } + compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 @@ -94,5 +111,6 @@ android { excludes += ["META-INF/INDEX.LIST"] } } + } diff --git a/sensorhub-android-app/res/xml/pref_sensors.xml b/sensorhub-android-app/res/xml/pref_sensors.xml index b2a5c6a0..7093e1c8 100644 --- a/sensorhub-android-app/res/xml/pref_sensors.xml +++ b/sensorhub-android-app/res/xml/pref_sensors.xml @@ -455,4 +455,29 @@ android:entryValues="@array/sos_option_values" android:defaultValue="@array/sos_option_defaults" android:layout="@layout/preference_list_item"/> + + + + + + + diff --git a/sensorhub-android-app/src/org/sensorhub/android/MainActivity.java b/sensorhub-android-app/src/org/sensorhub/android/MainActivity.java index 06527c90..9ea3a842 100644 --- a/sensorhub-android-app/src/org/sensorhub/android/MainActivity.java +++ b/sensorhub-android-app/src/org/sensorhub/android/MainActivity.java @@ -14,8 +14,6 @@ package org.sensorhub.android; -import static android.content.ContentValues.TAG; - import android.Manifest; import android.annotation.SuppressLint; import android.app.AlertDialog; @@ -89,6 +87,7 @@ import org.sensorhub.impl.sensor.meshtastic.control.TextMessageControl; import org.sensorhub.impl.sensor.polar.PolarConfig; import org.sensorhub.impl.sensor.ste.STERadPagerConfig; +import org.sensorhub.impl.sensor.template.TemplateConfig; import org.sensorhub.impl.sensor.trupulse.SimulatedDataStream; import org.sensorhub.impl.sensor.trupulse.TruPulseConfig; import org.sensorhub.impl.sensor.trupulse.TruPulseWithGeolocConfig; @@ -166,7 +165,8 @@ enum Sensors { PolarHRMonitor, Kestrel, Wardriving, - Controller + Controller, + Template } private final ServiceConnection sConn = new ServiceConnection() @@ -554,6 +554,19 @@ public boolean verify(String arg0, SSLSession arg1) { if (isSosServiceEnabled) { sensorhubConfig.add(sosConfig); } + + // Template Driver + enabled = prefs.getBoolean("template_enabled", false); + if (enabled) { + TemplateConfig templateConfig = new TemplateConfig(); + templateConfig.id = "TEMPLATE_DRIVER_"; + templateConfig.name = "Template [" + deviceName + "]"; + templateConfig.autoStart = true; + templateConfig.lastUpdated = ANDROID_SENSORS_LAST_UPDATED; + templateConfig.uid_extension = prefs.getString("uid_extension", ""); + sensorhubConfig.add(templateConfig); + } + } protected void addSosTConfig(SensorConfig sensorConf, String user, String pwd) @@ -889,6 +902,9 @@ boolean isPushingSensor(Sensors sensor) { } else if (Sensors.Controller.equals(sensor)) { return prefs.getBoolean("controller_enabled", false) && prefs.getStringSet("controller_options", Collections.emptySet()).contains("PUSH_REMOTE"); + } else if (Sensors.Template.equals(sensor)) { + return prefs.getBoolean("template_enabled", false) + && prefs.getStringSet("template_options", Collections.emptySet()).contains("PUSH_REMOTE"); } return false; diff --git a/sensorhub-android-app/src/org/sensorhub/android/SensorsFragment.java b/sensorhub-android-app/src/org/sensorhub/android/SensorsFragment.java index 181b1f98..766ce7f8 100644 --- a/sensorhub-android-app/src/org/sensorhub/android/SensorsFragment.java +++ b/sensorhub-android-app/src/org/sensorhub/android/SensorsFragment.java @@ -36,25 +36,26 @@ public class SensorsFragment extends PreferenceFragmentCompat { private static final String[][] SWITCH_DEPENDENTS = { - {"accel_enabled", "accel_options"}, - {"gyro_enabled", "gyro_options"}, - {"mag_enabled", "mag_options"}, + {"accel_enabled", "accel_options"}, + {"gyro_enabled", "gyro_options"}, + {"mag_enabled", "mag_options"}, {"orient_quat_enabled", "orient_quat_options"}, {"orient_euler_enabled","orient_euler_options"}, - {"gps_enabled", "gps_options"}, - {"netloc_enabled", "netloc_options"}, - {"cam_enabled", "cam_options", "video_codec", "video_framerate", "video_preset", "camera_select"}, - {"video_roll_enabled", "video_roll_options"}, - {"audio_enabled", "audio_options", "audio_codec", "audio_samplerate", "audio_bitrate"}, - {"meshtastic_enabled", "meshtastic_device_address", "meshtastic_options"}, - {"polar_enabled", "polar_device_address", "polar_options"}, - {"kestrel_enabled", "kestrel_device_address", "kestrel_options"}, - {"trupulse_enabled", "trupulse_datasource", "trupulse_options", "trupulse_device_address", "trupulse_simu"}, - {"angel_enabled", "angel_address", "angel_options"}, - {"flirone_enabled", "flir_options"}, + {"gps_enabled", "gps_options"}, + {"netloc_enabled", "netloc_options"}, + {"cam_enabled", "cam_options", "video_codec", "video_framerate", "video_preset", "camera_select"}, + {"video_roll_enabled", "video_roll_options"}, + {"audio_enabled", "audio_options", "audio_codec", "audio_samplerate", "audio_bitrate"}, + {"meshtastic_enabled", "meshtastic_device_address", "meshtastic_options"}, + {"polar_enabled", "polar_device_address", "polar_options"}, + {"kestrel_enabled", "kestrel_device_address", "kestrel_options"}, + {"trupulse_enabled", "trupulse_datasource", "trupulse_options", "trupulse_device_address", "trupulse_simu"}, + {"angel_enabled", "angel_address", "angel_options"}, + {"flirone_enabled", "flir_options"}, {"ste_radpager_enabled","ste_radpager_options"}, {"wardriving_enabled", "wardriving_options"}, {"controller_enabled", "controller_options"}, + {"template_enabled", "template_device_address", "template_options"}, }; @@ -64,6 +65,7 @@ public class SensorsFragment extends PreferenceFragmentCompat { "polar_device_address", "kestrel_device_address", "trupulse_device_address", + "template_device_address" }; private ArrayList frameRateList = new ArrayList<>(); diff --git a/sensorhub-android-template/AndroidManifest.xml b/sensorhub-android-template/AndroidManifest.xml new file mode 100644 index 00000000..d2a3abe1 --- /dev/null +++ b/sensorhub-android-template/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/sensorhub-android-template/README.md b/sensorhub-android-template/README.md new file mode 100644 index 00000000..5822066c --- /dev/null +++ b/sensorhub-android-template/README.md @@ -0,0 +1,91 @@ +# Template Driver Integration + +## 1. Add the Template Module +- Duplciate the template directory +- Rename it appropriately + +## 2. Add dependency to App Module: + - In 'sensorhub-android-app' `build.gradle` we need to include the project as a dependency: +```groovy + implementation project(':sensorhub-android-template') +``` +## 3. Add Preferences UI +- In `res/xml/pref_sensors.xml`, add: +```xml + + + +``` + +- In `SensorsFragment.java`, include the "enabled" and "options" in the SWITCH_DEPENDENTS map. +- +- **Note:** If the driver uses BLE to connect you must also add the ability to select the devices 'BLE Address' (Examples: Kestrel, Trupulse, Meshtastic,+ Polar) +- Add device selection: +```xml + +``` +- In `SensorsFragment.java`, include the "template_device_address" under the BT_DEVICE_PREF_KEYS + +## 4. Update `MainActivity` +- Import the drivers Config class +`import org.sensorhub.impl.sensor.template.TemplateConfig;` +- Add to `Sensors Enum` +``` +Template +``` + +- Enable Push check +Update `isPushingSensors(Sensors sensor)`: +``` +if (Sensors.Template.equals(sensor)) { + return prefs.getBoolean("template_enabled", false) + && prefs.getStringSet("template_options", Collections.emptySet()).contains("PUSH_REMOTE"); + } +``` +- Add to updateConfig(...) +``` + // Template Driver + enabled = prefs.getBoolean("template_enabled", false); + if (enabled) { + SensorConfig templateConfig = new SensorConfig(); + templateConfig.id = "TEMPLATE_DRIVER_"; + templateConfig.name = "Template [" + deviceName + "]"; + templateConfig.autoStart = true; + templateConfig.lastUpdated = ANDROID_SENSORS_LAST_UPDATED; + templateConfig.uid_extension = prefs.getString("uid_extension", ""); + sensorhubConfig.add(templateConfig); + } +``` + + +### Adding External Modules (osh-addons/osh-core/...) +This is slightly different process then local modules +1. Include the module in `settings.gradle` +```groovy +'sensors/positioning/sensorhub-driver-trupulse' +``` +**>**: Ensure the module path in settings.gradle matches the project folder structure exactly, and you include the correct submodule repository + +2. Add Dependency in `sensorhub-android-lib` +```groovy +api project(':sensorhub-driver-kestrel') +``` +3. Repeat steps 3-5 in the first set of instructions \ No newline at end of file diff --git a/sensorhub-android-template/build.gradle b/sensorhub-android-template/build.gradle new file mode 100644 index 00000000..be7d7faa --- /dev/null +++ b/sensorhub-android-template/build.gradle @@ -0,0 +1,47 @@ +apply plugin: 'com.android.library' + +description = 'Template Driver' +ext.details = 'Driver template for android' +version = '1.0.0' + +dependencies { + //api 'org.sensorhub:sensorhub-core:' + oshCoreVersion + api project(':sensorhub-core') + api project(':sensorhub-android-service') + + implementation 'io.reactivex.rxjava3:rxjava:3.1.6' + implementation 'io.reactivex.rxjava3:rxandroid:3.0.2' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation project(path: ':sensorhub-driver-android') + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'androidx.core:core:1.5.0' +} +configurations.configureEach { + exclude group: "ch.qos.logback" +} + +android { + namespace 'org.sensorhub.impl.sensor.template' + compileSdkVersion rootProject.compileSdkVersion + buildToolsVersion rootProject.buildToolsVersion + + defaultConfig { + minSdkVersion rootProject.minSdkVersion + targetSdkVersion rootProject.targetSdkVersion + } + + lintOptions { + abortOnError false + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src/main/java'] + resources.srcDirs = ['src/main/resources'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + jniLibs.srcDirs = ['libs'] + } + } +} diff --git a/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Descriptor.java b/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Descriptor.java new file mode 100644 index 00000000..c11a90ad --- /dev/null +++ b/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Descriptor.java @@ -0,0 +1,76 @@ +/***************************** BEGIN LICENSE BLOCK *************************** + + The contents of this file are subject to the Mozilla Public License, v. 2.0. + If a copy of the MPL was not distributed with this file, You can obtain one + at http://mozilla.org/MPL/2.0/. + + Software distributed under the License is distributed on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the License. + + The Initial Developer is Botts Innovative Research Inc. Portions created by the Initial + Developer are Copyright (C) 2025 the Initial Developer. All Rights Reserved. + + ******************************* END LICENSE BLOCK ***************************/ + +package org.sensorhub.impl.sensor.template; + +import org.sensorhub.api.module.IModule; +import org.sensorhub.api.module.IModuleProvider; +import org.sensorhub.api.module.ModuleConfig; + + +/** + *

+ * Descriptor of Android sensors driver module for automatic discovery + * by the ModuleRegistry + *

+ * + * @author Alex Robin + * @since Sep 7, 2013 + */ +public class Descriptor implements IModuleProvider +{ + + @Override + public String getModuleName() + { + return "Template"; + } + + + @Override + public String getModuleDescription() + { + return "Driver template"; + } + + + @Override + public String getModuleVersion() + { + return "0.1"; + } + + + @Override + public String getProviderName() + { + return "GeoRobotix LLC"; + } + + + @Override + public Class> getModuleClass() + { + return Sensor.class; + } + + + @Override + public Class getModuleConfigClass() + { + return TemplateConfig.class; + } + +} diff --git a/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Output.java b/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Output.java new file mode 100644 index 00000000..3aa99130 --- /dev/null +++ b/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Output.java @@ -0,0 +1,101 @@ +/***************************** BEGIN LICENSE BLOCK *************************** + + The contents of this file are subject to the Mozilla Public License, v. 2.0. + If a copy of the MPL was not distributed with this file, You can obtain one + at http://mozilla.org/MPL/2.0/. + + Software distributed under the License is distributed on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the License. + + The Initial Developer is Botts Innovative Research Inc. Portions created by the Initial + Developer are Copyright (C) 2025 the Initial Developer. All Rights Reserved. + + ******************************* END LICENSE BLOCK ***************************/ + +package org.sensorhub.impl.sensor.template; + +import net.opengis.swe.v20.DataBlock; +import net.opengis.swe.v20.DataComponent; +import net.opengis.swe.v20.DataEncoding; + +import org.sensorhub.api.data.DataEvent; +import org.sensorhub.impl.sensor.AbstractSensorOutput; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.vast.swe.SWEHelper; +import org.vast.swe.helper.GeoPosHelper; + + +/** + * Output for template WiFi access point scan results + * + * @author Kalyn Stricklin + * @since April 6, 2026 + */ +public class Output extends AbstractSensorOutput +{ + DataComponent dataStruct; + DataEncoding dataEncoding; + private static final String SENSOR_OUTPUT_NAME = "wifiScan"; + private static final String SENSOR_OUTPUT_LABEL = "WiFi Access Point Scan"; + private static final Logger logger = LoggerFactory.getLogger(Output.class); + + protected Output(Sensor parent) { + super(SENSOR_OUTPUT_NAME, parent); + } + + public void doInit() { + GeoPosHelper fac = new GeoPosHelper(); + + dataStruct = fac.createRecord() + .name(SENSOR_OUTPUT_NAME) + .label(SENSOR_OUTPUT_LABEL) + .definition(SWEHelper.getPropertyUri("WifiScanResult")) + .addField("time", fac.createTime() + .asSamplingTimeIsoUTC() + .label("Sampling Time") + .build()) + .addField("text", fac.createText() + .label("Text") + .definition(SWEHelper.getPropertyUri("Text")) + .description("Example text field") + .build()) + .build(); + + dataEncoding = fac.newTextEncoding(",", "\n"); + } + + + public void setData(String text) { + + DataBlock dataBlock; + if (latestRecord == null) + dataBlock = dataStruct.createDataBlock(); + else + dataBlock = latestRecord.renew(); + + int idx = 0; + dataBlock.setDoubleValue(idx++, System.currentTimeMillis() / 1000d); + dataBlock.setStringValue(idx++, text); + + latestRecord = dataBlock; + latestRecordTime = System.currentTimeMillis(); + eventHandler.publish(new DataEvent(latestRecordTime, this, dataBlock)); + } + + @Override + public double getAverageSamplingPeriod() { + return 10.0; + } + + @Override + public DataComponent getRecordDescription() { + return dataStruct; + } + + @Override + public DataEncoding getRecommendedEncoding() { + return dataEncoding; + } +} diff --git a/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Sensor.java b/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Sensor.java new file mode 100644 index 00000000..c094d75a --- /dev/null +++ b/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/Sensor.java @@ -0,0 +1,118 @@ +/***************************** BEGIN LICENSE BLOCK *************************** + + The contents of this file are subject to the Mozilla Public License, v. 2.0. + If a copy of the MPL was not distributed with this file, You can obtain one + at http://mozilla.org/MPL/2.0/. + + Software distributed under the License is distributed on an "AS IS" basis, + WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + for the specific language governing rights and limitations under the License. + + The Initial Developer is Botts Innovative Research Inc. Portions created by the Initial + Developer are Copyright (C) 2025 the Initial Developer. All Rights Reserved. + + ******************************* END LICENSE BLOCK ***************************/ + +package org.sensorhub.impl.sensor.template; + +import android.content.Context; +import android.os.Build; +import android.os.Handler; +import android.os.HandlerThread; + +import net.opengis.sensorml.v20.PhysicalComponent; + +import org.sensorhub.android.SensorHubService; +import org.sensorhub.api.sensor.SensorException; +import org.sensorhub.impl.sensor.AbstractSensorModule; +import org.sensorhub.impl.sensor.android.SensorMLBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; + +/** + * + * @author Kalyn Stricklin + * @since April 6, 2026 + */ +public class Sensor extends AbstractSensorModule { + static final String UID_PREFIX = "urn:osh:sensor:template:driver:"; + + private final ArrayList smlComponents; + private final SensorMLBuilder smlBuilder; + static final Logger logger = LoggerFactory.getLogger(Sensor.class.getSimpleName()); + private Context context; + Output output; + private HandlerThread eventThread; + private Handler eventHandler; + Thread processingThread; + volatile boolean doProcessing = true; + + + public Sensor() { + this.smlComponents = new ArrayList(); + this.smlBuilder = new SensorMLBuilder(); + } + + @Override + public void doInit() { + logger.info("Initializing Sensor"); + this.xmlID = "TEMPLATE_DRIVER_" + Build.SERIAL; + this.uniqueID = UID_PREFIX + config.getUidWithExt(); + + context = SensorHubService.getContext(); + + output = new Output(this); + output.doInit(); + addOutput(output, false); + + } + + @Override + public void doStart() throws SensorException { + eventThread = new HandlerThread("TemplateThread"); + eventThread.start(); + eventHandler = new Handler(eventThread.getLooper()); + + startProcessing(); + } + + public void startProcessing() { + doProcessing = true; + + processingThread = new Thread(() -> { + while (doProcessing) { + output.setData( "Sample Data"); + + try { + Thread.sleep(100); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + }); + processingThread.start(); + } + + public void stopProcessing() { + doProcessing = false; + } + + @Override + public void doStop() { + + if (eventThread != null) { + eventThread.quitSafely(); + eventThread = null; + } + + eventHandler = null; + logger.info("Sensor stopped"); + } + + @Override + public boolean isConnected() { + return processingThread != null && processingThread.isAlive(); + } +} diff --git a/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/TemplateConfig.java b/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/TemplateConfig.java new file mode 100644 index 00000000..ed6d5126 --- /dev/null +++ b/sensorhub-android-template/src/main/java/org/sensorhub/impl/sensor/template/TemplateConfig.java @@ -0,0 +1,51 @@ +/***************************** BEGIN LICENSE BLOCK *************************** + +The contents of this file are subject to the Mozilla Public License, v. 2.0. +If a copy of the MPL was not distributed with this file, You can obtain one +at http://mozilla.org/MPL/2.0/. + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +for the specific language governing rights and limitations under the License. + +Copyright (C) 2012-2015 Sensia Software LLC. All Rights Reserved. + +******************************* END LICENSE BLOCK ***************************/ + +package org.sensorhub.impl.sensor.template; + +import org.sensorhub.android.SensorHubService; + +import android.content.Context; +import android.provider.Settings; + + +/** + * + * @author Kalyn Stricklin + * @since April 6, 2026 + */ +public class TemplateConfig extends org.sensorhub.api.sensor.SensorConfig +{ + + public TemplateConfig() + { + this.moduleClass = Sensor.class.getCanonicalName(); + } + public String uid_extension; + + public long scanIntervalMs = 10000; + + public static String getUid() { + Context context = SensorHubService.getContext(); + return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); + } + + public String getUidWithExt() + { + String baseUid = getUid(); + if (uid_extension != null && !uid_extension.isEmpty()) + return baseUid + ":" + uid_extension; + return baseUid; + } +} diff --git a/sensorhub-android-template/src/main/resources/META-INF/services/org.sensorhub.api.module.IModuleProvider b/sensorhub-android-template/src/main/resources/META-INF/services/org.sensorhub.api.module.IModuleProvider new file mode 100644 index 00000000..924ba4ab --- /dev/null +++ b/sensorhub-android-template/src/main/resources/META-INF/services/org.sensorhub.api.module.IModuleProvider @@ -0,0 +1 @@ +org.sensorhub.impl.sensor.template.Descriptor \ No newline at end of file diff --git a/sensorhub-android-template/src/test/java/empty b/sensorhub-android-template/src/test/java/empty new file mode 100644 index 00000000..e69de29b diff --git a/sensorhub-android-template/src/test/resources/empty b/sensorhub-android-template/src/test/resources/empty new file mode 100644 index 00000000..e69de29b