Non-visible component that can detect shaking and measure acceleration approximately in three dimensions using SI units (m/s2). The components are:
AccelerationChanged(number xAccel, number yAccel, number zAccel)
Component for using the Barcode Scanner to read a barcode
Non-visible component that provides the instant in time using the internal clock on the phone. It can fire a timer at regularly set intervals and perform time calculations, manipulations, and conversions.
Instants are assumed to be in the device's local time zone. When they are converted to or from milliseconds, the milliseconds for a given Instance are calculated from January 1, 1970 in UTC (Greenwich Mean Time).
Methods to convert an Instant to text are also available. Acceptable patterns are empty string, MM/dd/YYYY HH:mm:ss a, or MMM d, yyyy HH:mm. The empty string will provide the default format, which is "MMM d, yyyy HH:mm:ss a" for FormatDateTime, "MMM d, yyyy" for FormatDate. To see all possible format, please see here.
A note on combining date and time: In order to combine the date from one Instant and the time from another, for example from a DatePicker and TimePicker, extract the parts as text and use the text to create a new Instant.
InstantInTime AddDays(InstantInTime instant, number days)
InstantInTime AddDuration(InstantInTime instant, Duration duration)
InstantInTime AddHours(InstantInTime instant, number hours)
InstantInTime AddMinutes(InstantInTime instant, number minutes)
InstantInTime AddMonths(InstantInTime instant, number months)
InstantInTime AddSeconds(InstantInTime instant, number seconds)
InstantInTime AddWeeks(InstantInTime instant, number weeks)
InstantInTime AddYears(InstantInTime instant, number years)
number DayOfMonth(InstantInTime instant)
Duration Duration(InstantInTime start, InstantInTime end)
number DurationToSeconds(Duration duration)
number DurationToMinutes(Duration duration)
number DurationToHours(Duration duration)
number DurationToDays(Duration duration)
number DurationToWeeks(Duration duration)
text FormatDate(InstantInTime instant, text pattern)
text FormatDateTime(InstantInTime instant, text pattern)
text FormatTime(InstantInTime instant)
number GetMillis(InstantInTime instant)
number Hour(InstantInTime instant)
InstantInTime MakeInstant(text from)
InstantInTime MakeInstantFromMillis(number millis)
number Minute(InstantInTime instant)
number Month(InstantInTime instant)
text MonthName(InstantInTime instant)
number Second(InstantInTime instant)
number Weekday(InstantInTime instant)
text WeekdayName(InstantInTime instant)
number Year(InstantInTime instant)
Non-visible component that can measure angular velocity in three dimensions in units of degrees per second.
In order to function, the component must have its
Enabled property set to True, and the device must have a gyroscope sensor.
ZAngularVelocityproperties will have meaningful values.
GyroscopeChanged(number xAngularVelocity, number yAngularVelocity, number zAngularVelocity, number timestamp)
timestampparameter is the time in nanoseconds at which the event occurred.
Non-visible component providing location information, including longitude, latitude, altitude (if supported by the device), speed (if supported by the device), and address. This can also perform "geocoding", converting a given address (not necessarily the current one) to a latitude (with the
LatitudeFromAddress method) and a longitude (with the
In order to function, the component must have its
Enabled property set to True, and the device must have location sensing enabled through wireless networks or GPS satellites (if outdoors).
LocationChanged(number latitude, number longitude, number altitude, number speed)
StatusChanged(text provider, text status)
number LatitudeFromAddress(text locationName)
number LongitudeFromAddress(text locationName)
Non-visible component to provide NFC capabilities. For now this component supports the reading and writing of text tags only (if supported by the device)
In order to read and write text tags, the component must
ReadMode property set to True or False
Note: This component will only work on Screen1 of any App Inventor app.
Use an orientation sensor component to determine the phone's spatial orientation.
An orientation sensor is a non-visible component that reports the following three values, in degrees:
OrientationChanged(number azimuth, number pitch, number roll)
A Component that acts like a Pedometer. It senses motion via the Accerleromter and attempts to determine if a step has been taken. Using a configurable stride length, it can estimate the distance traveled as well.
SimpleStep(number simpleSteps, number distance)
WalkStep(number walkSteps, number distance)
A sensor component that can measure the proximity of an object (in cm) relative to the view screen of a device. This sensor is typically used to determine whether a handset is being held up to a persons ear; i.e. lets you determine how far away an object is from a device. Many devices return the absolute distance, in cm, but some return only near and far values. In this case, the sensor usually reports its maximum range value in the far state and a lesser value in the near state. It reports the following value: