Configurations to setup mobile app

1. sunbird.properties

sunbird.properties file contains all the necessary configurations to set up Sunbird mobile app. The following are the configurations inside the sunbird.properties file.

Note

The properties can be environment-specific so the naming convention is <env_name>__<property__name>. For example, suppose base_url is the property so its dev environment-specific property name is dev_base_url, and the staging environment-specific property name is staging_base_url.

Property nameDescription

app_name

Name of the app/instance

app_version_code

Version code should be incremented every time a build is uploaded to Play Store.

app_id

A unique application id that identifies the app.Env specific properties dev_app_id, staging_app_id

base_url

Base URL of the instance(shouldn't contain "/" at the end). Env specific properties dev_base_url, staging_base_url

producer_id

Unique id used to show the origin(app/portal/desktop) of telemetry.Env specific properties dev_producer_id, staging_producer_id

channel_id

Default channel id.Env specific properties dev_channel_id, staging_channel_id

mobile_app_key

The credential is required to generate mobile_app_secret. This can be a version number Eg. "<instancename>-0.1". Suppose in the future you want to stop API calls to "<instancename>-0.1" then change it to "<instancename>-0.2" and generate a new mobile_app_secret and use it in the app. Env specific properties dev_mobile_app_key, staging_mobile_app_key.

mobile_app_secret

The credentials required for API calls Use this script to generate mobile_app_secret. The required properties to run the script is domain name, mobile_app_key, mobile admin key, and mobile admin secret(Run the OnboardConsumers Jenkins Job and take the mobile admin key and secret from Jenkins Output.)Env specific properties dev_mobile_app_secret, staging_mobile_app_secret

deeplink_base_url

Base URL used to support deep linking in the app.Env specific properties dev_deeplink_base_url, staging_deeplink_base_url

support_email

Email address of customer support where users can email their queries about the app.

custom_scheme

Custom scheme to support browser-based google login.Env specific properties dev_custom_scheme, staging_custom_scheme

merge_account_base_url

Base URL of merge account feature(shouldn't contain "/" at the end).Env specific properties dev_merge_account_base_url, staging_merge_account_base_url

oauth_redirect_url

Redirect URL to support browser-based google login.Env specific properties dev_oauth_redirect_url, staging_oauth_redirect_url

tou_base_url

Terms of use baseurl.Env specific properties dev_tou_base_url, staging_tou_base_url

survey_base_url

Survey feature base URL(Manage Learn Usecase).Env specific properties dev_survey_base_url, staging_survey_base_url

projects_base_url

Project feature base URL(Manage Learn Usecase).Env specific properties dev_projects_base_url, staging_projects_.base_url

2. google-service.json

Create apps in the firebase console based on the number of variants available for your instance. In the firebase console add the package name equivalent to your variant app_id. For example, suppose you have a staging variant of your instance and the property is following

staging_app_id = org.sunbird.app.staging

In the firebase console create an app whose package name should be "org.sunbird.staging.app".

For more reference follow this google support page.

Last updated