Skip to content

Instantly share code, notes, and snippets.

@ashwin-sp
Created June 4, 2018 03:32
Show Gist options
  • Save ashwin-sp/e0f463d1e1a131ecb486852a8ed9367d to your computer and use it in GitHub Desktop.
Save ashwin-sp/e0f463d1e1a131ecb486852a8ed9367d to your computer and use it in GitHub Desktop.
private var broadcastReceiver: BroadcastReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
if(intent.hasExtra(CHECKED))
{
println("broadcast received with intent")
MySliceProvider.state = intent.getBooleanExtra(CHECKED, false)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment