0
次はアンドロイドからクロムカスタムタブを起動するコードです。クロムカスタムタブを起動するとバックグラウンドで終了する
try {
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
builder.setToolbarColor(ContextCompat.getColor(context, R.color.appthemecolor));
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(context, Uri.parse(url));
} catch (ActivityNotFoundException e) {
e.printStackTrace();
Intent intent = new Intent(context, WebviewActivity.class);
intent.putExtra(WebviewActivity.EXTRA_URL, url);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
context.startActivity(intent);
} catch (Exception e) {
}
私はクロームカスタムタブに3〜4回を起動すると、それは私のアプリケーションを殺すと、この問題は、私は、以下のサポートライブラリを使用しています唯一の
ジェリービーンデバイスで発生している新しいタブに
を起動バージョン
compile 'com.android.support:customtabs:25.3.1'