Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Moodle Mobile custom apps: Difference between revisions

From MoodleDocs
Line 17: Line 17:
* Chromium browser as described here: https://docs.moodle.org/dev/Moodle_Mobile_development_using_Chrome_or_Chromium
* Chromium browser as described here: https://docs.moodle.org/dev/Moodle_Mobile_development_using_Chrome_or_Chromium


== Guidelines ==
== Steps for creating your Custom App ==


=== Setting up your computer ===
=== Setting up your computer ===
Line 31: Line 31:


You must be logged with your Github user!
You must be logged with your Github user!
=== Clone the repo in your desktop ===
You can use your favourite GIT client (or GitHub Desktop clients)
[[File:clone.png]]
=== Create a new branch ===
Having the code in a separate branch in the forked repository will make very easy to maintain our customizations using git tools (merge, rebase)
[[File:branch.png]]
=== Edit the app settings file ===
'''/config.xml'''
* Change the widget id value (instead com.moodle.moodlemobile your own id)
* Change the app name and description
'''/www/config.json'''
* Change versionname
* Add a pre-fixed URL: Adding a field like “siteurl”: “http://mysite.abc”
* Change gcmpn (if you are using your custom Google Push infrastructure)
* Change the appid (required for making Push notifications work)
* Remove demo sites (“demo_sites”: “”)

Revision as of 11:35, 21 September 2016

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

Overview

You will need a custom app if you want:

  • Force the users to log in to your site URL
  • Custom corporate image (name, app icon, theme, store entry)
  • Add additional features or static pages
  • Remove or change existing features
  • Custom translation of the app
  • Use your own notifications infrastructure

Requirements

Steps for creating your Custom App

Setting up your computer

Follow these guides:

Fork the app

Use the Fork tool in: https://github.com/moodlehq/moodlemobile2

forkCustomApp.png

You must be logged with your Github user!

Clone the repo in your desktop

You can use your favourite GIT client (or GitHub Desktop clients) clone.png

Create a new branch

Having the code in a separate branch in the forked repository will make very easy to maintain our customizations using git tools (merge, rebase) branch.png

Edit the app settings file

/config.xml

  • Change the widget id value (instead com.moodle.moodlemobile your own id)
  • Change the app name and description

/www/config.json

  • Change versionname
  • Add a pre-fixed URL: Adding a field like “siteurl”: “http://mysite.abc”
  • Change gcmpn (if you are using your custom Google Push infrastructure)
  • Change the appid (required for making Push notifications work)
  • Remove demo sites (“demo_sites”: “”)