for example: val service = new LocalServiceConnection[MyService] //...
for example: val service = new LocalServiceConnection[MyService] //... val result = service(_.foo > 3, "3 < " + _.foo, "fail")
Execute given function with the connected service.
Execute given function with the connected service. If the service is not connected yet, this returns ifEmpty value for example: val service = new LocalServiceConnection[MyService] //... val foo = service(_.foo, defaultVal)
Execute given function with the connected service.
Execute given function with the connected service. If the service is not connected yet, the function is enqueued and be called when the service is connected. For example: val service = new LocalServiceConnection[MyService] //... service(_.doSomeJob())
Returns true if the service is currently connected.
Execute given function with the connected service.
Execute given function with the connected service. If the service is not connected yet, this does nothing for example: val service = new LocalServiceConnection[MyService] //... val foo = service.ifAvailable(_.foo)
Internal implementation for handling the service connection.
Internal implementation for handling the service connection. You do not need to call this method.
Internal implementation for handling the service connection.
Internal implementation for handling the service connection. You do not need to call this method.
An in-process service connector that can bound LocalService. This yields far more concise code than that uses plain-old Android API.
Please refer to the URL below for more details.
http://blog.scaloid.org/2013/03/introducing-localservice.html