In Activity A you launch the Chrome Custom Tab like this:
private final int CHROME_CUSTOM_TAB_REQUEST_CODE = 100;
public void launchCustomTabs(String url) {
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.intent.setData(Uri.parse(url));
startActivityForResult(customTabsIntent.intent, CHROME_CUSTOM_TAB_REQUEST_CODE);
}
And in onActivityResult your check for that request code:
if (requestCode == CHROME_CUSTOM_TAB_REQUEST_CODE) {
startActivity(this, ActivityB.class);
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…