Back to project page BTSerialConsole.
The source code is released under:
MIT License
If you think the Android project BTSerialConsole listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.neykov.bluetoothserialconsole.connection; /*from www . j a va 2 s. co m*/ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import android.content.Context; public abstract class DeviceDriver implements IDeviceDriver { protected final IDeviceDriverCallback mDeviceCallback; protected DeviceDriver(Context context, IDeviceDriverCallback callbackObject, String sAppName) { this.mDeviceCallback = callbackObject; } abstract public void openConnection(); abstract public void closeConnection(); abstract public void setup(ConnectionParameters connParams) throws IOException; abstract public boolean isConnected(); abstract public int write(byte[] writeBuffer); abstract public int write(byte[] writeBuffer, int length); public int write(String writeString) { return write(writeString.getBytes()); } public abstract OutputStream getOutputStream(); public abstract InputStream getInputStream(); public abstract String getDeviceName(); }