Question: I build a worklight application. create android app and test this application with local machine , its working fine with emulator.but when i try to test this application with android tablet it through error "The Application failed connecting to the service".

I try to find application-descriptor.xml and fix localhost to `192.168.1.1:8080` 
 my ip local machine,but it not working.In my tablet I can't to go to `192.168.1.1:8080/console/index.html`

Can anybody help me regarding this issue. how can i fix this one in my worklight android application and run it on my android tablet

Answer: 
1. Check ip in local machine ipconfig ( field Adaptador de Ethernet )
2. Set this IP in field host name configuration server.
3. Rebuild
4. The other test is to check the direction in other machine, in the same network.
I would suggest the following debugging steps:

a) Go to your device browser and browse to http:
//xx.xx.xx.xx:8080/console

-> If this doesn't work, you have an obvious ip address issue. Then you have to figure out why, maybe you have a Symantec thingy that blocks any incoming traffic to your desktop - which they do. You should do an explicit allow.

b) If a) works, then you need to check in your code to make sure your app does try to connect to the server at startup. Or else the app will only try to connect when it calls adapter. 

Now, go to your code. open the initOptions.js file. I typically, would set connectOnStartup to true, but also enable the onConnectionFailure so that it runs offline when there is no connection. 

var wlInitOptions = {

```
// # Should application automatically attempt to connect to Worklight Server on application start up
// # The default value is true, we are overriding it to false here.
connectOnStartup : true,

// # The callback function to invoke in case application fails to connect to Worklight Server
onConnectionFailure: function (){wlCommonInit();},

// # Worklight server connection timeout
timeout: 2000,

```

};

3) Make sure you have the right URL in the application-descriptor.xml

<worklightServerRootURL><http://xx.xx.xx.xx:8080>
</worklightServerRootURL>

If you are using the consumer edition (the real purchased WL), your URL would be.
<worklightServerRootURL><http://xx.xx.xx.xx:9080/worklight>
</worklightServerRootURL>

(Note no space in between those URL - it's just this website putting a space there when there is a line break)

Redeploy your code to the WL server and create a new APK file. Update your device with the new APK file.

4) Do a test with the console again, you should see the console. Click on the Preview app link, it should work.

5) Now that you have updated your code on the server and the APK file. Open it up again on the device.

Do you still see the error message?

If things still not work.

6) Go to the app setting, since you have enable offline mode, it would allow you to access the App settings (it's the 4th button in Android) Go to **Worklight Settings**. Select **Server Address** -> Add the worklight URL to the Server URL. When you go back to the app, this will automatically reload the content from your WL server.