mardi 30 janvier 2018

Best architecture for Android project "back-end" using service/dao layer pattern

Im trying to start a project using Spring Boot (REST) as the backend and Android as frontend. The problem is in the android project, because I want to use the Service - Controller pattern.

When I put the code destined to manage the http requests/response in other class, for example UserService, is outside the main thread and this can't manipulate the UI.

I was reading about "runonuithread" but the elements of the UI are not in the Service class... What can I do in this case? Add the elements to the class or manage the context inside the UserService?

This is for asyncronous calls.. But when I wan't to make synchronous calls this is neccesary?

Aucun commentaire:

Enregistrer un commentaire