Chrome 自定义标签
Chrome Custom Tabs
今天我尝试(未成功)实施 Chrome Custom Tabs
在我的应用程序中,我的想法是尝试使用它们并回退到网络视图以防万一,但我坚持要打开它们:这是我尝试过的
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);我错过了什么吗?有人知道 module/widget ala Ti.safariDialog 吗?
implementation guide uses putBinder
where you use putExtra
so I guess that's the issue. Titanium currently doesn't expose putBinder
so you'd have to request that to be added in a JIRA ticket
今天我尝试(未成功)实施 Chrome Custom Tabs 在我的应用程序中,我的想法是尝试使用它们并回退到网络视图以防万一,但我坚持要打开它们:这是我尝试过的
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);我错过了什么吗?有人知道 module/widget ala Ti.safariDialog 吗?
implementation guide uses putBinder
where you use putExtra
so I guess that's the issue. Titanium currently doesn't expose putBinder
so you'd have to request that to be added in a JIRA ticket