I am trying to setup CustomTabs in an activity; however, the bindCustomTabsService method never calls onCustomTabsServiceConnected. What am I missing?
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.my_activity)
CustomTabsClient.bindCustomTabsService(this, "com.android.chrome", object: CustomTabsServiceConnection() {
override fun onServiceDisconnected(p0: ComponentName?) {
}
override fun onCustomTabsServiceConnected(
name: ComponentName,
client: CustomTabsClient
) {
// this is never called
log("Client connected")
mClient = client
client.warmup(0L)
}
})
..........