IBM Worklight Hybrid App - wifi

I Exported Project as an .apk file and installed in My Android Mobile. When i am Using My Company WIFI In My App i am able check the entered user and update password if exist.
when i am connected to Mobile Network its not working.
Ex:- MyServer HostName:192.168.0.16. In My router I Done Portforwarding for 192.168.0.16 and 10080.. My LouterSystem IP Ex:-122.169.78.182.
I am Using SQL Adaptors to connect database.
Iam Getting Following error run app using android emulator:
03-03 04:16:32.358: D/HttpPostRequestSender(1135): WLHybridRequestSender.run in WLHybridRequestSender.java:47 :: Sending request http://122.169.182.78:10800/Infraeasy/apps/services/api/DefaultPassword/android/query
03-03 04:16:32.608: I/Choreographer(1135): Skipped 34 frames! The application may be doing too much work on its main thread.
03-03 04:16:32.718: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(1135): WLNativeXHRPlugin$NativeXHRPostListener.onException in WLNativeXHRPlugin.java:154 :: onException
03-03 04:16:32.718: E/com.worklight.androidgap.plugin.WLNativeXHRPlugin(1135): org.apache.http.conn.HttpHostConnectException: Connection to http://122.169.182.78:10800 refused

As in your duplicate question: https://stackoverflow.com/questions/28803423/ibm-mobilrfirst-server-issue
The computer that you use to host the server, must be able to accept incoming connections from the public Internet, otherwise the application will not be able to connect to the server.
When the mobile phone and the server are in the same network, then the app is able to connect. Hence, you must verify that:
The server is able to accept connections from the public Internet
That there is no firewall blocking any ports and traffic
If you're getting any errors in LogCat (when you connect the device using a USB cable to your computer), tha would help debugging

Related

PhoneRTC Signal and Turn servers Vs Asteriks server

REQUIREMENTS: I was looking at using PhoneRTC Cordova plugin to broadcast a message from an Android tablet to a speaker/microphone device, where both these devices are in a private network based on an Asteriks server.
So any message from tablet to speaker/microphone device must be routed through the Asteriks server.
QUESTION: The Cordova plugin 'PhoneRTC' requires a SIGNAL server as well as a TURN server. In my case there is only an Asteriks server, so what will be the SIGNAL server and TURN server in above sceanrio? Maybe the Asteriks server can act as both the SIGNAL and TURN server, but not sure.
The challenge is how you can change the PhoneRTC server for another one.
In my case, I would like to use PhoneRTC but I would like to use easyRTC server instead of PhoneRTC server.
Thanks

iOS enterprise vpn connectivity

In an iOS application if you had to access corporate remote services, through VPN, what would be your pattern to ensure you have connectivity and inform the user if that's not the case:
check that your network and VPN are working (by checking if some host like google.com and some private enterprise host are reachable) and if that's the case then call the remote service?
or call directly the remote service, and if there is a network exception, then check if both a network host and an enterprise host are reachable? (to find-out what's going on and inform the user)
or you would do it differently?
Usual approach:
1)User opens VPN client enables VPN connectivity
2)User uses the app.
Alternative approach:
If you are developing an enterprise application
then you could possibly start and stop VPN connection right from the app using apple's private api.
Advantages of the approach:
So that all the network connections from the app are routed through VPN and user doesn't have to enable VPN connection every time he uses the app.
Reference:
You could find some hot discussions on this topic in the following threads.
Thread 1
Thread 2
Thread 3

Force iOS device app to talk through the local WIFI network

I'm building an application that will run in a museum with a local area wifi network without internet access, for some strange reason I'm not able to fully "join" this network with an iOS device. Enabling internet access on this network solves the problem...
The network should provide only a web server and a DNS server, the access point has a DHCP server, android devices can connect to the network without problems.
When I try to join the network with the device it remains in a "spinning wheel" status, the DHCP server log on the debian server says it has assigned an address to the iOS device, and if I check for the wifi address with an application (like iSys o SBSettings) I see the WIFI DHCP assigned address.
But when my app (or safari) tries to connect to the web server the request is routed through the 3G connection and not completed.
In my app I'm using the standard "Reachability" framework from Apple to check the reachability of a provided host name through the wifi connection and I get 0 on the SCNetworkReachabilityFlags mask....
I'm quite sure the problem is due to the fact iOS (5.1 in my case) tries to check the reachability for some "standard" host in the network, before routing traffic through the WIFI connection.
Anyone knows what an iOS device do to "validate" a WIFI network? I can add hostnames or simple dummy services to the server machine if this can help me connect the device to a LOCAL-only network :)
It seems that iOS doesn't like to join networks without a gateway, also if the network is local you have to setup a correct gateway address.
Setting the gateway as the server itself did the trick and the device started to route TCP/IP over my local area wifi network.

Blackberry SMS interception, sending an SMS to the emulator

I am currently developing a Blackberry 5.0 application which needs to be able to intercept a SMS message. I am trying to send a SMS to the emulator. I've come accross the suggestion to run two separate instances of the emulator and to send a SMS from the one emulator instance to the other using the SMSDemo sample application on both emulators.
I run the two instances of the emulator from two separate working directories as follows:
"C:\java\blackberry\eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.36\components\simulator\fledge.exe" /app="C:\java\blackberry\eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.36\components\simulator\Jvm.dll" /sms-source-port=6000 /sms-destination-port=6001
"C:\java\blackberry\eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.36\components\simulator\fledge.exe" /app="C:\java\blackberry\eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.36\components\simulator\Jvm.dll" /sms-source-port=6001 /sms-destination-port=6000
Both instances start up but when I attempt to send a SMS it never arrives at the second emulator.
I've disabled the Windows firewall - no change.
When I netstat for UDP I can see both ports 6000 and 6001 listening.
Any advice would be appreciated.
I have finally found a solution for the problem. Here it is:
Using Wireshark to sniff the UDP broadcast from the emulator I noticed that the destination address is incorrect - its "1.0.0.127". This address is not routable so the datagram sent from the one emulator will never reach the other emulator.
I might have missed it but I cannot see any command line argument to set when launching the emulator to specify the destination address.
I changed my development laptop to use a hard-coded IP address instead of DHCP. I then added 1.0.0.127 as another IP address to my TCP/IP settings. The address is now routable.
Restarted both emulators with no changes to the port settings (/sms-source-port and /sms-destination-port) and it worked fine. I did not need to use the SMSDemo application. I used the normal Blackberry messaging application.
I hope this helps others experiencing this same problem.

Socket Programming on BlackBerry

I am stuck creating a socket connection between blackberry client and java server. I need simple sample code which extends the socket API example from blackberry sample code.
We have a server that communicates with android systems and we need it to work with blackberry client as well.
Sorry for being late. And I am posting my comment here because of comment length. _screen.isDirectTCP() isn't an API method, so I am not sure what does this method return. But from the method name/signature I think this method is only used for checking whether Direct TCP connectivity is available or not on the device. Depending on the result, the application will append the connection parameter such as ";deviceside=....".
From the Network Transport article,
If you do not want your application to rely on the default connection
types described in the previous sections, explicitly state the
desired connection type by adding the “deviceside=” parameter to the
destination URL. If an application appends “;deviceside=true” to the
destination URL, then only a direct HTTP or TCP connection is
attempted. The application does not attempt to connect to the network
using the BlackBerry MDS. Alternatively, if an application appends
“;deviceside=false” to the destination URL, then the application only
attempts to connect to the network using the BlackBerry MDS. The
application does not attempt to connect to the network using a public
IP gateway.
Also please have a look at this link, What Is - Different ways to make an HTTP or socket connection.

Resources