当前位置: 首页>>代码示例>>Java>>正文


Java CustomTabsSession.mayLaunchUrl方法代码示例

本文整理汇总了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;
}
 
开发者ID:openid,项目名称:AppAuth-Android,代码行数:26,代码来源:CustomTabManager.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:CustomTabActivityHelper.java

示例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);
}
 
开发者ID:tomoya92,项目名称:android-apps,代码行数:13,代码来源:CustomTabActivityHelper.java

示例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);
}
 
开发者ID:saschpe,项目名称:android-customtabs,代码行数:8,代码来源:CustomTabsHelper.java

示例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);
}
 
开发者ID:indywidualny,项目名称:Centrum.fm,代码行数:11,代码来源:CustomTabActivityHelper.java

示例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);
}
 
开发者ID:Azure,项目名称:azure-mobile-engagement-app-android,代码行数:16,代码来源:CustomTabActivityHelper.java

示例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);
}
 
开发者ID:goodev,项目名称:materialup,代码行数:13,代码来源:CustomTabActivityHelper.java

示例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);
}
 
开发者ID:HugoGresse,项目名称:Anecdote,代码行数:12,代码来源:ChromeCustomTabsManager.java

示例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);
}
 
开发者ID:why168,项目名称:AndroidProjects,代码行数:13,代码来源:CustomTabActivityHelper.java

示例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);
}
 
开发者ID:Androideity,项目名称:AndroidStudioTutorials,代码行数:13,代码来源:CustomTabActivityHelper.java

示例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();
}
 
开发者ID:sakebook,项目名称:CustomTabsSample,代码行数:12,代码来源:ServiceHandler.java

示例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);
}
 
开发者ID:bkhezry,项目名称:ExtraWebView,代码行数:12,代码来源:CustomTabsDelegate.java

示例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);
}
 
开发者ID:dasmikko,项目名称:facepunchdroid,代码行数:9,代码来源:CustomTabActivityHelper.java

示例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);

}
 
开发者ID:fusion44,项目名称:galactic-tavern-android,代码行数:12,代码来源:CustomTabActivityHelper.java

示例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);
}
 
开发者ID:hidroh,项目名称:materialistic,代码行数:12,代码来源:CustomTabsDelegate.java


注:本文中的android.support.customtabs.CustomTabsSession.mayLaunchUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。