commercetest / androidserver-for-testing

Android server that serves react / files app using com.sun.net.httpserver
0 stars 0 forks source link

Add remote network calls to test emulator-to-emulator connectivity #1

Closed julianharty closed 5 months ago

julianharty commented 5 months ago

Context

I'd like a small self-contained Android app that facilitates network communications between Android devices; initially and mainly between emulators to test networking aspects. The upstream project provides a great starting point as a self-contained simple web server that serves text-based files (including SVG images).

Currently the app reads from the embedded assets folder. I hope it's easy enough to modify the code so it can request the assets from another instance of the app that's running on another emulator. The last instance (at the end of the requests) would read from the assets folder, any requesting instances ask their downstream emulator instance.

Notes

I hope it's obvious that the performance will be adversely affected when requests are made remotely rather than reading from assets embedded in the app.

The code is not intended for production use and isn't necessarily performant, secure, etc. etc.

julianharty commented 5 months ago

Thanks to the following additional external resources which helped me implement and test this: