0
今天我嘗試了(不太可能)在我的應用中實現Chrome Custom Tabs ,想法是嘗試使用它們並回退到webview以防萬一,但我堅持要打開它們:這裏是我試過的Chrome自定義標籤
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_VIEW,
data: 'http://www.google.com',
packageName: 'com.android.chrome'
});
intent.putExtra('android.support.customtabs.extra.SESSION', null);
Ti.Android.currentActivity.startActivity(intent);
它所做的僅僅是在Chrome中打開網頁(所以,我可以用Ti.Platform.openURL,但僅適用於Android做同樣的事情);我錯過了什麼嗎?是否有人知道模塊/部件ala Ti.safariDialog?