Reload a React Native app on an Android device manually via command line
I'd like to manually force a Reload of my React Native app on demand without physically shaking the device. (I'm getting carpal tunnel.)
I know that Live Reload / Hot Reload are available. I'm looking for a on-demand command line solution.
Solution 1:
Using the cmd line you can send a command to the Android device.
adb shell input text "RR"
This command tells the Android device to type the character "R" twice which is the React Native command to Reload on Android.
The adb shell
command has many useful features many of which are described here:
ADB Shell Input Events
To open the developer menu:
adb shell input keyevent 82
Solution 2:
Just posting it here in case you didn't know this trick
long press the menu button in your android device. Then you'll get this menu
tap the reload option and you are good to go