How to connect TIdTCPClient to TIdTCPServer on Android/IOS?

  

Indy TIdTCPClient Error: socket error # 113 no rout to host when connecting from Android to PC.

Hello, i know i asked a lot of questions about Indy Components lately, but i’m having a real problem trying to connect TIdTCPClient in my Android device to TIdTCPServer which is on my PC Windows 10.

I have to add that i am using WIFI on LAN network, also all devices have WIFI access.

Also, i have to mention that my windows 10 FireWall is Off, so it cannot be firewalled somehow.
In addition, there’s no antiviruses active in my windows 10 platform, not even MCAfee.

This is the error i get when i try to connect from my Android to PC:

socket error # 113 no route to host

Note: I can connect when i use both sides TIdTCPClient and TIdTCPServer on same Machine.

Connection Template:

This is my problem:

1- Connect from PC1 to PC2 = “Failed“.

2- Connect from PC1 to PC1 = “Success“.

3- Connect from PC1 to Android/IOS = “Failed“.

4- Connect from Android/IOS to PC1 = “Failed“.

On Failed i get the error above.

XML UPDATE:

<?xml version=”1.0″ encoding=”utf-8″?>
<!– BEGIN_INCLUDE(manifest) –>
<manifest xmlns:android=”http://schemas.android.com/apk/res/android”
package=”com.embarcadero.watcher”
android:versionCode=”1″
android:versionName=”1.0.0″
android:installLocation=”auto”>

<!– This is the platform API where NativeActivity was introduced. –>
<uses-sdk android:minSdkVersion=”14″ android:targetSdkVersion=”14″ />
<uses-permission android:name=”android.permission.ACCESS_COARSE_LOCATION” />
<uses-permission android:name=”android.permission.ACCESS_FINE_LOCATION” />
<uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE” />
<uses-permission android:name=”android.permission.ACCESS_WIFI_STATE” />
<uses-permission android:name=”android.permission.CALL_PHONE” />
<uses-permission android:name=”android.permission.CAMERA” />
<uses-permission android:name=”android.permission.INTERNET” />
<uses-permission android:name=”android.permission.READ_CALENDAR” />
<uses-permission android:name=”android.permission.READ_EXTERNAL_STORAGE” />
<uses-permission android:name=”android.permission.READ_PHONE_STATE” />
<uses-permission android:name=”android.permission.WRITE_CALENDAR” />
<uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE” />

<uses-feature android:glEsVersion=”0x00020000″ android:required=”True”/>
<application android:persistent=”False”
android:restoreAnyVersion=”False”
android:label=”watcher”
android:debuggable=”True”
android:largeHeap=”False”
android:icon=”@drawable/ic_launcher”
android:theme=”@style/AppTheme”
android:hardwareAccelerated=”true”>

<!– Our activity is a subclass of the built-in NativeActivity framework class.
This will take care of integrating with our NDK code. –>
<activity android:name=”com.embarcadero.firemonkey.FMXNativeActivity”
android:label=”watcher”
android:configChanges=”orientation|keyboard|keyboardHidden|screenSize”
android:launchMode=”singleTask”>
<!– Tell NativeActivity the name of our .so –>
<meta-data android:name=”android.app.lib_name”
android:value=”watcher” />
<intent-filter>
<action android:name=”android.intent.action.MAIN” />
<category android:name=”android.intent.category.LAUNCHER” />
</intent-filter>
</activity>

<receiver android:name=”com.embarcadero.rtl.notifications.NotificationAlarm” />

</application>
</manifest>
<!– END_INCLUDE(manifest) –>

Comments are closed.