Sunbird Mobile

Introduction

The Sunbird Mobile app provides mobility to its feature-rich learning platform. It provides learners with the flexibility to learn anywhere, anytime.

Prerequisites

1.To set up Sunbird mobile app, ensure you have installed the following: a) NPM Version - 6.+ b) Node JS Version - 8.+ c) Cordova Version - 8.+ d) Ionic Version - 4.11.2 2. Generate the key and secret for the mobile app user using the JWT token of the mobile admin user. Run the OnboardConsumers Jenkins Job and take the jwt token(JWT token for mobile_admin) from Jenkins Output.

Generating Secret: Execute the listed API to generate the key and secret for the mobile app:

curl -X POST \ <your-sunbird-base-url>/api/api-manager/v1/consumer/mobile_app/credential/register \ -H ‘authorization: Bearer <mobile_admin_jwt_token_from_jenkins_job_output>’ \ -H ‘content-type: application/json’ \ -d ‘{ “request”: { “key”: “<implementation-name>-mobile-app- <version-number>” } }’

Response body:

{“result”:{“key”:”<implementation-name>-mobile-app-<version-number>”,”secret”:”<secret>”}}

Use the key and secret from the response given for MOBILE_APP_KEY and MOBILE_APP_SECRET configuration in respective environments in gradle.properties file. Example:

dev_mobile_app_key = “<implementation-name>-mobile-app-<version-number>” dev_mobile_app_secret = “<secret>“

Producer Key

Replace the producer id PRODUCER_ID for respective environments in sunbird.properties.

Fabric credentials:

Replace release_fabric_api_key in sunbird.properties with your fabric API Key. Create an account in fabric.io and register in the app to get the API key.

Set up mobile app workspace from Git Repository

Sunbird mobile app can be built from the main source code which is available at SunbirdEd-mobile-app.

Customising App Configuration

Instance admin of Sunbird adopters can configure various aspects of the Sunbird mobile app based on the requirement of the the organization. The admin are able to configure various aspects such as:

  • App name

  • App logo

  • Login/Guest page to new users

  • Sign in footer card on the app

  • Onboarding cards

  • Categories in the profile page

Packaging Framework and Form Data

Sunbird mobile app supports configuration of the app framework to enable offline usage of the app. To configure the app framework, adopter needs to package the channel for the respective framework. Details of the file naming convention and folder location are given below:

Installing the Mobile Application

1.Create a workspace (Folder Hierarchy) and clone the Git repositories into this folder

2.Execute the instructions mentioned for each cloned repository

3.Open terminal and change the directory to “SunbirdEd-mobile-app”

4.Add one device to the system

5.Run the command- $ ionic cordova run android

Generate Multiple Sunbird Apps

As a Sunbird instance owner, owner should be able to generate multiple apps for multiple environments(dev/qa/production) so that user can use all the apps simultaneously. For each app, user should be able to have different content stores (on the local device), fire telemetry from separate app identifiers and upload to playstore (if need be).

Configuration

Instance admin of Sunbird adopters can configure the appId in the following way to acheive the functionality

  • dev_app_id = org.sample.app.dev

  • staging_app_id = org.sample.app.staging

  • production_app_id = org.sample.app

Last updated