本文整理汇总了Java中android.support.customtabs.CustomTabsSession.mayLaunchUrl方法的典型用法代码示例。如果您正苦于以下问题:Java CustomTabsSession.mayLaunchUrl方法的具体用法?Java CustomTabsSession.mayLaunchUrl怎么用?Java CustomTabsSession.mayLaunchUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.customtabs.CustomTabsSession
的用法示例。
在下文中一共展示了CustomTabsSession.mayLaunchUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createSession
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* Creates a {@link android.support.customtabs.CustomTabsSession custom tab session} for
* use with a custom tab intent, with optional callbacks and optional list of URIs that may
* be requested. The URI list should be ordered such that the most likely URI to be requested
* is first. If no custom tab supporting browser is available, this will return {@code null}.
*/
@WorkerThread
@Nullable
public CustomTabsSession createSession(
@Nullable CustomTabsCallback callbacks,
@Nullable Uri... possibleUris) {
CustomTabsClient client = getClient();
if (client == null) {
return null;
}
CustomTabsSession session = client.newSession(callbacks);
if (possibleUris != null && possibleUris.length > 0) {
List<Bundle> additionalUris = UriUtil.toCustomTabUriBundle(possibleUris, 1);
session.mayLaunchUrl(possibleUris[0], null, additionalUris);
}
return session;
}
示例2: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
* @return true if call to mayLaunchUrl was accepted.
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) return false;
CustomTabsSession session = getSession();
if (session == null) return false;
return session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例3: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @return true if call to mayLaunchUrl was accepted.
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) return false;
CustomTabsSession session = getSession();
if (session == null) return false;
return session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例4: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
public boolean mayLaunchUrl(final Uri uri, final Bundle extras, final List<Bundle> otherLikelyBundles) {
if (client == null) {
return false;
}
CustomTabsSession session = getSession();
return session != null && session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例5: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @return true if call to mayLaunchUrl was accepted.
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) return false;
CustomTabsSession session = getSession();
return session != null && session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例6: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @return true if call to mayLaunchUrl was accepted.
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
*/
public final boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles)
{
if (client == null)
{
return false;
}
CustomTabsSession session = getSession();
return session != null && session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例7: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @return true if call to mayLaunchUrl was accepted
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) return false;
CustomTabsSession session = getSession();
if (session == null) return false;
return session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例8: mayLaunch
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* Prevent the Chrome client that the given url may be opened.
*/
public void mayLaunch(String url) {
if (mClient == null || url == null) {
return;
}
Log.i(TAG, "mayLaunch " + url);
CustomTabsSession session = getSession();
session.mayLaunchUrl(Uri.parse(url), null, null);
}
示例9: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @return true if call to mayLaunchUrl was accepted.
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) return false;
CustomTabsSession session = getSession();
if (session == null) return false;
return session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例10: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}
* @return true if call to mayLaunchUrl was accepted
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) return false;
CustomTabsSession session = getSession();
if (session == null) return false;
return session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例11: onServiceConnected
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
@Override
public void onServiceConnected(CustomTabsClient client) {
customTabsClient = client;
customTabsClient.warmup(0L);
if (!TextUtils.isEmpty(mayLaunchUrl)) {
CustomTabsSession session = getSession();
boolean success = session.mayLaunchUrl(Uri.parse(mayLaunchUrl), null, null);
Log.d("CustomTabsSample", "mayLaunchUrl request is " + success + ", url = " + mayLaunchUrl);
}
serviceHandlerCallback.connected();
}
示例12: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
* @return true if call to mayLaunchUrl was accepted.
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) {
return false;
}
CustomTabsSession session = getSession();
return session != null && session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例13: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) return false;
CustomTabsSession session = getSession();
if (session == null) return false;
return session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例14: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @return true if call to mayLaunchUrl was accepted.
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) return false;
CustomTabsSession session = getSession();
return session != null && session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}
示例15: mayLaunchUrl
import android.support.customtabs.CustomTabsSession; //导入方法依赖的package包/类
/**
* @see CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)
* @return true if call to mayLaunchUrl was accepted.
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
if (mClient == null) {
return false;
}
CustomTabsSession session = getSession();
return session != null && session.mayLaunchUrl(uri, extras, otherLikelyBundles);
}