1

I have a sound recorder app. I have a service where the recording happening. I want to display a waveform during recording, I have a custom View for it, but it needs the byte array, which the recorder writes. My activity and my service communicates with messages and messagehandlers. I don't want to send the whole data to the view via messages every time I update the waveform. Is it possible somehow to send the View reference to the service?

czadam
  • 1,827
  • 1
  • 18
  • 31
  • For me this reads like a "how to update the ui from a service"-problem. Does this question helps you by any means? http://stackoverflow.com/questions/7942083/updating-ui-from-a-service-using-a-handler – nuala Aug 17 '12 at 09:07

1 Answers1

1

For a Service to trigger something in the UI, you don't send a View to it. However, Android does have several ways to accomplish Service-Activity communication. The documentation has an overview here. Pick your favorite method and find a tutorial; they're not very tricky, with the possible exception of using AIDL.

Yusuf X
  • 14,513
  • 5
  • 35
  • 47