Home | History | Annotate | Download | only in api_legacy
      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     field public static final int NAVIGATION_ABORTED = 4; // 0x4
     10     field public static final int NAVIGATION_FAILED = 3; // 0x3
     11     field public static final int NAVIGATION_FINISHED = 2; // 0x2
     12     field public static final int NAVIGATION_STARTED = 1; // 0x1
     13     field public static final int TAB_HIDDEN = 6; // 0x6
     14     field public static final int TAB_SHOWN = 5; // 0x5
     15   }
     16 
     17   public class CustomTabsClient {
     18     method public static boolean bindCustomTabsService(android.content.Context, java.lang.String, android.support.customtabs.CustomTabsServiceConnection);
     19     method public static boolean connectAndInitialize(android.content.Context, java.lang.String);
     20     method public android.os.Bundle extraCommand(java.lang.String, android.os.Bundle);
     21     method public static java.lang.String getPackageName(android.content.Context, java.util.List<java.lang.String>);
     22     method public static java.lang.String getPackageName(android.content.Context, java.util.List<java.lang.String>, boolean);
     23     method public android.support.customtabs.CustomTabsSession newSession(android.support.customtabs.CustomTabsCallback);
     24     method public boolean warmup(long);
     25   }
     26 
     27   public final class CustomTabsIntent {
     28     method public static int getMaxToolbarItems();
     29     method public void launchUrl(android.content.Context, android.net.Uri);
     30     method public static android.content.Intent setAlwaysUseBrowserUI(android.content.Intent);
     31     method public static boolean shouldAlwaysUseBrowserUI(android.content.Intent);
     32     field public static final java.lang.String EXTRA_ACTION_BUTTON_BUNDLE = "android.support.customtabs.extra.ACTION_BUTTON_BUNDLE";
     33     field public static final java.lang.String EXTRA_CLOSE_BUTTON_ICON = "android.support.customtabs.extra.CLOSE_BUTTON_ICON";
     34     field public static final java.lang.String EXTRA_DEFAULT_SHARE_MENU_ITEM = "android.support.customtabs.extra.SHARE_MENU_ITEM";
     35     field public static final java.lang.String EXTRA_ENABLE_INSTANT_APPS = "android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS";
     36     field public static final java.lang.String EXTRA_ENABLE_URLBAR_HIDING = "android.support.customtabs.extra.ENABLE_URLBAR_HIDING";
     37     field public static final java.lang.String EXTRA_EXIT_ANIMATION_BUNDLE = "android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE";
     38     field public static final java.lang.String EXTRA_MENU_ITEMS = "android.support.customtabs.extra.MENU_ITEMS";
     39     field public static final java.lang.String EXTRA_REMOTEVIEWS = "android.support.customtabs.extra.EXTRA_REMOTEVIEWS";
     40     field public static final java.lang.String EXTRA_REMOTEVIEWS_CLICKED_ID = "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_CLICKED_ID";
     41     field public static final java.lang.String EXTRA_REMOTEVIEWS_PENDINGINTENT = "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_PENDINGINTENT";
     42     field public static final java.lang.String EXTRA_REMOTEVIEWS_VIEW_IDS = "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_VIEW_IDS";
     43     field public static final java.lang.String EXTRA_SECONDARY_TOOLBAR_COLOR = "android.support.customtabs.extra.SECONDARY_TOOLBAR_COLOR";
     44     field public static final java.lang.String EXTRA_SESSION = "android.support.customtabs.extra.SESSION";
     45     field public static final java.lang.String EXTRA_TINT_ACTION_BUTTON = "android.support.customtabs.extra.TINT_ACTION_BUTTON";
     46     field public static final java.lang.String EXTRA_TITLE_VISIBILITY_STATE = "android.support.customtabs.extra.TITLE_VISIBILITY";
     47     field public static final java.lang.String EXTRA_TOOLBAR_COLOR = "android.support.customtabs.extra.TOOLBAR_COLOR";
     48     field public static final java.lang.String EXTRA_TOOLBAR_ITEMS = "android.support.customtabs.extra.TOOLBAR_ITEMS";
     49     field public static final java.lang.String KEY_DESCRIPTION = "android.support.customtabs.customaction.DESCRIPTION";
     50     field public static final java.lang.String KEY_ICON = "android.support.customtabs.customaction.ICON";
     51     field public static final java.lang.String KEY_ID = "android.support.customtabs.customaction.ID";
     52     field public static final java.lang.String KEY_MENU_ITEM_TITLE = "android.support.customtabs.customaction.MENU_ITEM_TITLE";
     53     field public static final java.lang.String KEY_PENDING_INTENT = "android.support.customtabs.customaction.PENDING_INTENT";
     54     field public static final int NO_TITLE = 0; // 0x0
     55     field public static final int SHOW_PAGE_TITLE = 1; // 0x1
     56     field public static final int TOOLBAR_ACTION_BUTTON_ID = 0; // 0x0
     57     field public final android.content.Intent intent;
     58     field public final android.os.Bundle startAnimationBundle;
     59   }
     60 
     61   public static final class CustomTabsIntent.Builder {
     62     ctor public CustomTabsIntent.Builder();
     63     ctor public CustomTabsIntent.Builder(android.support.customtabs.CustomTabsSession);
     64     method public android.support.customtabs.CustomTabsIntent.Builder addDefaultShareMenuItem();
     65     method public android.support.customtabs.CustomTabsIntent.Builder addMenuItem(java.lang.String, android.app.PendingIntent);
     66     method public deprecated android.support.customtabs.CustomTabsIntent.Builder addToolbarItem(int, android.graphics.Bitmap, java.lang.String, android.app.PendingIntent) throws java.lang.IllegalStateException;
     67     method public android.support.customtabs.CustomTabsIntent build();
     68     method public android.support.customtabs.CustomTabsIntent.Builder enableUrlBarHiding();
     69     method public android.support.customtabs.CustomTabsIntent.Builder setActionButton(android.graphics.Bitmap, java.lang.String, android.app.PendingIntent, boolean);
     70     method public android.support.customtabs.CustomTabsIntent.Builder setActionButton(android.graphics.Bitmap, java.lang.String, android.app.PendingIntent);
     71     method public android.support.customtabs.CustomTabsIntent.Builder setCloseButtonIcon(android.graphics.Bitmap);
     72     method public android.support.customtabs.CustomTabsIntent.Builder setExitAnimations(android.content.Context, int, int);
     73     method public android.support.customtabs.CustomTabsIntent.Builder setInstantAppsEnabled(boolean);
     74     method public android.support.customtabs.CustomTabsIntent.Builder setSecondaryToolbarColor(int);
     75     method public android.support.customtabs.CustomTabsIntent.Builder setSecondaryToolbarViews(android.widget.RemoteViews, int[], android.app.PendingIntent);
     76     method public android.support.customtabs.CustomTabsIntent.Builder setShowTitle(boolean);
     77     method public android.support.customtabs.CustomTabsIntent.Builder setStartAnimations(android.content.Context, int, int);
     78     method public android.support.customtabs.CustomTabsIntent.Builder setToolbarColor(int);
     79   }
     80 
     81   public abstract class CustomTabsService extends android.app.Service {
     82     ctor public CustomTabsService();
     83     method protected boolean cleanUpSession(android.support.customtabs.CustomTabsSessionToken);
     84     method protected abstract android.os.Bundle extraCommand(java.lang.String, android.os.Bundle);
     85     method protected abstract boolean mayLaunchUrl(android.support.customtabs.CustomTabsSessionToken, android.net.Uri, android.os.Bundle, java.util.List<android.os.Bundle>);
     86     method protected abstract boolean newSession(android.support.customtabs.CustomTabsSessionToken);
     87     method public android.os.IBinder onBind(android.content.Intent);
     88     method protected abstract int postMessage(android.support.customtabs.CustomTabsSessionToken, java.lang.String, android.os.Bundle);
     89     method protected abstract boolean requestPostMessageChannel(android.support.customtabs.CustomTabsSessionToken, android.net.Uri);
     90     method protected abstract boolean updateVisuals(android.support.customtabs.CustomTabsSessionToken, android.os.Bundle);
     91     method protected abstract boolean warmup(long);
     92     field public static final java.lang.String ACTION_CUSTOM_TABS_CONNECTION = "android.support.customtabs.action.CustomTabsService";
     93     field public static final java.lang.String KEY_URL = "android.support.customtabs.otherurls.URL";
     94     field public static final int RESULT_FAILURE_DISALLOWED = -1; // 0xffffffff
     95     field public static final int RESULT_FAILURE_MESSAGING_ERROR = -3; // 0xfffffffd
     96     field public static final int RESULT_FAILURE_REMOTE_ERROR = -2; // 0xfffffffe
     97     field public static final int RESULT_SUCCESS = 0; // 0x0
     98   }
     99 
    100   public static abstract class CustomTabsService.Result implements java.lang.annotation.Annotation {
    101   }
    102 
    103   public abstract class CustomTabsServiceConnection implements android.content.ServiceConnection {
    104     ctor public CustomTabsServiceConnection();
    105     method public abstract void onCustomTabsServiceConnected(android.content.ComponentName, android.support.customtabs.CustomTabsClient);
    106     method public final void onServiceConnected(android.content.ComponentName, android.os.IBinder);
    107   }
    108 
    109   public final class CustomTabsSession {
    110     method public boolean mayLaunchUrl(android.net.Uri, android.os.Bundle, java.util.List<android.os.Bundle>);
    111     method public int postMessage(java.lang.String, android.os.Bundle);
    112     method public boolean requestPostMessageChannel(android.net.Uri);
    113     method public boolean setActionButton(android.graphics.Bitmap, java.lang.String);
    114     method public boolean setSecondaryToolbarViews(android.widget.RemoteViews, int[], android.app.PendingIntent);
    115     method public deprecated boolean setToolbarItem(int, android.graphics.Bitmap, java.lang.String);
    116   }
    117 
    118   public class CustomTabsSessionToken {
    119     method public android.support.customtabs.CustomTabsCallback getCallback();
    120     method public static android.support.customtabs.CustomTabsSessionToken getSessionTokenFromIntent(android.content.Intent);
    121     method public boolean isAssociatedWith(android.support.customtabs.CustomTabsSession);
    122   }
    123 
    124   public class PostMessageService extends android.app.Service {
    125     ctor public PostMessageService();
    126     method public android.os.IBinder onBind(android.content.Intent);
    127   }
    128 
    129   public abstract class PostMessageServiceConnection implements android.content.ServiceConnection {
    130     ctor public PostMessageServiceConnection(android.support.customtabs.CustomTabsSessionToken);
    131     method public boolean bindSessionToPostMessageService(android.content.Context, java.lang.String);
    132     method public final boolean notifyMessageChannelReady(android.os.Bundle);
    133     method public void onPostMessageServiceConnected();
    134     method public void onPostMessageServiceDisconnected();
    135     method public final void onServiceConnected(android.content.ComponentName, android.os.IBinder);
    136     method public final void onServiceDisconnected(android.content.ComponentName);
    137     method public final boolean postMessage(java.lang.String, android.os.Bundle);
    138     method public void unbindFromContext(android.content.Context);
    139   }
    140 
    141 }
    142 
    143