0

Google recently announced Google Chrome Custom Tabs, a way to use Google chrome power to open webpages instead of using webviews.

Is there a list of all the possible KEYS for the Extra bundle used in mayLaunchUrl ?

mahemoff
  • 44,526
  • 36
  • 160
  • 222
Andrea Baccega
  • 27,211
  • 13
  • 45
  • 46

3 Answers3

0

Right now it looks like the extras Bundle for mayLaunchUrl is there only for future use. So, there doesn't seem to be a list of keys.

the the extras field on mayLaunchUrl:

  • @param extras Reserved for future use.
andreban
  • 4,621
  • 1
  • 20
  • 49
0

Only one extra is currently implemented for mayLaunchUrl: "org.chromium.chrome.browser.referrer_id".

Egor Pasko
  • 506
  • 3
  • 11
0

This class looks promising:

  public final class CustomTabsIntent {
    method public void launchUrl(android.app.Activity, android.net.Uri);
    field public static final java.lang.String EXTRA_ACTION_BUTTON_BUNDLE = "android.support.customtabs.extra.ACTION_BUTTON_BUNDLE";
    field public static final java.lang.String EXTRA_CLOSE_BUTTON_ICON = "android.support.customtabs.extra.CLOSE_BUTTON_ICON";
    field public static final java.lang.String EXTRA_EXIT_ANIMATION_BUNDLE = "android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE";
    field public static final java.lang.String EXTRA_MENU_ITEMS = "android.support.customtabs.extra.MENU_ITEMS";
    field public static final java.lang.String EXTRA_SESSION = "android.support.customtabs.extra.SESSION";
    field public static final java.lang.String EXTRA_TITLE_VISIBILITY_STATE = "android.support.customtabs.extra.TITLE_VISIBILITY";
    field public static final java.lang.String EXTRA_TOOLBAR_COLOR = "android.support.customtabs.extra.TOOLBAR_COLOR";
    field public static final java.lang.String KEY_DESCRIPTION = "android.support.customtabs.customaction.DESCRIPTION";
    field public static final java.lang.String KEY_ICON = "android.support.customtabs.customaction.ICON";
    field public static final java.lang.String KEY_MENU_ITEM_TITLE = "android.support.customtabs.customaction.MENU_ITEM_TITLE";
    field public static final java.lang.String KEY_PENDING_INTENT = "android.support.customtabs.customaction.PENDING_INTENT";
    field public static final int NO_TITLE = 0; // 0x0
    field public static final int SHOW_PAGE_TITLE = 1; // 0x1
    field public final android.content.Intent intent;
    field public final android.os.Bundle startAnimationBundle;
  }

"may launch URL" sounds very similar to the myLaunchUrl() method:

Last but not least, use the mayLaunchUrl() method to notify Chrome of a likely navigation to a URL or a list of URLs if necessary. It also returns a boolean to notify whether your custom tab will be launched. If false, the user does not have the latest version of Chrome available and you will need to decide whether you want to launch Chrome externally or use a web view as a fallback. Please note that as a best practice, call warmup() before mayLaunchUrl().

See: An Introduction to Chrome Custom Tabs for Android

Scott Merritt
  • 1,284
  • 2
  • 13
  • 24