File tree Expand file tree Collapse file tree 4 files changed +17
-16
lines changed
ShimmerAndroidInstrumentDriver
ShimmerAndroidInstrumentDriver
src/main/java/com/shimmerresearch/android
shimmerServiceExample/src/main/java/com/shimmerresearch/shimmercapture Expand file tree Collapse file tree 4 files changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ publishing {
8383 bar(MavenPublication) {
8484 groupId = 'com.shimmerresearch' // Replace with your package's group/organization name
8585 artifactId = 'shimmerandroidinstrumentdriver' // Replace with the name of your package
86- version = '3.2.3_beta ' // Replace with your package version
86+ version = '3.2.4_beta ' // Replace with your package version
8787 artifact("$buildDir/outputs/aar/${getArtificatId()}-release.aar")
8888 }
8989 }
Original file line number Diff line number Diff line change @@ -862,9 +862,9 @@ protected byte[] getDataFromArrayOutputStream(int extraBytesLength){
862862 @ Override
863863 protected void processInstreamResponse (boolean shouldClearCrcFromBuffer ) {
864864
865- if (mBluetoothRadioState .equals (BT_STATE .CONNECTED )){
865+ if (! mBluetoothRadioState .equals (BT_STATE .STREAMING )){ //every other start besides streaming
866866 super .processInstreamResponse (shouldClearCrcFromBuffer );
867- } else if ( mBluetoothRadioState . equals ( BT_STATE . STREAMING )){
867+ } else { //streaming state
868868 //byte[] inStreamResponseCommandBuffer = readBytes(1, INSTREAM_CMD_RESPONSE);
869869 byte [] bufferTemp = getDataFromArrayOutputStream (4 );
870870 if (bufferTemp != null ) {
Original file line number Diff line number Diff line change @@ -78,15 +78,15 @@ allprojects {
7878 implementation ' java3d:vecmath:1.3.1'
7979 implementation ' androidx.appcompat:appcompat:1.7.0'
8080 implementation ' com.github.Jasonchenlijian:FastBle:2.4.0'
81- implementation (group : ' com.shimmerresearch' , name : ' shimmerbluetoothmanager' , version :' 0.11.4_beta ' ){
81+ implementation (group : ' com.shimmerresearch' , name : ' shimmerbluetoothmanager' , version :' 0.11.5_beta ' ){
8282
8383 // excluding org.json which is provided by Android
8484 exclude group : ' io.netty'
8585 exclude group : ' com.google.protobuf'
8686 exclude group : ' org.apache.commons.math'
8787 }
8888
89- implementation (group : ' com.shimmerresearch' , name : ' shimmerdriver' , version :' 0.11.4_beta ' ){
89+ implementation (group : ' com.shimmerresearch' , name : ' shimmerdriver' , version :' 0.11.5_beta ' ){
9090
9191 // excluding org.json which is provided by Android
9292 exclude group : ' io.netty'
Original file line number Diff line number Diff line change @@ -527,17 +527,18 @@ public void onClick(DialogInterface dialog, int id) {
527527 }else if (id == R .id .device_info ){
528528 if (selectedDeviceAddress ==null ){
529529 return true ;
530- }
531- ShimmerDevice shimmerTemp = mService .getShimmer (selectedDeviceAddress );
532- String shimmerVersion = shimmerTemp .getHardwareVersionParsed ();
533- String FWName = shimmerTemp .getFirmwareVersionParsed ();
534- if (FWName .equals ("" ))
535- FWName = "Unknown" ;
536-
537- AlertDialog alertDialog = new AlertDialog .Builder (MainActivity .this ).create ();
538- alertDialog .setTitle ("Device Info" );
539- alertDialog .setMessage ("Shimmer Version: " +shimmerVersion + "\n \n Firmware Version: " +FWName );
540- alertDialog .show ();
530+
531+ ShimmerDevice shimmerTemp = mService .getShimmer (selectedDeviceAddress );
532+ double chargePercentage = shimmerTemp .getEstimatedChargePercentage ();
533+ String shimmerVersion = shimmerTemp .getHardwareVersionParsed ();
534+ String FWName = shimmerTemp .getFirmwareVersionParsed ();
535+ if (FWName .equals ("" ))
536+ FWName = "Unknown" ;
537+
538+ AlertDialog alertDialog = new AlertDialog .Builder (MainActivity .this ).create ();
539+ alertDialog .setTitle ("Device Info" );
540+ alertDialog .setMessage ("Shimmer Version: " +shimmerVersion + "\n \n Firmware Version: " +FWName + "\n \n Charge Percentage: " + (int )chargePercentage +"%" );
541+ alertDialog .show ();
541542
542543 return true ;
543544
You can’t perform that action at this time.
0 commit comments