Permalink
Browse files

Fix #147

  • Loading branch information...
pocorall committed Jul 5, 2016
1 parent 3062374 commit 36243483bcd38318ec9c8b954f1042134d6fea8c
@@ -478,8 +478,13 @@ class LocalServiceConnection[S <: LocalService](bindFlag: Int = Context.BIND_AUT
*/
def connected: Boolean = service.isDefined
+ /**
+ * Creating an intent for ctx.bindService(). Extend this when you need to to something other.
+ */
+ def createIntent(): Intent = SIntent[S]
+
reg.onRegister {
- ctx.bindService(SIntent[S], this, bindFlag)
+ ctx.bindService(createIntent(), this, bindFlag)
}
reg.onUnregister {
@@ -241,8 +241,13 @@ class LocalServiceConnection[S <: LocalService](bindFlag: Int = Context.BIND_AUT
*/
def connected: Boolean = service.isDefined
+ /**
+ * Creating an intent for ctx.bindService(). Extend this when you need to to something other.
+ */
+ def createIntent(): Intent = SIntent[S]
+
reg.onRegister {
- ctx.bindService(SIntent[S], this, bindFlag)
+ ctx.bindService(createIntent(), this, bindFlag)
}
reg.onUnregister {

0 comments on commit 3624348

Please sign in to comment.