Sunday, May 19, 2019

Run React Native app on Real Android device using WiFi on Windows

In our previous tutorial we have already explained how to run react native app on physical android device through cable on windows platform. In this tutorial, I am going to show you how we can run our react native app on real android device through WiFi connection on windows platform. To run your react native app on real android device using WiFi, your real android device and your development machine must be shared same network.

Run React Native app on Real Android device using WiFi on Windows

Step 1: In order to run your react native app on real android device through WiFi, Your react native app must be installed on your real android device. If it is not installed then first you will need to install react native app on your android device through cable.

If app is already installed on your real android device then you need to start development server manually.First you need to go inside your react native project directory through command prompt and apply the following command to start development server.

Command :
npm start

Step 2: After successfully completed above steps, then open command prompt and type following command to know the current IP of your development machine.

ipconfig

After you hit enter, we will see the result like this :

Run React Native app on Real Android device using WiFi on Windows

As you can see, under Wireless LAN adapter Wi-Fi section there is IPv4 Address. You need to note down the value of this IPv4 Address. For security reasons, I am hiding my development machine’s details.

Step 3: Open installed react native app on your real android device and shake your android device little bit to open in-app developer menu and select Dev Settings option as shown below.

Run React Native app on Real Android device using WiFi on Windows

Step 4: Under Debugging section select Debug server host & port for device option.

Run React Native app on Real Android device using WiFi on Windows


Step 5: Supply Debug server host (Your development machine’s IP) and port number and then select OK to apply changes.
Run React Native app on Real Android device using WiFi on Windows

Step 6: Go back into your app, shake your mobile little bit to open in-app developer menu and then select Reload option and finally you will get the following output on your real android device as per your code.

Run React Native app on Real Android device using WiFi on Windows

This is all about Running React Native app on Real Android device using WiFi on Windows. Thank you for reading this article, and if you have any problem, have a another better useful solution about this article, please write message in the comment section.

2 comments:

  1. It didn't work for me, is there any other extra configuration?

    ReplyDelete
  2. You can't mix and match, though, as all WiFi devices on your network must use the same encryption scheme. WEP may be not as good as the WPA settings, but remember that it's far better than no encryption at all. 192.168.100.1

    ReplyDelete