本文整理汇总了Java中com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc类的典型用法代码示例。如果您正苦于以下问题:Java AntPlusHeartRatePcc类的具体用法?Java AntPlusHeartRatePcc怎么用?Java AntPlusHeartRatePcc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AntPlusHeartRatePcc类属于com.dsi.ant.plugins.antplus.pcc包,在下文中一共展示了AntPlusHeartRatePcc类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResultReceived
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
@Override
public void onResultReceived(AntPlusHeartRatePcc antPlusHeartRatePcc, RequestAccessResult requestAccessResult, DeviceState deviceState) {
switch(requestAccessResult) {
case SUCCESS:
wgtplc = antPlusHeartRatePcc;
notifyDeviceStatusChanged(HRVDeviceStatus.CONNECTED);
break;
case USER_CANCELLED:
case SEARCH_TIMEOUT:
case OTHER_FAILURE:
notifyDeviceStatusChanged(HRVDeviceStatus.DISCONNECTED);
break;
default:
notifyDeviceStatusChanged(HRVDeviceStatus.DISCONNECTED);
}
}
示例2: connect
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
@Override
public void connect() {
notifyDeviceStatusChanged(HRVDeviceStatus.CONNECTING);
//Release the old access
if(wgtplc != null) {
wgtplc.releaseAccess();
wgtplc = null;
}
final AntPlusRRDataDevice helper = this;
//Make access request
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
AntPlusHeartRatePcc.requestAccess(activity, activity.getApplicationContext(), helper, helper);
}
});
}
示例3: onDeviceStateChange
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
public void onDeviceStateChange(final int newDeviceState) {
// this method is called back by the ANT+ plugin to notify of device state changes
myact.runOnUiThread(new Runnable() {
@Override
public void run() {
Log.i(this.toString(), "DEV STATE CHANGED: " + AntPlusHeartRatePcc.statusCodeToPrintableString(newDeviceState));
if ( (newDeviceState == AntPluginMsgDefines.DeviceStateCodes.TRACKING) && !isConnected() ) setConnected();
if (newDeviceState == AntPluginMsgDefines.DeviceStateCodes.DEAD) stop();
}
});
}
示例4: onNewCalculatedRrInterval
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
@Override
public void onNewCalculatedRrInterval(long l, EnumSet<EventFlag> enumSet, BigDecimal bigDecimal, AntPlusHeartRatePcc.RrFlag rrFlag) {
double rr = bigDecimal.longValue() / 1000.0;
this.rrMeasurements.add(rr);
notifyRRIntervalListeners(rr);
}
示例5: requestAsyncScanController
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
@Override
protected AsyncScanController<AntPlusHeartRatePcc> requestAsyncScanController( int proximity) {
return AntPlusHeartRatePcc.requestAsyncScanController(this, proximity, this);
}
开发者ID:NEUROINFORMATICS-GROUP-FAV-KIV-ZCU,项目名称:elfyz-data-mobile-logger,代码行数:5,代码来源:HeartRateDevicePickerActivity.java
示例6: connect
import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
public void connect() {
myact.setConnStatus("Connecting...");
AntPlusHeartRatePcc.requestAccess(myact, myact, this, this); // register with the ANT+ plugin
}