Class LocalActivityInvoker

java.lang.Object
org.robolectric.android.internal.LocalActivityInvoker
All Implemented Interfaces:
androidx.test.internal.platform.app.ActivityInvoker

public class LocalActivityInvoker extends Object implements androidx.test.internal.platform.app.ActivityInvoker
An ActivityInvoker that drives Activity lifecycles manually.

All the methods in this class are blocking API.

  • Constructor Details

    • LocalActivityInvoker

      public LocalActivityInvoker()
  • Method Details

    • startActivity

      public void startActivity(Intent intent, @Nullable Bundle activityOptions)
      Specified by:
      startActivity in interface androidx.test.internal.platform.app.ActivityInvoker
    • startActivity

      public void startActivity(Intent intent)
      Specified by:
      startActivity in interface androidx.test.internal.platform.app.ActivityInvoker
    • startActivityForResult

      public void startActivityForResult(Intent intent, @Nullable Bundle activityOptions)
      Specified by:
      startActivityForResult in interface androidx.test.internal.platform.app.ActivityInvoker
    • startActivityForResult

      public void startActivityForResult(Intent intent)
      Specified by:
      startActivityForResult in interface androidx.test.internal.platform.app.ActivityInvoker
    • getActivityResult

      public Instrumentation.ActivityResult getActivityResult()
      Specified by:
      getActivityResult in interface androidx.test.internal.platform.app.ActivityInvoker
    • resumeActivity

      public void resumeActivity(Activity activity)
      Specified by:
      resumeActivity in interface androidx.test.internal.platform.app.ActivityInvoker
    • pauseActivity

      public void pauseActivity(Activity activity)
      Specified by:
      pauseActivity in interface androidx.test.internal.platform.app.ActivityInvoker
    • stopActivity

      public void stopActivity(Activity activity)
      Specified by:
      stopActivity in interface androidx.test.internal.platform.app.ActivityInvoker
    • recreateActivity

      public void recreateActivity(Activity activity)
      Specified by:
      recreateActivity in interface androidx.test.internal.platform.app.ActivityInvoker
    • finishActivity

      public void finishActivity(Activity activity)
      Specified by:
      finishActivity in interface androidx.test.internal.platform.app.ActivityInvoker
    • getIntentForActivity

      public Intent getIntentForActivity(Class<? extends Activity> activityClass)
      Specified by:
      getIntentForActivity in interface androidx.test.internal.platform.app.ActivityInvoker