Android how to wait for code to finish before continuing

前端 未结 5 1317
南笙
南笙 2021-01-17 21:28

I have a method called hostPhoto(); it basically uploads an image to a site and retrieves a link. I then have an other method to post the link to a website.

5条回答
  •  遇见更好的自我
    2021-01-17 22:01

    you can use AsyncTask , refer this :

    EDIT: and he is a video tutorial of asynctask , or refer this sample example : clic here

提交回复
热议问题