# JobIntentService

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/JobIntentService.java+class:androidx.core.app.JobIntentService) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

*** ** * ** ***


```
public abstract class JobIntentService extends Service
```

<br />

|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||||
| ↳ | [android.content.Context](https://developer.android.com/reference/android/content/Context.html) ||||
|   | ↳ | [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) |||
|   |   | ↳ | [android.app.Service](https://developer.android.com/reference/android/app/Service.html) ||
|   |   |   | ↳ | [androidx.core.app.JobIntentService](https://developer.android.com/reference/androidx/core/app/JobIntentService) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> This class has been deprecated in favor of the Android Jetpack [WorkManager](https://developer.android.com/topic/libraries/architecture/workmanager) library, which makes it easy to schedule deferrable, asynchronous tasks that are expected to run even if the app exits or the device restarts.

Helper for processing work that has been enqueued for a job/service. When running on `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O` or later, the work will be dispatched as a job via `https://developer.android.com/reference/android/app/job/JobScheduler.html#enqueue(android.app.job.JobInfo, android.app.job.JobWorkItem)`. When running on older versions of the platform, it will use `https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)`.

You must publish your subclass in your manifest for the system to interact with. This should be published as a `https://developer.android.com/reference/android/app/job/JobService.html`, as described for that class, since on O and later platforms it will be executed that way.

Use `https://developer.android.com/reference/androidx/core/app/JobIntentService#enqueueWork(android.content.Context,java.lang.Class<?>,int,android.content.Intent)` to enqueue new work to be dispatched to and handled by your service. It will be executed in `https://developer.android.com/reference/androidx/core/app/JobIntentService#onHandleWork(android.content.Intent)`.

You do not need to use when using this class. When running on `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O`, the JobScheduler will take care of wake locks for you (holding a wake lock from the time you enqueue work until the job has been dispatched and while it is running). When running on previous versions of the platform, this wake lock handling is emulated in the class here by directly calling the PowerManager; this means the application must request the `https://developer.android.com/reference/android/Manifest.permission.html#WAKE_LOCK` permission.

There are a few important differences in behavior when running on `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O` or later as a Job vs. pre-O:

- When running as a pre-O service, the act of enqueueing work will generally start the service immediately, regardless of whether the device is dozing or in other conditions. When running as a Job, it will be subject to standard JobScheduler policies for a Job with a `https://developer.android.com/reference/android/app/job/JobInfo.Builder.html#setOverrideDeadline(long)` of 0: the job will not run while the device is dozing, it may get delayed more than a service if the device is under strong memory pressure with lots of demand to run jobs.

- When running as a pre-O service, the normal service execution semantics apply: the service can run indefinitely, though the longer it runs the more likely the system will be to outright kill its process, and under memory pressure one should expect the process to be killed even of recently started services. When running as a Job, the typical `https://developer.android.com/reference/android/app/job/JobService.html` execution time limit will apply, after which the job will be stopped (cleanly, not by killing the process) and rescheduled to continue its execution later. Job are generally not killed when the system is under memory pressure, since the number of concurrent jobs is adjusted based on the memory state of the device.

Here is an example implementation of this class:

```java
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.SystemClock;
import android.util.Log;
import android.widget.Toast;

import androidx.core.app.JobIntentService;

import org.jspecify.annotations.NonNull;

/**
 * Example implementation of a JobIntentService.
 */
public class SimpleJobIntentService extends JobIntentService {
    /**
     * Unique job ID for this service.
     */
    static final int JOB_ID = 1000;

    /**
     * Convenience method for enqueuing work in to this service.
     */
    static void enqueueWork(Context context, Intent work) {
        enqueueWork(context, SimpleJobIntentService.class, JOB_ID, work);
    }

    @Override
    protected void onHandleWork(@NonNull Intent intent) {
        // We have received work to do.  The system or framework is already
        // holding a wake lock for us at this point, so we can just go.
        Log.i("SimpleJobIntentService", "Executing work: " + intent);
        String label = intent.getStringExtra("label");
        if (label == null) {
            label = intent.toString();
        }
        toast("Executing: " + label);
        for (int i = 0; i < 5; i++) {
            Log.i("SimpleJobIntentService", "Running service " + (i + 1)
                    + "/5 @ " + SystemClock.elapsedRealtime());
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
            }
        }
        Log.i("SimpleJobIntentService", "Completed service @ " + SystemClock.elapsedRealtime());
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        toast("All work complete");
    }

    @SuppressWarnings("deprecation")
    final Handler mHandler = new Handler();

    // Helper for showing tests
    void toast(final CharSequence text) {
        mHandler.post(new Runnable() {
            @Override public void run() {
                Toast.makeText(SimpleJobIntentService.this, text, Toast.LENGTH_SHORT).show();
            }
        });
    }
}
```

## Summary

| ### Public constructors |
|---|
| `[JobIntentService](https://developer.android.com/reference/androidx/core/app/JobIntentService#JobIntentService())()` **This method is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `static void` | `[enqueueWork](https://developer.android.com/reference/androidx/core/app/JobIntentService#enqueueWork(android.content.Context,java.lang.Class<?>,int,android.content.Intent))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> cls, int jobId, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Intent.html work )` **This method is deprecated.** Deprecated in Java |
| `static void` | `[enqueueWork](https://developer.android.com/reference/androidx/core/app/JobIntentService#enqueueWork(android.content.Context,android.content.ComponentName,int,android.content.Intent))( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/ComponentName.html component, int jobId, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Intent.html work )` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[isStopped](https://developer.android.com/reference/androidx/core/app/JobIntentService#isStopped())()` **This method is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/android/os/IBinder.html` | `[onBind](https://developer.android.com/reference/androidx/core/app/JobIntentService#onBind(android.content.Intent))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Intent.html intent)` **This method is deprecated.** Deprecated in Java |
| `void` | `[onCreate](https://developer.android.com/reference/androidx/core/app/JobIntentService#onCreate())()` **This method is deprecated.** Deprecated in Java |
| `void` | `[onDestroy](https://developer.android.com/reference/androidx/core/app/JobIntentService#onDestroy())()` **This method is deprecated.** Deprecated in Java |
| `int` | `[onStartCommand](https://developer.android.com/reference/androidx/core/app/JobIntentService#onStartCommand(android.content.Intent,int,int))(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/Intent.html intent, int flags, int startId)` **This method is deprecated.** Deprecated in Java |
| `boolean` | `[onStopCurrentWork](https://developer.android.com/reference/androidx/core/app/JobIntentService#onStopCurrentWork())()` **This method is deprecated.** Deprecated in Java |
| `void` | `[setInterruptIfStopped](https://developer.android.com/reference/androidx/core/app/JobIntentService#setInterruptIfStopped(boolean))(boolean interruptIfStopped)` **This method is deprecated.** Deprecated in Java |

| ### Protected methods |
|---|---|
| `abstract void` | `[onHandleWork](https://developer.android.com/reference/androidx/core/app/JobIntentService#onHandleWork(android.content.Intent))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Intent.html intent)` **This method is deprecated.** Deprecated in Java |

### Inherited Constants

From [android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html) `static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND = 40`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_COMPLETE = 80`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_MODERATE = 60`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_CRITICAL = 15`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_LOW = 10`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE = 5`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN = 20`

**This field is deprecated.** Deprecated in Java
From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ACCESSIBILITY_SERVICE = "accessibility"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ACCOUNT_SERVICE = "account"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ACTIVITY_SERVICE = "activity"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ADVANCED_PROTECTION_SERVICE = "advanced_protection"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ALARM_SERVICE = "alarm"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#APPWIDGET_SERVICE = "appwidget"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#APP_FUNCTION_SERVICE = "app_function"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#APP_OPS_SERVICE = "appops"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#APP_SEARCH_SERVICE = "app_search"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#AUDIO_SERVICE = "audio"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#AUTOFILL_SERVICE = "autofill"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BATTERY_SERVICE = "batterymanager"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_ABOVE_CLIENT = 8`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_ADJUST_WITH_ACTIVITY = 128`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_ALLOW_ACTIVITY_STARTS = 512`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_ALLOW_OOM_MANAGEMENT = 16`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_AUTO_CREATE = 1`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_DEBUG_UNBIND = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_EXTERNAL_SERVICE = -2147483648`

**This field is deprecated.** Deprecated in Java
`static final long` `https://developer.android.com/reference/android/content/Context.html#BIND_EXTERNAL_SERVICE_LONG = 4611686018427387904`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_IMPORTANT = 64`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_INCLUDE_CAPABILITIES = 4096`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_NOT_FOREGROUND = 4`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_NOT_PERCEPTIBLE = 256`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_PACKAGE_ISOLATED_PROCESS = 16384`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_SHARED_ISOLATED_PROCESS = 8192`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#BIND_WAIVE_PRIORITY = 32`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BIOMETRIC_SERVICE = "biometric"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BLOB_STORE_SERVICE = "blob_store"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BLUETOOTH_SERVICE = "bluetooth"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#BUGREPORT_SERVICE = "bugreport"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CAMERA_SERVICE = "camera"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CAPTIONING_SERVICE = "captioning"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CARRIER_CONFIG_SERVICE = "carrier_config"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CHOOSER_SERVICE = "chooser"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CLIPBOARD_SERVICE = "clipboard"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#COMPANION_DEVICE_SERVICE = "companiondevice"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CONNECTIVITY_DIAGNOSTICS_SERVICE = "connectivity_diagnostics"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CONNECTIVITY_SERVICE = "connectivity"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CONSUMER_IR_SERVICE = "consumer_ir"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CONTACT_KEYS_SERVICE = "contact_keys"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_IGNORE_SECURITY = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_INCLUDE_CODE = 1`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#CONTEXT_RESTRICTED = 4`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CREDENTIAL_SERVICE = "credential"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#CROSS_PROFILE_APPS_SERVICE = "crossprofileapps"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#DEVICE_ID_DEFAULT = 0`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#DEVICE_ID_INVALID = -1`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DEVICE_LOCK_SERVICE = "device_lock"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DEVICE_POLICY_SERVICE = "device_policy"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DISPLAY_HASH_SERVICE = "display_hash"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DISPLAY_SERVICE = "display"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DOMAIN_VERIFICATION_SERVICE = "domain_verification"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DOWNLOAD_SERVICE = "download"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#DROPBOX_SERVICE = "dropbox"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#EUICC_SERVICE = "euicc"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#FILE_INTEGRITY_SERVICE = "file_integrity"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#FILE_SERVICE = "file"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#GAME_SERVICE = "game"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#GRAMMATICAL_INFLECTION_SERVICE = "grammatical_inflection"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#HARDWARE_PROPERTIES_SERVICE = "hardware_properties"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#HEALTHCONNECT_SERVICE = "healthconnect"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#INPUT_METHOD_SERVICE = "input_method"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#INPUT_SERVICE = "input"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#IPSEC_SERVICE = "ipsec"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#JOB_SCHEDULER_SERVICE = "jobscheduler"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#KEYGUARD_SERVICE = "keyguard"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#KEYSTORE_SERVICE = "keystore"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#LAUNCHER_APPS_SERVICE = "launcherapps"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#LAYOUT_INFLATER_SERVICE = "layout_inflater"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#LOCALE_SERVICE = "locale"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#LOCATION_SERVICE = "location"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_COMMUNICATION_SERVICE = "media_communication"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_METRICS_SERVICE = "media_metrics"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_PROJECTION_SERVICE = "media_projection"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_QUALITY_SERVICE = "media_quality"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_ROUTER_SERVICE = "media_router"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MEDIA_SESSION_SERVICE = "media_session"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#MIDI_SERVICE = "midi"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_APPEND = 32768`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_ENABLE_WRITE_AHEAD_LOGGING = 8`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_MULTI_PROCESS = 4`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_NO_LOCALIZED_COLLATORS = 16`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_PRIVATE = 0`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE = 1`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_WRITEABLE = 2`

**This field is deprecated.**
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NETWORK_STATS_SERVICE = "netstats"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NFC_SERVICE = "nfc"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NOTIFICATION_SERVICE = "notification"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NPU_SERVICE = "npu"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#NSD_SERVICE = "servicediscovery"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#OVERLAY_SERVICE = "overlay"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PCC_SANDBOX_SERVICE = "pcc_sandbox"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PEOPLE_SERVICE = "people"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PERFORMANCE_HINT_SERVICE = "performance_hint"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#POWER_SERVICE = "power"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PRINT_SERVICE = "print"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#PROFILING_SERVICE = "profiling"`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_EXPORTED = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_NOT_EXPORTED = 4`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/content/Context.html#RECEIVER_VISIBLE_TO_INSTANT_APPS = 1`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#RESTRICTIONS_SERVICE = "restrictions"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#ROLE_SERVICE = "role"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SATELLITE_SERVICE = "satellite"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SEARCH_SERVICE = "search"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SECURITY_STATE_SERVICE = "security_state"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SENSOR_SERVICE = "sensor"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SERIAL_SERVICE = "serial"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SHORTCUT_SERVICE = "shortcut"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#STATUS_BAR_SERVICE = "statusbar"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#STORAGE_SERVICE = "storage"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#STORAGE_STATS_SERVICE = "storagestats"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#SYSTEM_HEALTH_SERVICE = "systemhealth"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELECOM_SERVICE = "telecom"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_IMS_SERVICE = "telephony_ims"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_PHONE_NUMBER_SERVICE = "telephony_phone_number"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_SERVICE = "phone"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TELEPHONY_SUBSCRIPTION_SERVICE = "telephony_subscription_service"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TETHERING_SERVICE = "tethering"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TEXT_CLASSIFICATION_SERVICE = "textclassification"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TEXT_SERVICES_MANAGER_SERVICE = "textservices"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TV_AD_SERVICE = "tv_ad"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TV_INPUT_SERVICE = "tv_input"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#TV_INTERACTIVE_APP_SERVICE = "tv_interactive_app"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#UI_MODE_SERVICE = "uimode"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#USAGE_STATS_SERVICE = "usagestats"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#USB_SERVICE = "usb"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#USER_SERVICE = "user"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#VIBRATOR_MANAGER_SERVICE = "vibrator_manager"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#VIBRATOR_SERVICE = "vibrator"`

**This field is deprecated.**
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#VIRTUAL_DEVICE_SERVICE = "virtualdevice"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#VPN_MANAGEMENT_SERVICE = "vpn_management"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WALLPAPER_SERVICE = "wallpaper"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WEB_APP_SERVICE = "web_app"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WIFI_AWARE_SERVICE = "wifiaware"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WIFI_P2P_SERVICE = "wifip2p"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WIFI_RTT_RANGING_SERVICE = "wifirtt"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WIFI_SERVICE = "wifi"`

**This field is deprecated.** Deprecated in Java
`static final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/content/Context.html#WINDOW_SERVICE = "window"`

**This field is deprecated.** Deprecated in Java
From [android.app.Service](https://developer.android.com/reference/android/app/Service.html) `static final int` `https://developer.android.com/reference/android/app/Service.html#START_CONTINUATION_MASK = 15`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_FLAG_REDELIVERY = 1`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_FLAG_RETRY = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_NOT_STICKY = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_REDELIVER_INTENT = 3`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_STICKY = 1`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#START_STICKY_COMPATIBILITY = 0`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#STOP_FOREGROUND_DETACH = 2`

**This field is deprecated.** Deprecated in Java
`static final int` `https://developer.android.com/reference/android/app/Service.html#STOP_FOREGROUND_LEGACY = 0`

**This field is deprecated.**
`static final int` `https://developer.android.com/reference/android/app/Service.html#STOP_FOREGROUND_REMOVE = 1`

**This field is deprecated.** Deprecated in Java

### Inherited methods

From [android.content.Context](https://developer.android.com/reference/android/content/Context.html) `final int` `[getColor](https://developer.android.com/reference/android/content/Context.html#getColor(int))(int id)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/android/content/res/ColorStateList.html` `[getColorStateList](https://developer.android.com/reference/android/content/Context.html#getColorStateList(int))(int id)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[getDrawable](https://developer.android.com/reference/android/content/Context.html#getDrawable(int))(int id)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/java/lang/String.html` `[getString](https://developer.android.com/reference/android/content/Context.html#getString(int))(int resId)`

**This method is deprecated.** Deprecated in Java
`final T` `<T> [getSystemService](https://developer.android.com/reference/android/content/Context.html#getSystemService(java.lang.Class&lt;T&gt;))(https://developer.android.com/reference/java/lang/Class.html<T> serviceClass)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/java/lang/CharSequence.html` `[getText](https://developer.android.com/reference/android/content/Context.html#getText(int))(int resId)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.BindServiceFlags.html` `[getUpdateableFlags](https://developer.android.com/reference/android/content/Context.html#getUpdateableFlags())()`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/android/content/res/TypedArray.html` `[obtainStyledAttributes](https://developer.android.com/reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[]))(https://developer.android.com/reference/android/util/AttributeSet.html set, int[] attrs)`

**This method is deprecated.** Deprecated in Java
`void` `[revokeSelfPermissionOnKill](https://developer.android.com/reference/android/content/Context.html#revokeSelfPermissionOnKill(java.lang.String))(https://developer.android.com/reference/java/lang/String.html permName)`

**This method is deprecated.** Deprecated in Java
`void` `[sendBroadcastWithMultiplePermissions](https://developer.android.com/reference/android/content/Context.html#sendBroadcastWithMultiplePermissions(android.content.Intent, java.lang.String[]))(
https://developer.android.com/reference/android/content/Intent.html intent,
String[] receiverPermissions
)`

**This method is deprecated.** Deprecated in Java
From [android.content.ContextWrapper](https://developer.android.com/reference/android/content/ContextWrapper.html) `boolean` `[bindIsolatedService](https://developer.android.com/reference/android/content/ContextWrapper.html#bindIsolatedService(android.content.Intent, int, java.lang.String, java.util.concurrent.Executor, android.content.ServiceConnection))(
https://developer.android.com/reference/android/content/Intent.html service,
int flags,
https://developer.android.com/reference/java/lang/String.html instanceName,
https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
https://developer.android.com/reference/android/content/ServiceConnection.html conn
)`

**This method is deprecated.** Deprecated in Java
`boolean` `[bindService](https://developer.android.com/reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.Context.BindServiceFlags, java.util.concurrent.Executor, android.content.ServiceConnection))(
https://developer.android.com/reference/android/content/Intent.html service,
https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,
https://developer.android.com/reference/java/util/concurrent/Executor.html executor,
https://developer.android.com/reference/android/content/ServiceConnection.html conn
)`

**This method is deprecated.** Deprecated in Java
`boolean` `[bindServiceAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#bindServiceAsUser(android.content.Intent, android.content.ServiceConnection, android.content.Context.BindServiceFlags, android.os.UserHandle))(
https://developer.android.com/reference/android/content/Intent.html service,
https://developer.android.com/reference/android/content/ServiceConnection.html conn,
https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags,
https://developer.android.com/reference/android/os/UserHandle.html user
)`

**This method is deprecated.** Deprecated in Java
`int` `[checkCallingOrSelfPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfPermission(java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission)`

**This method is deprecated.** Deprecated in Java
`int` `[checkCallingOrSelfUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermission(android.net.Uri, int))(https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int[]` `[checkCallingOrSelfUriPermissions](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermissions(java.util.List&lt;android.net.Uri&gt;, int))(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/net/Uri.html> uris, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int` `[checkCallingPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingPermission(java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission)`

**This method is deprecated.** Deprecated in Java
`int` `[checkCallingUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermission(android.net.Uri, int))(https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int[]` `[checkCallingUriPermissions](https://developer.android.com/reference/android/content/ContextWrapper.html#checkCallingUriPermissions(java.util.List&lt;android.net.Uri&gt;, int))(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/net/Uri.html> uris, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int` `[checkContentUriPermissionFull](https://developer.android.com/reference/android/content/ContextWrapper.html#checkContentUriPermissionFull(android.net.Uri, int, int, int))(https://developer.android.com/reference/android/net/Uri.html uri, int pid, int uid, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int` `[checkPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkPermission(java.lang.String, int, int))(https://developer.android.com/reference/java/lang/String.html permission, int pid, int uid)`

**This method is deprecated.** Deprecated in Java
`int` `[checkSelfPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkSelfPermission(java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission)`

**This method is deprecated.** Deprecated in Java
`int` `[checkUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, int, int, int))(https://developer.android.com/reference/android/net/Uri.html uri, int pid, int uid, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`int[]` `[checkUriPermissions](https://developer.android.com/reference/android/content/ContextWrapper.html#checkUriPermissions(java.util.List&lt;android.net.Uri&gt;, int, int, int))(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/android/net/Uri.html> uris, int pid, int uid, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`void` `[clearWallpaper](https://developer.android.com/reference/android/content/ContextWrapper.html#clearWallpaper())()`

**This method is deprecated.**
`https://developer.android.com/reference/android/content/Context.html` `[createAttributionContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createAttributionContext(java.lang.String))(https://developer.android.com/reference/java/lang/String.html attributionTag)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createConfigurationContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createConfigurationContext(android.content.res.Configuration))(https://developer.android.com/reference/android/content/res/Configuration.html overrideConfiguration)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createContext(android.content.ContextParams))(https://developer.android.com/reference/android/content/ContextParams.html contextParams)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createContextForSplit](https://developer.android.com/reference/android/content/ContextWrapper.html#createContextForSplit(java.lang.String))(https://developer.android.com/reference/java/lang/String.html splitName)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createDeviceContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createDeviceContext(int))(int deviceId)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createDeviceProtectedStorageContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createDeviceProtectedStorageContext())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createDisplayContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createDisplayContext(android.view.Display))(https://developer.android.com/reference/android/view/Display.html display)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createPackageContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createPackageContext(java.lang.String, int))(https://developer.android.com/reference/java/lang/String.html packageName, int flags)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[createWindowContext](https://developer.android.com/reference/android/content/ContextWrapper.html#createWindowContext(android.view.Display, int, android.os.Bundle))(https://developer.android.com/reference/android/view/Display.html display, int type, https://developer.android.com/reference/android/os/Bundle.html options)`

**This method is deprecated.** Deprecated in Java
`String[]` `[databaseList](https://developer.android.com/reference/android/content/ContextWrapper.html#databaseList())()`

**This method is deprecated.** Deprecated in Java
`boolean` `[deleteDatabase](https://developer.android.com/reference/android/content/ContextWrapper.html#deleteDatabase(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`boolean` `[deleteFile](https://developer.android.com/reference/android/content/ContextWrapper.html#deleteFile(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`boolean` `[deleteSharedPreferences](https://developer.android.com/reference/android/content/ContextWrapper.html#deleteSharedPreferences(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`void` `[enforceCallingOrSelfPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfPermission(java.lang.String, java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission, https://developer.android.com/reference/java/lang/String.html message)`

**This method is deprecated.** Deprecated in Java
`void` `[enforceCallingOrSelfUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String))(
https://developer.android.com/reference/android/net/Uri.html uri,
int modeFlags,
https://developer.android.com/reference/java/lang/String.html message
)`

**This method is deprecated.** Deprecated in Java
`void` `[enforceCallingPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingPermission(java.lang.String, java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission, https://developer.android.com/reference/java/lang/String.html message)`

**This method is deprecated.** Deprecated in Java
`void` `[enforceCallingUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforceCallingUriPermission(android.net.Uri, int, java.lang.String))(https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags, https://developer.android.com/reference/java/lang/String.html message)`

**This method is deprecated.** Deprecated in Java
`void` `[enforcePermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforcePermission(java.lang.String, int, int, java.lang.String))(https://developer.android.com/reference/java/lang/String.html permission, int pid, int uid, https://developer.android.com/reference/java/lang/String.html message)`

**This method is deprecated.** Deprecated in Java
`void` `[enforceUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, int, int, int, java.lang.String))(
https://developer.android.com/reference/android/net/Uri.html uri,
int pid,
int uid,
int modeFlags,
https://developer.android.com/reference/java/lang/String.html message
)`

**This method is deprecated.** Deprecated in Java
`String[]` `[fileList](https://developer.android.com/reference/android/content/ContextWrapper.html#fileList())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[getApplicationContext](https://developer.android.com/reference/android/content/ContextWrapper.html#getApplicationContext())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/pm/ApplicationInfo.html` `[getApplicationInfo](https://developer.android.com/reference/android/content/ContextWrapper.html#getApplicationInfo())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/res/AssetManager.html` `[getAssets](https://developer.android.com/reference/android/content/ContextWrapper.html#getAssets())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/AttributionSource.html` `[getAttributionSource](https://developer.android.com/reference/android/content/ContextWrapper.html#getAttributionSource())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/String.html` `[getAttributionTag](https://developer.android.com/reference/android/content/ContextWrapper.html#getAttributionTag())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Context.html` `[getBaseContext](https://developer.android.com/reference/android/content/ContextWrapper.html#getBaseContext())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getCacheDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getCacheDir())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/ClassLoader.html` `[getClassLoader](https://developer.android.com/reference/android/content/ContextWrapper.html#getClassLoader())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getCodeCacheDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getCodeCacheDir())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/ContentResolver.html` `[getContentResolver](https://developer.android.com/reference/android/content/ContextWrapper.html#getContentResolver())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getDataDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getDataDir())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getDatabasePath](https://developer.android.com/reference/android/content/ContextWrapper.html#getDatabasePath(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`int` `[getDeviceId](https://developer.android.com/reference/android/content/ContextWrapper.html#getDeviceId())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getDir(java.lang.String, int))(https://developer.android.com/reference/java/lang/String.html name, int mode)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/view/Display.html` `[getDisplay](https://developer.android.com/reference/android/content/ContextWrapper.html#getDisplay())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getExternalCacheDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalCacheDir())()`

**This method is deprecated.** Deprecated in Java
`File[]` `[getExternalCacheDirs](https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalCacheDirs())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getExternalFilesDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDir(java.lang.String))(https://developer.android.com/reference/java/lang/String.html type)`

**This method is deprecated.** Deprecated in Java
`File[]` `[getExternalFilesDirs](https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalFilesDirs(java.lang.String))(https://developer.android.com/reference/java/lang/String.html type)`

**This method is deprecated.** Deprecated in Java
`File[]` `[getExternalMediaDirs](https://developer.android.com/reference/android/content/ContextWrapper.html#getExternalMediaDirs())()`

**This method is deprecated.**
`https://developer.android.com/reference/java/io/File.html` `[getFileStreamPath](https://developer.android.com/reference/android/content/ContextWrapper.html#getFileStreamPath(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getFilesDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getFilesDir())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/util/concurrent/Executor.html` `[getMainExecutor](https://developer.android.com/reference/android/content/ContextWrapper.html#getMainExecutor())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/os/Looper.html` `[getMainLooper](https://developer.android.com/reference/android/content/ContextWrapper.html#getMainLooper())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getNoBackupFilesDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getNoBackupFilesDir())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/File.html` `[getObbDir](https://developer.android.com/reference/android/content/ContextWrapper.html#getObbDir())()`

**This method is deprecated.** Deprecated in Java
`File[]` `[getObbDirs](https://developer.android.com/reference/android/content/ContextWrapper.html#getObbDirs())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/String.html` `[getOpPackageName](https://developer.android.com/reference/android/content/ContextWrapper.html#getOpPackageName())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/String.html` `[getPackageCodePath](https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageCodePath())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/pm/PackageManager.html` `[getPackageManager](https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageManager())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/String.html` `[getPackageName](https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageName())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/String.html` `[getPackageResourcePath](https://developer.android.com/reference/android/content/ContextWrapper.html#getPackageResourcePath())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/ContextParams.html` `[getParams](https://developer.android.com/reference/android/content/ContextWrapper.html#getParams())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/res/Resources.html` `[getResources](https://developer.android.com/reference/android/content/ContextWrapper.html#getResources())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/SharedPreferences.html` `[getSharedPreferences](https://developer.android.com/reference/android/content/ContextWrapper.html#getSharedPreferences(java.lang.String, int))(https://developer.android.com/reference/java/lang/String.html name, int mode)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/Object.html` `[getSystemService](https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemService(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/lang/String.html` `[getSystemServiceName](https://developer.android.com/reference/android/content/ContextWrapper.html#getSystemServiceName(java.lang.Class&lt;?&gt;))(https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> serviceClass)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/res/Resources.Theme.html` `[getTheme](https://developer.android.com/reference/android/content/ContextWrapper.html#getTheme())()`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[getWallpaper](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaper())()`

**This method is deprecated.**
`int` `[getWallpaperDesiredMinimumHeight](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumHeight())()`

**This method is deprecated.**
`int` `[getWallpaperDesiredMinimumWidth](https://developer.android.com/reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumWidth())()`

**This method is deprecated.**
`void` `[grantUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#grantUriPermission(java.lang.String, android.net.Uri, int))(https://developer.android.com/reference/java/lang/String.html toPackage, https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`boolean` `[isDeviceProtectedStorage](https://developer.android.com/reference/android/content/ContextWrapper.html#isDeviceProtectedStorage())()`

**This method is deprecated.** Deprecated in Java
`boolean` `[isRestricted](https://developer.android.com/reference/android/content/ContextWrapper.html#isRestricted())()`

**This method is deprecated.** Deprecated in Java
`boolean` `[isUiContext](https://developer.android.com/reference/android/content/ContextWrapper.html#isUiContext())()`

**This method is deprecated.** Deprecated in Java
`boolean` `[moveDatabaseFrom](https://developer.android.com/reference/android/content/ContextWrapper.html#moveDatabaseFrom(android.content.Context, java.lang.String))(https://developer.android.com/reference/android/content/Context.html sourceContext, https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`boolean` `[moveSharedPreferencesFrom](https://developer.android.com/reference/android/content/ContextWrapper.html#moveSharedPreferencesFrom(android.content.Context, java.lang.String))(https://developer.android.com/reference/android/content/Context.html sourceContext, https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/FileInputStream.html` `[openFileInput](https://developer.android.com/reference/android/content/ContextWrapper.html#openFileInput(java.lang.String))(https://developer.android.com/reference/java/lang/String.html name)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/java/io/FileOutputStream.html` `[openFileOutput](https://developer.android.com/reference/android/content/ContextWrapper.html#openFileOutput(java.lang.String, int))(https://developer.android.com/reference/java/lang/String.html name, int mode)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html` `[openOrCreateDatabase](https://developer.android.com/reference/android/content/ContextWrapper.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory))(
https://developer.android.com/reference/java/lang/String.html name,
int mode,
https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html factory
)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `[peekWallpaper](https://developer.android.com/reference/android/content/ContextWrapper.html#peekWallpaper())()`

**This method is deprecated.**
`void` `[rebindService](https://developer.android.com/reference/android/content/ContextWrapper.html#rebindService(android.content.ServiceConnection, android.content.Context.BindServiceFlags))(https://developer.android.com/reference/android/content/ServiceConnection.html conn, https://developer.android.com/reference/android/content/Context.BindServiceFlags.html flags)`

**This method is deprecated.** Deprecated in Java
`void` `[registerComponentCallbacks](https://developer.android.com/reference/android/content/ContextWrapper.html#registerComponentCallbacks(android.content.ComponentCallbacks))(https://developer.android.com/reference/android/content/ComponentCallbacks.html callback)`

**This method is deprecated.** Deprecated in Java
`void` `[registerDeviceIdChangeListener](https://developer.android.com/reference/android/content/ContextWrapper.html#registerDeviceIdChangeListener(java.util.concurrent.Executor, java.util.function.IntConsumer))(https://developer.android.com/reference/java/util/concurrent/Executor.html executor, https://developer.android.com/reference/java/util/function/IntConsumer.html listener)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/Intent.html` `[registerReceiver](https://developer.android.com/reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter))(https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver, https://developer.android.com/reference/android/content/IntentFilter.html filter)`

**This method is deprecated.** Deprecated in Java
`void` `[removeStickyBroadcast](https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcast(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.**
`void` `[removeStickyBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle))(https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/UserHandle.html user)`

**This method is deprecated.**
`void` `[revokeSelfPermissionsOnKill](https://developer.android.com/reference/android/content/ContextWrapper.html#revokeSelfPermissionsOnKill(java.util.Collection&lt;java.lang.String&gt;))(https://developer.android.com/reference/java/util/Collection.html<https://developer.android.com/reference/java/lang/String.html> permissions)`

**This method is deprecated.** Deprecated in Java
`void` `[revokeUriPermission](https://developer.android.com/reference/android/content/ContextWrapper.html#revokeUriPermission(android.net.Uri, int))(https://developer.android.com/reference/android/net/Uri.html uri, int modeFlags)`

**This method is deprecated.** Deprecated in Java
`void` `[sendBroadcast](https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.** Deprecated in Java
`void` `[sendBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle))(https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/UserHandle.html user)`

**This method is deprecated.** Deprecated in Java
`void` `[sendOrderedBroadcast](https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, int, java.lang.String, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, java.lang.String, android.os.Bundle, android.os.Bundle))(
https://developer.android.com/reference/android/content/Intent.html intent,
int initialCode,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/java/lang/String.html receiverAppOp,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras,
https://developer.android.com/reference/android/os/Bundle.html options
)`

**This method is deprecated.** Deprecated in Java
`void` `[sendOrderedBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle))(
https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/android/os/UserHandle.html user,
https://developer.android.com/reference/java/lang/String.html receiverPermission,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)`

**This method is deprecated.** Deprecated in Java
`void` `[sendStickyBroadcast](https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcast(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.**
`void` `[sendStickyBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle))(https://developer.android.com/reference/android/content/Intent.html intent, https://developer.android.com/reference/android/os/UserHandle.html user)`

**This method is deprecated.**
`void` `[sendStickyOrderedBroadcast](https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle))(
https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)`

**This method is deprecated.**
`void` `[sendStickyOrderedBroadcastAsUser](https://developer.android.com/reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle))(
https://developer.android.com/reference/android/content/Intent.html intent,
https://developer.android.com/reference/android/os/UserHandle.html user,
https://developer.android.com/reference/android/content/BroadcastReceiver.html resultReceiver,
https://developer.android.com/reference/android/os/Handler.html scheduler,
int initialCode,
https://developer.android.com/reference/java/lang/String.html initialData,
https://developer.android.com/reference/android/os/Bundle.html initialExtras
)`

**This method is deprecated.**
`void` `[setTheme](https://developer.android.com/reference/android/content/ContextWrapper.html#setTheme(int))(int resid)`

**This method is deprecated.** Deprecated in Java
`void` `[setWallpaper](https://developer.android.com/reference/android/content/ContextWrapper.html#setWallpaper(android.graphics.Bitmap))(https://developer.android.com/reference/android/graphics/Bitmap.html bitmap)`

**This method is deprecated.**
`void` `[startActivities](https://developer.android.com/reference/android/content/ContextWrapper.html#startActivities(android.content.Intent[]))(Intent[] intents)`

**This method is deprecated.** Deprecated in Java
`void` `[startActivity](https://developer.android.com/reference/android/content/ContextWrapper.html#startActivity(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/ComponentName.html` `[startForegroundService](https://developer.android.com/reference/android/content/ContextWrapper.html#startForegroundService(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html service)`

**This method is deprecated.** Deprecated in Java
`boolean` `[startInstrumentation](https://developer.android.com/reference/android/content/ContextWrapper.html#startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle))(
https://developer.android.com/reference/android/content/ComponentName.html className,
https://developer.android.com/reference/java/lang/String.html profileFile,
https://developer.android.com/reference/android/os/Bundle.html arguments
)`

**This method is deprecated.** Deprecated in Java
`void` `[startIntentSender](https://developer.android.com/reference/android/content/ContextWrapper.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int))(
https://developer.android.com/reference/android/content/IntentSender.html intent,
https://developer.android.com/reference/android/content/Intent.html fillInIntent,
int flagsMask,
int flagsValues,
int extraFlags
)`

**This method is deprecated.** Deprecated in Java
`https://developer.android.com/reference/android/content/ComponentName.html` `[startService](https://developer.android.com/reference/android/content/ContextWrapper.html#startService(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html service)`

**This method is deprecated.** Deprecated in Java
`boolean` `[stopService](https://developer.android.com/reference/android/content/ContextWrapper.html#stopService(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html name)`

**This method is deprecated.** Deprecated in Java
`void` `[unbindService](https://developer.android.com/reference/android/content/ContextWrapper.html#unbindService(android.content.ServiceConnection))(https://developer.android.com/reference/android/content/ServiceConnection.html conn)`

**This method is deprecated.** Deprecated in Java
`void` `[unregisterComponentCallbacks](https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterComponentCallbacks(android.content.ComponentCallbacks))(https://developer.android.com/reference/android/content/ComponentCallbacks.html callback)`

**This method is deprecated.** Deprecated in Java
`void` `[unregisterDeviceIdChangeListener](https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterDeviceIdChangeListener(java.util.function.IntConsumer))(https://developer.android.com/reference/java/util/function/IntConsumer.html listener)`

**This method is deprecated.** Deprecated in Java
`void` `[unregisterReceiver](https://developer.android.com/reference/android/content/ContextWrapper.html#unregisterReceiver(android.content.BroadcastReceiver))(https://developer.android.com/reference/android/content/BroadcastReceiver.html receiver)`

**This method is deprecated.** Deprecated in Java
`void` `[updateServiceBindings](https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceBindings(java.util.Collection&lt;android.content.Context.UpdateBindingParams&gt;))(https://developer.android.com/reference/java/util/Collection.html<https://developer.android.com/reference/android/content/Context.UpdateBindingParams.html> params)`

**This method is deprecated.** Deprecated in Java
`void` `[updateServiceGroup](https://developer.android.com/reference/android/content/ContextWrapper.html#updateServiceGroup(android.content.ServiceConnection, int, int))(https://developer.android.com/reference/android/content/ServiceConnection.html conn, int group, int importance)`

**This method is deprecated.** Deprecated in Java
From [android.app.Service](https://developer.android.com/reference/android/app/Service.html) `void` `[attachBaseContext](https://developer.android.com/reference/android/app/Service.html#attachBaseContext(android.content.Context))(https://developer.android.com/reference/android/content/Context.html newBase)`

**This method is deprecated.** Deprecated in Java
`void` `[dump](https://developer.android.com/reference/android/app/Service.html#dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]))(https://developer.android.com/reference/java/io/FileDescriptor.html fd, https://developer.android.com/reference/java/io/PrintWriter.html writer, String[] args)`

**This method is deprecated.** Deprecated in Java
`final https://developer.android.com/reference/android/app/Application.html` `[getApplication](https://developer.android.com/reference/android/app/Service.html#getApplication())()`

**This method is deprecated.** Deprecated in Java
`final int` `[getForegroundServiceType](https://developer.android.com/reference/android/app/Service.html#getForegroundServiceType())()`

**This method is deprecated.** Deprecated in Java
`void` `[onConfigurationChanged](https://developer.android.com/reference/android/app/Service.html#onConfigurationChanged(android.content.res.Configuration))(https://developer.android.com/reference/android/content/res/Configuration.html newConfig)`

**This method is deprecated.** Deprecated in Java
`void` `[onLowMemory](https://developer.android.com/reference/android/app/Service.html#onLowMemory())()`

**This method is deprecated.**
`void` `[onRebind](https://developer.android.com/reference/android/app/Service.html#onRebind(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.** Deprecated in Java
`void` `[onStart](https://developer.android.com/reference/android/app/Service.html#onStart(android.content.Intent, int))(https://developer.android.com/reference/android/content/Intent.html intent, int startId)`

**This method is deprecated.**
`void` `[onTaskRemoved](https://developer.android.com/reference/android/app/Service.html#onTaskRemoved(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html rootIntent)`

**This method is deprecated.** Deprecated in Java
`void` `[onTimeout](https://developer.android.com/reference/android/app/Service.html#onTimeout(int))(int startId)`

**This method is deprecated.** Deprecated in Java
`void` `[onTrimMemory](https://developer.android.com/reference/android/app/Service.html#onTrimMemory(int))(int level)`

**This method is deprecated.** Deprecated in Java
`boolean` `[onUnbind](https://developer.android.com/reference/android/app/Service.html#onUnbind(android.content.Intent))(https://developer.android.com/reference/android/content/Intent.html intent)`

**This method is deprecated.** Deprecated in Java
`final void` `[startForeground](https://developer.android.com/reference/android/app/Service.html#startForeground(int, android.app.Notification))(int id, https://developer.android.com/reference/android/app/Notification.html notification)`

**This method is deprecated.** Deprecated in Java
`final void` `[stopForeground](https://developer.android.com/reference/android/app/Service.html#stopForeground(boolean))(boolean removeNotification)`

**This method is deprecated.**
`final void` `[stopSelf](https://developer.android.com/reference/android/app/Service.html#stopSelf())()`

**This method is deprecated.** Deprecated in Java
`final boolean` `[stopSelfResult](https://developer.android.com/reference/android/app/Service.html#stopSelfResult(int))(int startId)`

**This method is deprecated.** Deprecated in Java

## Public constructors

### JobIntentService

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

```
public [JobIntentService](https://developer.android.com/reference/androidx/core/app/JobIntentService#JobIntentService())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Default empty constructor.

## Public methods

### enqueueWork

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

```
public static void [enqueueWork](https://developer.android.com/reference/androidx/core/app/JobIntentService#enqueueWork(android.content.Context,java.lang.Class<?>,int,android.content.Intent))(
    @NonNull Context context,
    @NonNull Class<@NonNull ?> cls,
    int jobId,
    @NonNull Intent work
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Call this to enqueue work for your subclass of `https://developer.android.com/reference/androidx/core/app/JobIntentService`. This will either directly start the service (when running on pre-O platforms) or enqueue work for it as a job (when running on O and later). In either case, a wake lock will be held for you to ensure you continue running. The work you enqueue will ultimately appear at `https://developer.android.com/reference/androidx/core/app/JobIntentService#onHandleWork(android.content.Intent)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context` | Context this is being called from. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?> cls` | The concrete class the work should be dispatched to (this is the class that is published in your manifest). |
| `int jobId` | A unique job ID for scheduling; must be the same value for all work enqueued for the same class. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Intent.html work` | The Intent of work to enqueue. |

### enqueueWork

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

```
public static void [enqueueWork](https://developer.android.com/reference/androidx/core/app/JobIntentService#enqueueWork(android.content.Context,android.content.ComponentName,int,android.content.Intent))(
    @NonNull Context context,
    @NonNull ComponentName component,
    int jobId,
    @NonNull Intent work
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Like `https://developer.android.com/reference/androidx/core/app/JobIntentService#enqueueWork(android.content.Context,java.lang.Class<?>,int,android.content.Intent)`, but supplies a ComponentName for the service to interact with instead of its class.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context` | Context this is being called from. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/ComponentName.html component` | The published ComponentName of the class this work should be dispatched to. |
| `int jobId` | A unique job ID for scheduling; must be the same value for all work enqueued for the same class. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Intent.html work` | The Intent of work to enqueue. |

### isStopped

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

```
public boolean [isStopped](https://developer.android.com/reference/androidx/core/app/JobIntentService#isStopped())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns true if `https://developer.android.com/reference/androidx/core/app/JobIntentService#onStopCurrentWork()` has been called. You can use this, while executing your work, to see if it should be stopped.

### onBind

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

```
public IBinder [onBind](https://developer.android.com/reference/androidx/core/app/JobIntentService#onBind(android.content.Intent))(@NonNull Intent intent)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Returns the IBinder for the `https://developer.android.com/reference/android/app/job/JobServiceEngine.html` when running as a JobService on O and later platforms.

### onCreate

```
public void [onCreate](https://developer.android.com/reference/androidx/core/app/JobIntentService#onCreate())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onDestroy

```
public void [onDestroy](https://developer.android.com/reference/androidx/core/app/JobIntentService#onDestroy())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

### onStartCommand

```
public int [onStartCommand](https://developer.android.com/reference/androidx/core/app/JobIntentService#onStartCommand(android.content.Intent,int,int))(@Nullable Intent intent, int flags, int startId)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Processes start commands when running as a pre-O service, enqueueing them to be later dispatched in `https://developer.android.com/reference/androidx/core/app/JobIntentService#onHandleWork(android.content.Intent)`.

### onStopCurrentWork

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

```
public boolean [onStopCurrentWork](https://developer.android.com/reference/androidx/core/app/JobIntentService#onStopCurrentWork())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

This will be called if the JobScheduler has decided to stop this job. The job for this service does not have any constraints specified, so this will only generally happen if the service exceeds the job's maximum execution time.

| Returns |
|---|---|
| `boolean` | True to indicate to the JobManager whether you'd like to reschedule this work, false to drop this and all following work. Regardless of the value returned, your service must stop executing or the system will ultimately kill it. The default implementation returns true, and that is most likely what you want to return as well (so no work gets lost). |

### setInterruptIfStopped

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

```
public void [setInterruptIfStopped](https://developer.android.com/reference/androidx/core/app/JobIntentService#setInterruptIfStopped(boolean))(boolean interruptIfStopped)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Control whether code executing in `https://developer.android.com/reference/androidx/core/app/JobIntentService#onHandleWork(android.content.Intent)` will be interrupted if the job is stopped. By default this is false. If called and set to true, any time `https://developer.android.com/reference/androidx/core/app/JobIntentService#onStopCurrentWork()` is called, the class will first call `https://developer.android.com/reference/android/os/AsyncTask.html#cancel(boolean)` to interrupt the running task.

| Parameters |
|---|---|
| `boolean interruptIfStopped` | Set to true to allow the system to interrupt actively running work. |

## Protected methods

### onHandleWork

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/core#1.6.0)

```
protected abstract void [onHandleWork](https://developer.android.com/reference/androidx/core/app/JobIntentService#onHandleWork(android.content.Intent))(@NonNull Intent intent)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called serially for each work dispatched to and processed by the service. This method is called on a background thread, so you can do long blocking operations here. Upon returning, that work will be considered complete and either the next pending work dispatched here or the overall service destroyed now that it has nothing else to do.

Be aware that when running as a job, you are limited by the maximum job execution time and any single or total sequential items of work that exceeds that limit will cause the service to be stopped while in progress and later restarted with the last unfinished work. (There is currently no limit on execution duration when running as a pre-O plain Service.)

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Intent.html intent` | The intent describing the work to now be processed. |