Abdul-Muqadim-Arbisoft a539ca2693 feat: migrate from pylint/black to ruff (#64)
* feat: migrate from pylint/black to ruff
Linked Epic: overhangio/tutor#1251

Some new rules that have been added are:

I: sort imports
N: check for pep8-naming standards
W292: check for missing extra line at EOF

Some of our lines, particularly in config break the 88 character line length limit. For that, we add a # noqa: E501 to let ruff know to ignore the rule for that line

* test: python package distribution build when running make test
Pushing to pypi would occasionally fail because of breaking distribution build.
We verify the build in the github CI now so that we can mitigate those errors later on.

* fix: install ruff instead of pylint/black as optional dev dependency
2025-09-07 19:44:37 +05:00
🌅
2021-04-27 14:45:26 +02:00
2025-06-10 11:00:15 +05:00
2023-05-16 09:54:08 +02:00

Android application plugin for `Tutor <https://docs.tutor.edly.io>`__
=========================================================================

This is a plugin to easily build an Android mobile application for your `Open edX <https://open.edx.org>`__ instance.

Installation
------------

::

    tutor plugins install android

Usage
-----

Enable the plugin and start the platform::

    tutor plugins enable android
    tutor local launch

The ``.apk`` file will then be available for download at http(s)://mobile.LMS_HOST/app.apk. When running locally, this will be: http://mobile.local.openedx.io/app.apk. You can forward this address to your students for download.

Building a custom Android app
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Android app is built from the `official openedx-app-android repository <https://github.com/openedx/openedx-app-android/>`__. To change this repository or the app version, you can simply build a different docker image with::

    tutor images build \
        --build-arg ANDROID_APP_REPOSITORY=https://github.com/mycustomfork/openedx-app-android \
        --build-arg ANDROID_APP_VERSION=master \
        android

Alternatively, you can build an image from a local checked-out fork of openedx-app-android::

    tutor mounts add /path/to/openedx-app-android
    tutor local launch

Making courses visible in app
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

By default, courses are not visible in the mobile app. To make them available, go to Studio → YOUR COURSE → Settings → Advanced Settings and set ``Mobile Course Available`` to true.


Releasing an Android app
~~~~~~~~~~~~~~~~~~~~~~~~

**Note**: this is an untested feature.

Releasing an Android app on the Play Store requires to build the app in release mode. To do so, modify the following Tutor settings::

    tutor config save \
      --set ANDROID_RELEASE_STORE_PASSWORD=yourstorepassword \
      --set ANDROID_RELEASE_KEY_PASSWORD=yourreleasekeypassword \
      --set ANDROID_RELEASE_KEY_ALIAS=yourreleasekeyalias \
      --set ANDROID_ENABLE_RELEASE_MODE=true

Then, place your keystore file in ``$(tutor config printroot)/env/plugins/android/build/app/config/app.keystore``. Finally, rebuild the image by starting the "android-app" container::

    tutor local start -d android-app

Customising the Android app
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Customising the application, such as the logo or the background image, is currently not supported. If you are interested by this feature, please tell us about it in the Tutor `discussion forums <https://discuss.overhang.io>`_.

Troubleshooting
---------------

This Tutor plugin is maintained by Abdul-Muqadim from `Edly <https://edly.io>`__. Community support is available from the official `Open edX forum <https://discuss.openedx.org>`__. Do you need help with this plugin? See the `troubleshooting <https://docs.tutor.edly.io/troubleshooting.html>`__ section from the Tutor documentation.

License
-------

This work is licensed under the terms of the `GNU Affero General Public License (AGPL) <https://github.com/overhangio/tutor-android/blob/release/LICENSE.txt>`_.
Description
Building an Android application for your Open edX platform
Readme 179 KiB
Languages
Python 52.1%
Dockerfile 32.8%
Makefile 15.1%