| Author |
Message |
| < Java2SE / Android Client API ~ Android 2.2 SDK is not work with Java Client API |

|
|
Posted:
Wed Jun 02, 2010 3:39 am
|
|
|
Joined: 02 Jun 2010
Posts: 1
|
|
Hello,
I found there is a socket error when connecting to sfs server.
Error Message:
java.net.SocketException: Bad address family
It works fine in Android 2.1 or below SDK, but not in 2.2
I guess the new SDK using default IPv6 address rather than IPv4 address
Could it be fix in the xmlSocket.jar?
Thx |
|
|
|
|
|
 |
|
Posted:
Tue Jun 08, 2010 1:09 pm
|
|
|
Site Admin
Joined: 21 Mar 2005
Posts: 9308
Location: Italy
|
|
Quite strange error. We're going to investigate soon.
Stay tuned. |
_________________ Lapo
--
gotoAndPlay()
...addicted to flash games |
|
|
|
|
 |
|
Posted:
Thu Jun 10, 2010 8:29 am
|
|
|
Joined: 06 May 2009
Posts: 10
|
|
|
|
|
 |
|
Posted:
Thu Jun 10, 2010 7:00 pm
|
|
|
Site Admin
Joined: 21 Mar 2005
Posts: 9308
Location: Italy
|
|
| Thanks! |
_________________ Lapo
--
gotoAndPlay()
...addicted to flash games |
|
|
|
|
 |
|
Posted:
Thu Jul 01, 2010 8:37 am
|
|
|
Joined: 06 May 2009
Posts: 10
|
|
Hi!
Any news on this issue? Since Nexus One phones already started to receive updates to 2.2 this issue become a serious problem...
Best regards,
Serge. |
|
|
|
|
|
 |
|
Posted:
Thu Jul 15, 2010 10:41 am
|
|
|
Site Admin
Joined: 21 Mar 2005
Posts: 9308
Location: Italy
|
|
Quick update.
The problem is very low level and at the moment we haven't found any detailed explanation of why a MINA client fails to even establish a connection. It's not MINA's fault, evidently something in the guts of the Android socket implementation was changed, breaking the MINA connector.
We'll investigate and see what we can do. Probably an alternative XMLSocket library based on java.net.Socket is a good workaround for now.
From what I read in your StackOverflow post you already have done that. Can we see the code?
You can PM me, if you wish. |
_________________ Lapo
--
gotoAndPlay()
...addicted to flash games |
|
|
|
|
 |
|
Posted:
Fri Jul 23, 2010 6:33 pm
|
|
|
Joined: 06 May 2009
Posts: 10
|
|
Hello,
| Lapo wrote: |
Quick update.
The problem is very low level and at the moment we haven't found any detailed explanation of why a MINA client fails to even establish a connection. It's not MINA's fault, evidently something in the guts of the Android socket implementation was changed, breaking the MINA connector.
We'll investigate and see what we can do. Probably an alternative XMLSocket library based on java.net.Socket is a good workaround for now.
From what I read in your StackOverflow post you already have done that. Can we see the code?
You can PM me, if you wish.
|
It's not my post on StackOverflow - I found it while trying to investigate this problem, because the problem described there and our problem are the same... So we still have no solution... On emulator problem can be reproduced easily... |
|
|
|
|
|
 |
|
Posted:
Mon Aug 09, 2010 4:47 pm
|
|
|
Joined: 16 Apr 2009
Posts: 18
|
|
That link to the post on stackoverflow contains a solution which is to add this line
System.setProperty("java.net.preferIPv6Addresses", "false");
to your code. Has anyone who has the problem tried this? Did it work?
Thanks,
Craig |
|
|
|
|
|
 |
|
Posted:
Tue Aug 10, 2010 8:35 am
|
|
|
Site Admin
Joined: 21 Mar 2005
Posts: 9308
Location: Italy
|
|
i am going to verify it and post my findings here soon.
Thanks for reporting. |
_________________ Lapo
--
gotoAndPlay()
...addicted to flash games |
|
|
|
|
 |
|
Posted:
Tue Aug 10, 2010 9:32 am
|
|
|
Site Admin
Joined: 21 Mar 2005
Posts: 9308
Location: Italy
|
|
Good new everyone!
The simple line of code above actually does the trick. I was able to successfully run our example without any errors.
Thanks cBroadbo for reporting. |
_________________ Lapo
--
gotoAndPlay()
...addicted to flash games |
|
|
|
|
 |
|
Posted:
Tue Aug 10, 2010 3:42 pm
|
|
|
Joined: 16 Apr 2009
Posts: 18
|
|
You're welcome. But let's give the credit to gustyJin on stackoverflow for finding the solution.
Craig |
|
|
|
|
|
 |
|