Docs enter link description here say how to start and finish service. Is there any way to bind with existing one with android annotation?
Asked
Active
Viewed 853 times
1 Answers
2
When you bind to your Service
, simply use the generated class:
Intent intent = new Intent(this, MyService_.class); // note the underscore
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
Or you can use the generated Intent
builder:
bindService(MyService_.intent(this).get(), mConnection, Context.BIND_AUTO_CREATE);

WonderCsabo
- 11,947
- 13
- 63
- 105