Giter Site home page Giter Site logo

sunbird-ed / sunbirded-mobile-app Goto Github PK

View Code? Open in Web Editor NEW
7.0 8.0 83.0 56.45 MB

Cordova Mobile Application for Sunbird software. Provide the interfaces on Android Application. Currently caters to use cases of both offline and online consumption of Sunbird resources

License: MIT License

Shell 0.07% JavaScript 0.62% HTML 7.27% Java 0.02% TypeScript 85.31% SCSS 6.64% CSS 0.07%

sunbirded-mobile-app's Introduction

Circle CI - master branch Circle CI Badge Quality Gate Status Coverage Lines of Code Maintainability Rating

What is the Sunbird Mobile app?

The Sunbird Mobile app is the app-based interface for the Sunbird application stack. It provides a app(android/ios) through which all functionality of Sunbird can be accessed.

Latest release- release-5.2.0

Ongoing release- release-6.0.0

Prerequisites:

Package Version Recommended Version
Node 12+ 12.22.10
NPM 6+ 6.14.16
Cordova 10+ 10.1.2
Ionic 5 5.7.0
Java(For Android) 11+ 11.0.15.1
Gradle(For Android) 7+ 7.0.2
CocoaPods(For Ios) 1.11.3

Project Setup

1. Ionic-Android build Setup
- Install java
- Install Gradle
- Install Android Studio
- After Android studio installation, install SDK
- Open Android studio and goto settings/appearance and behavior/system settings/Android SDK
- Install appropriate Android sdk platform package.
- Add environment variables in ~/.bashrc or ~/.bash_profile as follows
export ANDROID_SDK_ROOT=path_to_sdk
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
- Reference: https://ionicframework.com/docs/installation/android

CLI Setup    
- `npm install -g ionic`   
- `npm install -g cordova`   

2. Project Setup
- git clone the repo(https://github.com/Sunbird-Ed/SunbirdEd-mobile-app).
- Rename sunbird.properties.example file to sunbird.properties and put all the valid credentials and api endpoint.
- Run ./build.sh
3. Onboarding/Tabs Configuration Onboarding steps and Tabs can be configured via this configuration settings. Onboarding Configurations

Name Description Options
Language Selection User should select their prefered language To skip language selection, set skip as false and provide default values
User Role Selection User should select their role If want to skip User Type selection, set skip as false and provide default user type
Profile Settings User should set their profile by choosing their framework fields Provide deafult profile values to skip profile settings page
District Maping Here user need to provide details related to their location To skip this page deafult location values are required

Language Selection

{
  "onboarding": [
    {
      "name": "language-setting",
      "skip": false,
      "default": {
        "code": "en",
        "label": "English"
      }
    }
  ]
}

User Role Selection

{
  "onboarding": [
    {
      "name": "user-type-selection",
      "skip": false,
      "default": "teacher"
    }
  ]
}

Profile Settings

{
  "onboarding": [
    {
      "name": "profile-settings",
      "skip": false,
      "default": {
        "syllabus": [
          "CBSE"
        ],
        "board": [
          "cbse"
        ],
        "medium": [
          "english"
        ],
        "grade": [
          "class5",
          "class6"
        ]
      }
    }
  ]
}

District Maping

{
  "onboarding": [
    {
      "name": "district-mapping",
      "skip": false,
      "default": {
        "state": "Andaman & Nicobar Islands",
        "stateId": "83h3u832ui4",
        "district": "Nicobars",
        "districtId": "aef899d41"
      }
    }
  ]
}

Tabs Page COnfigurations Configure the tabs page according to the requirement. Fllowing are the configurable settings for tabs.

{
  "tabs": [
    {
      "root": "home",
      "name": "home",
      "icon": {
        "active": "assets/imgs/tab_home_selected.svg",
        "inactive": "assets/imgs/tab_home.svg",
        "disabled": "assets/imgs/ic_home.png"
      },
      "label": "TAB_HOME",
      "index": 2,
      "isSelected": true,
      "is_visable": true,
      "disabled": false,
      "theme": "NEW",
      "status": "ALL",
      "userTypeAdmin": true
    }
  ]
}
Property Description Value
root On which page the tab should be shown. home
name Name given to the tab home
icon Different icons for respective events. i.e when the tab is selected, not seleted and disabled. Object with path to the respectivr icons
label Label name to displayed for the tab 'TAB_NAME'
index At which position the tab should be displayed numeric value ex: 2 shows at 2 position in order
isSelected Wheather the tab should be selected by deafult Boolean value ex: true default selected
is_visable To display the tab or not Boolean value
disabled If true, tab is displayed, but can't select Boolean.
is_visable To display the tab or not Boolean value
theme Theme on which the tab should be displayed(If there are multiple theme for the app available) name of theme for which tab has to be displayed
status To display to a spefic user criteria ex: 'logIn' will show to logged in users only
userTypeAdmin Wheather to show for only Admin users Boolean value

4. How to build apk

  • To check attached devices do adb devices
  • npm run ionic-build (Make sure you have attached device)
  • ionic cordova run android --prod
  • Apk location project_folder/platforms/android/app/build/outputs/apk/staging/debug/apk_name.apk

5. How to debug apk

  • Open chrome and enter chrome://inspect
    - Select app

IOS Development setup

Prerequisites

1. Node js version 14.20.1
2. Ionic 5.4.16 using `npm i [email protected] -g`
3. Cordova 11.0.0  using `npm i [email protected] -g`
4. cordova-res 0.15.3 - using `npm install -g cordova-res`
5. ios-deploy  1.11.4 - using `brew install ios-deploy`
all of the above should be installed globally
Xcode 12.4 Build version 12D4e or above
NOTE: For M1 chipset users please go through FAQ section for ROSETA 2 compatibility and usage.

Steps

1. Checkout sunbird-mobile-app repo from https://github.com/shikshalokam/SunbirdEd-mobile-app with branch release-3.9.0-ios
2. Add `GoogleService-Info.plist` file
3. cd to <sunbird-mobile-app> local path
4. Rename `sunbird.properties.example` file to `sunbird.properties` and put all the valid credentials and api endpoint.
5. RUN ./build-ios.sh
6. RUN cordova emulate ios

FAQ

  1. error: Value for SWIFT_VERSION cannot be empty. (in target 'Sunbird' from project 'Sunbird') or Duplicate GoogleService-Info.plist file error open platforms/ios/Sunbird.xcworkspace Select Sunbird Build setting Project, targets update Swift language version to 4 Inside Tagets -> Build phases -> Copy Bundle Resources -> remove duplicate GoogleService-Info.plist if present and close Xcode then rerun the cordova emulate ios
  2. M1 Chipset users - Turn off ROSETA for XCODE Open Applications -> Right Click Xcode -> Click on Get Info -> Unchek Open with Roseta Once build-ios.sh is completed, open platforms/ios/Sunbird.xcworkspace and run the application by clicking on Play button
  3. Install Java on Mac Check if JAVA is already insalled or not by running following command in terminal javac --version if you get the verdetails then it's installed already Check the installation path in /Library/Java/JavaVirtualMachines Check is JAVA_HOME is set by runnig echo $JAVA_HOME, if you get the installation path as output then JAVA_HOME is set For Further details follow the link - https://stackoverflow.com/a/50683158/4259981
  4. (iOS Setup only) POD installation - https://cocoapods.org/
  5. (Android Setup only) Gradle installation - https://gradle.org/install/

sunbirded-mobile-app's People

Contributors

ajoym avatar ajoymaity avatar amiableanil avatar balakrishna-m avatar balakrishna10 avatar bindu07 avatar christyfernandes avatar dhirenaade avatar diptesh6501 avatar harpreetwalia143 avatar itsvick avatar jsdevl avatar kiranharidas187 avatar kirantunerlabs avatar navkumarv avatar pradeepkumarcm96 avatar pradoshkumar avatar raghav14 avatar rejneesh1 avatar sachinsahu731 avatar sharathkashyap avatar sonaarun avatar souravdey091 avatar subranil avatar sujithsojan avatar swayangjit avatar vinod-v3 avatar vishwanath1004 avatar vishwasuresh avatar vppavithra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sunbirded-mobile-app's Issues

Error while building Sunbird ED from scratch

Getting the following error almost 20 times (once for each cordova plugin add command) when running ./build.sh on a completely new clone

> cordova plugin add cordova-plugin-filepath

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Failed to fetch plugin cordova-plugin-filepath@^1.5.8 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: npm: Command failed with exit code 1 Error output:
npm WARN idealTree Removing dependencies.cordova-plugin-filepath in favor of devDependencies.cordova-plugin-filepath
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @project-sunbird/[email protected]
npm ERR! node_modules/@project-sunbird/client-services
npm ERR!   @project-sunbird/client-services@"5.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @project-sunbird/client-services@"3.6.x" from @project-sunbird/[email protected]
npm ERR! node_modules/@project-sunbird/common-form-elements-v9
npm ERR!   @project-sunbird/common-form-elements-v9@"5.0.3" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:

There seems to be an issue with [email protected]

Implement unit test case for Survey, observation and Project flows

Description

Sunbird ED is a software leveraged to enable learning, capacity building, professional development, and content distribution solutions. More details here

Currently, all the Manage learn features (Survey, Observation, and Project) are not incorporated with unit testcases. All the components need to be test driven so that the quality of the code is maintained.

Acceptance Criteria

  • Overall Project test should have a minimum coverage of 70%
  • Each component should have a minimum coverage of 65%

Implementation Details

Set up app details link

Project

SunbiredEd-mobile

Organization Name:

Shikshalokam

Domain

Education

Tech Skills Needed:

Ionic, Angular, jest

Mentor(s)

@Vinod-V3

Complexity

High

Category

Test

Sub Category

Frontend, Mobile

Issue with setting up SunbirdED in iOS: unable to proceed past splash screen and missing files in www folder

I was able to successfully set up the SunbirdED project in iOS and opened the xcworkspace file after installing the podfile. However, when running the project, it only displays the splash screen and stops from going to the next screen. Upon investigation, I found out that there were no files in the www folder. To resolve this issue, I added a dummy index.html file which enabled the HTML file to display on the screen after the splash screen. However, I am now unsure of what to do next. Can anyone guide me on how to properly set up this project for iOS?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.