|
YAACC - UPNP Client and Server
|
The new browser layout: no tabs. More...


Public Member Functions | |
| void | showServers () |
| Shows the list of servers. | |
| void | showContent () |
| Shows the content of the currently selected server. | |
| void | showReceivers () |
| Shows the receivers. | |
| boolean | pickReceivers (PickedAction action, String shareName, Collection< String > initialIds) |
Opens the receiver picker ("Play on...", the device sheet in pick mode) and reports the answer through action: exactly one of PickedAction#onConfirmed (with the chosen receiver ids and a done callback to end the single flight) or PickedAction#onCancelled runs, on the main thread, and only if this returns true. | |
| boolean | isPickOpen (String pickId) |
| Whether the receiver picker with this id is open (a restored sheet asks, then closes itself if not). | |
| void | onPendingShare (String token, String displayName) |
A shared file is waiting for the user to pick the receivers (see ShareIntentHandler). | |
| void | showPlayers () |
| Shows the running players. | |
| boolean | providesShutdownTimer () |
| Whether the host shows the shutdown timer itself (in its toolbar), so the server list leaves its own timer rows out and uses the top-level layout. | |
| boolean | providesReceiverBar () |
| Whether the host shows the receiver bar itself, at every level (new layout). | |
| boolean | showsBackAtContentRoot () |
Whether the content list shows the back arrow at the content root too, and its tap calls showServers() there (new layout: the root of a server is one step below the server list). | |
| boolean | onCreateOptionsMenu (Menu menu) |
| boolean | onOptionsItemSelected (MenuItem item) |
Public Member Functions inherited from de.yaacc.browser.BrowserHost | |
Protected Member Functions | |
| void | onCreate (Bundle savedInstanceState) |
| void | onNewIntent (Intent intent) |
| void | onStart () |
| void | onStop () |
| void | onResume () |
| void | onDestroy () |
The new browser layout: no tabs.
The top level is the server list; tapping a server shows its content on top of it. The default action bar is the toolbar (settings, exit and the shutdown timer). The receiver bar and the mini-player sit below the fragment container, so they show at every level: the mini-player list (MiniPlayerBar, one row per running player) directly above the receiver bar (ReceiverBarController). Both follow their events only while the activity is started.
Not exported and without intent filters: de.yaacc.LauncherActivity starts it with a fresh intent through BrowserLauncher. The only part of getIntent() that is read is the forwarded share text, and only by ShareIntentHandler.
| boolean de.yaacc.browser.BrowserActivity.isPickOpen | ( | String | pickId | ) |
Whether the receiver picker with this id is open (a restored sheet asks, then closes itself if not).
Implements de.yaacc.browser.BrowserHost.
| void de.yaacc.browser.BrowserActivity.onPendingShare | ( | String | token, |
| String | displayName ) |
A shared file is waiting for the user to pick the receivers (see ShareIntentHandler).
Called on the main thread. The host shows its receiver picker with displayName (already cleaned, safe for setText) and later calls ShareIntentHandler#confirm or ShareIntentHandler#cancel with the token. The default does nothing: the pending share then waits for its timeout (two minutes) and is dropped.
| token | binds the pending share to its pick; a result with another token changes nothing |
| displayName | the cleaned name of the file |
Implements de.yaacc.browser.BrowserHost.

| boolean de.yaacc.browser.BrowserActivity.pickReceivers | ( | PickedAction | action, |
| String | shareName, | ||
| Collection< String > | initialIds ) |
Opens the receiver picker ("Play on...", the device sheet in pick mode) and reports the answer through action: exactly one of PickedAction#onConfirmed (with the chosen receiver ids and a done callback to end the single flight) or PickedAction#onCancelled runs, on the main thread, and only if this returns true.
Only one picked action may be between its confirm and its done: a confirm while another is still starting is refused with onCancelled. Call it on the main thread.
The new layout uses it for play, play-all, add-to-playlist and a pending share; classic uses it only for a pending shared file (normal classic browsing never shows the sheet). Nothing is stored by the picker: the host's callbacks decide what a confirm sets and clears.
| action | what to do with the answer |
| shareName | the cleaned name of the pending share, or null if the pick is not for a share (an empty name is replaced by a fixed text on the sheet) |
| initialIds | receivers that start ticked, may be null (classic: its tab-based selection) |
Implements de.yaacc.browser.BrowserHost.
| boolean de.yaacc.browser.BrowserActivity.providesReceiverBar | ( | ) |
Whether the host shows the receiver bar itself, at every level (new layout).
A content list then hides its own footer and opens the device sheet through showReceivers(). False for the classic tabs, where the content list shows the original static footer (current provider, selected receivers) and there is no sheet.
Implements de.yaacc.browser.BrowserHost.
| boolean de.yaacc.browser.BrowserActivity.providesShutdownTimer | ( | ) |
Whether the host shows the shutdown timer itself (in its toolbar), so the server list leaves its own timer rows out and uses the top-level layout.
False for the classic tabs.
Implements de.yaacc.browser.BrowserHost.
| void de.yaacc.browser.BrowserActivity.showContent | ( | ) |
Shows the content of the currently selected server.
Implements de.yaacc.browser.BrowserHost.
| void de.yaacc.browser.BrowserActivity.showPlayers | ( | ) |
Shows the running players.
Implements de.yaacc.browser.BrowserHost.
| void de.yaacc.browser.BrowserActivity.showReceivers | ( | ) |
Shows the receivers.
Implements de.yaacc.browser.BrowserHost.

| boolean de.yaacc.browser.BrowserActivity.showsBackAtContentRoot | ( | ) |
Whether the content list shows the back arrow at the content root too, and its tap calls showServers() there (new layout: the root of a server is one step below the server list).
False for the classic tabs, where the root has nothing to go back to.
Implements de.yaacc.browser.BrowserHost.
| void de.yaacc.browser.BrowserActivity.showServers | ( | ) |
Shows the list of servers.
Implements de.yaacc.browser.BrowserHost.