- I've used this project to teach about Android applications and learn about Hilt and Room libraries (I had never used these libraries before).
- The architecture was created using the recommendation by Android Jetpack (complete documentation) with MVVM patttern.
- The main application has the folders:
/data
/di: dependency injection
/model
/api: api responses
/db: database entity
/network: network functions and validadtions
/repository: repositories to connect to web services and local storage
/service
/util: generic approaches
/viewmodel
/ui
/activity
/fragment
- I've created a module called
components
to encapsulate all components of the application.
- This approach could be used to encapsulate other parts of the project like data, domain, web service. The better choice depends on the size of the project and how many projects will be linked to it.
- I've create only two tests inside
components
module in androidTest
folder to test FlexOptionComponent
and SearchBarComponent
. I can create more tests later.
- About webhook, I've never seen this tool before and I didn't have a lot of time to study and create a permanent link, but I included two calls to send when pokemon is a catch (on the first page) and when pokemon is marked as favorite (on the detail page). You can see all the requests here.
- Observation: I don't know how long this link will be, so if you have problems and need to create another link you need:
- Edit URL response with:
Default status code = 200
Content Type = application/json,
Timeout before response = 0
Response body = { "sv_status" = true }
- Update
data/service/WebHookService.kt
with id get in webhook.site.
- The pages was create with different layouts to portrait and landscape orientation.
- The local database is used only to get a bit history.