public class

ActivityStarter

extends AbsActivityStarter
java.lang.Object
   ↳ sofia.app.internal.AbsActivityStarter
     ↳ sofia.app.ActivityStarter

Class Overview

Starts another screen or activity for the user and slides it into view. This class can be used in one of two ways:

  1. To start a subclass of Screen (or MapScreen), you create an ActivityStarter and pass it the class that should be started and the arguments that you want to pass to its initialize method. When the activity returns, a callback will be called based on the name of the activity class.
  2. To start a traditional Android activity based on an Intent, pass the Intent object and the name of a callback method that will be called when the activity returns.

Users can use this class directly but should probably prefer the Screen#presentScreen(Class, Object...) and Screen#presentActivity(Intent, String) methods instead.

Summary

Public Constructors
ActivityStarter(Intent intent, String callback)
ActivityStarter(Class<? extends Activity> screenClass, Object... params)
Public Methods
void start(Activity owner, String callback)
Protected Methods
String getCanceledCallback()
String getDefaultCallback()
void invokeCallback(Activity owner, Intent data, int resultCode)
[Expand]
Inherited Methods
From class sofia.app.internal.AbsActivityStarter
From class java.lang.Object

Public Constructors

public ActivityStarter (Intent intent, String callback)

public ActivityStarter (Class<? extends Activity> screenClass, Object... params)

Public Methods

public void start (Activity owner, String callback)

Protected Methods

protected String getCanceledCallback ()

protected String getDefaultCallback ()

protected void invokeCallback (Activity owner, Intent data, int resultCode)