Skip to content

Contact Picker

Category Requires Version
Social API 21, Android 5.0 Lollipop 12

Overview

A button that, when clicked on, displays a list of the contacts to choose among. After the user has made a selection, the following properties will be set to information about the chosen contact:

  • ContactName: the contact's name
  • EmailAddress: the contact's primary email address
  • ContactUri: the contact's URI on the device
  • EmailAddressList: a list of the contact's email addresses
  • PhoneNumber: the contact's primary phone number (on Later Android Verisons)
  • PhoneNumberList: a list of the contact's phone numbers (on Later Android Versions)
  • Picture: the name of the file containing the contact's image, which can be used as a Picture property value for the Image or ImageSprite component.

Other properties affect the appearance of the button (TextAlignment, BackgroundColor, etc.) and whether it can be clicked on (Enabled)

The ContactPicker component might not work on all phones. For example, on Android systems before system 3.0, it cannot pick phone numbers, and the list of email addresses will contain only one email.

Permissions

Events

After Picking

Event to be raised after the picker activity returns itsresult and the properties have been filled in.

Params
selection Text

Before Picking

Event to raise when the button of the component is clicked or the list is shownusing the Open block. This event occurs before the list of items is displayed, andcan be used to prepare the list before it is shown.

Got Focus

Indicates the cursor moved over the button so it is now possible to click it.

Lost Focus

Indicates the cursor moved away from the button so it is now no longer possible to click it.

Touch Down

Indicates that the button was pressed down.

Touch Up

Indicates that a button has been released.

Methods

Button Click

Perform a button click as function.

Open

Opens the picker, as though the user clicked on it.

Set Animation Style

Allows you to set animation style. Valid (case-insensitive) values are: ChasingDots, Circle, CubeGrid, DoubleBounce, FadingCircle, FoldingCube, Pulse, RotatingCircle, RotatingPlane, ThreeBounce, WanderingCubes, Wave. If invalid style is used, animation will be removed.Position can be: top, left, right, bottom. Size can be 100.

Params
style Text
position Text
size Number
color Number

Set Shadow

Place a blurred shadow of text underneath the text, drawn with the specified x, y, radius, color (e.g. -11, 12, 13, black.

Params
x Number
y Number
radius Number
color Number

View Contact

view a contact via its URI

Params
uri Text

With Icon From Font Awesome

Show an image on the given position near to the button. You can use following words for the position: 'Left', 'Right', 'Top' or 'Bottom'. Use the padding to add space between the icon and text. Use a 'FontAwesome' icon as the button icon without uploading a image resource into your project. You can find the icon code here at https://fontawesome.com/cheatsheet Use as example for a heart icon just 'f004' or ''

Params
position Text
icon Name Text
icon Color Number
padding Number
size Number

With Icon From Material Font

Show an image on the given position near to the button. You can use following words for the position: 'Left', 'Right', 'Top' or 'Bottom'. Use the padding to add space between the icon and text. Use a 'Material' icon as the button icon without uploading a image resource into your project. You can find the icon name here at https://material.io/resources/icons

Params
position Text
icon Name Text
icon Color Number
padding Number
size Number

With Icon From Picture

Show an image on the given position near to the button. You can use following words for the position: 'Left', 'Right', 'Top' or 'Bottom'. Use the padding to add space between the icon and text.

Params
position Text
picture Text
padding Number
width Number
height Number

Properties

Background Color

Color Default: #444444FF  ➖ Read Write - Designer Blocks

Returns the button's background color

Border Shadow

Available as Advanced Property

Boolean Default: True ➖ Write - Designer

Returns true if the button have a outside border shadow on click.

Contact Name

Text ➖ Read - Blocks

Name property getter method.

Contact URI

Text ➖ Read - Blocks

URI that specifies the location of the contact on the device.

Email Address

Text ➖ Read - Blocks

EmailAddress property getter method.

Email Address List

List ➖ Read - Blocks

EmailAddressList property getter method.

Enabled

Boolean Default: True ➖ Read Write - Designer Blocks

If set, user can tap check box to cause action.

Font Bold

Boolean Default: False ➖ Read Write - Designer Blocks

If set, button text is displayed in bold.

Font Italic

Boolean Default: False ➖ Read Write - Designer Blocks

If set, button text is displayed in italics.

Font Size

Number Default: 14.0 ➖ Read Write - Designer Blocks

Point size for button text.

Font Typeface

Number Default: 0 ➖ Write - Designer

Font family for button text.

Font Typeface Import

Available as Advanced Property

Text ➖ Write - Designer Blocks

Set a custom font.

Height

Number ➖ Read Write - Blocks

Specifies the component's vertical height, measured in pixels.

Height Percent

Number ➖ Write - Blocks

Specifies the component's vertical height as a percentageof the height of its parent Component.

HTML Format

Available as Advanced Property

Boolean Default: False ➖ Write - Designer

If true, then this button will show html text else it will show plain text. Note: Not all HTML is supported.

Image

Text ➖ Read Write - Designer Blocks

Image to display on button.

Phone Number

Text ➖ Read - Blocks

PhoneNumber property getter method.

Phone Number List

List ➖ Read - Blocks

PhoneNumberList property getter method.

Picture

Text ➖ Read - Blocks

Picture URI for this contact, which can beused to retrieve the contact's photo and other fields.

Rotation Angle

Available as Advanced Property

Number Default: 0.0 ➖ Read Write - Designer Blocks

Sets the degrees that the button is rotated around the pivot point. Increasing values result in clockwise rotation.

Shape

Number Default: 0 ➖ Write - Designer

Specifies the button's shape (default, rounded, rectangular, oval). The shape will not be visible if an Image is being displayed.

Show Feedback

Available as Advanced Property

Boolean Default: True ➖ Read Write - Designer Blocks

Specifies if a visual feedback should be shown for a button that as an image as background.

Text

Text ➖ Read Write - Designer Blocks

Text to display on button.

Text Alignment

Number Default: 1 ➖ Write - Designer

Left, center, or right.

Text Color

Color Default: #FFFFFFFF  ➖ Read Write - Designer Blocks

Color for button text.

Touch Color

Available as Advanced Property

Color Default: #CCCCCCFF  ➖ Read Write - Designer Blocks

Set the buttons touch color.

Visible

Boolean Default: True ➖ Read Write - Designer Blocks

Returns true iff the component is visible.

Width

Number ➖ Read Write - Blocks

Specifies the component's horizontal width, measured in pixels.

Width Percent

Number ➖ Write - Blocks

Specifies the component's horizontal width as a percentageof the Width of its parent Component.


Last update: November 9, 2022