1 package android.support.customtabs { 2 3 public class CustomTabsCallback { 4 ctor public CustomTabsCallback(); 5 method public void extraCallback(java.lang.String, android.os.Bundle); 6 method public void onMessageChannelReady(android.os.Bundle); 7 method public void onNavigationEvent(int, android.os.Bundle); 8 method public void onPostMessage(java.lang.String, android.os.Bundle); 9 method public void onRelationshipValidationResult(int, android.net.Uri, boolean, android.os.Bundle); 10 field public static final int NAVIGATION_ABORTED = 4; // 0x4 11 field public static final int NAVIGATION_FAILED = 3; // 0x3 12 field public static final int NAVIGATION_FINISHED = 2; // 0x2 13 field public static final int NAVIGATION_STARTED = 1; // 0x1 14 field public static final int TAB_HIDDEN = 6; // 0x6 15 field public static final int TAB_SHOWN = 5; // 0x5 16 } 17 18 public class CustomTabsClient { 19 method public static boolean bindCustomTabsService(android.content.Context, java.lang.String, android.support.customtabs.CustomTabsServiceConnection); 20 method public static boolean connectAndInitialize(android.content.Context, java.lang.String); 21 method public android.os.Bundle extraCommand(java.lang.String, android.os.Bundle); 22 method public static java.lang.String getPackageName(android.content.Context, java.util.List<java.lang.String>); 23 method public static java.lang.String getPackageName(android.content.Context, java.util.List<java.lang.String>, boolean); 24 method public android.support.customtabs.CustomTabsSession newSession(android.support.customtabs.CustomTabsCallback); 25 method public boolean warmup(long); 26 } 27 28 public final class CustomTabsIntent { 29 method public static int getMaxToolbarItems(); 30 method public void launchUrl(android.content.Context, android.net.Uri); 31 method public static android.content.Intent setAlwaysUseBrowserUI(android.content.Intent); 32 method public static boolean shouldAlwaysUseBrowserUI(android.content.Intent); 33 field public static final java.lang.String EXTRA_ACTION_BUTTON_BUNDLE = "android.support.customtabs.extra.ACTION_BUTTON_BUNDLE"; 34 field public static final java.lang.String EXTRA_CLOSE_BUTTON_ICON = "android.support.customtabs.extra.CLOSE_BUTTON_ICON"; 35 field public static final java.lang.String EXTRA_DEFAULT_SHARE_MENU_ITEM = "android.support.customtabs.extra.SHARE_MENU_ITEM"; 36 field public static final java.lang.String EXTRA_ENABLE_INSTANT_APPS = "android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS"; 37 field public static final java.lang.String EXTRA_ENABLE_URLBAR_HIDING = "android.support.customtabs.extra.ENABLE_URLBAR_HIDING"; 38 field public static final java.lang.String EXTRA_EXIT_ANIMATION_BUNDLE = "android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE"; 39 field public static final java.lang.String EXTRA_MENU_ITEMS = "android.support.customtabs.extra.MENU_ITEMS"; 40 field public static final java.lang.String EXTRA_REMOTEVIEWS = "android.support.customtabs.extra.EXTRA_REMOTEVIEWS"; 41 field public static final java.lang.String EXTRA_REMOTEVIEWS_CLICKED_ID = "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_CLICKED_ID"; 42 field public static final java.lang.String EXTRA_REMOTEVIEWS_PENDINGINTENT = "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_PENDINGINTENT"; 43 field public static final java.lang.String EXTRA_REMOTEVIEWS_VIEW_IDS = "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_VIEW_IDS"; 44 field public static final java.lang.String EXTRA_SECONDARY_TOOLBAR_COLOR = "android.support.customtabs.extra.SECONDARY_TOOLBAR_COLOR"; 45 field public static final java.lang.String EXTRA_SESSION = "android.support.customtabs.extra.SESSION"; 46 field public static final java.lang.String EXTRA_TINT_ACTION_BUTTON = "android.support.customtabs.extra.TINT_ACTION_BUTTON"; 47 field public static final java.lang.String EXTRA_TITLE_VISIBILITY_STATE = "android.support.customtabs.extra.TITLE_VISIBILITY"; 48 field public static final java.lang.String EXTRA_TOOLBAR_COLOR = "android.support.customtabs.extra.TOOLBAR_COLOR"; 49 field public static final java.lang.String EXTRA_TOOLBAR_ITEMS = "android.support.customtabs.extra.TOOLBAR_ITEMS"; 50 field public static final java.lang.String KEY_DESCRIPTION = "android.support.customtabs.customaction.DESCRIPTION"; 51 field public static final java.lang.String KEY_ICON = "android.support.customtabs.customaction.ICON"; 52 field public static final java.lang.String KEY_ID = "android.support.customtabs.customaction.ID"; 53 field public static final java.lang.String KEY_MENU_ITEM_TITLE = "android.support.customtabs.customaction.MENU_ITEM_TITLE"; 54 field public static final java.lang.String KEY_PENDING_INTENT = "android.support.customtabs.customaction.PENDING_INTENT"; 55 field public static final int NO_TITLE = 0; // 0x0 56 field public static final int SHOW_PAGE_TITLE = 1; // 0x1 57 field public static final int TOOLBAR_ACTION_BUTTON_ID = 0; // 0x0 58 field public final android.content.Intent intent; 59 field public final android.os.Bundle startAnimationBundle; 60 } 61 62 public static final class CustomTabsIntent.Builder { 63 ctor public CustomTabsIntent.Builder(); 64 ctor public CustomTabsIntent.Builder(android.support.customtabs.CustomTabsSession); 65 method public android.support.customtabs.CustomTabsIntent.Builder addDefaultShareMenuItem(); 66 method public android.support.customtabs.CustomTabsIntent.Builder addMenuItem(java.lang.String, android.app.PendingIntent); 67 method public deprecated android.support.customtabs.CustomTabsIntent.Builder addToolbarItem(int, android.graphics.Bitmap, java.lang.String, android.app.PendingIntent) throws java.lang.IllegalStateException; 68 method public android.support.customtabs.CustomTabsIntent build(); 69 method public android.support.customtabs.CustomTabsIntent.Builder enableUrlBarHiding(); 70 method public android.support.customtabs.CustomTabsIntent.Builder setActionButton(android.graphics.Bitmap, java.lang.String, android.app.PendingIntent, boolean); 71 method public android.support.customtabs.CustomTabsIntent.Builder setActionButton(android.graphics.Bitmap, java.lang.String, android.app.PendingIntent); 72 method public android.support.customtabs.CustomTabsIntent.Builder setCloseButtonIcon(android.graphics.Bitmap); 73 method public android.support.customtabs.CustomTabsIntent.Builder setExitAnimations(android.content.Context, int, int); 74 method public android.support.customtabs.CustomTabsIntent.Builder setInstantAppsEnabled(boolean); 75 method public android.support.customtabs.CustomTabsIntent.Builder setSecondaryToolbarColor(int); 76 method public android.support.customtabs.CustomTabsIntent.Builder setSecondaryToolbarViews(android.widget.RemoteViews, int[], android.app.PendingIntent); 77 method public android.support.customtabs.CustomTabsIntent.Builder setShowTitle(boolean); 78 method public android.support.customtabs.CustomTabsIntent.Builder setStartAnimations(android.content.Context, int, int); 79 method public android.support.customtabs.CustomTabsIntent.Builder setToolbarColor(int); 80 } 81 82 public abstract class CustomTabsService extends android.app.Service { 83 ctor public CustomTabsService(); 84 method protected boolean cleanUpSession(android.support.customtabs.CustomTabsSessionToken); 85 method protected abstract android.os.Bundle extraCommand(java.lang.String, android.os.Bundle); 86 method protected abstract boolean mayLaunchUrl(android.support.customtabs.CustomTabsSessionToken, android.net.Uri, android.os.Bundle, java.util.List<android.os.Bundle>); 87 method protected abstract boolean newSession(android.support.customtabs.CustomTabsSessionToken); 88 method public android.os.IBinder onBind(android.content.Intent); 89 method protected abstract int postMessage(android.support.customtabs.CustomTabsSessionToken, java.lang.String, android.os.Bundle); 90 method protected abstract boolean requestPostMessageChannel(android.support.customtabs.CustomTabsSessionToken, android.net.Uri); 91 method protected abstract boolean updateVisuals(android.support.customtabs.CustomTabsSessionToken, android.os.Bundle); 92 method protected abstract boolean validateRelationship(android.support.customtabs.CustomTabsSessionToken, int, android.net.Uri, android.os.Bundle); 93 method protected abstract boolean warmup(long); 94 field public static final java.lang.String ACTION_CUSTOM_TABS_CONNECTION = "android.support.customtabs.action.CustomTabsService"; 95 field public static final java.lang.String KEY_URL = "android.support.customtabs.otherurls.URL"; 96 field public static final int RELATION_HANDLE_ALL_URLS = 2; // 0x2 97 field public static final int RELATION_USE_AS_ORIGIN = 1; // 0x1 98 field public static final int RESULT_FAILURE_DISALLOWED = -1; // 0xffffffff 99 field public static final int RESULT_FAILURE_MESSAGING_ERROR = -3; // 0xfffffffd 100 field public static final int RESULT_FAILURE_REMOTE_ERROR = -2; // 0xfffffffe 101 field public static final int RESULT_SUCCESS = 0; // 0x0 102 } 103 104 public static abstract class CustomTabsService.Relation implements java.lang.annotation.Annotation { 105 } 106 107 public static abstract class CustomTabsService.Result implements java.lang.annotation.Annotation { 108 } 109 110 public abstract class CustomTabsServiceConnection implements android.content.ServiceConnection { 111 ctor public CustomTabsServiceConnection(); 112 method public abstract void onCustomTabsServiceConnected(android.content.ComponentName, android.support.customtabs.CustomTabsClient); 113 method public final void onServiceConnected(android.content.ComponentName, android.os.IBinder); 114 } 115 116 public final class CustomTabsSession { 117 method public static android.support.customtabs.CustomTabsSession createMockSessionForTesting(android.content.ComponentName); 118 method public boolean mayLaunchUrl(android.net.Uri, android.os.Bundle, java.util.List<android.os.Bundle>); 119 method public int postMessage(java.lang.String, android.os.Bundle); 120 method public boolean requestPostMessageChannel(android.net.Uri); 121 method public boolean setActionButton(android.graphics.Bitmap, java.lang.String); 122 method public boolean setSecondaryToolbarViews(android.widget.RemoteViews, int[], android.app.PendingIntent); 123 method public deprecated boolean setToolbarItem(int, android.graphics.Bitmap, java.lang.String); 124 method public boolean validateRelationship(int, android.net.Uri, android.os.Bundle); 125 } 126 127 public class CustomTabsSessionToken { 128 method public static android.support.customtabs.CustomTabsSessionToken createMockSessionTokenForTesting(); 129 method public android.support.customtabs.CustomTabsCallback getCallback(); 130 method public static android.support.customtabs.CustomTabsSessionToken getSessionTokenFromIntent(android.content.Intent); 131 method public boolean isAssociatedWith(android.support.customtabs.CustomTabsSession); 132 } 133 134 public class PostMessageService extends android.app.Service { 135 ctor public PostMessageService(); 136 method public android.os.IBinder onBind(android.content.Intent); 137 } 138 139 public abstract class PostMessageServiceConnection implements android.content.ServiceConnection { 140 ctor public PostMessageServiceConnection(android.support.customtabs.CustomTabsSessionToken); 141 method public boolean bindSessionToPostMessageService(android.content.Context, java.lang.String); 142 method public final boolean notifyMessageChannelReady(android.os.Bundle); 143 method public void onPostMessageServiceConnected(); 144 method public void onPostMessageServiceDisconnected(); 145 method public final void onServiceConnected(android.content.ComponentName, android.os.IBinder); 146 method public final void onServiceDisconnected(android.content.ComponentName); 147 method public final boolean postMessage(java.lang.String, android.os.Bundle); 148 method public void unbindFromContext(android.content.Context); 149 } 150 151 public class TrustedWebUtils { 152 method public static void launchAsTrustedWebActivity(android.content.Context, android.support.customtabs.CustomTabsIntent, android.net.Uri); 153 field public static final java.lang.String EXTRA_LAUNCH_AS_TRUSTED_WEB_ACTIVITY = "android.support.customtabs.extra.LAUNCH_AS_TRUSTED_WEB_ACTIVITY"; 154 } 155 156 } 157 158 package androidx.browser.browseractions { 159 160 public class BrowserActionItem { 161 ctor public BrowserActionItem(java.lang.String, android.app.PendingIntent, int); 162 ctor public BrowserActionItem(java.lang.String, android.app.PendingIntent); 163 method public android.app.PendingIntent getAction(); 164 method public int getIconId(); 165 method public java.lang.String getTitle(); 166 } 167 168 public class BrowserActionsIntent { 169 method public static java.lang.String getCreatorPackageName(android.content.Intent); 170 method public android.content.Intent getIntent(); 171 method public static void launchIntent(android.content.Context, android.content.Intent); 172 method public static void openBrowserAction(android.content.Context, android.net.Uri); 173 method public static void openBrowserAction(android.content.Context, android.net.Uri, int, java.util.ArrayList<androidx.browser.browseractions.BrowserActionItem>, android.app.PendingIntent); 174 method public static java.util.List<androidx.browser.browseractions.BrowserActionItem> parseBrowserActionItems(java.util.ArrayList<android.os.Bundle>); 175 field public static final java.lang.String ACTION_BROWSER_ACTIONS_OPEN = "androidx.browser.browseractions.browser_action_open"; 176 field public static final java.lang.String EXTRA_APP_ID = "androidx.browser.browseractions.APP_ID"; 177 field public static final java.lang.String EXTRA_MENU_ITEMS = "androidx.browser.browseractions.extra.MENU_ITEMS"; 178 field public static final java.lang.String EXTRA_SELECTED_ACTION_PENDING_INTENT = "androidx.browser.browseractions.extra.SELECTED_ACTION_PENDING_INTENT"; 179 field public static final java.lang.String EXTRA_TYPE = "androidx.browser.browseractions.extra.TYPE"; 180 field public static final int ITEM_COPY = 3; // 0x3 181 field public static final int ITEM_DOWNLOAD = 2; // 0x2 182 field public static final int ITEM_INVALID_ITEM = -1; // 0xffffffff 183 field public static final int ITEM_OPEN_IN_INCOGNITO = 1; // 0x1 184 field public static final int ITEM_OPEN_IN_NEW_TAB = 0; // 0x0 185 field public static final int ITEM_SHARE = 4; // 0x4 186 field public static final java.lang.String KEY_ACTION = "androidx.browser.browseractions.ACTION"; 187 field public static final java.lang.String KEY_ICON_ID = "androidx.browser.browseractions.ICON_ID"; 188 field public static final java.lang.String KEY_TITLE = "androidx.browser.browseractions.TITLE"; 189 field public static final int MAX_CUSTOM_ITEMS = 5; // 0x5 190 field public static final int URL_TYPE_AUDIO = 3; // 0x3 191 field public static final int URL_TYPE_FILE = 4; // 0x4 192 field public static final int URL_TYPE_IMAGE = 1; // 0x1 193 field public static final int URL_TYPE_NONE = 0; // 0x0 194 field public static final int URL_TYPE_PLUGIN = 5; // 0x5 195 field public static final int URL_TYPE_VIDEO = 2; // 0x2 196 } 197 198 public static final class BrowserActionsIntent.Builder { 199 ctor public BrowserActionsIntent.Builder(android.content.Context, android.net.Uri); 200 method public androidx.browser.browseractions.BrowserActionsIntent build(); 201 method public androidx.browser.browseractions.BrowserActionsIntent.Builder setCustomItems(java.util.ArrayList<androidx.browser.browseractions.BrowserActionItem>); 202 method public androidx.browser.browseractions.BrowserActionsIntent.Builder setCustomItems(androidx.browser.browseractions.BrowserActionItem...); 203 method public androidx.browser.browseractions.BrowserActionsIntent.Builder setOnItemSelectedAction(android.app.PendingIntent); 204 method public androidx.browser.browseractions.BrowserActionsIntent.Builder setUrlType(int); 205 } 206 207 } 208 209