Restful API service

前端 未结 11 1605
清歌不尽
清歌不尽 2020-11-22 14:28

I\'m looking to make a service which I can use to make calls to a web-based REST API.

Basically I want to start a service on app init then I want to be able to ask t

11条回答
  •  深忆病人
    2020-11-22 15:11

    Also when I hit the post(Config.getURL("login"), values) the app seems to pause for a while (seems weird - thought the idea behind a service was that it runs on a different thread!)

    In this case its better to use asynctask, which runs on a different thread and return result back to the ui thread on completion.

提交回复
热议问题