本文整理汇总了Java中no.nordicsemi.android.log.ILogSession类的典型用法代码示例。如果您正苦于以下问题:Java ILogSession类的具体用法?Java ILogSession怎么用?Java ILogSession使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILogSession类属于no.nordicsemi.android.log包,在下文中一共展示了ILogSession类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: connect
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
/**
* Adds the given device to managed and stars connecting to it. If the device is already connected this method does nothing.
* @param device target Bluetooth device
* @param session log session that has to be used by the device
*/
@SuppressWarnings("unchecked")
public void connect(final BluetoothDevice device, final ILogSession session) {
// If a device is in managed devices it means that it's already connected, or was connected
// using autoConnect and the link was lost but Android is already trying to connect to it.
if (mManagedDevices.contains(device))
return;
mManagedDevices.add(device);
BleManager<BleManagerCallbacks> manager = mBleManagers.get(device);
if (manager != null) {
if (session != null)
manager.setLogger(session);
manager.connect(device);
} else {
mBleManagers.put(device, manager = initializeManager());
manager.setGattCallbacks(BleMulticonnectProfileService.this);
manager.setLogger(session);
manager.connect(device);
}
}
开发者ID:NordicSemiconductor,项目名称:Android-nRF-Toolbox,代码行数:26,代码来源:BleMulticonnectProfileService.java
示例2: onDeviceSelected
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
@Override
public void onDeviceSelected(final BluetoothDevice device, final String name) {
final int titleId = getLoggerProfileTitle();
ILogSession logSession = null;
if (titleId > 0) {
logSession = Logger.newSession(getApplicationContext(), getString(titleId), device.getAddress(), name);
// If nRF Logger is not installed we may want to use local logger
if (logSession == null && getLocalAuthorityLogger() != null) {
logSession = LocalLogSession.newSession(getApplicationContext(), getLocalAuthorityLogger(), device.getAddress(), name);
}
}
mService.connect(device, logSession);
}
开发者ID:NordicSemiconductor,项目名称:Android-nRF-Toolbox,代码行数:15,代码来源:BleMulticonnectProfileServiceReadyActivity.java
示例3: getLogSession
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
@Override
public ILogSession getLogSession() {
return super.getLogSession();
}
开发者ID:runtimeco,项目名称:Android-DFU-App,代码行数:5,代码来源:UARTService.java
示例4: setLogger
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
/**
* Sets the optional log session. This session will be used to log Bluetooth events.
* The logs may be viewed using the nRF Logger application: https://play.google.com/store/apps/details?id=no.nordicsemi.android.log
* Since nRF Logger Library v2.0 an app may define it's own log provider. Use {@link BleProfileServiceReadyActivity#getLocalAuthorityLogger()} to define local log URI.
* NOTE: nRF Logger must be installed prior to nRF Toolbox as it defines the required permission which is used by nRF Toolbox.
*
* @param session the session, or null if nRF Logger is not installed.
*/
public void setLogger(final ILogSession session) {
mLogSession = session;
}
开发者ID:runtimeco,项目名称:Android-DFU-App,代码行数:12,代码来源:BleManager.java
示例5: getLogSession
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
/**
* Returns the log session that can be used to append log entries. The log session is created when the service is being created. The method returns <code>null</code> if the nRF Logger app was
* not installed.
*
* @return the log session
*/
public ILogSession getLogSession() {
return mLogSession;
}
开发者ID:runtimeco,项目名称:Android-DFU-App,代码行数:10,代码来源:BleProfileService.java
示例6: getLogSession
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
/**
* Returns the log session. Log session is created when the device was selected using the {@link ScannerFragment} and released when user press DISCONNECT.
*
* @return the logger session or <code>null</code>
*/
public ILogSession getLogSession() {
return mLogSession;
}
开发者ID:runtimeco,项目名称:Android-DFU-App,代码行数:9,代码来源:BleProfileServiceReadyActivity.java
示例7: getLogSession
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
/**
* Returns the log session. Log session is created when the device was selected using the {@link ScannerFragment} and released when user press DISCONNECT.
*
* @return the logger session or <code>null</code>
*/
protected ILogSession getLogSession() {
return mLogSession;
}
开发者ID:NordicSemiconductor,项目名称:Android-nRF-Toolbox,代码行数:9,代码来源:BleProfileExpandableListActivity.java
示例8: getLogSession
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
/**
* Returns the log session that can be used to append log entries.
* The log session is created when the service is being created.
* The method returns <code>null</code> if the nRF Logger app was not installed.
*
* @return the log session
*/
public ILogSession getLogSession() {
return mLogSession;
}
开发者ID:NordicSemiconductor,项目名称:Android-nRF-Toolbox,代码行数:11,代码来源:BleProfileService.java
示例9: getLogSession
import no.nordicsemi.android.log.ILogSession; //导入依赖的package包/类
/**
* Returns the log session that can be used to append log entries. The log session is created when the service is being created. The method returns <code>null</code> if the nRF Logger app was
* not installed.
*
* @return the log session
*/
protected ILogSession getLogSession() {
return mLogSession;
}
开发者ID:linkezhi,项目名称:Android-nRF-Toolbox-master,代码行数:10,代码来源:BleProfileService.java
注:本文中的no.nordicsemi.android.log.ILogSession类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论