I have a service that collects sensor data.
The service is started in a class, lets call it x
. Inside x
I've defined a few methods for a JavaScript interface in a webview.
now I need to get that data inside x
to inject it to the webview to post it to server.
what is the best practice for this?
How can I get a reference to the service instance inside x
so I can access its methods and properties?