|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tivo.hme.sdk.HmeObject com.tivo.hme.sdk.Resource com.tivo.hme.sdk.StreamResource com.tivo.hme.sdk.Application com.tivo.hme.bananas.BApplication com.blackledge.david.tivo.multitasker.MultiTaskerApplication
public class MultiTaskerApplication
Superclass of any applications that want to take advantage of the Multitasker architecture to automatically get configurable audio handling, ticker, background images, etc. [Also sets up a factory to serve local files and scaled local images.] Includes an options system and a preferences editor screen accessed via the "Slow" button. Also supports arg "-uriAndTitle" to set the uri and title separately from that built into app. Use: -uriAndTitle uripath:TitleToUse
Nested Class Summary | |
---|---|
class |
MultiTaskerApplication.CallbackChain
Callback class to chain two callbacks together - when this callback is invoked, first it schedules the next callback, then it runs the primary callback. |
static interface |
MultiTaskerApplication.ICallback
Interface for MultiTasker callbacks - uses animation chaining but easier to understand |
Nested classes/interfaces inherited from class com.tivo.hme.sdk.Resource |
---|
com.tivo.hme.sdk.Resource.FontResource |
Field Summary | |
---|---|
static int |
LIMIT_TEXT_RENDER_HEIGHT
according to an error logged: "rendered text exceeded max allowed dimensions of 1920x1080" |
static int |
LIMIT_TEXT_RENDER_WIDTH
according to an error logged: "rendered text exceeded max allowed dimensions of 1920x1080" |
static String |
OPTION_AUDIO_CLASS
What is the class used to supply the audio streams? |
static String |
OPTION_AUDIO_HANDLE_CONTROLS
Should audio handler try to interpret some remote commands to control the audio stream? |
static String |
OPTION_AUDIO_HANDLE_CONTROLS_NEXT
|
static String |
OPTION_AUDIO_HANDLE_CONTROLS_PAUSE
|
static String |
OPTION_AUDIO_ON
Should audio be used at all? |
static String |
OPTION_AUDIO_RANDOM
Should audio be provided in random order (if supported)? |
static String |
OPTION_AUDIO_STATUS_SHOW
Should audio show the status of the audio stream? |
static String |
OPTION_BACKGROUND_IMAGE_CLASS
what is the class used to supply image information? |
static String |
OPTION_BACKGROUND_IMAGE_DELAY
How long should the background image wait to change the image? in milliseconds. |
static String |
OPTION_BACKGROUND_IMAGE_HANDLE_CONTROLS
Should Background Image handler try to interpret some remote commands to control the Background Images? |
static String |
OPTION_BACKGROUND_IMAGE_HANDLE_CONTROLS_NEXT
|
static String |
OPTION_BACKGROUND_IMAGE_HANDLE_CONTROLS_PAUSE
|
static String |
OPTION_BACKGROUND_IMAGE_HANDLE_CONTROLS_PUPD
|
static String |
OPTION_BACKGROUND_IMAGE_HISTORY
Size of the History available for Background Images. |
static String |
OPTION_BACKGROUND_IMAGE_ON
Should images be used at all? |
static String |
OPTION_BACKGROUND_IMAGE_PLANE
What Bananas plane should the images be in? (above, normal, or below?) |
static String |
OPTION_BACKGROUND_IMAGE_RANDOM
Should images be provided in random order (if supported)? |
static String |
OPTION_BACKGROUND_IMAGE_SIZE
What size should the background image be? max, normal, safe... |
static String |
OPTION_BACKGROUND_IMAGE_TRANSITION
What transition should the images use to change? |
static String |
OPTION_BACKGROUND_IMAGE_TRANSITION_DELAY
How much time should it take to transition to the next image? (how gradual should it be?) in milliseconds |
static String |
OPTION_BRAND_CLASS
what is the class used to supply the brand information? |
static String |
OPTION_BRAND_HEIGHT
|
static String |
OPTION_BRAND_ON
Should the brand be used at all? |
static String |
OPTION_BRAND_TIME
How long between brand updates? (milliseconds) |
static String |
OPTION_BRAND_TRANSITION_TIME
How fast does the transition animate between brands? (milliseconds) |
static String |
OPTION_BRAND_TRANSPARENCY
What level of transparency should the brand use? (1.0 = invisible) |
static String |
OPTION_BRAND_WIDTH
|
static String |
OPTION_HANDLE_CONTROLS_CLEAR
Should "clear" toggle various decorative options (ticker, audio display, brand)? |
static String |
OPTION_IDLE
"idle" - How should the application respond to the idle event? |
static String |
OPTION_LOCAL_FILE_ROOT
"localRoot" - Folder to start at - defaults to user.home, but that only works when it's not run by a service... |
static String |
OPTION_MEDIA_KEY
Global useful option - your media key - enables Tivo media options such as TivoTicker . |
static String |
OPTION_TICKER_TAPE_BACKGROUND
What background (color as a hex rgb value) should the ticker use? |
static String |
OPTION_TICKER_TAPE_CLASS
what is the class used to supply the ticker information? |
static String |
OPTION_TICKER_TAPE_FONT_FAMILY
What font family should the ticker use? (default or system?) |
static String |
OPTION_TICKER_TAPE_FOREGROUND
What foreground (color as a hex rgb value) should the ticker use? |
static String |
OPTION_TICKER_TAPE_HANDLE_CONTROLS
Should tickertape handler try to interpret some remote commands to control the ticker? |
static String |
OPTION_TICKER_TAPE_HANDLE_CONTROLS_NEXT
|
static String |
OPTION_TICKER_TAPE_HANDLE_CONTROLS_PAUSE
|
static String |
OPTION_TICKER_TAPE_HANDLE_CONTROLS_RWFF
|
static String |
OPTION_TICKER_TAPE_HEADING
What part of the ticker is the height of the heading area? |
static String |
OPTION_TICKER_TAPE_HEIGHT
What is the total height of the screen real estate the ticker uses? |
static String |
OPTION_TICKER_TAPE_ON
Should the ticker be used at all? |
static String |
OPTION_TICKER_TAPE_RANDOM
Should ticker content be provided in random order (if supported)? |
static String |
OPTION_TICKER_TAPE_TIME
How much time should each letter of the ticker take to cross the screen? (in milliseconds) |
static String |
OPTION_TICKER_TAPE_TRANSPARENCY
What level of transparency should the ticker use? (1.0 = invisible) |
static String |
OPTION_ZIP_CODE
Global useful option...your zip code. |
static int |
RSRC_STATUS_BUFFER_OVERFLOW
Media status code, resource at end of available buffer. |
static int |
RSRC_STATUS_END
Media status code, resource at end of stream. |
Fields inherited from class com.tivo.hme.bananas.BApplication |
---|
FADE_ANIM, SLIDE_ANIM |
Fields inherited from class com.tivo.hme.sdk.Resource |
---|
EVT_RSRC_STATUS, status |
Fields inherited from interface com.blackledge.david.tivo.multitasker.LocalOptionProvider |
---|
TYPE_BOOLEAN, TYPE_CLASS, TYPE_COLOR, TYPE_FILE, TYPE_FLOAT, TYPE_FOLDER, TYPE_IMAGE, TYPE_INTEGER, TYPE_STRING, TYPE_URL |
Fields inherited from interface com.tivo.hme.bananas.IBananas |
---|
A_ANCHOR_MASK, A_BOTTOM, A_CENTER, A_DELTA_MASK, A_LEFT, A_NEGATIVE_MASK, A_RIGHT, A_TOP, ARROW_NAMES, BAR_DEFAULT, BAR_HANG, BEVT_ACTION, BEVT_FOCUS, BEVT_SCREEN_ENTER, BEVT_SCREEN_EXIT, H_BAR, H_DOWN, H_KEYBOARD, H_LEFT, H_PAGEDOWN, H_PAGEUP, H_RIGHT, H_UP, H_VIS_FALSE, H_VIS_FOCUS, H_VIS_TRUE, TRANSITION_FADE, TRANSITION_LEFT, TRANSITION_NONE |
Fields inherited from interface com.tivo.hme.sdk.IHmeProtocol |
---|
APP_ERROR_BAD_ARGUMENT, APP_ERROR_BAD_COMMAND, APP_ERROR_OTHER, APP_ERROR_OUT_OF_MEMORY, APP_ERROR_RSRC_NOT_FOUND, APP_ERROR_UNKNOWN, APP_ERROR_VIEW_NOT_FOUND, CMD_RECEIVER_ACKNOWLEDGE_IDLE, CMD_RECEIVER_TRANSITION, CMD_RESERVED, CMD_RSRC_ADD_ANIM, CMD_RSRC_ADD_COLOR, CMD_RSRC_ADD_FONT, CMD_RSRC_ADD_IMAGE, CMD_RSRC_ADD_SOUND, CMD_RSRC_ADD_STREAM, CMD_RSRC_ADD_TEXT, CMD_RSRC_ADD_TTF, CMD_RSRC_CLOSE, CMD_RSRC_REMOVE, CMD_RSRC_SEND_EVENT, CMD_RSRC_SET_ACTIVE, CMD_RSRC_SET_POSITION, CMD_RSRC_SET_SPEED, CMD_VIEW_ADD, CMD_VIEW_REMOVE, CMD_VIEW_SET_BOUNDS, CMD_VIEW_SET_PAINTING, CMD_VIEW_SET_RESOURCE, CMD_VIEW_SET_SCALE, CMD_VIEW_SET_TRANSLATION, CMD_VIEW_SET_TRANSPARENCY, CMD_VIEW_SET_VISIBLE, EVT_APP_INFO, EVT_DEVICE_INFO, EVT_FONT_INFO, EVT_IDLE, EVT_INIT_INFO, EVT_KEY, EVT_RESERVED, EVT_RSRC_INFO, FONT_BOLD, FONT_BOLDITALIC, FONT_ITALIC, FONT_METRICS_BASIC, FONT_METRICS_GLYPH, FONT_PLAIN, ID_ALERT_SOUND, ID_BONK_SOUND, ID_CLIENT, ID_CLIENT_PRE_0_38, ID_DEFAULT_TTF, ID_DESELECT_SOUND, ID_ERROR_SOUND, ID_LEFT_SOUND, ID_NULL, ID_PAGEDOWN_SOUND, ID_PAGEUP_SOUND, ID_RESERVED, ID_RIGHT_SOUND, ID_ROOT_STREAM, ID_ROOT_VIEW, ID_SELECT_SOUND, ID_SLOWDOWN1_SOUND, ID_SPEEDUP1_SOUND, ID_SPEEDUP2_SOUND, ID_SPEEDUP3_SOUND, ID_SYSTEM_TTF, ID_THUMBSDOWN_SOUND, ID_THUMBSUP_SOUND, ID_TIVO_SOUND, ID_UPDOWN_SOUND, KEY_ADVANCE, KEY_CHANNELDOWN, KEY_CHANNELUP, KEY_CLEAR, KEY_DISPLAY, KEY_DOWN, KEY_ENTER, KEY_FORWARD, KEY_INFO, KEY_LEFT, KEY_LIVETV, KEY_MUTE, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_OPT_ANGLE, KEY_OPT_ASPECT, KEY_OPT_DVD, KEY_OPT_EXIT, KEY_OPT_GUIDE, KEY_OPT_LIST, KEY_OPT_MENU, KEY_OPT_PIP, KEY_OPT_STOP, KEY_OPT_TOP_MENU, KEY_OPT_WINDOW, KEY_PAUSE, KEY_PLAY, KEY_PRESS, KEY_RECORD, KEY_RELEASE, KEY_REPEAT, KEY_REPLAY, KEY_REVERSE, KEY_RIGHT, KEY_SELECT, KEY_SLOW, KEY_THUMBSDOWN, KEY_THUMBSUP, KEY_TIVO, KEY_UNKNOWN, KEY_UP, KEY_VOLUMEDOWN, KEY_VOLUMEUP, LIMIT_CMD_NBYTES, LIMIT_EVENT_NBYTES, LIMIT_FONT_POINT_SIZE, LIMIT_IMAGE_HEIGHT, LIMIT_IMAGE_NBYTES, LIMIT_IMAGE_WIDTH, LIMIT_SOUND_NBYTES, LIMIT_TEXT_NBYTES, LIMIT_URL_NBYTES, LIMIT_VIEW_DEPTH, MAGIC, RSRC_ERROR_BAD_ARGUMENT, RSRC_ERROR_BAD_DATA, RSRC_ERROR_BAD_MAGIC, RSRC_ERROR_BAD_STATE, RSRC_ERROR_BAD_VERSION, RSRC_ERROR_CONNECT_FAILED, RSRC_ERROR_CONNECTION_LOST, RSRC_ERROR_CONNECTION_TIMEOUT, RSRC_ERROR_HOST_NOT_FOUND, RSRC_ERROR_INCOMPATIBLE, RSRC_ERROR_NOT_SUPPORTED, RSRC_ERROR_OTHER, RSRC_ERROR_UNKNOWN, RSRC_HALIGN_CENTER, RSRC_HALIGN_LEFT, RSRC_HALIGN_MASK, RSRC_HALIGN_RIGHT, RSRC_IMAGE_BESTFIT, RSRC_IMAGE_HFIT, RSRC_IMAGE_MASK, RSRC_IMAGE_VFIT, RSRC_STATUS_CLOSED, RSRC_STATUS_COMPLETE, RSRC_STATUS_CONNECTED, RSRC_STATUS_CONNECTING, RSRC_STATUS_ERROR, RSRC_STATUS_LOADING, RSRC_STATUS_PAUSED, RSRC_STATUS_PLAYING, RSRC_STATUS_READY, RSRC_STATUS_SEEKING, RSRC_STATUS_UNKNOWN, RSRC_TEXT_MASK, RSRC_TEXT_WRAP, RSRC_VALIGN_BOTTOM, RSRC_VALIGN_CENTER, RSRC_VALIGN_MASK, RSRC_VALIGN_TOP, SAFE_ACTION_H, SAFE_ACTION_V, SAFE_TITLE_H, SAFE_TITLE_V, TRANSITION_BACK, TRANSITION_FORWARD, TRANSITION_TELEPORT, VERSION, VERSION_0_38, VERSION_0_40, VERSION_MAJOR, VERSION_MINOR, VERSION_STRING |
Constructor Summary | |
---|---|
MultiTaskerApplication()
|
Method Summary | |
---|---|
void |
addCallback(MultiTaskerApplication.ICallback callback,
com.tivo.hme.sdk.Resource animation)
|
boolean |
cancelCallback(MultiTaskerApplication.ICallback callback)
|
com.tivo.hme.sdk.StreamResource |
createImageStream(String nextImageStream)
USE THIS METHOD TO PREVENT CRASHES. |
com.tivo.hme.sdk.StreamResource |
createStream(String uri,
String contentType,
boolean play)
Checks against IHmeProtocol.LIMIT_URL_NBYTES and uses
MultiTaskerApplicationFactory.getShortMappedUri(String) to have
the factory act as proxy so it still will work, also logs a warning. |
void |
destroy()
|
static String |
fixPoorUrl(String newUrl)
Intended to fix e.g. |
static com.tivo.hme.interfaces.IFactory |
getAppFactory(String appClassName,
ClassLoader loader,
com.tivo.hme.interfaces.IArgumentList args)
overrides so MultiTasker's application factory is now the default. |
AudioView |
getAudioView()
|
BackgroundView |
getBackgroundView()
|
Boolean |
getBooleanOption(String key)
|
Boolean |
getBooleanOption(String key,
Boolean def)
|
BrandView |
getBrandView()
|
Color |
getColorOption(String key)
key must be a hex value for the rgb representation of the color (may begin with 0x or not) |
Color |
getColorOption(String key,
Color def)
|
String |
getCurrentAudioStream()
What stream is currently getting played by the audio task? |
com.tivo.hme.sdk.Resource |
getCurrentImage()
What resource is currently getting displayed by the background image task? |
Float |
getFloatOption(String key)
|
Float |
getFloatOption(String key,
Float def)
|
String |
getHostAddress()
Get the IP address of the Tivo that is connected. |
Integer |
getIntegerOption(String key)
|
Integer |
getIntegerOption(String key,
Integer def)
|
String |
getLocalOptionDefault(String key)
By default, just returns whatever getOptionDefault(String)
returns. |
Collection |
getLocalOptionNames()
LocalOptionProvider default implementation. |
Map |
getLocalOptionPreferences()
LocalOptionProvider default implementation - returns null(?an empty
map). |
File |
getLocalRoot()
|
String |
getOption(String key)
If an option has an override, the override is returned no matter what. |
String |
getOption(String key,
String def)
equivalent to getOption(String) , but returns def if the option is null. |
String |
getOptionDefault(String key)
Override this method to provide your own default values for some options (return super implementation for things you're not providing a default for) (public just so preferences screen can use it). |
String |
getOptionOverride(String key)
Override this method to override options with no ability for the user to change them for your app. |
String |
getOptionSetting(String key)
Just the value set in the user settings for this option, ignoring overrides and defaults. |
static Image |
getScaledImageByHeight(InputStream file,
int height)
|
static Image |
getScaledImageByWidth(InputStream file,
int width)
|
TickerView |
getTickerView()
|
static String |
getUrlContent(URL _url,
String contentTypeSubstring)
Deprecated. Use Utility.getUrlContent(URL,String) instead |
boolean |
handleApplicationError(int errorCode,
String errorText,
Integer resourceId)
Improved version of Application#handleApplicationError(int, String) that includes the
resourceId related to the error - critical for knowing when you have a
problem with a resource you created. |
boolean |
handleEvent(com.tivo.hme.sdk.HmeEvent event)
In addition to various MultiTaskerApplication things (like callback/animation chaining, menu, etc), this also generates a ResourceInfo event with an error status when there is an application error that has a resource id. |
boolean |
handleIdle(boolean isIdle)
Handles the idle/unidle events based on the OPTION_IDLE setting. |
static List |
handleMultiStreamSource(String originalUrl)
Deprecated. Use Utility.handleMultiStreamSource(String) instead |
static String |
handleRedirect(String url)
deal with redirect requests and use that Url instead. |
void |
hideAudio()
Hide's the audio visual element (e.g. |
void |
hideBackgroundImage()
|
void |
hideBrand()
|
void |
hideTickerTape()
|
void |
init(com.tivo.hme.interfaces.IContext context)
Make sure you call super.init(context) if you override this method. |
protected boolean |
openMultiTaskerMenu()
Opens the menu of multitasker options, including access to the settings. |
Map |
parseQuery(String query)
SDK Bug Fix - OMG! sick bug in HMEObject that has never been noticed or exercised since nobody has apparently attempted to do App-in-app with HmeObject.createStream(String, Map) . |
void |
postEvent(com.tivo.hme.sdk.HmeEvent event)
|
void |
showAudio()
|
void |
showBackgroundImage()
|
void |
showBrand()
|
void |
showTickerTape()
|
void |
silenceAudio()
Clears the current audio resource from the audio plugin's view. |
void |
toggleAudio()
|
void |
toggleBackgroundImage()
|
void |
toggleBrand()
|
void |
toggleTickerTape()
|
static boolean |
validUrl(String url)
Test that the string is a good url before sending it to the Tivo |
Methods inherited from class com.tivo.hme.bananas.BApplication |
---|
dispatchEvent, dispatchKeyEvent, getAbove, getBelow, getCurrentScreen, getNormal, getSkin, getStackDepth, handleAction, play, playSoundForKey, pop, pop, push, push, setSkin |
Methods inherited from class com.tivo.hme.sdk.Application |
---|
acknowledgeIdle, close, flush, getContext, getFactory, getFocus, getHeight, getResource, getResources, getRoot, getStream, getWidth, handleActive, handleApplicationError, handleChunk, handlePing, isAChunk, isApplicationClosing, log, open, setContext, setFactory, setFocus, transitionBack, transitionForward |
Methods inherited from class com.tivo.hme.sdk.StreamResource |
---|
getContentType, getSpeed, getStatus, getURI, isPaused, pause, play, setPosition, setSpeed, toString |
Methods inherited from class com.tivo.hme.sdk.Resource |
---|
addHandler, dump, finalize, remove, removeHandler, sendEvent, sendEvent, setActive |
Methods inherited from class com.tivo.hme.sdk.HmeObject |
---|
createAnimation, createAnimation, createColor, createFont, createFont, createImage, createImage, createImage, createImage, createSound, createSound, createSound, createStream, createStream, createText, createTrueType, getApp, getID, handleKeyPress, handleKeyRelease, handleKeyRepeat, rsrcFlagsToString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int LIMIT_TEXT_RENDER_WIDTH
public static final int LIMIT_TEXT_RENDER_HEIGHT
public static final int RSRC_STATUS_END
public static final int RSRC_STATUS_BUFFER_OVERFLOW
public static final String OPTION_AUDIO_HANDLE_CONTROLS
public static final String OPTION_AUDIO_HANDLE_CONTROLS_NEXT
public static final String OPTION_AUDIO_HANDLE_CONTROLS_PAUSE
public static final String OPTION_AUDIO_STATUS_SHOW
public static final String OPTION_AUDIO_CLASS
public static final String OPTION_AUDIO_ON
public static final String OPTION_AUDIO_RANDOM
public static final String OPTION_TICKER_TAPE_HANDLE_CONTROLS
public static final String OPTION_TICKER_TAPE_HANDLE_CONTROLS_NEXT
public static final String OPTION_TICKER_TAPE_HANDLE_CONTROLS_RWFF
public static final String OPTION_TICKER_TAPE_HANDLE_CONTROLS_PAUSE
public static final String OPTION_TICKER_TAPE_HEADING
public static final String OPTION_TICKER_TAPE_HEIGHT
public static final String OPTION_TICKER_TAPE_FONT_FAMILY
public static final String OPTION_TICKER_TAPE_TRANSPARENCY
public static final String OPTION_TICKER_TAPE_BACKGROUND
public static final String OPTION_TICKER_TAPE_FOREGROUND
public static final String OPTION_TICKER_TAPE_TIME
public static final String OPTION_TICKER_TAPE_CLASS
public static final String OPTION_TICKER_TAPE_ON
public static final String OPTION_TICKER_TAPE_RANDOM
public static final String OPTION_BRAND_CLASS
public static final String OPTION_BRAND_ON
public static final String OPTION_BRAND_TRANSPARENCY
public static final String OPTION_BRAND_TIME
public static final String OPTION_BRAND_TRANSITION_TIME
public static final String OPTION_BRAND_WIDTH
public static final String OPTION_BRAND_HEIGHT
public static final String OPTION_BACKGROUND_IMAGE_DELAY
public static final String OPTION_BACKGROUND_IMAGE_TRANSITION_DELAY
public static final String OPTION_BACKGROUND_IMAGE_TRANSITION
public static final String OPTION_BACKGROUND_IMAGE_PLANE
public static final String OPTION_BACKGROUND_IMAGE_SIZE
public static final String OPTION_BACKGROUND_IMAGE_CLASS
public static final String OPTION_BACKGROUND_IMAGE_HISTORY
public static final String OPTION_BACKGROUND_IMAGE_ON
public static final String OPTION_BACKGROUND_IMAGE_HANDLE_CONTROLS
public static final String OPTION_BACKGROUND_IMAGE_HANDLE_CONTROLS_NEXT
public static final String OPTION_BACKGROUND_IMAGE_HANDLE_CONTROLS_PUPD
public static final String OPTION_BACKGROUND_IMAGE_HANDLE_CONTROLS_PAUSE
public static final String OPTION_BACKGROUND_IMAGE_RANDOM
public static final String OPTION_ZIP_CODE
public static final String OPTION_MEDIA_KEY
TivoTicker
.
public static final String OPTION_IDLE
public static final String OPTION_HANDLE_CONTROLS_CLEAR
public static final String OPTION_LOCAL_FILE_ROOT
Constructor Detail |
---|
public MultiTaskerApplication()
Method Detail |
---|
public static com.tivo.hme.interfaces.IFactory getAppFactory(String appClassName, ClassLoader loader, com.tivo.hme.interfaces.IArgumentList args)
appClassName
- loader
- args
-
public void addCallback(MultiTaskerApplication.ICallback callback, com.tivo.hme.sdk.Resource animation)
public boolean cancelCallback(MultiTaskerApplication.ICallback callback)
callback
-
public void toggleBrand()
public void hideBrand()
public void showBrand()
public void toggleTickerTape()
public void hideTickerTape()
public void showTickerTape()
public void toggleBackgroundImage()
public void hideBackgroundImage()
public void showBackgroundImage()
public void toggleAudio()
public void silenceAudio()
public void hideAudio()
public void showAudio()
public String getCurrentAudioStream()
public com.tivo.hme.sdk.Resource getCurrentImage()
public static Image getScaledImageByHeight(InputStream file, int height)
public static Image getScaledImageByWidth(InputStream file, int width)
public boolean handleEvent(com.tivo.hme.sdk.HmeEvent event)
handleEvent
in class com.tivo.hme.bananas.BApplication
BApplication.handleEvent(com.tivo.hme.sdk.HmeEvent)
public boolean handleIdle(boolean isIdle)
OPTION_IDLE
setting.
handleIdle
in class com.tivo.hme.sdk.Application
Application.handleIdle(boolean)
public TickerView getTickerView()
TickerTape
plugins.public BrandView getBrandView()
Brand
plugins.public BackgroundView getBackgroundView()
BackgroundImage
plugins.public AudioView getAudioView()
Audio
plugins.public final String getOption(String key)
key
-
public String getOptionSetting(String key)
key
-
public String getOptionDefault(String key)
getLocalOptionDefault(String)
returns.
key
-
public String getOptionOverride(String key)
key
-
public final String getOption(String key, String def)
getOption(String)
, but returns def if the option is null.
key
- def
- the value to return if the option is null.
public final Integer getIntegerOption(String key)
key
-
getOption(String)
public final Integer getIntegerOption(String key, Integer def)
public final Float getFloatOption(String key)
key
-
getOption(String)
public final Float getFloatOption(String key, Float def)
public final Boolean getBooleanOption(String key)
key
-
getOption(String)
public final Boolean getBooleanOption(String key, Boolean def)
public final Color getColorOption(String key)
key
-
getOption(String)
public final Color getColorOption(String key, Color def)
protected boolean openMultiTaskerMenu()
public void destroy()
destroy
in class com.tivo.hme.sdk.Application
public void init(com.tivo.hme.interfaces.IContext context) throws Exception
init
in class com.tivo.hme.bananas.BApplication
Exception
BApplication.init(com.tivo.hme.interfaces.IContext)
public void postEvent(com.tivo.hme.sdk.HmeEvent event)
postEvent
in interface com.tivo.hme.sdk.IHmeEventHandler
postEvent
in class com.tivo.hme.sdk.Resource
public File getLocalRoot()
public boolean handleApplicationError(int errorCode, String errorText, Integer resourceId)
Application#handleApplicationError(int, String)
that includes the
resourceId related to the error - critical for knowing when you have a
problem with a resource you created. Default implementation simply calls
Application.handleApplicationError(int, String)
. ApplicationError codes 1
(e.g. "can't create rsrc. unsupported stream type
/avatar/cf1e61a4330e75d5d1d7a744c5ef38c4") and 3 (e.g. "resource 2091 not
found (type type[-1])") about a resource never provide a resourceinfo
event!
errorCode
- the error code of the error (one of the
IHmeProtocol
APP_ERROR_ constants)errorText
- details of the errorresourceId
- the id associated with the error - could be null.
Suitable for use with Application.getResource(Object)
(or
((WeakReference)Application.getResources()
.get(Object)).get() to
avoid automatic SDK warning message when it's not found)
public com.tivo.hme.sdk.StreamResource createStream(String uri, String contentType, boolean play)
IHmeProtocol.LIMIT_URL_NBYTES
and uses
MultiTaskerApplicationFactory.getShortMappedUri(String)
to have
the factory act as proxy so it still will work, also logs a warning.
createStream
in class com.tivo.hme.sdk.HmeObject
HmeObject.createStream(java.lang.String,
java.lang.String, boolean)
public Map parseQuery(String query)
HmeObject.createStream(String, Map)
. They forgot a "new" keyword and
auto-"fixed" the problem creating a method named LinkedHashMap that has
default method content returning null! Also, calling code won't handle
the nulls that are returned in certain circumstances, so now returning an
empty map here. Lucky for us it is public and non-final.
parseQuery
in class com.tivo.hme.sdk.HmeObject
HmeObject.parseQuery(java.lang.String)
public static String handleRedirect(String url)
url
- original URL
public static String fixPoorUrl(String newUrl)
newUrl
-
public static List handleMultiStreamSource(String originalUrl)
Utility.handleMultiStreamSource(String)
instead
originalUrl
-
public static String getUrlContent(URL _url, String contentTypeSubstring) throws IOException
Utility.getUrlContent(URL,String)
instead
_url
- contentTypeSubstring
- if not null, this method will return null if
the contentType of the url's connection is null or doesn't contain
this substring.
IOException
- if one happens while reading the stream (if one
happens while connecting, null is returned)public static boolean validUrl(String url)
url
-
public String getHostAddress()
public com.tivo.hme.sdk.StreamResource createImageStream(String nextImageStream)
HmeObject.createStream(String)
or
createStream(String, String, boolean)
.public Collection getLocalOptionNames()
LocalOptionProvider
default implementation. Override to provide
Option Names for your Application's local options. Default keySet of
getLocalOptionPreferences()
, or null if that is null.
getLocalOptionNames
in interface LocalOptionProvider
public Map getLocalOptionPreferences()
LocalOptionProvider
default implementation - returns null(?an empty
map). Override to provide Option Preferences settings for your Application's
local options.
getLocalOptionPreferences
in interface LocalOptionProvider
public String getLocalOptionDefault(String key)
getOptionDefault(String)
returns. If the local option default starst with a +, it is appended
(delimeted by a comma) to the getOptionDefault value, if any. Only the
first local provider that has a default for the key is used.
defaults for each of the local option keys. Could just return null if
there is no provided default. If the local option default starts with a +,
it is appended (delimeted by a comma) to the getOptionDefault value, if
any.
getLocalOptionDefault
in interface LocalOptionProvider
LocalOptionProvider.getLocalOptionDefault(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |