### startPackageInstallerSessionDetailsActivity Source: https://robolectric.org/javadoc/latest/org/robolectric/shadows/ShadowLauncherApps.html Starts the package installer session details activity. ```APIDOC ## startPackageInstallerSessionDetailsActivity ### Description Starts the package installer session details activity. ### Method startPackageInstallerSessionDetailsActivity ### Parameters - `sessionInfo` (PackageInstaller.SessionInfo) - Required - The session info. - `sourceBounds` (Rect) - Optional - The source bounds. - `opts` (Bundle) - Optional - The options. ``` -------------------------------- ### start() Source: https://robolectric.org/javadoc/latest/org/robolectric/shadows/ShadowMediaRecorder.html Starts recording. ```APIDOC ## start() ### Description Starts recording. ### Method `protected void start()` ### Parameters None. ### Return Value - `void` ``` -------------------------------- ### startPackageInstallerSessionDetailsActivity(PackageInstaller.SessionInfo, Rect, Bundle) - ShadowLauncherApps Source: https://robolectric.org/javadoc/latest/index-all.html Method in class org.robolectric.shadows.ShadowLauncherApps. Starts the package installer session details activity. ```APIDOC ## startPackageInstallerSessionDetailsActivity(PackageInstaller.SessionInfo, Rect, Bundle) ### Description Method in class org.robolectric.shadows.ShadowLauncherApps. Starts the package installer session details activity. ### Method startPackageInstallerSessionDetailsActivity ### Signature `public void startPackageInstallerSessionDetailsActivity(PackageInstaller.SessionInfo sessionInfo, Rect sourceBounds, Bundle opts)` ### Parameters - **sessionInfo** (PackageInstaller.SessionInfo) - Required - The session info. - **sourceBounds** (Rect) - Required - The source bounds. - **opts** (Bundle) - Required - The options bundle. ``` -------------------------------- ### start() - Method in class org.robolectric.simulator.Simulator Source: https://robolectric.org/javadoc/latest/index-all.html Starts the simulator. ```APIDOC ## start() - Method in Simulator ### Description Starts the simulator. ``` -------------------------------- ### start(Path output, int width, int height, ScreenRecorder.FrameRate frameRate) Source: https://robolectric.org/javadoc/latest/org/robolectric/simulator/pluginapi/NoOpScreenRecorder.html Starts the screen recorder. This implementation does nothing, as it is a no-op. ```APIDOC ## start(Path output, int width, int height, ScreenRecorder.FrameRate frameRate) ### Description Starts the screen recorder. This is a no-op implementation. ### Method `public void start(Path output, int width, int height, ScreenRecorder.FrameRate frameRate)` ### Parameters - **output** (Path) - Required - The output path for the recording. - **width** (int) - Required - The width of the recording. - **height** (int) - Required - The height of the recording. - **frameRate** (ScreenRecorder.FrameRate) - Required - The frame rate for the recording. ### Returns void ``` -------------------------------- ### start() Source: https://robolectric.org/javadoc/latest/org/robolectric/android/controller/FragmentController.html Starts the fragment. ```APIDOC ## start() ### Description Starts the fragment. ### Method start ### Signature `public FragmentController start()` ### Returns - **FragmentController** - This controller. ### Deprecation Deprecated. Use FragmentScenario instead. ``` -------------------------------- ### start() - Method in class org.robolectric.shadows.ShadowMediaRecorder Source: https://robolectric.org/javadoc/latest/index-all.html Starts the media recorder shadow. ```APIDOC ## start() - Method in ShadowMediaRecorder ### Description Starts the media recorder shadow. ``` -------------------------------- ### start(Path output, int width, int height, ScreenRecorder.FrameRate frameRate) Source: https://robolectric.org/javadoc/latest/org/robolectric/simulator/pluginapi/ScreenRecorder.html Starts the screen recorder with the specified output path, dimensions, and frame rate. ```APIDOC ## start(Path output, int width, int height, ScreenRecorder.FrameRate frameRate) ### Description Start the screen recorder. ### Method void start(Path output, int width, int height, ScreenRecorder.FrameRate frameRate) ### Parameters - **output** (Path) - The output path for the recording. - **width** (int) - The width of the recording. - **height** (int) - The height of the recording. - **frameRate** (ScreenRecorder.FrameRate) - The frame rate for the recording. ### Returns void ``` -------------------------------- ### start() - Method in class org.robolectric.shadows.ShadowVideoView Source: https://robolectric.org/javadoc/latest/index-all.html Starts the video view shadow. ```APIDOC ## start() - Method in ShadowVideoView ### Description Starts the video view shadow. ``` -------------------------------- ### start(Path, int, int, ScreenRecorder.FrameRate) - Method in class org.robolectric.simulator.pluginapi.NoOpScreenRecorder Source: https://robolectric.org/javadoc/latest/index-all.html Starts the screen recorder with the given parameters. ```APIDOC ## start(Path, int, int, ScreenRecorder.FrameRate) - Method in NoOpScreenRecorder ### Description Starts the screen recorder with the given parameters. ``` -------------------------------- ### start() Source: https://robolectric.org/javadoc/latest/org/robolectric/shadows/ShadowMediaPlayer.html Simulates private native method MediaPlayer._start(). ```APIDOC ## start() ### Description Simulates private native method `MediaPlayer._start()`. ### Method start ### Parameters None. ``` -------------------------------- ### start(Path, int, int, ScreenRecorder.FrameRate) - Method in interface org.robolectric.simulator.pluginapi.ScreenRecorder Source: https://robolectric.org/javadoc/latest/index-all.html Start the screen recorder. ```APIDOC ## start(Path, int, int, ScreenRecorder.FrameRate) - Method in ScreenRecorder ### Description Start the screen recorder. ``` -------------------------------- ### doStart() Source: https://robolectric.org/javadoc/latest/org/robolectric/shadows/ShadowMediaPlayer.html Starts simulated playback. ```APIDOC ## doStart() ### Description Starts simulated playback. ### Method void ``` -------------------------------- ### onCreate(Bundle arguments) Source: https://robolectric.org/javadoc/latest/org/robolectric/android/internal/RoboMonitoringInstrumentation.html Sets up lifecycle monitoring and argument registry. Subclasses must call up to onCreate(). This onCreate method does not call start(); it is the subclass's responsibility to call start if desired. ```APIDOC ## Method: onCreate(Bundle arguments) ### Description Sets up lifecycle monitoring and argument registry. Subclasses must call up to onCreate(). This onCreate method does not call start(); it is the subclass's responsibility to call start if desired. ### Signature `public void onCreate(Bundle arguments)` ### Parameters - **arguments** (Bundle) - Required - The arguments passed to the instrumentation. ### Returns void ``` -------------------------------- ### start() Source: https://robolectric.org/javadoc/latest/org/robolectric/android/controller/FragmentController.html Deprecated method that starts the fragment. ```APIDOC ## start() ### Description Deprecated method that starts the fragment. ### Method start ### Signature `public FragmentController start()` ### Returns - `FragmentController` - This controller. ### Deprecation Deprecated. ``` -------------------------------- ### start() - Method in class org.robolectric.android.controller.ActivityController Source: https://robolectric.org/javadoc/latest/index-all.html Starts the activity controller. ```APIDOC ## start() - Method in ActivityController ### Description Starts the activity controller. ``` -------------------------------- ### startCommand(int flags, int startId) Source: https://robolectric.org/javadoc/latest/org/robolectric/android/controller/ServiceController.html Starts the service with the given flags and start ID. ```APIDOC ## startCommand(int flags, int startId) ### Description Starts the service with the given flags and start ID. ### Method startCommand ### Signature `public ServiceController startCommand(int flags, int startId)` ### Parameters - **flags** (int) - Required - The flags for the start command. - **startId** (int) - Required - The start ID for the start command. ### Returns - **ServiceController** - This controller for chaining. ``` -------------------------------- ### startCommand(int flags, int startId) Source: https://robolectric.org/javadoc/latest/org/robolectric/android/controller/IntentServiceController.html Starts the service with the given command flags and start ID. ```APIDOC ## startCommand(int flags, int startId) ### Description Starts the service with the specified flags and start ID, simulating the onStartCommand lifecycle method. ### Method Instance method ### Signature `public IntentServiceController startCommand(int flags, int startId)` ### Parameters - **flags** (int) - Required - Command flags for the start command. - **startId** (int) - Required - Unique identifier for this start request. ### Returns - **IntentServiceController** - This controller for chaining. ``` -------------------------------- ### startActivity(Context context, Intent intent, Bundle options) Source: https://robolectric.org/javadoc/latest/org/robolectric/shadows/ShadowAppTask.html Starts the activity using the given context. The started activity can be checked using ShadowContextWrapper.getNextStartedActivity(). ```APIDOC ## startActivity(Context context, Intent intent, Bundle options) ### Description Starts the activity using the given context. The started activity can be checked using ShadowContextWrapper.getNextStartedActivity(). ### Method startActivity ### Signature @Implementation protected void startActivity(Context context, Intent intent, Bundle options) ### Parameters - **context** (Context) - Required - Context with which the activity will be started. - **intent** (Intent) - Required - Intent of the activity to be started. - **options** (Bundle) - Required - Extras passed to the activity. ``` -------------------------------- ### IntentServiceController.startCommand Source: https://robolectric.org/javadoc/latest/index-all.html Starts a command on the IntentServiceController. ```APIDOC ## startCommand(int, int) ### Description Starts a command on the IntentServiceController. ### Method startCommand ### Parameters - **startId** (int) - Required - The start ID. - **flags** (int) - Required - The flags. ``` -------------------------------- ### startDiscovery Source: https://robolectric.org/javadoc/latest/org/robolectric/shadows/ShadowBluetoothAdapter.html Starts discovery of Bluetooth devices. Returns true if discovery successfully started. ```APIDOC ## startDiscovery ### Description Starts discovery of Bluetooth devices. Returns true if discovery successfully started. ### Method protected boolean startDiscovery() ### Parameters None ### Returns - **boolean** - true if discovery started successfully, false otherwise. ``` -------------------------------- ### ActivityController.setup(Bundle) Source: https://robolectric.org/javadoc/latest/org/robolectric/android/controller/ActivityController.html Performs setup with a saved instance state, simulating restoration. ```APIDOC ## ActivityController setup(Bundle) ### Description Calls the same lifecycle methods on the Activity called by Android when an Activity is restored from previously saved state. ### Method `public ActivityController setup(Bundle savedInstanceState)` ### Parameters - **savedInstanceState** (Bundle) - Required - Saved instance state. ### Returns Activity controller instance. ``` -------------------------------- ### startDiscovery() Source: https://robolectric.org/javadoc/latest/org/robolectric/shadows/ShadowBluetoothAdapter.html Starts discovery. ```APIDOC ## startDiscovery() ### Description Starts discovery. ### Method protected boolean startDiscovery() ### Parameters None ### Returns boolean - true if discovery started successfully, false otherwise. ``` -------------------------------- ### setupLogging() Source: https://robolectric.org/javadoc/latest/org/robolectric/shadows/ShadowLog.html Sets up logging for the shadow. ```APIDOC ## setupLogging() ### Description Sets up logging for the shadow. ### Method setupLogging ### Signature `public static void setupLogging()` ### Parameters None. ### Returns void ``` -------------------------------- ### getInstalledProviders() - Method in class org.robolectric.shadows.ShadowAppWidgetManager Source: https://robolectric.org/javadoc/latest/index-all.html Method to get installed widget providers. ```APIDOC ## getInstalledProviders() ### Description Method to get installed widget providers. ### Method Instance ### Class org.robolectric.shadows.ShadowAppWidgetManager ``` -------------------------------- ### WelcomeActivityTest in Kotlin Source: https://robolectric.org/writing-a-test Robolectric test that verifies clicking the login button starts LoginActivity. Uses ActivityController to set up the activity and shadowOf to get the next started activity. ```kotlin @RunWith(RobolectricTestRunner::class) class WelcomeActivityTest { @Test fun clickingLogin_shouldStartLoginActivity() { Robolectric.buildActivity(WelcomeActivity::class.java).use { controller -> controller.setup() // Moves the Activity to the RESUMED state val activity = controller.get() activity.findViewById