Last active 4 months ago
Android
Implementation of service, bounded service in Android
0
0
4
| 1 | // without bound |
| 2 | override fun onStart() { |
| 3 | super.onStart() |
| 4 | val intent = Intent(this, HelloService::class.java) |
| 5 | startService(intent) |
| 6 | } |
| 7 | |
| 8 | // with bound |
| 9 | private lateinit var mService: LocalService |
| 10 | private var mBound: Boolean = false |