- All Known Implementing Classes:
DialogHandlerAdapter
public interface DialogHandler
Specification for a component that handles native dialogs.
A dialog need not have a user-interface. For example, a login dialog could load credentials from a file or system properties and programmatically deal with the dialog.
Implementations should use MediaPlayerFactory.dialogs()
to interact with the dialogs.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Present a cancel dialog.void
displayError
(Long userData, String title, String text) Present an error dialog.void
displayLogin
(Long userData, DialogId id, String title, String text, String defaultUsername, boolean askStore) Present a login dialog.void
displayProgress
(Long userData, DialogId id, String title, String text, int indeterminate, float position, String cancel) Present a progress dialog.void
displayQuestion
(Long userData, DialogId id, String title, String text, DialogQuestionType type, String cancel, String action1, String action2) Present a question dialog.void
updateProgress
(Long userData, DialogId id, float position, String text) Update a progress dialog.
-
Method Details
-
displayError
-
displayLogin
void displayLogin(Long userData, DialogId id, String title, String text, String defaultUsername, boolean askStore) Present a login dialog.- Parameters:
userData
- user dataid
- dialog id, used to interact with this dialogtitle
- dialog titletext
- login textdefaultUsername
- default username to display in the dialogaskStore
- iftrue
, ask if the credentials should be stored
-
displayQuestion
void displayQuestion(Long userData, DialogId id, String title, String text, DialogQuestionType type, String cancel, String action1, String action2) Present a question dialog.- Parameters:
userData
- user dataid
- dialog id, used to interact with this dialogtitle
- dialog titletext
- question texttype
- type of questioncancel
- cancel action textaction1
- first action textaction2
- second action text
-
displayProgress
void displayProgress(Long userData, DialogId id, String title, String text, int indeterminate, float position, String cancel) Present a progress dialog.- Parameters:
userData
- user dataid
- dialog id, used to interact with this dialogtitle
- dialog titletext
- progress textindeterminate
-true
if the progress is indeterminate;false
if it is notposition
- percent completioncancel
- cancel action text
-
cancel
-
updateProgress
-