Help Needed: Running Open edX Android App in Development Mode

Hi everyone,

I’m currently working with the Android mobile app, using Tutor v19.0.2 and the sumac.2 tag of edx-platform.

I’m trying to run the Android app in development mode using the Android Studio emulator.


Initially, I set the following in default_config/dev/config.yaml:

API_HOST_URL: ‘http://local.openedx.io:8000

However, the emulator couldn’t resolve the local.openedx.io domain since it’s bound to my local machine and not recognized inside the emulator. To work around this, I updated the config to API_HOST_URL: 'http://10.0.2.2:8000'


Now the API requests are working, and the app can successfully fetch data. However, images are not being loaded on the Home (Discover) page. I suspect this is due to the domain mismatch between the LMS and the Android app.

Current configuration:

#config.yml for Tutor :

LMS_HOST: local.openedx.io

#config.yaml for Android app :

API_HOST_URL: ‘http://10.0.2.2:8000

Additionally, when I try to access course content, I receive a 404 - course not found error. The same course renders correctly in the browser via the Learning MFE.


Could someone please guide me on the correct steps or configuration to successfully run the Open edX Android app in development mode with Tutor?

Any help would be greatly appreciated!

Thanks in advance.

@Ivan_Stepanok @Pavlo_Netrebchuk as CCs on Mobile could I ask you to take a look at some forums posts?

Hi @sarina,

Thank you so much for bringing this to the attention of the mobile CCs – I really appreciate your support and help in getting more visibility on the issue!

Hi @Yogesh, we at edly were able to get tutor-android working with the tutor development environment.

I am listing down the steps we followed to use zrok. They might be of help to you:

  1. Install zrok
  2. Set up zrok by generating an access code and enabling our environment
  3. Create a reserved share for the LMS_HOST:
zrok reserve public http://local.openedx.io:8000 --unique-name "<name>"
  1. Share the now reserved URL
zrok share reserved <name>
  1. zrok will now provide you with a URL. Add this to the API_HOST_URL configuration and rebuild the android images. After the build process has completed and you’ve restarted the platform, the android app should connect with the LMS successfully.

Note that there is another way to share zrok urls using public shares but that is not recommended as it changes the share URL everytime you run zrok and the image needs to be rebuilt again.

2 Likes

+1 for the recommendation @Danyal_Faheem.

If that doesn’t work, you may need to allow HTTP traffic in the Manifest file.

android:usesCleartextTraffic="true"

But keep in mind that this is not a recommended solution for a production build.

1 Like

Thank you very much @Danyal_Faheem
It worked like a charm! :sparkles:

Also special thanks for “reserved share” url suggestion. :heart:

1 Like