android service communicates with other class instances

后端 未结 1 1410
梦毁少年i
梦毁少年i 2021-01-28 15:33

first let me describe the logic.

  1. User turn on Photos Upload button to launch a transfer service to upload local photos to server.

  2. When the app w

相关标签:
1条回答
  • 2021-01-28 15:50

    follow steps to implement the requirement:

    1. create a service to fulfill the two parts of requirements

    2. UI button to trigger the service

    3. inside service class, register a Content Observer to detect camera event, the event files onChange() method, so you can upload photo in onChange() method

    4. register a Transfer service, bind the connection and use that to upload all local photos under onStartCommand() method.

    go to the github site to view the whole project.

    0 讨论(0)
提交回复
热议问题