Skip to content

Commit 5bf26be

Browse files
authored
Merge pull request #42 from ShimmerEngineering/AA-259_7
AA-259
2 parents ba8b8fe + 554e263 commit 5bf26be

File tree

29 files changed

+1054
-1
lines changed

29 files changed

+1054
-1
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# Known Issues
2+
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:-
3+
4+
| Android Phone Model | Percentage of Success |
5+
| ------------- | ------------- |
6+
| Nokia 2.3 | 96% |
7+
| Pocophone F1 | 60% |
8+
| Redmi Note4 | 97% |
9+
| Redmi 9AT | 99% |
10+
| Samsung j3 | 97% |
11+
| Samsung Galaxy A5 | 99% |
12+
| Samsung Galaxy A10 | 99% |
13+
| Xiaomi Redmi 9A | 99% |
14+
| Pixel 3A | 77% |
15+
| OnePlus 5 | 60% |
16+
17+
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.
18+
19+
120
# Important ~ Migration to JFrog
221
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.
322

ShimmerAndroidInstrumentDriver/.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include ':ShimmerAndroidInstrumentDriver', ':bluetoothManagerExample', ':shimmerServiceExample', ':shimmerLegacyExample', ':shimmerBasicExample', ':efficientDataArrayExample'
2-
include ':shimmer3DOrientationExample'
2+
include ':shimmer3DOrientationExample', ':shimmerConnectionTest'
33
//Don't need shimmeradvancelibrary is just an example on how to import projects from different folders
44
//include ':ShimmerAdvanceLibrary'
55
//project (":ShimmerAdvanceLibrary").projectDir = new File("../../ShimmerAdvanceAPI/ShimmerAdvanceLibrary")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Shimmer Basic Example
2+
This example is only applicable for Shimmer3 devices onwards. For Shimmer2 devices, please see the Legacy Example
3+
4+
- This example demonstrates connecting and streaming data from a Shimmer directly, without the use of the Bluetooth Manager
5+
- The build.gradle file shows how to retrieve the library from bintray. Take note of the following:-
6+
7+
```
8+
compile 'ShimmerAndroidInstrumentDriver:ShimmerAndroidInstrumentDriver:3.0.65Beta'
9+
```
10+
11+
- Note you will need to specify the url for the shimmer bintray repository, this is done in the build.gradle file (root projects folder)
12+
```
13+
allprojects {
14+
repositories {
15+
google()
16+
jcenter()
17+
maven {
18+
url "http://dl.bintray.com/shimmerengineering/Shimmer"
19+
}
20+
}
21+
}
22+
```
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 26
5+
6+
7+
8+
defaultConfig {
9+
applicationId "shimmerresearch.com.shimmerconnectiontest"
10+
minSdkVersion 17
11+
targetSdkVersion 26
12+
versionCode 1
13+
versionName "1.0"
14+
multiDexEnabled true
15+
16+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
17+
18+
}
19+
20+
buildTypes {
21+
release {
22+
minifyEnabled false
23+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
24+
}
25+
}
26+
27+
packagingOptions {
28+
exclude 'META-INF/DEPENDENCIES'
29+
exclude 'META-INF/LICENSE'
30+
exclude 'META-INF/LICENSE.txt'
31+
exclude 'META-INF/license.txt'
32+
exclude 'META-INF/NOTICE'
33+
exclude 'META-INF/NOTICE.txt'
34+
exclude 'META-INF/notice.txt'
35+
exclude 'META-INF/ASL2.0'
36+
}
37+
38+
configurations.all {
39+
resolutionStrategy.force 'com.android.support:support-annotations:25.3.1'
40+
}
41+
42+
}
43+
44+
dependencies {
45+
implementation fileTree(dir: 'libs', include: ['*.jar'])
46+
47+
androidTestCompile 'com.android.support:support-annotations:25.3.1'
48+
//compile(group: 'com.shimmersensing', name: 'ShimmerAndroidInstrumentDriver', version: '3.0.71Beta', ext: 'aar')
49+
compile project(':ShimmerAndroidInstrumentDriver')
50+
implementation (group: 'com.shimmersensing', name: 'ShimmerBluetoothManager', version:'0.9.42beta'){
51+
// excluding org.json which is provided by Android
52+
exclude group: 'io.netty'
53+
exclude group: 'com.google.protobuf'
54+
exclude group: 'org.apache.commons.math'
55+
}
56+
implementation (group: 'com.shimmersensing', name: 'ShimmerDriver', version:'0.9.138beta'){
57+
// excluding org.json which is provided by Android
58+
exclude group: 'io.netty'
59+
exclude group: 'com.google.protobuf'
60+
exclude group: 'org.apache.commons.math'
61+
}
62+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
63+
testImplementation 'junit:junit:4.12'
64+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
65+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
66+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
67+
}
68+
repositories {
69+
mavenCentral()
70+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package shimmerresearch.com.shimmerconnectiontest;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("shimmerresearch.com.shimmerconnectiontest", appContext.getPackageName());
25+
}
26+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="shimmerresearch.com.shimmerconnectiontest">
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@mipmap/ic_launcher"
8+
android:label="@string/app_name"
9+
android:roundIcon="@mipmap/ic_launcher_round"
10+
android:supportsRtl="true"
11+
android:theme="@style/AppTheme">
12+
<activity android:name="shimmerresearch.com.shimmerconnectiontest.MainActivity">
13+
<intent-filter>
14+
<action android:name="android.intent.action.MAIN" />
15+
16+
<category android:name="android.intent.category.LAUNCHER" />
17+
</intent-filter>
18+
</activity>
19+
<activity android:name="com.shimmerresearch.android.guiUtilities.ShimmerBluetoothDialog"
20+
android:theme="@android:style/Theme.Dialog">
21+
</activity>
22+
23+
</application>
24+
25+
</manifest>

0 commit comments

Comments
 (0)