Why can't I connect to the openfire server?

前端 未结 4 1590
不思量自难忘°
不思量自难忘° 2020-12-20 06:37

I\'m having a little bit of trouble trying to connect to Openfire (which I\'ve installed on my computer) while using Smack.

    ConnectionConfiguration con         


        
相关标签:
4条回答
  • 2020-12-20 07:18

    Use host as localhost if you are using a device. If you are using an emulator, use ip address (192.168.1.2 or whatever) in the configuration step (line 1 of the given code)

    0 讨论(0)
  • 2020-12-20 07:21

    i had the same problem, i followed these steps to solve it:

    1. disable your firewall first

    2. use your the IP address of your server openfire

    0 讨论(0)
  • 2020-12-20 07:24

    I have Same problem .... but i resolved this issue at my end using following steps :::

    1) Firstly checked Internet permission

        <uses-permission android:name="android.permission.INTERNET"/>
    

    2) Then open the openfire.xml file from C:\Openfire\conf (Installation directory) and edit the file

        <network>
            <interface>Your IP Address(192.168.0.1)</interface>
        </network> 
    

    and save the file and start the openfire server. I think it will be helpful for you....

    0 讨论(0)
  • 2020-12-20 07:25

    I just created a new project in which I need XMPP, and ran into the same problem. However, I realized that it was simply because I had forgotten to add the internet permission in my manifest:

    <uses-permission android:name="android.permission.INTERNET"/>
    

    Make sure that you haven't done the same mistake.

    0 讨论(0)
提交回复
热议问题