Stay organized with collections
Save and categorize content based on your preferences.
Browser
public
class
Browser
extends Object
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Constants
public static final String EXTRA_APPLICATION_ID
The name of the extra data when starting the Browser from another
application.
The value is a unique identification string that will be used to
identify the calling application. The Browser will attempt to reuse the
same window each time the application launches the Browser with the same
identifier.
Constant Value:
"com.android.browser.application_id"
public static final String EXTRA_CREATE_NEW_TAB
Boolean extra passed along with an Intent to a browser, specifying that
a new tab be created. Overrides EXTRA_APPLICATION_ID; if both are set,
a new tab will be used, rather than using the same one.
Constant Value:
"create_new_tab"
public static final String EXTRA_HEADERS
The name of the extra data in the VIEW intent. The data are key/value
pairs in the format of Bundle. They will be sent in the HTTP request
headers for the provided url. The keys can't be the standard HTTP headers
as they are set by the WebView. The url's schema must be http(s).
Constant Value:
"com.android.browser.headers"
INITIAL_ZOOM_LEVEL
public static final String INITIAL_ZOOM_LEVEL
The name of extra data when starting Browser with ACTION_VIEW or
ACTION_SEARCH intent.
The value should be an integer between 0 and 1000. If not set or set to
0, the Browser will use default. If set to 100, the Browser will start
with 100%.
Constant Value:
"browser.initialZoomLevel"
Public constructors
Browser
public Browser ()
Public methods
sendString
public static final void sendString (Context context,
String string)
Sends the given string using an Intent with Intent.ACTION_SEND
and a mime type
of text/plain. The string is put into Intent.EXTRA_TEXT
.
Parameters |
context |
Context : the context used to start the activity |
string |
String : the string to send |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Browser\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Constants](#constants) \\| [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nBrowser\n=======\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/provider/Browser \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\nclass\nBrowser\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|--------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.provider.Browser |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nSummary\n-------\n\n| ### Constants ||\n|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](/reference/java/lang/String) | [EXTRA_APPLICATION_ID](/reference/android/provider/Browser#EXTRA_APPLICATION_ID) The name of the extra data when starting the Browser from another application. |\n| [String](/reference/java/lang/String) | [EXTRA_CREATE_NEW_TAB](/reference/android/provider/Browser#EXTRA_CREATE_NEW_TAB) Boolean extra passed along with an Intent to a browser, specifying that a new tab be created. |\n| [String](/reference/java/lang/String) | [EXTRA_HEADERS](/reference/android/provider/Browser#EXTRA_HEADERS) The name of the extra data in the VIEW intent. |\n| [String](/reference/java/lang/String) | [INITIAL_ZOOM_LEVEL](/reference/android/provider/Browser#INITIAL_ZOOM_LEVEL) The name of extra data when starting Browser with ACTION_VIEW or ACTION_SEARCH intent. |\n\n| ### Public constructors ||\n|------------------------------------------------------------------|---|\n| ` `[Browser](/reference/android/provider/Browser#Browser())`() ` |\n\n| ### Public methods ||\n|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` static final void` | ` `[sendString](/reference/android/provider/Browser#sendString(android.content.Context,%20java.lang.String))`(`[Context](/reference/android/content/Context)` context, `[String](/reference/java/lang/String)` string) ` Sends the given string using an Intent with [Intent.ACTION_SEND](/reference/android/content/Intent#ACTION_SEND) and a mime type of text/plain. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nConstants\n---------\n\n### EXTRA_APPLICATION_ID\n\nAdded in [API level 3](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String EXTRA_APPLICATION_ID\n```\n\nThe name of the extra data when starting the Browser from another\napplication.\n\n\nThe value is a unique identification string that will be used to\nidentify the calling application. The Browser will attempt to reuse the\nsame window each time the application launches the Browser with the same\nidentifier.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"com.android.browser.application_id\"\n\n\n### EXTRA_CREATE_NEW_TAB\n\nAdded in [API level 12](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String EXTRA_CREATE_NEW_TAB\n```\n\nBoolean extra passed along with an Intent to a browser, specifying that\na new tab be created. Overrides EXTRA_APPLICATION_ID; if both are set,\na new tab will be used, rather than using the same one.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"create_new_tab\"\n\n\n### EXTRA_HEADERS\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String EXTRA_HEADERS\n```\n\nThe name of the extra data in the VIEW intent. The data are key/value\npairs in the format of Bundle. They will be sent in the HTTP request\nheaders for the provided url. The keys can't be the standard HTTP headers\nas they are set by the WebView. The url's schema must be http(s).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"com.android.browser.headers\"\n\n\n### INITIAL_ZOOM_LEVEL\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final String INITIAL_ZOOM_LEVEL\n```\n\nThe name of extra data when starting Browser with ACTION_VIEW or\nACTION_SEARCH intent.\n\n\nThe value should be an integer between 0 and 1000. If not set or set to\n0, the Browser will use default. If set to 100, the Browser will start\nwith 100%.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n\"browser.initialZoomLevel\"\n\n\nPublic constructors\n-------------------\n\n### Browser\n\n```\npublic Browser ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### sendString\n\nAdded in [API level 1](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic static final void sendString (Context context, \n String string)\n```\n\nSends the given string using an Intent with [Intent.ACTION_SEND](/reference/android/content/Intent#ACTION_SEND) and a mime type\nof text/plain. The string is put into [Intent.EXTRA_TEXT](/reference/android/content/Intent#EXTRA_TEXT).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|----------------------------------------------------------|\n| `context` | `Context`: the context used to start the activity \u003cbr /\u003e |\n| `string` | `String`: the string to send \u003cbr /\u003e |"]]