androidreact-nativejava-websocket

Websocket isn't connected to server in react-native


I am developing mobile app using react native. It includs websocket communication. In debug mode, all is working well, but websocket isn't connected to server in release mode. I use built-in library for websocket. Is there any person to have same problem? Thanks for paying attention to my asking.


Solution

  • I realized this problem is dued to android permission problem. I added android:usesCleartextTraffic="true" AndroidManifest.xml in release folder.

    Then all is ok.