📜 ⬆️ ⬇️

Mobile applications of Stepic.org for iOS and Android

Hurray, it happened! The platform with open online courses Stepic.org has applications for iOS and Android.
In this short post we will talk about the process of working on applications - the choice of platforms, the technologies used and the API, and even give links to the source code.


Frankly, we have long doubted whether this is necessary. Judge for yourself - whatever the educational mobile application, there is no way you can conveniently write Haskell code or enter a dozen or two commands into the Linux terminal. Therefore, it was not about an application that would fully convey the functionality of Stepic, but would help to diversify and improve the training of our users.

Often we are asked - why is there no application for Windows Phone?
At the time of the start of development (September 2015), Stepic.org statistics on mobile OS were as follows:

At the same time, 11% of Stepic.org users came from mobile devices (6% from tablets and 5% from phones).

As soon as it was decided to make applications for Android and iOS, there were also developers: Kirill Makarov and Alexander Karpov - third-year students of the HSE Faculty of Computer Science and interns at Stepic.org, the mobile application will also be counted as a course work in high school.
')


Some details about the applications themselves.


The main functionality was implemented using Stepic.org REST API, authorization takes place using OAuth 2. It was decided to make the design native, for example, iOS uses lower tabs, and Android uses a navigation drawer. By the way, anyone can repeat this: OAuth application registration - stepic.org/oauth2/applications/ , API autodocumentation - stepic.org/api/docs/ .

Android

To play the video in the application, it was decided to give the user the ability to play the video in his favorite player, by the way, Google advises . Of course, this leads to the fact that the players have their drawbacks, some, for example, do not support the function of controlling the speed of video playback, which is useful for viewing online courses. For those who are critical of this feature, we recommend using the open source video player VLC for Android . Android application is made in accordance with the Google Material Design Guide . Dagger 2.0 is used for dependency injection, its advantages can be read here . To work with the API, use Retrofit , which allows you to add new API methods literally in one line. To manage events in a project, Otto is used, which allows you to avoid many errors associated with updating the user interface, when this interface no longer exists, this often occurs when returning responses from the server.

iOS

The Alamofire and SwiftyJSON libraries were used to work with the API. Core Data is used to store data in the database. A very useful FLKAutoLayout framework was used to work with AutoLayout . For mobile analytics, Crashlytics is used.



What can applications do?


You can view text and video materials, as well as download them to view offline. You can also view course descriptions and sign up for them, view a user profile. Very soon the possibility of solving some types of tasks will be added. Updates happen on average every two weeks.

Applications are available for download for free, we welcome your feedback:

By the way, the source code of applications is open:

Source: https://habr.com/ru/post/275713/


All Articles