alert string update fix

master
Omer Schloss 3 years ago
parent e01c0c1145
commit bafe1db4a0

@ -1,6 +1,7 @@
package com.example.flightgearcontrollerapp.model
import java.io.PrintWriter
import java.net.InetSocketAddress
import java.net.Socket
class TelnetClient{
@ -9,11 +10,13 @@ class TelnetClient{
private lateinit var output:PrintWriter
fun connect(ipAddress: String, portAddress: Int): Boolean {
return try {
client = Socket(ipAddress, portAddress)
client = Socket()
client.connect(InetSocketAddress(ipAddress, portAddress),5000)
output = PrintWriter(client.getOutputStream(), true)
true
}catch (e: Exception){
e.printStackTrace()
throw RuntimeException(e)
false
}
}

@ -8,7 +8,7 @@
<string name="txt_rudder">Rudder</string>
<string name="disconnect">disconnect</string>
<string name="alert_dialog_flightgear_connection">FlightGear Connection</string>
<string name="alert_instruction">For connecting to FlightGear App,\nFirst open the app.\nThen, copy these lines to Setting-> Additional Setting:\n\n &#45;&#45;telnet=socket,in,10,\'ip\',\'port\',tcp,playback_small \n\n and now just press fly!</string>
<string name="alert_instruction">For connecting to FlightGear App,\nFirst open the app.\nThen, copy these lines to Setting-> Additional Setting:\n\n &#45;&#45;telnet=socket,in,10,\'ip\',\'port\',tcp\n\n and now just press fly!</string>
<string name="ok_btn">continue</string>
<string name="alert_title">FlightGear Connection</string>
<string name="connection_failed">Connection failed!</string>

Loading…
Cancel
Save