Fabio Picchi
Fabio Picchi

Reputation: 1202

Launching Chrome custom tabs example without having launched Chrome beta for the first time

I have just begun experimenting with chrome custom tabs and faced this small problem. While I set up the environment to run the Chrome custom tabs example I downloaded Chrome beta on my device. However, when I ran the example, it wouldn't work.

I put up a couple of breakpoints and everything seemed to be working and, most importantly, the program could find a package that supported custom tabs with:

    String packageName = CustomTabsHelper.getPackageNameToUse(this);

'packageName' was set to chrome beta but none of the callbacks were called (onCustomTabsServiceConnected or onServiceDisconnected).

I solved this problem by running Chrome Beta and performing a couple of setup operations. After that, I ran the example again and it worked. It seems to be a kind of bug... Is this behaviour expected?

Upvotes: 2

Views: 1084

Answers (1)

Egor Pasko
Egor Pasko

Reputation: 516

This is expected behavior. When Chrome displays anything to the user, it asks to accept the terms of use first. After accepting the TOS, the webpage should be displayed, and the app gets the ability to bind to the service.

Upvotes: 2

Related Questions