com.samsung.android.sdk.look.cocktailbar
Class SlookCocktailManager
- java.lang.Object
-
- com.samsung.android.sdk.look.cocktailbar.SlookCocktailManager
-
public final class SlookCocktailManager extends java.lang.Object
Updates Cocktail state; gets information about installed Cocktail providers and other Cocktail related state. This is also supported by edge simulator.
-
-
Field Summary
Fields Modifier and Type Field and Description static int
COCKTAIL_VISIBILITY_HIDE
Cocktail has been hidden in cocktail-bar.static int
COCKTAIL_VISIBILITY_SHOW
Cocktail has been shown in cocktail-bar.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description int[]
getCocktailIds(android.content.ComponentName provider)
Get the cocktailIds that have been bound to the given Cocktail provider.static SlookCocktailManager
getInstance(android.content.Context context)
Get the SlookCocktailManager instance to use for the suppliedContext
object.void
notifyCocktailViewDataChanged(int cocktailId, int viewId)
Notifies the specified collection view in the specified Cocktail instance to invalidate its data.void
updateCocktail(int cocktailId, android.widget.RemoteViews view)
Set the RemoteViews to use for the specified cocktailId.void
updateCocktail(int cocktailId, android.widget.RemoteViews contentView, android.widget.RemoteViews helpView)
Set the content view and help view to use for the specified cocktailId.
-
-
-
Field Detail
-
COCKTAIL_VISIBILITY_SHOW
public static final int COCKTAIL_VISIBILITY_SHOW
Cocktail has been shown in cocktail-bar.
-
COCKTAIL_VISIBILITY_HIDE
public static final int COCKTAIL_VISIBILITY_HIDE
Cocktail has been hidden in cocktail-bar.
-
-
Method Detail
-
getInstance
public static SlookCocktailManager getInstance(android.content.Context context)
Get the SlookCocktailManager instance to use for the suppliedContext
object.- Parameters:
context
-Context
object.- Returns:
- SlookCocktailManager.
- Throws:
Java.lang.IllegalArgumentException
- - Thrown if context or baseContext is null.- Since:
- 1.1.0
-
updateCocktail
public void updateCocktail(int cocktailId, android.widget.RemoteViews view)
Set the RemoteViews to use for the specified cocktailId.It is okay to call this method both inside an ACTION_COCKTAIL_UPDATE broadcast, and outside of the handler. This method will only work when called from the uid that owns the Cocktail provider.
The total Bitmap memory used by the RemoteViews object cannot exceed that required to fill the screen 1.5 times, ie. (screen width x screen height x 4 x 1.5) bytes.
- Parameters:
cocktailId
- The Cocktail instance for which to set the RemoteViews.view
- The RemoteViews object to show.- Throws:
Java.lang.IllegalArgumentException
- - Thrown if RemoteViews is null.- Since:
- 1.1.0
-
updateCocktail
public void updateCocktail(int cocktailId, android.widget.RemoteViews contentView, android.widget.RemoteViews helpView)
Set the content view and help view to use for the specified cocktailId.It is okay to call this method both inside an ACTION_COCKTAIL_UPDATE broadcast, and outside of the handler. This method will only work when called from the uid that owns the Cocktail provider.
The total Bitmap memory used by the RemoteViews object cannot exceed that required to fill the screen 1.5 times, ie. (screen width x screen height x 4 x 1.5) bytes.
- Parameters:
cocktailId
- The Cocktail instance for which to set the RemoteViews.contentView
- The RemoteViews object to show.helpView
- The RemoteViews object to describe the cocktail.- Throws:
Java.lang.IllegalArgumentException
- - Thrown if contentView is null.- Since:
- 1.3.0
-
notifyCocktailViewDataChanged
public void notifyCocktailViewDataChanged(int cocktailId, int viewId)
Notifies the specified collection view in the specified Cocktail instance to invalidate its data.- Parameters:
cocktailId
- The Cocktail instance to notify of view data changes.viewId
- The collection view id.- Since:
- 1.1.0
-
getCocktailIds
public int[] getCocktailIds(android.content.ComponentName provider)
Get the cocktailIds that have been bound to the given Cocktail provider.- Parameters:
provider
- TheBroadcastReceiver
that is the Cocktail provider to find the cocktailId for.- Since:
- 1.1.0
-
-