|
YAACC - UPNP Client and Server
|
Activity for browsing devices and folders. More...


Public Member Functions | |
| void | onCreate (Bundle savedInstanceState) |
| void | showServers () |
| Shows the list of servers. | |
| void | showContent () |
| Shows the content of the currently selected server. | |
| void | showReceivers () |
| Shows the receivers. | |
| void | showPlayers () |
| Shows the running players. | |
| 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: the same "Play on..." sheet as in the new layout, showing the cleaned file name, with the classic receiver selection as the initial ticks. | |
| void | setCurrentTab (final BrowserTabs content) |
| void | onResume () |
| void | onBackPressed () |
| void | onCreateContextMenu (ContextMenu menu, View v, ContextMenuInfo menuInfo) |
| boolean | onCreateOptionsMenu (Menu menu) |
| boolean | onOptionsItemSelected (MenuItem item) |
| Navigation in option menu. | |
| void | onClick (View view) |
| boolean | onKeyDown (int keyCode, KeyEvent event) |
Public Member Functions inherited from de.yaacc.browser.BrowserHost | |
| default 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. | |
| default boolean | providesReceiverBar () |
| Whether the host shows the receiver bar itself, at every level (new layout). | |
| default 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). | |
Protected Member Functions | |
| void | onSaveInstanceState (@NonNull Bundle outState) |
| void | onNewIntent (Intent intent) |
| void | onDestroy () |
| void | onStart () |
| void | onStop () |
Activity for browsing devices and folders.
Represents the entrypoint for the whole application.
| boolean de.yaacc.browser.TabBrowserActivity.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.TabBrowserActivity.onPendingShare | ( | String | token, |
| String | displayName ) |
A shared file is waiting: the same "Play on..." sheet as in the new layout, showing the cleaned file name, with the classic receiver selection as the initial ticks.
The selection is put back once the playback has started (de.yaacc.share.AfterStartSelection).
Implements de.yaacc.browser.BrowserHost.

| boolean de.yaacc.browser.TabBrowserActivity.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.
| void de.yaacc.browser.TabBrowserActivity.showContent | ( | ) |
Shows the content of the currently selected server.
Implements de.yaacc.browser.BrowserHost.
| void de.yaacc.browser.TabBrowserActivity.showPlayers | ( | ) |
Shows the running players.
Implements de.yaacc.browser.BrowserHost.
| void de.yaacc.browser.TabBrowserActivity.showReceivers | ( | ) |
Shows the receivers.
Implements de.yaacc.browser.BrowserHost.
| void de.yaacc.browser.TabBrowserActivity.showServers | ( | ) |
Shows the list of servers.
Implements de.yaacc.browser.BrowserHost.