public class

ActivityCompat

extends ActivityCompat

 java.lang.Object

androidx.core.content.ContextCompat

androidx.core.app.ActivityCompat

↳androidx.legacy.app.ActivityCompat

Gradle dependencies

compile group: 'androidx.legacy', name: 'legacy-support-v13', version: '1.0.0'

  • groupId: androidx.legacy
  • artifactId: legacy-support-v13
  • version: 1.0.0

Artifact androidx.legacy:legacy-support-v13:1.0.0 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.legacy:legacy-support-v13 com.android.support:support-v13

Androidx class mapping:

androidx.legacy.app.ActivityCompat android.support.v13.app.ActivityCompat

Overview

Helper for accessing features in in a backwards compatible fashion.

Summary

Fields
from ContextCompatRECEIVER_EXPORTED, RECEIVER_NOT_EXPORTED, RECEIVER_VISIBLE_TO_INSTANT_APPS
Constructors
protectedActivityCompat()

This class should not be instantiated, but the constructor must be visible for the class to be extended.

Methods
from ActivityCompatfinishAffinity, finishAfterTransition, getPermissionCompatDelegate, getReferrer, invalidateOptionsMenu, isLaunchedFromBubble, postponeEnterTransition, recreate, requestDragAndDropPermissions, requestPermissions, requireViewById, setEnterSharedElementCallback, setExitSharedElementCallback, setLocusContext, setPermissionCompatDelegate, shouldShowRequestPermissionRationale, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition
from ContextCompatcheckSelfPermission, createAttributionContext, createDeviceProtectedStorageContext, getAttributionTag, getCodeCacheDir, getColor, getColorStateList, getContextForLanguage, getDataDir, getDisplayOrDefault, getDrawable, getExternalCacheDirs, getExternalFilesDirs, getMainExecutor, getNoBackupFilesDir, getObbDirs, getString, getSystemService, getSystemServiceName, isDeviceProtectedStorage, registerReceiver, registerReceiver, startActivities, startActivities, startActivity, startForegroundService
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

protected ActivityCompat()

Deprecated: Use androidx.core.app.ActivityCompat.

This class should not be instantiated, but the constructor must be visible for the class to be extended.

Source

/*
 * Copyright (C) 2011 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.legacy.app;

/**
 * Helper for accessing features in {@link android.app.Activity} in a backwards compatible fashion.
 *
 * @deprecated Use {@link androidx.core.app.ActivityCompat
 * androidx.core.app.ActivityCompat}.
 */
@Deprecated
public class ActivityCompat extends androidx.core.app.ActivityCompat {
    /**
     * This class should not be instantiated, but the constructor must be
     * visible for the class to be extended.
     *
     * @deprecated Use {@link androidx.core.app.ActivityCompat
     * androidx.core.app.ActivityCompat}.
     */
    @Deprecated
    protected ActivityCompat() {
        // Not publicly instantiable, but may be extended.
    }
}