Skip to content

Commit 6c0c049

Browse files
committed
working on Bluetooth problem: Switching off BT doesn't kill BT sockets - problem understood - no completely solved, tough
1 parent 58cc2c4 commit 6c0c049

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

app/libs/ASAP_Engine_0.5.0.jar

263 Bytes
Binary file not shown.

app/src/main/java/net/sharksystem/asap/android/service/ASAPConnectionLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private String getLogStart() {
4040
}
4141

4242
public void run() {
43-
Log.d(this.getLogStart(), "started");
43+
Log.d(this.getLogStart(), "going to launch a new asap connection");
4444

4545
try {
4646
if(this.is == null) {

app/src/main/java/net/sharksystem/asap/android/service/MacLayerEngine.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
import android.content.Context;
44
import android.util.Log;
55

6+
import net.sharksystem.asap.ASAPException;
67
import net.sharksystem.asap.MultiASAPEngineFS;
8+
import net.sharksystem.asap.protocol.ASAPConnection;
79

10+
import java.io.IOException;
811
import java.io.InputStream;
912
import java.io.OutputStream;
1013
import java.util.Date;
@@ -103,12 +106,24 @@ private String getLogStart() {
103106

104107
protected void launchASAPConnection(
105108
String address, InputStream inputStream, OutputStream outputStream) {
106-
109+
/*
107110
// set up new ASAP Session on that connection
108111
ASAPConnectionLauncher asapConnectionLauncher =
109112
new ASAPConnectionLauncher(
110113
inputStream, outputStream, this.getAsapService().getASAPEngine());
111114
112115
asapConnectionLauncher.start();
116+
*/
117+
Log.d(this.getLogStart(), "going to launch a new asap connection");
118+
119+
try {
120+
Log.d(this.getLogStart(), "call asapMultiEngine to handle connection");
121+
// TestConnectionHandler testConnectionHandler = new TestConnectionHandler(this.is, this.os);
122+
// testConnectionHandler.start();
123+
ASAPConnection asapConnection =
124+
this.getAsapService().getASAPEngine().handleConnection(inputStream, outputStream);
125+
} catch (IOException | ASAPException e) {
126+
Log.d(this.getLogStart(), "while lauching asap connection: " + e.getLocalizedMessage());
127+
}
113128
}
114129
}

0 commit comments

Comments
 (0)