SFS & Android-android routine debugging

Source: Internet
Author: User

I wrote a Java client for testing.Program, Message sending and receiving are useless, and then moved into Android. This is really a great deal of effort. debug has been on and off for three or four days.

The basicserverconnection routine of Android always has an error. The error is that the methods in the jar package are not self-written. Think hard for a day. You can only write a small program to test the usage of SFS in Android. First, test the connection and navigate to the server end of the graduation project. The result is that the server cannot be connected. After one day of debugging, the android project forgot the network access permission. Great sweat went home from work.

Then it is proved that the SFS client can access the server, but it still fails. Finally, I finally found the problem by visiting Google's site search. In the inconspicuous post of the SFS forum, the moderator posted a frequently asked question. I am angry! Let's not talk about the APIs on Mao official website,CodeLet me talk about it. Post: http://www.smartfoxserver.com/forums/viewtopic.php? T = 10370 & SID = e8738ca6731e59edfda-1634fbef69b4

This is a god post. I have encountered three common problems. 1. Android Network access permission. 2.127.0.0.1 is not the local address of the android simulator, but 10.0.0.2. 3. the android client uses IPv6 by default. To use IPv4, you need to add the following statement:

system. setproperty ("java.net. preferipv6addresses "," false ");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.