Browse Source

1,更新依赖库

2,微调双频八电极界面
master
陈福行 23 hours ago
parent
commit
df2e88d082

+ 3
- 3
app/build.gradle View File

applicationId "aicare.net.cn.sdk.ailinksdkdemoandroid" applicationId "aicare.net.cn.sdk.ailinksdkdemoandroid"
minSdkVersion app_minSdk minSdkVersion app_minSdk
targetSdkVersion app_targetSdk targetSdkVersion app_targetSdk
versionName "1.16.21"
versionName "1.16.22"
versionCode getVersionCodeNumber(versionName) versionCode getVersionCodeNumber(versionName)
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
//https://jitpack.io/#elinkthings/AILinkSDKRepositoryAndroid //https://jitpack.io/#elinkthings/AILinkSDKRepositoryAndroid
implementation 'com.github.elinkthings:AILinkSDKRepositoryAndroid:1.15.04'//蓝牙核心库
implementation 'com.github.elinkthings:AILinkSDKRepositoryAndroid:1.15.11'//蓝牙核心库


//https://jitpack.io/#elinkthings/AILinkSDKParsingLibraryAndroid //https://jitpack.io/#elinkthings/AILinkSDKParsingLibraryAndroid
implementation 'com.github.elinkthings:AILinkSDKParsingLibraryAndroid:1.9.13'//蓝牙解析库,需要依赖核心库
implementation 'com.github.elinkthings:AILinkSDKParsingLibraryAndroid:1.9.20'//蓝牙解析库,需要依赖核心库
implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// implementation project(path: ':otalibrary') // implementation project(path: ':otalibrary')

+ 1
- 1
app/src/main/java/aicare/net/cn/sdk/ailinksdkdemoandroid/BleCmdActivity.java View File

} }
byte[] data = BleStrUtils.stringToByte(setDevice); byte[] data = BleStrUtils.stringToByte(setDevice);
sendBleBean = new SendBleBean(); sendBleBean = new SendBleBean();
sendBleBean.setHex(mBleSendCmdUtil.setDeviceInfo(data));
sendBleBean.setHex(mBleSendCmdUtil.setDeviceSaveCustomData(data));
sendData(sendBleBean); sendData(sendBleBean);
addShowData("设置设备信息:" + BleStrUtils.byte2HexStr(data)); addShowData("设置设备信息:" + BleStrUtils.byte2HexStr(data));
} else if (id == R.id.btn_get_device) {// 获取设备信息 } else if (id == R.id.btn_get_device) {// 获取设备信息

+ 2
- 1
app/src/main/java/aicare/net/cn/sdk/ailinksdkdemoandroid/modules/coffee_scale/CoffeeScaleActivity.java View File

private void appBrewMode() { private void appBrewMode() {
Log.i(TAG, "设置冲煮模式"); Log.i(TAG, "设置冲煮模式");
int status = rb_brew_mode_enter.isChecked() ? 1 : 0; int status = rb_brew_mode_enter.isChecked() ? 1 : 0;
int btn = 1;
if (mCoffeeScaleData != null) { if (mCoffeeScaleData != null) {
addText("APP设置冲煮模式:" + status + ";" + getBrewMode(status)); addText("APP设置冲煮模式:" + status + ";" + getBrewMode(status));
mCoffeeScaleData.brewMode(status);
mCoffeeScaleData.brewMode(status,btn);
} }
} }



+ 57
- 25
app/src/main/java/aicare/net/cn/sdk/ailinksdkdemoandroid/modules/eight_bodyfat/dual_band/EightDoubleBodyfatActivity.java View File

test_bodyfit.setOnClickListener(new View.OnClickListener() { test_bodyfit.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
List<EightDoubleBodyFatAdcBean> list = new ArrayList<>();
EightDoubleBodyFatAdcBean adcBean = new EightDoubleBodyFatAdcBean();
adcBean.setAdcRightHand(0x70CE5D91L);
adcBean.setAdcLeftHand(0x61A2D714L);
adcBean.setAdcBody(0x3013EEE0L);
adcBean.setAdcRightFoot(0x50A93C9FL);
adcBean.setAdcLeftFoot(0x10071D0CL);
adcBean.setFrequencyId(0x01);
adcBean.setAlgorithmsId(0x01);
list.add(adcBean);

EightDoubleBodyFatAdcBean adcBean100 = new EightDoubleBodyFatAdcBean();
adcBean100.setAdcRightHand(0x509A9A5FL);
adcBean100.setAdcLeftHand(0x7037B559L);
adcBean100.setAdcBody(0x3022CEC6L);
adcBean100.setAdcRightFoot(0x60AA8F98L);
adcBean100.setAdcLeftFoot(0x40F72698L);
adcBean100.setFrequencyId(0x02);
adcBean100.setAlgorithmsId(0x01);
list.add(adcBean100);
mCid = EightDoubleBodyFatBleConfig.CID_APP;
onTestCompleted(list);
testAdc2();

} }
}); });

}

private void testAdc1(){
List<EightDoubleBodyFatAdcBean> list = new ArrayList<>();
EightDoubleBodyFatAdcBean adcBean = new EightDoubleBodyFatAdcBean();
adcBean.setAdcRightHand(0x70CE5D91L);
adcBean.setAdcLeftHand(0x61A2D714L);
adcBean.setAdcBody(0x3013EEE0L);
adcBean.setAdcRightFoot(0x50A93C9FL);
adcBean.setAdcLeftFoot(0x10071D0CL);
adcBean.setFrequencyId(0x01);
adcBean.setAlgorithmsId(0x01);
list.add(adcBean);

EightDoubleBodyFatAdcBean adcBean100 = new EightDoubleBodyFatAdcBean();
adcBean100.setAdcRightHand(0x509A9A5FL);
adcBean100.setAdcLeftHand(0x7037B559L);
adcBean100.setAdcBody(0x3022CEC6L);
adcBean100.setAdcRightFoot(0x60AA8F98L);
adcBean100.setAdcLeftFoot(0x40F72698L);
adcBean100.setFrequencyId(0x02);
adcBean100.setAlgorithmsId(0x01);
list.add(adcBean100);
onTestCompleted(list);
} }
private void testAdc2(){
List<EightDoubleBodyFatAdcBean> list = new ArrayList<>();
EightDoubleBodyFatAdcBean adcBean = new EightDoubleBodyFatAdcBean();
adcBean.setAdcRightHand(1635046219);
adcBean.setAdcLeftHand(31463021);
adcBean.setAdcBody(540087696);
adcBean.setAdcRightFoot(8196483);
adcBean.setAdcLeftFoot(4182139);
adcBean.setFrequencyId(0x01);
adcBean.setAlgorithmsId(0x01);
list.add(adcBean);

EightDoubleBodyFatAdcBean adcBean100 = new EightDoubleBodyFatAdcBean();
adcBean100.setAdcRightHand(1343010255);
adcBean100.setAdcLeftHand(11339343);
adcBean100.setAdcBody(536975770);
adcBean100.setAdcRightFoot(816731059);
adcBean100.setAdcLeftFoot(1884060387);
adcBean100.setFrequencyId(0x02);
adcBean100.setAlgorithmsId(0x01);
list.add(adcBean100);
onTestCompleted(list);
}




private void initUserInfo() { private void initUserInfo() {
mWeightKg = et_weight.getText().toString().trim(); mWeightKg = et_weight.getText().toString().trim();




private void getBodyFatData(List<EightDoubleBodyFatAdcBean> adcBeanList) { private void getBodyFatData(List<EightDoubleBodyFatAdcBean> adcBeanList) {
if (mCid != EightDoubleBodyFatBleConfig.CID_APP || adcBeanList == null || adcBeanList.isEmpty()) {
if ((mCid != EightDoubleBodyFatBleConfig.CID_APP && mCid != EightDoubleBodyFatBleConfig.CID_MCU) || adcBeanList == null || adcBeanList.isEmpty()) {
return; return;
} }
mEightDoubleBodyFatData.getDualEightBodyData(mUserInfoBean.getSex(), mUserInfoBean.getAge(), mUserInfoBean.getWeightKg(),
mUserInfoBean.getHeightCm(), adcBeanList);
if (mEightDoubleBodyFatData!=null) {
mEightDoubleBodyFatData.getDualEightBodyData(mUserInfoBean.getSex(), mUserInfoBean.getAge(), mUserInfoBean.getWeightKg(),
mUserInfoBean.getHeightCm(), adcBeanList);
}
} }


@Override @Override

+ 1
- 1
app/src/main/res/layout/activity_eight_double_body_fata.xml View File

android:id="@+id/test_bodyfit" android:id="@+id/test_bodyfit"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="计算体脂数据" />
android:text="计算体脂数据(测试用)" />


<ListView <ListView
android:id="@+id/log_list" android:id="@+id/log_list"

Loading…
Cancel
Save