IT. Expert System.

Android Reference

ShareCompat.IntentBuilder


android.support.v4.app

Class ShareCompat.IntentBuilder

  • Enclosing class:
    ShareCompat


    public static class ShareCompat.IntentBuilder
    extends Object
    IntentBuilder is a helper for constructing Intent.ACTION_SEND and Intent.ACTION_SEND_MULTIPLE sharing intents and starting activities to share content. The ComponentName and package name of the calling activity will be included.
    • Method Detail

      • from

        public static ShareCompat.IntentBuilder from(Activity launchingActivity)
        Create a new IntentBuilder for launching a sharing action from launchingActivity.
        Parameters:
        launchingActivity - Activity that the share will be launched from
        Returns:
        a new IntentBuilder instance
      • getIntent

        public Intent getIntent()
        Retrieve the Intent as configured so far by the IntentBuilder. This Intent is suitable for use in a ShareActionProvider or chooser dialog.

        To create an intent that will launch the activity chooser so that the user may select a target for the share, see createChooserIntent().

        Returns:
        The current Intent being configured by this builder
      • createChooserIntent

        public Intent createChooserIntent()
        Create an Intent that will launch the standard Android activity chooser, allowing the user to pick what activity/app on the system should handle the share.
        Returns:
        A chooser Intent for the currently configured sharing action
      • startChooser

        public void startChooser()
        Start a chooser activity for the current share intent.

        Note that under most circumstances you should use ShareCompat.configureMenuItem() to add a Share item to the menu while presenting a detail view of the content to be shared instead of invoking this directly.

      • setChooserTitle

        public ShareCompat.IntentBuilder setChooserTitle(CharSequence title)
        Set the title that will be used for the activity chooser for this share.
        Parameters:
        title - Title string
        Returns:
        This IntentBuilder for method chaining
      • setChooserTitle

        public ShareCompat.IntentBuilder setChooserTitle(int resId)
        Set the title that will be used for the activity chooser for this share.
        Parameters:
        resId - Resource ID of the title string to use
        Returns:
        This IntentBuilder for method chaining
      • setHtmlText

        public ShareCompat.IntentBuilder setHtmlText(String htmlText)
        Set an HTML string to be sent as part of the share. If EXTRA_TEXT has not already been supplied, a styled version of the supplied HTML text will be added as EXTRA_TEXT as parsed by Html.fromHtml.
        Parameters:
        htmlText - A string containing HTML markup as a richer version of the text provided by EXTRA_TEXT.
        Returns:
        This IntentBuilder for method chaining
        See Also:
        setText(CharSequence)
      • setStream

        public ShareCompat.IntentBuilder setStream(Uri streamUri)
        Set a stream URI to the data that should be shared.

        This replaces all currently set stream URIs and will produce a single-stream ACTION_SEND intent.

        Parameters:
        streamUri - URI of the stream to share
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_STREAM
      • addStream

        public ShareCompat.IntentBuilder addStream(Uri streamUri)
        Add a stream URI to the data that should be shared. If this is not the first stream URI added the final intent constructed will become an ACTION_SEND_MULTIPLE intent. Not all apps will handle both ACTION_SEND and ACTION_SEND_MULTIPLE.
        Parameters:
        streamUri - URI of the stream to share
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_STREAM, Intent.ACTION_SEND, Intent.ACTION_SEND_MULTIPLE
      • setEmailTo

        public ShareCompat.IntentBuilder setEmailTo(String[] addresses)
        Set an array of email addresses as recipients of this share. This replaces all current "to" recipients that have been set so far.
        Parameters:
        addresses - Email addresses to send to
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_EMAIL
      • addEmailTo

        public ShareCompat.IntentBuilder addEmailTo(String address)
        Add an email address to be used in the "to" field of the final Intent.
        Parameters:
        address - Email address to send to
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_EMAIL
      • addEmailTo

        public ShareCompat.IntentBuilder addEmailTo(String[] addresses)
        Add an array of email addresses to be used in the "to" field of the final Intent.
        Parameters:
        addresses - Email addresses to send to
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_EMAIL
      • setEmailCc

        public ShareCompat.IntentBuilder setEmailCc(String[] addresses)
        Set an array of email addresses to CC on this share. This replaces all current "CC" recipients that have been set so far.
        Parameters:
        addresses - Email addresses to CC on the share
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_CC
      • addEmailCc

        public ShareCompat.IntentBuilder addEmailCc(String address)
        Add an email address to be used in the "cc" field of the final Intent.
        Parameters:
        address - Email address to CC
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_CC
      • addEmailCc

        public ShareCompat.IntentBuilder addEmailCc(String[] addresses)
        Add an array of email addresses to be used in the "cc" field of the final Intent.
        Parameters:
        addresses - Email addresses to CC
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_CC
      • setEmailBcc

        public ShareCompat.IntentBuilder setEmailBcc(String[] addresses)
        Set an array of email addresses to BCC on this share. This replaces all current "BCC" recipients that have been set so far.
        Parameters:
        addresses - Email addresses to BCC on the share
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_BCC
      • addEmailBcc

        public ShareCompat.IntentBuilder addEmailBcc(String address)
        Add an email address to be used in the "bcc" field of the final Intent.
        Parameters:
        address - Email address to BCC
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_BCC
      • addEmailBcc

        public ShareCompat.IntentBuilder addEmailBcc(String[] addresses)
        Add an array of email addresses to be used in the "bcc" field of the final Intent.
        Parameters:
        addresses - Email addresses to BCC
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_BCC
      • setSubject

        public ShareCompat.IntentBuilder setSubject(String subject)
        Set a subject heading for this share; useful for sharing via email.
        Parameters:
        subject - Subject heading for this share
        Returns:
        This IntentBuilder for method chaining
        See Also:
        Intent.EXTRA_SUBJECT


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 223 / 158782536. Delta: 0.04208 с