How to set up the environment and debug application while creating mobile version
APP
run chosen OpenLMIS module, for example stock-management (in project directory):
sudo docker-compose run --service-ports stockmanagement-ui
npm i
grunt
grunt build --serve --openlmisServerURL=https://uat.openlmis.org --noTest
ANDROID STUDIO
Download Android Studio
Create new empty project
Choose existing emulator or create a new one (emulator must have play store icon)
Run emulator
Open chrome app
Navigate to 10.0.2.2:9000
Choose ‘webapp’ directory
Click the three dots on right upper corner of chrome app, choose ‘Add to home screen’ → ‘Add’ → ‘Add to home screen’
OpenLMIS app should appear on the screen (it can take a few seconds)
10. Open OpenLMIS app, choose ‘webapp’ directory
11. Mobile app should be displayed
DEBUGGING
Navigate to chrome://inspect/#devices on your PC
Emulator device should be visible (if it is not, please make sure that you have opened OpenLMIS app on your emulator)
Click ‘inspect’ under your device
Window with DevTools should open with access to all developer tools
OpenLMIS: the global initiative for powerful LMIS software