Repository for the Android i-on component.
I-on Android is a mobile application which presents academic information retrieved from the Web API made available from i-on Core project.
To test the application one must:
-
Contact the developers via their student emails to obtain the file google-services.json and the authorization token for the read API because they cannot be committed to the repository for security reasons. The authorization token can be also obtained from i-on Core's developers.
-
Once google-services.json has been obtained it has to placed in the folder: Project/app
-
The authorization code should be placed in the file Project/app/src/main/java/org/ionproject/android/common/ionwebapi/WebAPIConfigs.kt:
const val WEB_API_AUTHORIZATION_TOKEN = "ASK_THE_DEVELOPERS" (replace with authorization token)
- Now, if you want to run the application with mocks uncomment this line of code in the file Project/app/src/main/java/org/ionproject/android/common/IonApplication.kt:
// val webAPI = MockIonWebAPI(ionMapper)
And comment these lines of code in the same file:
val retrofit = Retrofit.Builder()
.baseUrl(WEB_API_HOST)
.addConverterFactory(ScalarsConverterFactory.create())
.build()
val service: IonService = retrofit.create(IonService::class.java)
val webAPI = IonWebAPI(service, ionMapper)
- Finally open the project in the latest version of Android Studio and run the LoadingActivity on an emulator or your phone.
IMPORTANT: To run the application the phone or emulator MUST support at least the version 21 of the Android SDK.