Android: Can Android client talk to Java Proxy server? - android

Situation : An Android client-server application has been developed. Currently the client and the server are 2 emulators running on the same machine.
Problem: The server will remain an emulator. But the client can be an external device. And such devices cannot directly communicate with emulators. So, a Proxy server must be developed (in Java).
Can an Android client (external device) communicate with a Java Proxy server?

Related

Debugging HTTPS local services from my mobile device (web, api, websocket)

Having a hard time debugging from mobile device my local development web app which connects to a GraphQL node server and another service using web sockets. All three services running on HTTPS to the below ports.
Web Reactjs app: https://localhost:3335
Node server: https://localhost:3334
Web socket server: wss://localhost:4443
From my macOS machine, everything works as expected but when trying to access the reactjs from Chrome Android and using the inspect desktop devtools and USB cable navigating to https://localhost:3335 works but I get the error POST https://localhost:3334/dev/graphql net::ERR_CERT_DATE_INVALID.
My iOS device doesn't even connect to localhost:3335 or 192.168.2.3:3335.
I am open to any tips, tricks, services, and ideas to debug using my local development machine and mobile devices.
I was able to make it work by navigating to all addresses in the mobile browser and accept the risk of a self-signed certificate.
https://localhost:3334/dev/grapqhl -> accept
https://localhost:4443 -> accept
Now https://localhost:3335 will work fine.
Struggling with iPhone debugging due to localhost not binding to the machine IP address (Pending solution, might create another SO question for reference).

WebSocket connection from Unity app

I'm writing app that connects to a custom websocket server (socket.io) written in NodeJS.
This server also handles requests from a browser and the browser part works flawlessly, connection, disconnection, messages, all great.
The app part works perfect on Android (tested on samsung s7) and iOS (tested on iPhone6 and 7 with iOS11.3)
Problem is that I need to get it working on headsets like Nibiru and PicoVR, which operative systems are derived from Android (they're a VR version of Android), on these systems, the app works fine, but can't connect to the webserver.
Additional info:
Server runs on port 7000
Server also has apache, php and mysql installed
HTTP connection to server works
The URL I use for the socket is: "http://192.168.12.1:7000" (server is local, running on port 7000 bc port 80 is taken by apache)
I'm developing all the apps with Unity3d, version 2017.2.0f3
Plugin used for WebSockets: Socket.IO-Unity
Solved the issue by changing the scripting runtime version from "Stable 3.5" to "Experimental 4.6"

how to communicate mobile app with the soap web service server with out ip address and port

I am developing mobile apps by using Delphi XE8. And also I made soap webservice server by using Delphi XE8. I am developing internal mobile app for an organization. I install webservice server at the organization internal server. And the mobile app communicates with that webservice server. The webservice server publish the soap service. for example http://192.168.1.125:16645.
The mobile app has to be configured this URL to communicate with the server since this changes for every organization.
I don't want to give such a configuration to mobile app users. Could you help me out how can I automate this with this kind of URL?
Any domain things?
There are server implementations such as ActiveMQ which broadcast their own server name via UDP, so that clients can locate them automatically.
See for a related question: Discover a running ActiveMQ message broker using IP multicast and a related blog post by me (with source code) here and here. Indy can be used with the Delphi mobile compilers, so this code should work with your apps.
You can implement the same logic with your server, as long as there are no network restrictions for UDP.

Database on IIS server - need to access with api in android phone via localhost

I had configured the IIS server on Windows 8 on same we had a database.
Already made the api in .Net Framework to access the database.
Now we had made an android app to access the module of the desktop application via app.
Api is being is used in the android app.
Now stucked in the situation, how to connect the iis server (database) via android app.
How to setup the network between the server and the tablet on which the application will be runnning.

How to test my own ASP.NET Web API in localhost:port using android or Windows Phone device (no simulator)

I'm trying to develop my first REST Service using ASP.NET following this guide.
I'd like to test my services in localhost using my android and wp devices without using android and WP simulator (too slow).
Is there a way to do that?
If you deploy the ASP.NET app on IIS, the services will be reachable as long as the phones are connected on the same network (via Wifi for example). Just use the IP adress of the server instead of localhost.
Another idea is to use fiddler's proxy option. (This also assumes you have set up your app in IIS). Check out this article.
This approach is especially useful if you want to test using custom host headers over SSL.
With this approach you can simulate production dns (by altering hosts file on the fiddler host) rather than using IP addresses and machine names from the mobile device.

Categories

Resources