public final class SdkActivity extends ComponentActivity


Activity to start for SDKs running locally. Not for App / SDK Usage.

SDK should use SdkSandboxControllerCompat.registerSdkSandboxActivityHandler for handler registration.

App should use SdkSandboxManagerCompat.startSdkSandboxActivity for starting activity.

Summary

Public constructors

Protected methods

void
onCreate(Bundle savedInstanceState)

{@inheritDoc}

Inherited methods

From android.app.Activity
void
void
void
void
@NonNull PendingIntent
createPendingResult(int p0, @NonNull Intent p1, int p2)
final void
dismissDialog(int p0)

This method is deprecated. Deprecated in Java

final void
boolean
boolean
boolean
boolean
void
dump(
    @NonNull String p0,
    @Nullable FileDescriptor p1,
    @NonNull PrintWriter p2,
    @Nullable String[] p3
)
void

This method is deprecated. Deprecated in Java

boolean
@NonNull T
<T extends View> findViewById(int p0)
void
void
void

This method is deprecated. Deprecated in Java

void
void
void
void

This method is deprecated. Deprecated in Java

@Nullable ActionBar
final @NonNull Application
@Nullable ComponentName
@Nullable String
int
@NonNull ComponentName
@NonNull Scene
@NonNull TransitionManager
@Nullable View
@NonNull FragmentManager

This method is deprecated. Deprecated in Java

@NonNull Intent
@Nullable Object
@Nullable String
int
@NonNull LayoutInflater
@NonNull LoaderManager

This method is deprecated. Deprecated in Java

@NonNull String
int
final @NonNull MediaController
@NonNull MenuInflater
@NonNull OnBackInvokedDispatcher
final @NonNull Activity
@Nullable Intent
@NonNull SharedPreferences
@Nullable Uri
int
final @NonNull SearchEvent
final @NonNull SplashScreen
@NonNull Object
int
final @NonNull CharSequence
final int
@NonNull VoiceInteractor
final int
@NonNull Window
@NonNull WindowManager
boolean
void
boolean
boolean
final boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
final @NonNull Cursor
managedQuery(
    @NonNull Uri p0,
    @NonNull String[] p1,
    @NonNull String p2,
    @NonNull String[] p3,
    @NonNull String p4
)

This method is deprecated. Deprecated in Java

boolean
moveTaskToBack(boolean p0)
boolean
boolean

This method is deprecated. Deprecated in Java

void
void
void
void
onApplyThemeResource(@NonNull Resources.Theme p0, int p1, boolean p2)
void

This method is deprecated. Deprecated in Java

void
void
void
boolean
void
void
void
@Nullable CharSequence
@NonNull Dialog

This method is deprecated. Deprecated in Java

@Nullable Dialog
onCreateDialog(int p0, @NonNull Bundle p1)

This method is deprecated. Deprecated in Java

void
boolean
@Nullable View
boolean

This method is deprecated. Deprecated in Java

@Nullable View
onCreateView(
    @NonNull String p0,
    @NonNull Context p1,
    @NonNull AttributeSet p2
)
@Nullable View
onCreateView(
    @Nullable View p0,
    @NonNull String p1,
    @NonNull Context p2,
    @NonNull AttributeSet p3
)
void
void
void
boolean
void
boolean
onKeyDown(int p0, @NonNull KeyEvent p1)
boolean
boolean
onKeyMultiple(int p0, int p1, @NonNull KeyEvent p2)
boolean
boolean
onKeyUp(int p0, @NonNull KeyEvent p1)
void
void
void
boolean
onMenuOpened(int p0, @NonNull Menu p1)
boolean
boolean

This method is deprecated. Deprecated in Java

boolean
void
void
void
boolean
void
void
void
void
void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
boolean
void
void
void
onProvideKeyboardShortcuts(
    @NonNull List<@NonNull KeyboardShortcutGroup> p0,
    Menu p1,
    int p2
)
@NonNull Uri
void
void
void
void
void
boolean
boolean
void
void

This method is deprecated. Deprecated in Java

void
void
void
boolean
boolean
void
void

This method is deprecated. Deprecated in Java

void
void
@Nullable ActionMode
@Nullable ActionMode
void
void
void
overrideActivityTransition(int p0, int p1, int p2)
void
overrideActivityTransition(int p0, int p1, int p2, int p3)
void
overridePendingTransition(int p0, int p1)

This method is deprecated. Deprecated in Java

void
overridePendingTransition(int p0, int p1, int p2)

This method is deprecated. Deprecated in Java

void
void
void
void
void
void
boolean
final void
removeDialog(int p0)

This method is deprecated. Deprecated in Java

@NonNull DragAndDropPermissions
void
final void
requestPermissions(@NonNull String[] p0, int p1)
final void
boolean

This method is deprecated. Deprecated in Java

final boolean
final @NonNull T
<T extends View> requireViewById(int p0)
final void
void
void
final void
void
void
final void
final void
setFeatureDrawableAlpha(int p0, int p1)
final void
setFeatureDrawableResource(int p0, int p1)
final void
void
void
setImmersive(boolean p0)
void
void
void
final void
void
final void
setProgress(int p0)

This method is deprecated. Deprecated in Java

final void

This method is deprecated. Deprecated in Java

final void

This method is deprecated. Deprecated in Java

final void

This method is deprecated. Deprecated in Java

void
void
final void
setResult(int p0)
final void
setResult(int p0, @NonNull Intent p1)
final void

This method is deprecated. Deprecated in Java

void
void
setShowWhenLocked(boolean p0)
void
void
setTheme(int p0)
void
void
setTitle(int p0)
void
setTitleColor(int p0)

This method is deprecated. Deprecated in Java

boolean
setTranslucent(boolean p0)
void
setTurnScreenOn(boolean p0)
void
setVisible(boolean p0)
final void
void
boolean
boolean
boolean
boolean
final void
showDialog(int p0)

This method is deprecated. Deprecated in Java

final boolean
showDialog(int p0, @NonNull Bundle p1)

This method is deprecated. Deprecated in Java

void
@Nullable ActionMode
@Nullable ActionMode
void
startActivities(@NonNull Intent[] p0)
void
startActivities(@NonNull Intent[] p0, @Nullable Bundle p1)
void
void
void

This method is deprecated. Deprecated in Java

void
startActivityFromChild(
    @NonNull Activity p0,
    @NonNull Intent p1,
    int p2,
    @Nullable Bundle p3
)

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
startActivityFromFragment(
    @NonNull Fragment p0,
    @NonNull Intent p1,
    int p2,
    @Nullable Bundle p3
)

This method is deprecated. Deprecated in Java

boolean
boolean
void
startIntentSender(
    @NonNull IntentSender p0,
    @Nullable Intent p1,
    int p2,
    int p3,
    int p4
)
void
startIntentSender(
    @NonNull IntentSender p0,
    @Nullable Intent p1,
    int p2,
    int p3,
    int p4,
    @Nullable Bundle p5
)
void
startIntentSenderFromChild(
    @NonNull Activity p0,
    @NonNull IntentSender p1,
    int p2,
    @NonNull Intent p3,
    int p4,
    int p5,
    int p6
)

This method is deprecated. Deprecated in Java

void
startIntentSenderFromChild(
    @NonNull Activity p0,
    @NonNull IntentSender p1,
    int p2,
    @NonNull Intent p3,
    int p4,
    int p5,
    int p6,
    @Nullable Bundle p7
)

This method is deprecated. Deprecated in Java

void
void
void

This method is deprecated. Deprecated in Java

boolean
boolean
void
void
startSearch(@Nullable String p0, boolean p1, @Nullable Bundle p2, boolean p3)
void
void
void

This method is deprecated. Deprecated in Java

void
takeKeyEvents(boolean p0)
void
void
void
void
void
From androidx.activity.ComponentActivity
void
void

Adds the given MenuProvider to this MenuHost.

void
addMenuProvider(
    @NonNull MenuProvider provider,
    @NonNull LifecycleOwner owner
)

Adds the given MenuProvider to this MenuHost.

void
addMenuProvider(
    @NonNull MenuProvider provider,
    @NonNull LifecycleOwner owner,
    @NonNull Lifecycle.State state
)

Adds the given MenuProvider to this MenuHost once the given LifecycleOwner reaches the given Lifecycle.State.

final void

Add a new listener that will get a callback associated with ComponentCallbacks.onConfigurationChanged with the new Configuration.

final void

{@inheritDoc}

final void

Add a new listener that will get a callback associated with Activity.onMultiWindowModeChanged with the new MultiWindowModeChangedInfo.

final void

Add a new listener that will get a callback associated with Activity.onNewIntent with the new Intent.

final void

Add a new listener that will get a callback associated with Activity.onPictureInPictureModeChanged with the new PictureInPictureModeChangedInfo.

final void

Add a new listener that will get a callback associated with ComponentCallbacks2.onTrimMemory with the int representing the level of trimming.

final void

Add a new listener that will get a callback associated with Activity.onUserLeaveHint

final @NonNull ActivityResultRegistry

Get the ActivityResultRegistry associated with this activity.

@NonNull CreationExtras

{@inheritDoc}

@NonNull ViewModelProvider.Factory
@NonNull FullyDrawnReporter

Retrieve the FullyDrawnReporter that should handle the independent parts of the UI that separately report that they are fully drawn.

Object

This method is deprecated. Use a {@link androidx.lifecycle.ViewModel} to store non config state.

@NonNull Lifecycle

{@inheritDoc}

final @NonNull OnBackPressedDispatcher

Retrieve the OnBackPressedDispatcher that will be triggered when onBackPressed is called.

final @NonNull SavedStateRegistry
@NonNull ViewModelStore

Returns the ViewModelStore associated with this activity

void

Sets the view tree owners before setting the content view so that the inflation process and attach listeners will see them already present.

void

Invalidates the android.view.Menu to ensure that what is displayed matches the current internal state of the menu.

void
@CallSuper
onActivityResult(int requestCode, int resultCode, Intent data)

This method is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

void

This method is deprecated. This method has been deprecated in favor of using the {@link OnBackPressedDispatcher} via {@link #getOnBackPressedDispatcher()}.

void

{@inheritDoc}

boolean
onCreatePanelMenu(int featureId, @NonNull Menu menu)
boolean
onMenuItemSelected(int featureId, @NonNull MenuItem item)
void
@CallSuper
onMultiWindowModeChanged(boolean isInMultiWindowMode)

This method is deprecated. Deprecated in android.app.Activity

void
@RequiresApi(api = 26)
@CallSuper
onMultiWindowModeChanged(
    boolean isInMultiWindowMode,
    @NonNull Configuration newConfig
)

{@inheritDoc}

void

{@inheritDoc}

void
onPanelClosed(int featureId, @NonNull Menu menu)
void
@CallSuper
onPictureInPictureModeChanged(boolean isInPictureInPictureMode)

This method is deprecated. Deprecated in android.app.Activity

void
@RequiresApi(api = 26)
@CallSuper
onPictureInPictureModeChanged(
    boolean isInPictureInPictureMode,
    @NonNull Configuration newConfig
)

{@inheritDoc}

boolean
onPreparePanel(int featureId, View view, @NonNull Menu menu)
void
@CallSuper
onRequestPermissionsResult(
    int requestCode,
    @NonNull String[] permissions,
    @NonNull int[] grantResults
)

This method is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

Object

This method is deprecated. Use a {@link androidx.lifecycle.ViewModel} to store non config state.

final Object

Retain all appropriate non-config state.

void
void

{@inheritDoc}

void

{@inheritDoc}

Context

Get the Context if it is currently available.

final @NonNull ActivityResultLauncher<@NonNull I>
<I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull ActivityResultCallback<@NonNull O> callback
)

Register a request to start an activity for result, designated by the given contract.

final @NonNull ActivityResultLauncher<@NonNull I>
<I extends Object, O extends Object> registerForActivityResult(
    @NonNull ActivityResultContract<@NonNull I, @NonNull O> contract,
    @NonNull ActivityResultRegistry registry,
    @NonNull ActivityResultCallback<@NonNull O> callback
)

Register a request to start an activity for result, designated by the given contract.

void

Removes the given MenuProvider from this MenuHost.

final void

Remove a previously added listener.

final void

Remove a OnContextAvailableListener previously added via addOnContextAvailableListener.

final void

Remove a previously added listener.

final void

Remove a previously added listener.

final void

Remove a previously added listener.

final void

Remove a previously added listener.

final void

Remove a previously added listener.

void
void
setContentView(@LayoutRes int layoutResID)
void
void
void
startActivityForResult(@NonNull Intent intent, int requestCode)

This method is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

void
startActivityForResult(
    @NonNull Intent intent,
    int requestCode,
    Bundle options
)

This method is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

void
startIntentSenderForResult(
    @NonNull IntentSender intent,
    int requestCode,
    Intent fillInIntent,
    int flagsMask,
    int flagsValues,
    int extraFlags
)

This method is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

void
startIntentSenderForResult(
    @NonNull IntentSender intent,
    int requestCode,
    Intent fillInIntent,
    int flagsMask,
    int flagsValues,
    int extraFlags,
    Bundle options
)

This method is deprecated. This method has been deprecated in favor of using the Activity Result API which brings increased type safety via an {@link ActivityResultContract} and the prebuilt contracts for common intents available in {@link androidx.activity.result.contract.ActivityResultContracts}, provides hooks for testing, and allow receiving results in separate, testable classes independent from your activity.

From android.content.Context
boolean
final int
getColor(int p0)
final @NonNull ColorStateList
final @Nullable Drawable
getDrawable(int p0)
final @NonNull String
getString(int p0)
final @NonNull String
getString(int p0, @NonNull Object p1)
final @NonNull T
<T extends Object> getSystemService(@NonNull Class<@NonNull T> p0)
final @NonNull CharSequence
getText(int p0)
final @NonNull TypedArray
final @NonNull TypedArray
final @NonNull TypedArray
obtainStyledAttributes(int p0, @NonNull int[] p1)
final @NonNull TypedArray
obtainStyledAttributes(
    @Nullable AttributeSet p0,
    @NonNull int[] p1,
    int p2,
    int p3
)
void
void
sendBroadcastWithMultiplePermissions(
    @NonNull Intent p0,
    @NonNull String[] p1
)
From android.view.ContextThemeWrapper
From android.content.ContextWrapper
boolean
bindIsolatedService(
    @NonNull Intent p0,
    int p1,
    @NonNull String p2,
    @NonNull Executor p3,
    @NonNull ServiceConnection p4
)
boolean
boolean
boolean
boolean
bindService(
    @NonNull Intent p0,
    int p1,
    @NonNull Executor p2,
    @NonNull ServiceConnection p3
)
boolean
boolean
bindServiceAsUser(
    @NonNull Intent p0,
    @NonNull ServiceConnection p1,
    int p2,
    @NonNull UserHandle p3
)
int
int
@NonNull int[]
int
int
@NonNull int[]
int
checkPermission(@NonNull String p0, int p1, int p2)
int
int
checkUriPermission(@NonNull Uri p0, int p1, int p2, int p3)
int
checkUriPermission(
    @Nullable Uri p0,
    @Nullable String p1,
    @Nullable String p2,
    int p3,
    int p4,
    int p5
)
@NonNull int[]
checkUriPermissions(@NonNull List<@NonNull Uri> p0, int p1, int p2, int p3)
void

This method is deprecated. Deprecated in Java

@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull Context
@NonNull String[]
boolean
boolean
boolean
void
void
enforceCallingOrSelfUriPermission(
    @NonNull Uri p0,
    int p1,
    @NonNull String p2
)
void
void
void
enforcePermission(@NonNull String p0, int p1, int p2, @Nullable String p3)
void
enforceUriPermission(
    @NonNull Uri p0,
    int p1,
    int p2,
    int p3,
    @NonNull String p4
)
void
enforceUriPermission(
    @Nullable Uri p0,
    @Nullable String p1,
    @Nullable String p2,
    int p3,
    int p4,
    int p5,
    @Nullable String p6
)
@NonNull String[]
@NonNull Context
@NonNull ApplicationInfo
@NonNull AttributionSource
@Nullable String
@NonNull Context
@NonNull File
@NonNull ClassLoader
@NonNull File
@NonNull ContentResolver
@NonNull File
@NonNull File
int
@NonNull File
getDir(@NonNull String p0, int p1)
@Nullable Display
@Nullable File
@NonNull File[]
@Nullable File
@NonNull File[]
@NonNull File[]
@NonNull File
@NonNull File
@NonNull Executor
@NonNull Looper
@NonNull File
@NonNull File
@NonNull File[]
@NonNull String
@NonNull String
@NonNull PackageManager
@NonNull String
@NonNull String
@Nullable ContextParams
@NonNull SharedPreferences
String
@NonNull Drawable

This method is deprecated. Deprecated in Java

int

This method is deprecated. Deprecated in Java

int

This method is deprecated. Deprecated in Java

void
boolean
boolean
boolean
boolean
boolean
@NonNull FileInputStream
@NonNull FileOutputStream
openFileOutput(@NonNull String p0, int p1)
@NonNull SQLiteDatabase
openOrCreateDatabase(
    @NonNull String p0,
    int p1,
    @NonNull SQLiteDatabase.CursorFactory p2
)
@NonNull SQLiteDatabase
@NonNull Drawable

This method is deprecated. Deprecated in Java

void
Intent
Intent
registerReceiver(
    @Nullable BroadcastReceiver p0,
    @NonNull IntentFilter p1,
    int p2
)
Intent
registerReceiver(
    @Nullable BroadcastReceiver p0,
    @NonNull IntentFilter p1,
    @Nullable String p2,
    @Nullable Handler p3
)
Intent
registerReceiver(
    @Nullable BroadcastReceiver p0,
    @NonNull IntentFilter p1,
    @Nullable String p2,
    @Nullable Handler p3,
    int p4
)
void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
void
void
void
void
void
void
void
void
void
sendOrderedBroadcast(
    @NonNull Intent p0,
    @Nullable String p1,
    @Nullable Bundle p2
)
void
sendOrderedBroadcast(
    @NonNull Intent p0,
    @Nullable String p1,
    @Nullable BroadcastReceiver p2,
    @Nullable Handler p3,
    int p4,
    @Nullable String p5,
    @Nullable Bundle p6
)
void
sendOrderedBroadcast(
    @NonNull Intent p0,
    @Nullable String p1,
    @Nullable Bundle p2,
    @Nullable BroadcastReceiver p3,
    @Nullable Handler p4,
    int p5,
    @Nullable String p6,
    @Nullable Bundle p7
)
void
sendOrderedBroadcast(
    @NonNull Intent p0,
    @Nullable String p1,
    @Nullable String p2,
    @Nullable BroadcastReceiver p3,
    @Nullable Handler p4,
    int p5,
    @Nullable String p6,
    @Nullable Bundle p7
)
void
sendOrderedBroadcast(
    @NonNull Intent p0,
    int p1,
    @Nullable String p2,
    @Nullable String p3,
    @Nullable BroadcastReceiver p4,
    @Nullable Handler p5,
    @Nullable String p6,
    @Nullable Bundle p7,
    @Nullable Bundle p8
)
void
sendOrderedBroadcastAsUser(
    @NonNull Intent p0,
    @NonNull UserHandle p1,
    @Nullable String p2,
    @Nullable BroadcastReceiver p3,
    @Nullable Handler p4,
    int p5,
    @Nullable String p6,
    @Nullable Bundle p7
)
void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void
sendStickyOrderedBroadcast(
    @NonNull Intent p0,
    @Nullable BroadcastReceiver p1,
    @Nullable Handler p2,
    int p3,
    @Nullable String p4,
    @Nullable Bundle p5
)

This method is deprecated. Deprecated in Java

void
sendStickyOrderedBroadcastAsUser(
    @NonNull Intent p0,
    @NonNull UserHandle p1,
    @Nullable BroadcastReceiver p2,
    @Nullable Handler p3,
    int p4,
    @Nullable String p5,
    @Nullable Bundle p6
)

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

void

This method is deprecated. Deprecated in Java

@Nullable ComponentName
boolean
startInstrumentation(
    @NonNull ComponentName p0,
    @Nullable String p1,
    @Nullable Bundle p2
)
@Nullable ComponentName
boolean
void
void
void
void
updateServiceGroup(@NonNull ServiceConnection p0, int p1, int p2)
From android.view.Window.Callback
void

Public constructors

SdkActivity

Added in 1.0.0-alpha15
public SdkActivity()

Protected methods

onCreate

protected void onCreate(Bundle savedInstanceState)

{@inheritDoc}

If your ComponentActivity is annotated with ContentView, this will call setContentView for you.