IntentService.OnHandleIntent(Intent) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method is invoked on the worker thread with a request to process.
[Android.Runtime.Register("onHandleIntent", "(Landroid/content/Intent;)V", "GetOnHandleIntent_Landroid_content_Intent_Handler")]
protected abstract void OnHandleIntent(Android.Content.Intent? intent);
[<Android.Runtime.Register("onHandleIntent", "(Landroid/content/Intent;)V", "GetOnHandleIntent_Landroid_content_Intent_Handler")>]
abstract member OnHandleIntent : Android.Content.Intent -> unit
Parameters
- intent
- Intent
Intent: The value passed to android.content.Context.startService(Intent). This may be null if the service is being restarted after its process has gone away; see Service.onStartCommand(Intent, int, int) for details.
- Attributes
Remarks
This method is invoked on the worker thread with a request to process. Only one Intent is processed at a time, but the processing happens on a worker thread that runs independently from other application logic. So, if this code takes a long time, it will hold up other requests to the same IntentService, but it will not hold up anything else. When all requests have been handled, the IntentService stops itself, so you should not call Service.stopSelf(). This method may take several seconds to complete, so it should only be called from a worker thread.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-03 UTC.
Android reference for android.app.IntentService.onHandleIntent.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.