chrome-custom-tabs

How to close chrome custom tabs

这一生的挚爱 提交于 2019-11-28 00:29:24
问题 In my app I have opened a url via Chrome Custom Tab. We know that when user taps the device back button or custom back button Chrome Custom Tab will be closed. Is it possible to close the Chrome Custom Tab by programatically without user intervention. 回答1: There is no such support currently to close chrome custom tab programatically. But you can close it by starting your previous activity from where you launched chrome custom tab if you want. Let, you open chrome custom tab from "

Chrome Custom Tabs redirect to Android app will close the app

早过忘川 提交于 2019-11-27 06:40:59
问题 I am trying to implement an OAuth2 flow with an Android Chrome Custom Tab but my app is always closed (no crash) when the Chrome Custom Tab is receiving the 302 with the location/scheme of my app. If I create a HTML page with ahref link and touch manually on it the Chrome Custom Tab is correctly switching to my app. Seems like when handling the server 302 redirect in the Chrome Custom Tab it will not correctly handle my custom app scheme... but why? If I try the same redirect URL in a stock

Callback on dismiss of chrome custom tabs

泄露秘密 提交于 2019-11-27 03:34:48
问题 I have an activity 'A' and inside that activity, I have opened a chrome custom tab. Now when the user closes the chrome custom tab I want to open another activity 'B'. Is there a way to know when the chrome custom tabs has been closed. Or any other way to solve the above problem. 回答1: You could keep track that Custom Tabs was opened on a boolean variable on Activity A. private boolean mCustomTabsOpened = false; public void launchCustomTabs(String url) { mCustomTabsOpened = true; new