0

My react-native android app uses the IP address of a smart device on the local network to communicate with it. This works perfectly in testing but now that I've launched the app for internal testing this call fails.

Ex call is: http://192.168.88.39:8080/version

This call works perfectly in development, but not on the deployed app. I was previously using a hostname to resolve the IP address of the device on the local network but realized this didn't work with Android, so I switched to using the IoT device's IP address to communicate with it.

But to my surprise that isn't working. I've also tried to setup a Charles proxy to intercept the requests but have been unable to do so successfully so I'm not sure what the exact response is from the http request.

But I know it doesn't resolve.

So firstly is this even possible to do? Want to make sure this is not prohibited?

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Nishant Mehta
  • 612
  • 4
  • 11

1 Answers1

1

You cannot access http urls in a production build. Check this question for possible solutions Android 8: Cleartext HTTP traffic not permitted

Klaz
  • 101
  • 5