1

My app connects with a sip server in a couple of activities. I haven't found a way to pass a registered sip session to the next activity. This means that every time the user goes to a new activity inside the app, the app needs to "reregister" at the sip server.

Does anyone know a solution?

Kind regards,

Lucas Swartsenburg

lswartsenburg
  • 373
  • 3
  • 8

1 Answers1

1

I think a good solution would be to register the sip server in an Android service. When the app starts start the service, and when your activities start/stop on the device, bind/unbind to that service as needed. When the last activity exits, stop the service.

To make the bind/unbind easier, you could superclass your activities and make the appropriate calls in onResume() and onPause().

Hope that works for you!

jarvisteve
  • 926
  • 8
  • 14