As a student of 42 Silicon Valley I decided to build our school’s app. The app utilizes our school API 42 API.
With Portal 42 you can search for students by their login
Here is the list of valid student logins for testing:
- ydeineha
- dgonor
- mpetruse
- vmuradia
If a login is valid the information about a student will be displayed. In particular, his name, surname, profile picture, number of wallet points, evaluation points, phone number, email, cursus, grade etc.
The second tab contains the list of his achievements with the following information name of the achievement, its description and icon
In order to search for other students one can press the search icon on the app bar or select options menu Home
- The app contains 2 Activities:
- MainActivity class - is the home page class
- UserActivity class - is the class which holds the 2 Fragments
- The 2 Fragments are:
- InfoFragment class - displays the basic information about the user
- AchievementsFragment class - displays user’s achievements with the help of Recycler View
- My idea was to use IntentService to get information about the user from the API, but due to the lack of time I didn’t implement it
- Text Input
- Material Button
- Top App Bar
- Tab Layout
- Card View
All the classes in model package. These are POJO classes used for parsing JSON data and a separate Model class.
Model class is a singleton. It holds an object of MutableLiveData User class and other information about the user. NetworkService class parses this information from the API and stores it to Model class. This is not the best implementation. If I had more time I would have implemented it differently. I would store the information to the Database and would observe it with the help of LiveData
View is represented by XML files: activity_main.xml and fragment_info.xml
View is represented by MainViewModel class. Two classes (MainActivity class and InfoFragment class) are bound to it. I used both one-way and two-way databinding for this project
This project uses Retrofit Library for API. I was learning this library from scratch in order to be able to use our school’s API
Yuliya Deinega