org.scaloid.common

LocalServiceConnection

Related Doc: package common

class LocalServiceConnection[S <: LocalService] extends ServiceConnection

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

Linear Supertypes
ServiceConnection, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LocalServiceConnection
  2. ServiceConnection
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LocalServiceConnection(bindFlag: Int = Context.BIND_AUTO_CREATE)(implicit ctx: Context, reg: Registerable, mf: ClassTag[S])

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def apply[T](test: (S) ⇒ Boolean, ifTrue: (S) ⇒ T, ifFalse: ⇒ T): T

    for example: val service = new LocalServiceConnection[MyService] //...

    for example: val service = new LocalServiceConnection[MyService] //... val result = service(_.foo > 3, "3 < " + _.foo, "fail")

  5. def apply[T](f: (S) ⇒ T, ifEmpty: ⇒ T): T

    for example: val service = new LocalServiceConnection[MyService] //...

    for example: val service = new LocalServiceConnection[MyService] //... val foo = service(_.foo, defaultVal)

  6. def apply[T](f: (S) ⇒ Unit): Unit

    Execute some function with the connected service.

    Execute some 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())

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. var binder: IBinder

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. var componentName: ComponentName

  11. def connected: Boolean

    Returns true if the service is currently connected.

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. var onConnected: EventSource1[S, Unit]

  22. var onDisconnected: EventSource1[S, Unit]

  23. def onServiceConnected(p1: ComponentName, b: IBinder): Unit

    Internal implementation for handling the service connection.

    Internal implementation for handling the service connection. You do not need to call this method.

    Definition Classes
    LocalServiceConnection → ServiceConnection
  24. def onServiceDisconnected(p1: ComponentName): Unit

    Internal implementation for handling the service connection.

    Internal implementation for handling the service connection. You do not need to call this method.

    Definition Classes
    LocalServiceConnection → ServiceConnection
  25. var service: Option[S]

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def run(f: (S) ⇒ Unit): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 3.6) Use apply(f: S => Unit) instead.

Inherited from ServiceConnection

Inherited from AnyRef

Inherited from Any

Ungrouped