當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。