Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Known Issues
While this does have a dependency on the environment you are in (e.g. whether there is significant radio noise in the Bluetooth spectrum) in general we've found that the rate of connecting to a Shimmer3 device on the first try varies across Android devices. The following gives an example of the results we've seen, where percentage of success is the number of times the Android Phone Model is able to connect successfully to a Shimmer device the first time of trying:-

| Android Phone Model | Percentage of Success |
| ------------- | ------------- |
| Nokia 2.3 | 96% |
| Pocophone F1 | 60% |
| Redmi Note4 | 97% |
| Redmi 9AT | 99% |
| Samsung j3 | 97% |
| Samsung Galaxy A5 | 99% |
| Samsung Galaxy A10 | 99% |
| Xiaomi Redmi 9A | 99% |
| Pixel 3A | 77% |
| OnePlus 5 | 60% |

From a users perspective to improve the success rate of connecting the first time seamlessly, we recommend using logic in the background which will automatically try to connect to the Shimmer device should the first time fail. An example implementation of this logic can be found in the project/app shimmerConnectionTest. Please refer to the readme of said project for further details. Using said logic we have found significant improvements on the poor performing phones like the Pocophone F1 and the OnePlus 5.


# Important ~ Migration to JFrog
With Bintray being sunset, we have migrated to the use of JFrog. Should you face any problems please do not hesitate to contact us. We apologize for any inconvenience caused.

Expand Down
1 change: 1 addition & 0 deletions ShimmerAndroidInstrumentDriver/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ShimmerAndroidInstrumentDriver/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include ':ShimmerAndroidInstrumentDriver', ':bluetoothManagerExample', ':shimmerServiceExample', ':shimmerLegacyExample', ':shimmerBasicExample', ':efficientDataArrayExample'
include ':shimmer3DOrientationExample'
include ':shimmer3DOrientationExample', ':shimmerConnectionTest'
//Don't need shimmeradvancelibrary is just an example on how to import projects from different folders
//include ':ShimmerAdvanceLibrary'
//project (":ShimmerAdvanceLibrary").projectDir = new File("../../ShimmerAdvanceAPI/ShimmerAdvanceLibrary")
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
22 changes: 22 additions & 0 deletions ShimmerAndroidInstrumentDriver/shimmerConnectionTest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Shimmer Basic Example
This example is only applicable for Shimmer3 devices onwards. For Shimmer2 devices, please see the Legacy Example

- This example demonstrates connecting and streaming data from a Shimmer directly, without the use of the Bluetooth Manager
- The build.gradle file shows how to retrieve the library from bintray. Take note of the following:-

```
compile 'ShimmerAndroidInstrumentDriver:ShimmerAndroidInstrumentDriver:3.0.65Beta'
```

- Note you will need to specify the url for the shimmer bintray repository, this is done in the build.gradle file (root projects folder)
```
allprojects {
repositories {
google()
jcenter()
maven {
url "http://dl.bintray.com/shimmerengineering/Shimmer"
}
}
}
```
70 changes: 70 additions & 0 deletions ShimmerAndroidInstrumentDriver/shimmerConnectionTest/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26



defaultConfig {
applicationId "shimmerresearch.com.shimmerconnectiontest"
minSdkVersion 17
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}

configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:25.3.1'
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

androidTestCompile 'com.android.support:support-annotations:25.3.1'
//compile(group: 'com.shimmersensing', name: 'ShimmerAndroidInstrumentDriver', version: '3.0.71Beta', ext: 'aar')
compile project(':ShimmerAndroidInstrumentDriver')
implementation (group: 'com.shimmersensing', name: 'ShimmerBluetoothManager', version:'0.9.42beta'){
// excluding org.json which is provided by Android
exclude group: 'io.netty'
exclude group: 'com.google.protobuf'
exclude group: 'org.apache.commons.math'
}
implementation (group: 'com.shimmersensing', name: 'ShimmerDriver', version:'0.9.138beta'){
// excluding org.json which is provided by Android
exclude group: 'io.netty'
exclude group: 'com.google.protobuf'
exclude group: 'org.apache.commons.math'
}
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# 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 *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package shimmerresearch.com.shimmerconnectiontest;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("shimmerresearch.com.shimmerconnectiontest", appContext.getPackageName());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="shimmerresearch.com.shimmerconnectiontest">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="shimmerresearch.com.shimmerconnectiontest.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.shimmerresearch.android.guiUtilities.ShimmerBluetoothDialog"
android:theme="@android:style/Theme.Dialog">
</activity>

</application>

</manifest>
Loading