|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Clarification on api/apiUI
From the sagetv javadoc, it says,
Quote:
But, if apiUI is called, with null, will it also default to SAGETV_PROCESS_LOCAL_UI? ie, will the following 3 statements yield the same results. Code:
apiUI("SAGETV_PROCESS_LOCAL_UI", Cmd, Args) apiUI(null, Cmd, Args) api(Cmd, Args)
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#2
|
||||
|
||||
My experience is that calling apiUI() with a null context means no UI context, not the local UI context. So this way of calling it is useful only for methods that deal with global database and configuration data, and not for any UI-related API methods (i.e. those that change client settings, control media playback, etc).
Passing a context in to a method that doesn't require it does no harm; the method still operates on the shared global data regardless of which context you pass in. The thing to remember is that when running in service mode, the service process has no local UI context. So in that case you must always pass in a valid context to do anything UI-related. The rule I use in my API wrappers is to always call apiUI() instead of api(), and always pass in an explicit context if available, instead of relying on any defaulting behavior.
__________________
-- Greg |
#3
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Intelligent Recordings - Need clarification | Skirge01 | SageTV Software | 3 | 05-14-2009 08:49 AM |
Clarification on my setup | eventerke | SageTV Software | 1 | 10-28-2006 09:04 PM |
Clarification on 4.1 | dfrancis | SageTV Software | 5 | 12-21-2005 11:12 AM |
Clarification of what does what..... | icel0rd | SageTV Software | 15 | 03-15-2003 01:16 PM |