How to integrate Relay server in a working SUP Android project? - android

I am a pure Android developer and don't know anything about Sybase Unwired Platform and Relay Server. I have a working SUP based project('m not one who develop it). I need to integrate Relay server in between SUP and Mobile. The Relay Server is installed and configured to SUP OUTBOUND ENABLER. Relay server port is 80 on SUP Server. But I don't know how to make data transaction through it and show data in android device?

It should be as easy as changing the ip of the SUP server to the ip address of the relay server, changing the port from the current port number to port 80, setting the messaging farm id and setting the url suffix. When configuring the relay server a backend farm would have been defined with a farm id. This is the id that you would need to enter here. Default relay server url suffix is "ias_relay_server/client/rs_client.dll" for Windows based relay server.
These are the properties for the connectionProperties.
You will also need to change the properties for the synchronisation profile. Here you will have to set ip address, port and stream params. Where stream params look something like "url_suffix=/ias_relay_server/client/rs_client.dll/"

Related

how to get android emulator to connect to a specific port on our server

I am using Xamarin Forms to build an Android app. The data that the app will consume is stored on our server in a SQL database on our local network. I am using a C# Web API service (served by IIS) to connect the app to the server. All traffic will be inside our local network.
Currently the Web API is being served by IP address on port 90 - this was the only way I could get the emulator to be able to connect to the server, as no luck accessing it by name. I can fire up a browser on my development machine and load up http://10.1.1.15:90/api/Controller and I get back the data I was expecting.
I have also done a networkaccess check for access to 10.1.1.15 on port 90 using Powershell from my machine, which comes back Fine.
I use James Montemagno's Connectivity package to check for network access in the app - this returns true if I check for the IP address. It returns true if I check for the IP address on port 80. However it returns false if I check for the IP address on port 90. How can I get this to access the server on port 90? (BTW it will also need to access other services on port 91 and 92).
The android device was set up by default with a proxy. I toild it not to use the proxy and then it worked

Android: Proxy (Relay) Server Requests

I have a server and an android app. My server want to request a destination but with the IP of the android device that my app is running on. So I need to proxy the requests (relay them) in my app so the destination could see the client's IP but the server. You can see my explanation in the picture:
How can I do this in my app?
Yes this could be done but not just with relays; you also need to port forwarding mechanism in between. Here is how I would try to do this:
Local portforward the requests of the server onto a dedicated port on your android device and then from their call the Destination server via your relay mechanism which could be fulfilled very succicntly by LittleProxy like solution.

Server with dynamic IP

I am making an app that uses socket programming. Client side is programmed using android and server side using Java. The IP address of the server may change and the IP address has to be kept secure and private.
I do not want the users to install the app again and again when the IP of server changes.
You can use domain for your server . your domain is static and not change dynamically.
for example your domain is : yoursystem.com
now your server ip is : xxx.xxx.xxx.xxx
and tomarow your ip change to yyy.yyy.yyy.yyy
but your domain address is static and user can conect to your domain.
if your privacy is important you can improve your privacy by set token for your user and ...

How to send an image both side using WIFI Direct?

I am working on an app where ,i am able to send an image only one way,from client to groupowner.How can i send it in both ways?
I had done bi-directional data transfer in my project. In Wifi Direct group owner Ip is decided by OS itself which is known to both devices i.e Server as well as client. Client know the IP of server on which it has to send data, But server don't know the client IP.
For that you have to send client IP address to server and store that address in sharedPrefrences. So you should initiate transfer silently when connection made so that server store the client IP, for next transfer.
Socket client = serverSocket.accept();
String WiFiClientIp = client.getInetAddress().getHostAddress();
you can made a check while transfer i.e if IP don't match server Ip then send data to client IP.
For testing purpose when you send file from client to server, in AsyncTask doinbackground method you can get the IP address of client which is also decide by OS itself. Put that IP statically then you will be able to send file on client also.
I will share my code on github soon. I hope this info will help you.
Working Bi-Directional Data Transfer APK File-> https://play.google.com/store/apps/details?id=anuj.wifidirect&hl=en

Access to asp.net web service

I wrote a little WS on asp.net, I can open it printing something like
http://46.146.170.225/RouteGen/Service.asmx
in address bar. It's all right, WS works.
But if I print the same address in a browser on the other computer, the page isn't available. How to get access to my web server from other PC? (I need from Android device, but I think it's no difference)
If you started the Web-Service from within Visual Studio then without changing the starup-settings of your project - it's not possible, because VS only starts a local debug web-server that doesn't allow calls from other hosts than localhost.
To allow external IPs to access your web-server, you have to set up the IIS and run your web-service inside it. A firewall could block incoming requests to the IIS but I ran such a service last winter and didn't have to change firewall-settings.
Verify that the website, in IIS, is bound to a public-facing IP address. Right click on your website in IIS, and go to the bindings setting. Then, check the host field. It should have an IP address or domain name that is available publicly.
Verify that your firewall has Port 80 open for incoming traffic

Categories

Resources