Java Code Examples for android.bluetooth.BluetoothGattServer#STATE_CONNECTED

The following examples show how to use android.bluetooth.BluetoothGattServer#STATE_CONNECTED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PA_Task_RequiresServerConnection.java    From AsteroidOSSync with GNU General Public License v3.0 5 votes vote down vote up
@Override protected boolean isExecutable()
{
	boolean shouldBeExecutable = super.isExecutable() && getServer().m_nativeWrapper.getNativeState(m_macAddress) == BluetoothGattServer.STATE_CONNECTED;
	
	if( shouldBeExecutable )
	{
		return true;
	}
	
	return false;
}
 
Example 2
Source File: PA_Task_RequiresServerConnection.java    From SweetBlue with GNU General Public License v3.0 5 votes vote down vote up
@Override protected boolean isExecutable()
{
	boolean shouldBeExecutable = super.isExecutable() && getServer().m_nativeWrapper.getNativeState(m_macAddress) == BluetoothGattServer.STATE_CONNECTED;
	
	if( shouldBeExecutable )
	{
		return true;
	}
	
	return false;
}
 
Example 3
Source File: P_NativeServerWrapper.java    From AsteroidOSSync with GNU General Public License v3.0 4 votes vote down vote up
public final boolean isConnected(final String macAddress)
{
	return getNativeState(macAddress) == BluetoothGattServer.STATE_CONNECTED;
}
 
Example 4
Source File: P_NativeServerWrapper.java    From AsteroidOSSync with GNU General Public License v3.0 4 votes vote down vote up
public final boolean isConnectingOrConnected(final String macAddress)
{
	final int  nativeState = getNativeState(macAddress);

	return nativeState == BluetoothGattServer.STATE_CONNECTING || nativeState == BluetoothGattServer.STATE_CONNECTED;
}
 
Example 5
Source File: P_NativeServerWrapper.java    From SweetBlue with GNU General Public License v3.0 4 votes vote down vote up
public final boolean isConnected(final String macAddress)
{
	return getNativeState(macAddress) == BluetoothGattServer.STATE_CONNECTED;
}
 
Example 6
Source File: P_NativeServerWrapper.java    From SweetBlue with GNU General Public License v3.0 4 votes vote down vote up
public final boolean isConnectingOrConnected(final String macAddress)
{
	final int  nativeState = getNativeState(macAddress);

	return nativeState == BluetoothGattServer.STATE_CONNECTING || nativeState == BluetoothGattServer.STATE_CONNECTED;
}