A component to record a video using the device's camcorder. After the video is recorded, the name of the file on the phone containing the clip is available as an argument to the AfterRecording event. The file name can be used, for example, to set the source property of a VideoPlayer component.
none
AfterRecording(text clip)
RecordVideo()
Use a camera component to take a picture on the phone.
Camera is a non-visible component that takes a picture using the device's camera. After the picture is taken, the path to the file on the phone containing the picture is available as an argument to the AfterPicture event. The path can be used, for example, as the Picture property of an Image component.
none
AfterPicture(Text image)
image
is the path that can be used to locate the image on the phone.TakePicture()
A special-purpose button. When the user taps an image picker, the device's image gallery appears, and the user can choose an image. After an image is picked, it is saved on the SD card and the ImageFile
property will be the name of the file where the image is stored. In order to not fill up storage, a maximum of 10 images will be stored. Picking more images will delete previous images, in order from oldest to newest.
BackgroundColor
Enabled
FontBold
FontItalic
FontSize
FontTypeface
Height
Width
Image
Selection
Text
TextAlignment
TextColor
Visible
AfterPicking()
BeforePicking()
GotFocus()
LostFocus()
Open()
Use a player component to play an audio or video file, or to vibrate the phone.
Player is a non-visible component that plays audio or video and controls phone vibration. The name of a media file is specified in the Source
property, which can be set in the Designer or in the Blocks Editor. The length of time for a vibration is specified in the Blocks Editor in milliseconds (thousandths of a second).
See Android Supported Media Formats for more information on which types of files you can use.
Use a player component for playing long sound files, video files, and vibrating the phone. For playing short sound files, such as sound effects, use a Sound
component instead.
IsLooping
IsPlaying
Source
Volume
Completed()
Pause()
Start()
Stop()
Vibrate(number milliseconds)
Use a sound component to play an audio file, or to vibrate the phone.
Sound is a non-visible component that plays sound files and vibrates for the number of milliseconds (thousandths of a second) specified in the Blocks Editor. The name of the sound file to play can be specified either in the Designer or in the Blocks Editor.
See Android Supported Media Formats for more information on which types of files you can use.
This component is best for short sound files, such as sound effects, while the Player
component is more efficient for longer sounds, such as songs.
Source
MinimumInterval
Pause()
Play()
Resume()
Stop()
Vibrate(number millisecs)
Use a VideoPlayer component to play a video file.
Video player is a media component that plays videos. A video player appears in your app as a rectangle. If the user taps the rectangle, media controls appear: play/pause, skip ahead, and skip backward. Your app can control playback behavior by calling the Start, Pause,
and SeekTo<.code> methods.
Video files should be in 3GPP (.3gp), or MPEG-4 (.mp4) format. For more details about formats, see Android Supported Media Formats.
App Inventor accepts video files up to 1 MB in size and limits the total size of an app to 5 MB, not all of which is available for media files. If your media files are too large, you might get errors when packaging or installing your app, in which case you should reduce the number of media files or their sizes. Video editing software, such as Windows Movie Maker or Apple iMovie, can help you decrease the size of videos by shortening them or re-encoding them into more compact formats.
Source
Visible
FullScreen
Height
Width
Completed()
Pause()
Start()
SeekTo(number millisecs)
number GetDuration()