wikiti / extension-networking

Library developed for OpenFL to facilitate connections between applications, using TCP sockets, and following the scheme of event-driven programming.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

client.send in Android doesn't seem to be working

f-rank opened this issue · comments

Hi, after establishing a Server in Windows, opening a Client in Android and connecting to server from the client, trying:

server.send({ x: "something"});

doesn't seem to register on the android client. Maybe I am missing something here though.
I can provide the HaxeDevelop project, with both the server and the client, if needed.
It's a simple in house project so no NDA.

Hello @f-rank,

Does it work with any of the project samples? Which versions of Haxe, Lime and OpenFL are you using?

Hi @wikiti,

I'm on
haxe 3.4.7
openfl 8.9.0
lime 7.3.0
hxcpp 4.0.8

I didn't understand the part about the project samples, should I try them in android ?

The gist of it is that after a successful connection, the send from the windows server isn't registering on the android client.. haven't tried the other way around though.

Edit 1: I can use the server.send between windows and windows and flash.

Edit 2: No message_sent getting triggered even.

Hi @f-rank ,

I didn't understand the part about the project samples, should I try them in android ?

Yes, try them on android (client) and windows (server) and see if the error still occurs.

tic-tac-toe failed building for android with:
"Manifest.xml:2: AAPT: Tag attribute package has invalid character '-'.

C:\HaxeToolkit\haxe\lib\extension-networking\1,4,2\examples\tic-tac-toe\bin\android\bin\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:30: AAPT: Tag attribute name has invalid character '-'.

:app:processDebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Android\sdk\build-tools\29.0.2\aapt.exe'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED"

and BASIC EXAMPLES fails with:
"C:\HaxeToolkit\haxe\lib\extension-networking\1,4,2\examples\basic-example\bin\android\bin\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:2: AAPT: Tag attribute package has invalid character '-'.

C:\HaxeToolkit\haxe\lib\extension-networking\1,4,2\examples\basic-example\bin\android\bin\app\build\intermediates\manifests\full\debug\AndroidManifest.xml:30: AAPT: Tag attribute name has invalid character '-'.

:app:processDebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Android\sdk\build-tools\29.0.2\aapt.exe'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED"

Edit 1: both seem to be unrelated to the problem I was getting though.

@wikiti

I actually got to the bottom of this. It has to do with either:
import sys.net.Host;
import sys.net.Socket;
being used in the background to constantly check for machine IP and web availability.

Nothing at all to do with your library. Now I have to find a way to check current server IP, another way. Thanks and sorry to waste your time with my silly mistake.

Edit 1: Though still weird that it allows the connect to server to happen but stops subsequent communication.

@f-rank Hi,

I've setup an AVD and a linux server, and, beside the compile errors, the sample apps were working correctly. I'll update the repository to fix those compile errors.

Best regards,
Daniel