Documentation
  • Introduction
  • Components
    • User Interface
      • Button
      • Checkbox
      • Date Picker
      • Floating Button
      • Image
      • Label
      • List Picker
      • List View
      • List View Image and Text
      • Notifier
      • Radio Button
      • Rating Bar
      • Slider
      • Surface View
      • Spinner
      • Switch
      • TextBox
      • Time Picker
      • Web Viewer
    • Layout
      • Horizontal Arrangement
      • Horizontal Scroll Arrangement
      • Space
      • Table Arrangement
      • Vertical Arrangement
      • Vertical Scroll Arrangement
    • Media
      • Audio Picker
      • Camcorder
      • Camera
      • Image Picker
      • Metadata
      • OCR
      • Player
      • QR Code
      • Sound
      • Sound Recorder
      • Speech Recognizer
      • Text To Speech
      • Video Player
      • Yandex Translate
    • Drawing and Animation
      • Ball
      • Canvas
      • Image Editor
      • Image Sprite
    • Sensors
      • Accelerometer
      • Barcode Scanner
      • Clock
      • Finger Print
      • Gravity Sensor
      • Gyroscope Sensor
      • Light Sensor
      • Location Sensor
      • Magnetic Field Sensor
      • NearField
      • Orientation Sensor
      • Pedometer
      • Pressure Sensor
      • Proximity Sensor
      • Sound Sensor
      • Temperature Sensor
    • Social
      • Contact Picker
      • Email Picker
      • Google Account Picker
      • Phone Call
      • Phone Number Picker
      • Sharing
      • Texting
      • Twitter
    • Storage
      • File
      • Firebase DB
      • Fusiontables Control
      • SQLite
      • Tiny DB
      • Tiny Web DB
    • Connectivity
      • Activity Starter
      • Bluetooth Admin
      • Bluetooth Client
      • Bluetooth Server
      • Download
      • Network
      • Web
      • WiFi
    • Google
      • Google Account Picker
      • Google Maps
      • Google Shortlink
    • LEGO Mindstorms
      • NXT Drive
      • NXT Color Sensor
      • NXT Light Sensor
      • NXT Sound Sensor
      • NXT Touch Sensor
      • NXT Ultrasonic Sensor
      • NXT Direct Commands
      • EV3 Motors
      • EV3 Color Sensor
      • EV3 Gyro Sensor
      • EV3 Touch Sensor
      • EV3 Ultrasonic Sensor
      • EV3 Sound
      • EV3 UI
      • EV3 Commands
    • Monetization
      • AdMob Interstitial
      • AdMob Banner
      • AdMob Rewarded Video
      • Billing
      • Leadbolt
    • Device
      • Audio
      • Device Tools
      • Wallpaper
      • Package
      • Screenshot
    • Experimental
      • Push Notifications
      • Cloud DB
      • Notification
  • Blocks
    • Control
    • Logic
    • Math
    • Text
    • Lists
    • Colors
    • Variables
    • Procedures
    • Screen
    • Any Component
  • Testing
    • Live Development
      • Via WiFi
      • Via USB
    • Makeroid Companion
  • Extensions
    • List of Extensions
    • Creating Extensions
  • Other
    • Backpack
    • Release Notes
      • Andromeda
      • Beta Versions
    • Resources
      • Concept Cards
    • Terms of Service
Powered by GitBook
On this page
  • Properties
  • Action
  • ActivityClass
  • ActivityPackage
  • DataType
  • DataUri
  • ExtraKey
  • ExtraValue
  • Extras
  • Result
  • ResultName
  • ResultType
  • ResultUri
  • Events
  • ActivityCanceled
  • AfterActivity
  • Methods
  • ResolveActivity
  • StartActivity
  1. Components
  2. Connectivity

Activity Starter

A component that can launch an activity using the StartActivity method.

Activities that can be launched include:

  • Starting another App Inventor for Android app. To do so, first find out the class of the other application by downloading the source code and using a file explorer or unzip utility to find a file named "youngandroidproject/project.properties".

    The first line of the file will start with "main=" and be followed by the class name; for example, main=com.makeroid.pavitra.HelloWorld.Screen1.

    To make your ActivityStarter launch this application, set the following properties:

    • ActivityPackage to the class name, dropping the last component (for example, com.gmail.Bitdiddle.Ben.HelloPurr)

    • ActivityClass to the entire class name (for example, com.gmail.Bitdiddle.Ben.HelloPurr.Screen1)

  • Starting the camera application by setting the following properties:

    • Action: android.intent.action.MAIN

    • ActivityPackage: com.android.camera

    • ActivityClass: com.android.camera.Camera

  • Performing web search. Assuming the term you want to search for is "vampire" (feel free to substitute your own choice), set the properties to:

    • Action: android.intent.action.WEB_SEARCH

    • ExtraKey: query

    • ExtraValue: vampire

    • ActivityPackage: com.google.android.providers.enhancedgooglesearch

    • ActivityClass: com.google.android.providers.enhancedgooglesearch.Launcher

  • Opening a browser to a specified web page. Assuming the page you want to go to is "www.facebook.com" (feel free to substitute your own choice), set the properties to:

    • Action: android.intent.action.VIEW

    • DataUri: http://www.facebook.com

Properties

Action

ActivityClass

ActivityPackage

DataType

DataUri

ExtraKey

Returns the extra key that will be passed to the activity. DEPRECATED: New code should use Extras property instead.

ExtraValue

Returns the extra value that will be passed to the activity. DEPRECATED: New code should use Extras property instead.

Extras

Result

ResultName

ResultType

ResultUri

Events

ActivityCanceled

Event raised if this ActivityStarter returns because the activity was canceled.

AfterActivity

Parameter

Type

result

text

Event raised after this ActivityStarter returns.

Methods

ResolveActivity

Returns: (text)

Returns the name of the activity that corresponds to this ActivityStarter, or an empty string if no corresponding activity can be found.

StartActivity

Start the activity corresponding to this ActivityStarter.

PreviousConnectivityNextBluetooth Admin

Last updated 7 years ago