本文整理匯總了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);
}