Check out example codes for "INSTALL_FAILED_USER_RESTRICTED: Install canceled by user". It will help you in understanding the concepts better.

Code Example 1

1) Turn ON Developer Options
2) Turn ON USB Debugging
3) Turn OFF MIUI optimization
4) Turn ON Install via USB

Learn ReactJs, React Native from akashmittal.com