OMG it works!!!
This commit is contained in:
parent
10ed4c2e32
commit
b933ff64f6
|
@ -55,8 +55,6 @@ import com.rusefi.io.serial.StreamConnector;
|
||||||
import com.rusefi.proxy.NetworkConnector;
|
import com.rusefi.proxy.NetworkConnector;
|
||||||
import com.rusefi.proxy.NetworkConnectorContext;
|
import com.rusefi.proxy.NetworkConnectorContext;
|
||||||
|
|
||||||
import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|
||||||
|
|
||||||
public class rusEFI extends Activity {
|
public class rusEFI extends Activity {
|
||||||
private static final String ACTION_USB_PERMISSION = "com.android.example.USB_PERMISSION";
|
private static final String ACTION_USB_PERMISSION = "com.android.example.USB_PERMISSION";
|
||||||
|
|
||||||
|
@ -123,7 +121,7 @@ public class rusEFI extends Activity {
|
||||||
dfuUpload.fileOperation(mResultView);
|
dfuUpload.fileOperation(mResultView);
|
||||||
authToken.setText(getAuthToken());
|
authToken.setText(getAuthToken());
|
||||||
|
|
||||||
switchOrProgramDfu();
|
// switchOrProgramDfu();
|
||||||
|
|
||||||
SoundBroadcast.checkOrRequestPermission(this);
|
SoundBroadcast.checkOrRequestPermission(this);
|
||||||
}
|
}
|
||||||
|
@ -243,7 +241,15 @@ public class rusEFI extends Activity {
|
||||||
linkManager.getConnector().connectAndReadConfiguration(new ConnectionStateListener() {
|
linkManager.getConnector().connectAndReadConfiguration(new ConnectionStateListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onConnectionEstablished() {
|
public void onConnectionEstablished() {
|
||||||
mResultView.append("On connection established\n");
|
mResultView.post(() -> mResultView.append("On connection established\n"));
|
||||||
|
|
||||||
|
NetworkConnectorContext context = new NetworkConnectorContext();
|
||||||
|
new NetworkConnector().start(getAuthToken(), context, new NetworkConnector.ReconnectListener() {
|
||||||
|
@Override
|
||||||
|
public void onReconnect() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}, linkManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -255,13 +261,6 @@ public class rusEFI extends Activity {
|
||||||
Snackbar mySnackbar = Snackbar.make(view, "Broadcasting with " + getAuthToken(), BaseTransientBottomBar.LENGTH_LONG);
|
Snackbar mySnackbar = Snackbar.make(view, "Broadcasting with " + getAuthToken(), BaseTransientBottomBar.LENGTH_LONG);
|
||||||
mySnackbar.show();
|
mySnackbar.show();
|
||||||
|
|
||||||
NetworkConnectorContext context = new NetworkConnectorContext();
|
|
||||||
new NetworkConnector().start(getAuthToken(), context, new NetworkConnector.ReconnectListener() {
|
|
||||||
@Override
|
|
||||||
public void onReconnect() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}, linkManager);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue