#服务端 首先,登录到服务器,编辑/edx/app/edxapp/lms.env.json,在FEATURES中添加

1
2
3
4
5
6
:::text
"ENABLE_MOBILE_REST_API": true,
"ENABLE_OAUTH2_PROVIDER": true,
"ENABLE_COMBINED_LOGIN_REGISTRATION": true,
"OAUTH_ENFORCE_SECURE": false,
}

接着,创建oauth client,将得到的OAUTH_CLIENT_ID给移动端

#移动端 ###环境依赖

  • >= java 7
  • SDK要求23
  • Build Tools:23.0.2

###开始编译 首先拉取项目,切换到相应分支:

1
2
3
4
#拉取edx-app-android
git clone https://github.com/edx/edx-app-android.git
#切换到named-release/dogwood分支
git checkout -b named-release/dogwood named-release/dogwood

接着修改配置文件VideoLocker/default_config/config.yaml,填入你自己的服务器信息

1
2
3
4
5
6
7
8
API_HOST_URL: 'http://10.0.2.2' # localhost is 10.0.2.2 in Android
ENVIRONMENT_DISPLAY_NAME: 'Localhost'
PLATFORM_NAME: 'Your platform name here'
PLATFORM_DESTINATION_NAME: 'example.com'
FEEDBACK_EMAIL_ADDRESS: 'support@example.com'
COURSE_ENROLLMENT:
    ENABLED: true
    EXTERNAL_COURSE_SEARCH_URL: 'http://10.0.2.2/courses'

将你的OAUTH_CLIENT_ID填入VideoLocker/default_config/local.yaml

然后使用 Android Studio或gradle来编译项目

#参考