0

I want to start a service that uploads some data to a web page. The service sends notifications to the notification bar (updates a progress bar). So far so good. Now, I want to show a activity when the user clicks on the notification in the notification bar. This Activity shall contain a button and optionally a status of the upload, i.e. I have to access the service that uploads the data. Is there a correct way to handle this requirement?

The service is currently started from a activity. I guess the main problem here is, to "link" the activity that is started from the pendingIntent on in the Notification with the service, i.e. access the service information. Does someone have a good example for that use case/issue?

Bartzilla
  • 2,768
  • 4
  • 28
  • 37
Soccertrash
  • 1,830
  • 3
  • 28
  • 48

1 Answers1

1

Just bind the activity to the service. Hope this, and this and this helps you out

Community
  • 1
  • 1
Azlam
  • 2,052
  • 3
  • 24
  • 28