first let me describe the logic.
User turn on Photos Upload button to launch a transfer service to upload local photos to server.
When the app w
follow steps to implement the requirement:
create a service to fulfill the two parts of requirements
UI button to trigger the service
inside service class, register a Content Observer to detect camera event, the event files onChange() method, so you can upload photo in onChange() method
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.