Activity Starter

  • Description

      Activity Starter

      The component Activity starter is a component that can launch an activity using the StartActivity method. Activities that can be launched include:

      • - Starting another 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.gmail.Bitdiddle.Ben.HelloPurr.Screen1. (The first components indicate that it was created by Ben.Bitdiddle@gmail.com.) 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 "Block2Code" (feel free to substitute your own choice), set the properties to:
        • Action: android.intent.action.WEB_SEARCH.
        • ExtraValue: Block2Code.
        • 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
  • Events

    • After Activity (text result)
    • Event raised after this ActivityStarter returns.
    • Activity Canceled
    • Event raised if this ActivityStarter returns because the activity was canceled.
  • Procedures

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

    • Action (text)
    • Action of the activity that was launched.
    • Activity Class (text)
    • Class name of the activity that was launched.
    • Activity Package (text)
    • Package name of the activity that was launched.
    • Data Uri (text)
    • URI passed to the activity that will start.
    • Extra Key (text)
    • Text key name goes to the activity.
    • Extra Value (text)
    • Text value goes to the activity.
    • Extras (list of pairs)
    • Accepts a list of pairs which are used as key/value pairs in the “Extra” field of the activity.
    • Result (text)
    • Value returned for the activity that was started.
    • Result Name (text)
    • The name used to extract the result returned by the activity that was started.
    • Result Type (text)
    • Write back information about the activity that started.
    • Result Uri (text)
    • URI (or data) of information returned from the activity that was started.