public class WebIntent extends BaseIntent<WebIntent>
BaseIntent builder implementation providing API for building and starting of intents
targeting a web content related applications.
This intent builder requires only a web Url to be specified via url(String).
Valid Url for the web intent must comply with Patterns.WEB_URL matcher.
| Modifier and Type | Field and Description |
|---|---|
static Matcher |
WEB_URL_MATCHER
Matcher for the valid web URL.
|
| Constructor and Description |
|---|
WebIntent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureCanBuildOrThrow()
Called to ensure that this builder can build its Intent from its current data.
|
protected android.content.Intent |
onBuild(android.content.Context context)
Invoked from
BaseIntent.build(Context) after BaseIntent.ensureCanBuildOrThrow() to build intent
specific for this intent builder from the current data. |
String |
url()
Returns the web URL to be loaded into web browser.
|
WebIntent |
url(String url)
Sets an URL that should be loaded into framework's web browser.
|
activityNotFoundMessage, activityNotFoundMessage, build, cannotBuildIntentException, dialogTitle, dialogTitle, enterTransition, enterTransition, exitTransition, exitTransition, isActivityForIntentAvailable, notifyActivityNotFound, onStartWith, startWith, transitionspublic static final Matcher WEB_URL_MATCHER
Patterns.WEB_URLpublic WebIntent url(String url)
If the given url is valid, but doesn't contain HTTP or HTTPS prefix, then the HTTP (http://) prefix will be attached to it.
url - The desired URL to load into web browser.url()public String url()
url(String)protected void ensureCanBuildOrThrow()
BaseIntent
If there are some required data missing/not specified, an exception indicating such state
should be thrown. The default exception may be created via BaseIntent.cannotBuildIntentException(String).
ensureCanBuildOrThrow in class BaseIntent<WebIntent>protected android.content.Intent onBuild(android.content.Context context)
BaseIntentBaseIntent.build(Context) after BaseIntent.ensureCanBuildOrThrow() to build intent
specific for this intent builder from the current data.onBuild in class BaseIntent<WebIntent>context - Context obtained from the IntentStarter.