ConnectionService Class
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.
An abstract service that should be implemented by any apps which either: <ol> <li>Can make phone calls (VoIP or otherwise) and want those calls to be integrated into the built-in phone app.
[Android.Runtime.Register("android/telecom/ConnectionService", ApiSince=23, DoNotGenerateAcw=true)]
public abstract class ConnectionService : Android.App.Service
[<Android.Runtime.Register("android/telecom/ConnectionService", ApiSince=23, DoNotGenerateAcw=true)>]
type ConnectionService = class
inherit Service
- Inheritance
- Attributes
Remarks
An abstract service that should be implemented by any apps which either: <ol> <li>Can make phone calls (VoIP or otherwise) and want those calls to be integrated into the built-in phone app. Referred to as a <b>system managed</b> ConnectionService.</li> <li>Are a standalone calling app and don't want their calls to be integrated into the built-in phone app. Referred to as a <b>self managed</b> ConnectionService.</li> </ol> Once implemented, the ConnectionService needs to take the following steps so that Telecom will bind to it:
1. Registration in AndroidManifest.xml<br/>
<service android:name="com.example.package.MyConnectionService"
android:label="@string/some_label_for_my_connection_service"
android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE">
<intent-filter>
<action android:name="android.telecom.ConnectionService" />
</intent-filter>
</service>
2. Registration of PhoneAccount with TelecomManager.<br/> See PhoneAccount and TelecomManager#registerPhoneAccount for more information.
System managed ConnectionServices must be enabled by the user in the phone app settings before Telecom will bind to them. Self-managed ConnectionServices must declare the android.Manifest.permission#MANAGE_OWN_CALLS permission in their manifest before Telecom will bind to them.
Once registered and enabled by the user in the phone app settings or granted permission, telecom will bind to a ConnectionService implementation when it wants that ConnectionService to place a call or the service has indicated that is has an incoming call through TelecomManager#addNewIncomingCall(PhoneAccountHandle, Bundle). The ConnectionService can then expect a call to #onCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest) or #onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest) wherein it should provide a new instance of a Connection object. It is through this Connection object that telecom receives state updates and the ConnectionService receives call-commands such as answer, reject, hold and disconnect.
When there are no more live calls, telecom will unbind from the ConnectionService.
<h1>Self-Managed Connection Services</h1> A VoIP app can implement a ConnectionService to ensure that its calls are integrated into the Android platform. There are numerous benefits to using the Telecom APIs for a VoIP app: <ul> <li>Call concurrency is handled - the user is able to swap between calls in different apps and on the mobile network.</li> <li>Simplified audio routing - the platform provides your app with a unified list of the audio routes which are available (e.g. android.telecom.Connection#onAvailableCallEndpointsChanged(List)) and a standardized way to switch audio routes (e.g. android.telecom.Connection#requestCallEndpointChange(CallEndpoint, Executor, OutcomeReceiver) ).</li> <li>Bluetooth integration - your calls will be visible on and controllable via bluetooth devices (e.g. car head units and headsets).</li> <li>Companion device integration - wearable devices such as watches which implement an InCallService can optionally subscribe to see self-managed calls. Similar to a bluetooth headunit, wearables will typically render your call using a generic call UX and provide the user with basic call controls such as hangup, answer, reject.</li> <li>Automotive calling experiences - Android supports automotive optimized experiences which provides a means for calls to be controlled and viewed in an automobile; these experiences are capable of leveraging call metadata provided by your app.</li> </ul> <h2>Registering a Phone Account</h2> Before your app can handle incoming or outgoing calls through Telecom it needs to register a PhoneAccount with Telecom indicating to the platform that your app is capable of calling.
Your app should create a new instance of PhoneAccount which meets the following requirements: <ul> <li>Has PhoneAccount#CAPABILITY_SELF_MANAGED (set using PhoneAccount.Builder#setCapabilities(int)). This indicates to Telecom that your app will report calls but that it provides a primary UI for the calls by itself.</li> <li>Provide a unique identifier for the PhoneAccount via the PhoneAccountHandle#getId() attribute. As per the PhoneAccountHandle documentation, you should NOT use an identifier which contains PII or other sensitive information. A typical choice is a UUID.</li> </ul> Your app should register the new PhoneAccount with Telecom using TelecomManager#registerPhoneAccount(PhoneAccount). PhoneAccounts persist across reboot. You can use TelecomManager#getOwnSelfManagedPhoneAccounts() to confirm the PhoneAccount you registered. Your app should generally only register a single PhoneAccount.
<h2>Implementing ConnectionService</h2> Your app uses TelecomManager#placeCall(Uri, Bundle) to start new outgoing calls and TelecomManager#addNewIncomingCall(PhoneAccountHandle, Bundle) to report new incoming calls. Calling these APIs causes the Telecom stack to bind to your app's ConnectionService implementation. Telecom will either inform your app that it cannot handle a call request at the current time (i.e. there could be an ongoing emergency call, which means your app is not allowed to handle calls at the current time), or it will ask your app to create a new instance of Connection to represent a call in your app.
Your app should implement the following ConnectionService methods: <ul> <li>ConnectionService#onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest) - called by Telecom to ask your app to make a new Connection to represent an outgoing call your app requested via TelecomManager#placeCall(Uri, Bundle).</li> <li><ConnectionService#onCreateOutgoingConnectionFailed(PhoneAccountHandle, ConnectionRequest) - called by Telecom to inform your app that a call it reported via TelecomManager#placeCall(Uri, Bundle) cannot be handled at this time. Your app should NOT place a call at the current time.</li> <li>ConnectionService#onCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest) - called by Telecom to ask your app to make a new Connection to represent an incoming call your app reported via TelecomManager#addNewIncomingCall(PhoneAccountHandle, Bundle).</li> <li>ConnectionService#onCreateIncomingConnectionFailed(PhoneAccountHandle, ConnectionRequest) - called by Telecom to inform your app that an incoming call it reported via TelecomManager#addNewIncomingCall(PhoneAccountHandle, Bundle) cannot be handled at this time. Your app should NOT post a new incoming call notification and should silently reject the call.</li> </ul>
<h2>Implementing a Connection</h2> Your app should extend the Connection class to represent calls in your app. When you create new instances of your Connection, you should ensure the following properties are set on the new Connection instance returned by your ConnectionService: <ul> <li>Connection#setAddress(Uri, int) - the identifier for the other party. For apps that user phone numbers the Uri can be a PhoneAccount#SCHEME_TEL URI representing the phone number.</li> <li>Connection#setCallerDisplayName(String, int) - the display name of the other party. This is what will be shown on Bluetooth devices and other calling surfaces such as wearable devices. This is particularly important for calls that do not use a phone number to identify the caller or called party.</li> <li>Connection#setConnectionProperties(int) - ensure you set Connection#PROPERTY_SELF_MANAGED to identify to the platform that the call is handled by your app.</li> <li>Connection#setConnectionCapabilities(int) - if your app supports making calls inactive (i.e. holding calls) you should get Connection#CAPABILITY_SUPPORT_HOLD and Connection#CAPABILITY_HOLD to indicate to the platform that you calls can potentially be held for concurrent calling scenarios.</li> <li>Connection#setAudioModeIsVoip(boolean) - set to true to ensure that the platform knows your call is a VoIP call.</li> <li>For newly created Connection instances, do NOT change the state of your call using Connection#setActive(), Connection#setOnHold() until the call is added to Telecom (ie you have returned it via ConnectionService#onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest) or ConnectionService#onCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest)). </li> </ul>
<h2>How to Place Outgoing Calls</h2> When your app wants to place an outgoing call it calls TelecomManager#placeCall(Uri, Bundle). You should specify a Uri to identify who the call is being placed to, and specify the PhoneAccountHandle associated with the PhoneAccount you registered for your app using TelecomManager#EXTRA_PHONE_ACCOUNT_HANDLE in the Bundle parameter.
Telecom will bind to your app's ConnectionService implementation and call either: <ul> <li>ConnectionService#onCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest) - the ConnectionRequest#getAddress() will match the address you specified when placing the call. You should return a new instance of your app's Connection class to represent the outgoing call.</li> <li>ConnectionService#onCreateOutgoingConnectionFailed(PhoneAccountHandle, ConnectionRequest) - your app should not place the call at this time; the call should be cancelled and the user informed that the call cannot be placed.</li> </ul>
New outgoing calls will start in a Connection#STATE_DIALING state. This state indicates that your app is in the process of connecting the call to the other party.
Once the other party answers the call (or it is set up successfully), your app should call Connection#setActive() to inform Telecom that the call is now active.
<h2>How to Add Incoming Calls</h2> When your app receives an incoming call, it should call TelecomManager#addNewIncomingCall(PhoneAccountHandle, Bundle). Set the PhoneAccountHandle parameter to the PhoneAccountHandle associated with your app's PhoneAccount.
Telecom will bind to your app's ConnectionService implementation and call either: <ul> <li>ConnectionService#onCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest) - You should return a new instance of your app's Connection class to represent the incoming call.</li> <li>ConnectionService#onCreateIncomingConnectionFailed(PhoneAccountHandle, ConnectionRequest) - your app should not receive the call at this time; the call should be rejected silently; the user may be informed of a missed call.</li> </ul>
New incoming calls will start with a Connection#STATE_RINGING state. This state indicates that your app has a new incoming call pending. Telecom will NOT play a ringtone or post a notification for your app. It is up to your app to post an incoming call notification with an associated ringtone. Telecom will call Connection#onShowIncomingCallUi() on the Connection when your app can post its incoming call notification. See Connection#onShowIncomingCallUi() the docs for more information on how to post the notification.
Your incoming call notification (or full screen UI) will typically have an "answer" and "decline" action which the user chooses. When your app receives the "answer" or "decline" android.app.PendingIntent, you should must call either Connection#setActive() to inform Telecom that the call was answered, or Connection#setDisconnected(DisconnectCause) to inform Telecom that the call was rejected. If the call was rejected, supply an instance of DisconnectCause with DisconnectCause#REJECTED, and then call Connection#destroy().
In addition to handling requests to answer or decline the call via notification actions, your app should also be implement the Connection#onAnswer(int) and Connection#onAnswer() methods on the Connection. These will be raised if the user answers your call via a Bluetooth device or another device like a wearable or automotive calling UX. In response, your app should call Connection#setActive() to inform Telecom that the call was answered.
Additionally, your app should implement Connection#onReject() to handle requests to reject the call which are raised via Bluetooth or other calling surfaces. Your app should call Connection#setDisconnected(DisconnectCause) and supply an instance of DisconnectCause with DisconnectCause#REJECTED in this case.
<h2>Ending Calls</h2> When an ongoing active call (incoming or outgoing) has ended, your app is responsible for informing Telecom that the call ended.
Your app calls: <ul> <li>Connection#setDisconnected(DisconnectCause) - this informs Telecom that the call has terminated. You should provide a new instance of DisconnectCause with either DisconnectCause#LOCAL or DisconnectCause#REMOTE to indicate where the call disconnection took place. DisconnectCause#LOCAL indicates that the call terminated in your app on the current device (i.e. via user action), where DisconnectCause#REMOTE indicates that the call terminates on the remote device.</li> <li>Connection#destroy() - this informs Telecom that your call instance can be cleaned up. You should always call this when you are finished with a call.</li> </ul>
Similar to answering incoming calls, requests to disconnect your call may originate from outside your app. You can handle these by implementing Connection#onDisconnect(). Your app should call Connection#setDisconnected(DisconnectCause) with an instance of DisconnectCause and reason DisconnectCause#LOCAL to indicate to Telecom that your app has disconnected the call as requested based on the user's request.
<h2>Holding and Unholding Calls</h2> When your app specifies Connection#CAPABILITY_SUPPORT_HOLD and Connection#CAPABILITY_HOLD on your Connection instance, it is telling Telecom that your calls can be placed into a suspended, or "held" state if required. If your app supports holding its calls, it will be possible for the user to switch between calls in your app and holdable calls in another app or on the mobile network. If your app does not support holding its calls, you may receive a request to disconnect the call from Telecom if the user opts to answer an incoming call in another app or on the mobile network; this ensures that the user can only be in one call at a time.
Your app is free to change a call between the held and active state using Connection#setOnHold() and Connection#setActive().
Your app may receive a request from Telecom to hold or unhold a call via Connection#onHold() and Connection#onUnhold(). Telecom can ask your app to hold or unhold its Connection either if the user requests this action through another calling surface such as Bluetooth, or if the user answers or switches to a call in a different app or on the mobile network.
When your app receives an Connection#onHold() it must call Connection#setOnHold() to inform Telecom that the call has been held successfully.
When your app receives an Connection#onUnhold() it must call Connection#setActive() to inform Telecom that the call has been resumed successfully.
Java documentation for android.telecom.ConnectionService.
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.
Constructors
| Name | Description |
|---|---|
| ConnectionService() | |
| ConnectionService(IntPtr, JniHandleOwnership) | |
Fields
| Name | Description |
|---|---|
| AccessibilityService |
Use with |
| AccountService |
Use with |
| ActivityService |
Use with |
| AdvancedProtectionService |
Use with |
| AlarmService |
Use with |
| AppFunctionService |
Use with |
| AppOpsService |
Use with |
| AppSearchService |
Use with |
| AppwidgetService |
Use with |
| AudioService |
Use with |
| BatteryService |
Use with |
| BindAllowActivityStarts |
Obsolete.
Flag for |
| BindExternalServiceLong |
Works in the same way as |
| BindNotPerceptible |
Obsolete.
Flag for |
| BindPackageIsolatedProcess |
Obsolete.
Flag for |
| BindSharedIsolatedProcess |
Obsolete.
Flag for |
| BiometricService |
Use with |
| BlobStoreService |
Use with |
| BluetoothService |
Use with |
| BugreportService |
Service to capture a bugreport. (Inherited from Context) |
| CameraService |
Use with |
| CaptioningService |
Use with |
| CarrierConfigService |
Use with |
| ChooserService |
Use with |
| ClipboardService |
Use with |
| CompanionDeviceService |
Use with |
| ConnectivityDiagnosticsService |
Use with |
| ConnectivityService |
Use with |
| ConsumerIrService |
Use with |
| ContactKeysService |
Use with |
| CredentialService |
Use with |
| CrossProfileAppsService |
Use with |
| DeviceIdDefault |
The default device ID, which is the ID of the primary (non-virtual) device. (Inherited from Context) |
| DeviceIdInvalid |
Invalid device ID. (Inherited from Context) |
| DeviceLockService |
Use with |
| DevicePolicyService |
Use with |
| DisplayHashService |
Use with |
| DisplayService |
Use with |
| DomainVerificationService |
Use with |
| DownloadService |
Use with |
| DropboxService |
Use with |
| EuiccService |
Use with |
| FileIntegrityService |
Use with |
| FingerprintService |
Use with |
| GameService |
Use with |
| GrammaticalInflectionService |
Use with |
| HardwarePropertiesService |
Use with |
| HealthconnectService |
Use with |
| InputMethodService |
Use with |
| InputService |
Use with |
| IpsecService |
Use with |
| JobSchedulerService |
Use with |
| KeyguardService |
Use with |
| KeystoreService |
Use with |
| LauncherAppsService |
Use with |
| LayoutInflaterService |
Use with |
| LocaleService |
Use with |
| LocationService |
Use with |
| MediaCommunicationService |
Use with |
| MediaMetricsService |
Use with |
| MediaProjectionService |
Use with |
| MediaQualityService |
Use with |
| MediaRouterService |
Use with |
| MediaSessionService |
Use with |
| MidiService |
Use with |
| NetworkStatsService |
Use with |
| NfcService |
Use with |
| NotificationService |
Use with |
| NsdService |
Use with |
| OverlayService |
Use with |
| PeopleService |
Use with |
| PerformanceHintService |
Use with |
| PersistentDataBlockService |
Use with |
| PowerService |
Use with |
| PrintService |
|
| ProfilingService |
Use with |
| ReceiverExported |
Obsolete.
Flag for |
| ReceiverNotExported |
Obsolete.
Flag for |
| ReceiverVisibleToInstantApps |
Obsolete.
Flag for |
| RestrictionsService |
Use with |
| RoleService |
Use with |
| SatelliteService |
Use with |
| SearchService |
Use with |
| SecurityStateService |
Use with |
| SensorService |
Use with |
| ServiceInterface |
The |
| ShortcutService |
Use with |
| StatusBarService |
Use with |
| StopForegroundDetach |
Obsolete.
Selector for stopForeground(int): if set, the notification previously supplied to startForeground(int, Notification) will be detached from the service's lifecycle. (Inherited from Service) |
| StopForegroundLegacy |
This constant was deprecated in API level 33. (Inherited from Service) |
| StopForegroundRemove |
Obsolete.
Selector for stopForeground(int): if supplied, the notification previously supplied to startForeground(int, Notification) will be cancelled and removed from display. (Inherited from Service) |
| StorageService |
Use with |
| StorageStatsService |
Use with |
| SystemHealthService |
Use with |
| TelecomService |
Use with |
| TelephonyImsService |
Use with |
| TelephonyPhoneNumberService |
Use with |
| TelephonyService |
Use with |
| TelephonySubscriptionService |
Use with |
| TetheringService |
Use with |
| TextClassificationService |
Use with |
| TextServicesManagerService |
Use with |
| TvAdService |
Use with |
| TvInputService |
Use with |
| TvInteractiveAppService |
Use with |
| UiModeService |
Use with |
| UsageStatsService |
Use with |
| UsbService |
Use with |
| UserService |
Use with |
| VibratorManagerService |
Use with |
| VibratorService |
Use with |
| VirtualDeviceService |
Use with |
| VpnManagementService |
Use with |
| WallpaperService |
Use with |
| WifiAwareService |
Use with |
| WifiP2pService |
Use with |
| WifiRttRangingService |
Use with |
| WifiService |
Use with |
| WindowService |
Use with |
Properties
| Name | Description |
|---|---|
| AllConferences |
Returns all the active |
| AllConnections |
Returns all the active |
| Application |
Return the application that owns this service. (Inherited from Service) |
| ApplicationContext |
Return the context of the single, global Application object of the current process. (Inherited from ContextWrapper) |
| ApplicationInfo |
Return the full application info for this context's package. (Inherited from ContextWrapper) |
| Assets |
Return an AssetManager instance for your application's package. (Inherited from ContextWrapper) |
| AttributionSource |
Gets the attribution source associated with this context. (Inherited from Context) |
| AttributionTag |
Attribution can be used in complex apps to logically separate parts of the app. (Inherited from Context) |
| BaseContext | (Inherited from ContextWrapper) |
| CacheDir |
Returns the absolute path to the application specific cache directory on the filesystem. (Inherited from ContextWrapper) |
| Class |
Returns the runtime class of this |
| ClassLoader |
Return a class loader you can use to retrieve classes in this package. (Inherited from ContextWrapper) |
| CodeCacheDir |
Returns the absolute path to the application specific cache directory on the filesystem designed for storing cached code. (Inherited from ContextWrapper) |
| ContentResolver |
Return a ContentResolver instance for your application's package. (Inherited from ContextWrapper) |
| DataDir |
Returns the absolute path to the directory on the filesystem where all private files belonging to this app are stored. Apps should not use this path directly; they should instead use getFilesDir() , getCacheDir() , getDir(String,int) , or other storage APIs on this class. The returned path may change over time if the calling app is moved to an adopted storage device, so only relative paths should be persisted. No additional permissions are required for the calling app to read or write files under the returned path. Returns File (Inherited from ContextWrapper) |
| DeviceId |
Gets the device ID this context is associated with. (Inherited from Context) |
| Display |
Get the display this context is associated with. (Inherited from Context) |
| ExternalCacheDir |
Returns the absolute path to the directory on the primary external filesystem (that is somewhere on ExternalStorageDirectory where the application can place cache files it owns. (Inherited from ContextWrapper) |
| FilesDir |
Returns the absolute path to the directory on the filesystem where files created with OpenFileOutput(String, FileCreationMode) are stored. (Inherited from ContextWrapper) |
| ForegroundServiceType |
If the service has become a foreground service by calling startForeground(int,Notification) or startForeground(int,Notification,int), getForegroundServiceType() returns the current foreground service type. (Inherited from Service) |
| Handle |
The handle to the underlying Android instance. (Inherited from Object) |
| IsDeviceProtectedStorage |
Indicates if the storage APIs of this Context are backed by device-protected storage. (Inherited from ContextWrapper) |
| IsRestricted |
Indicates whether this Context is restricted. (Inherited from Context) |
| IsUiContext |
Returns |
| JniIdentityHashCode |
Gets the identity hash code assigned to this Java peer by the interop runtime. (Inherited from Object) |
| JniManagedPeerState | (Inherited from JavaObject) |
| JniPeerMembers | |
| MainExecutor |
Return an |
| MainLooper |
Return the Looper for the main thread of the current process. (Inherited from ContextWrapper) |
| NoBackupFilesDir |
Returns the absolute path to the directory on the filesystem similar to FilesDir. (Inherited from ContextWrapper) |
| ObbDir |
Return the primary external storage directory where this application's OBB files (if there are any) can be found. (Inherited from ContextWrapper) |
| OpPackageName |
Return the package name that should be used for |
| PackageCodePath |
Return the full path to this context's primary Android package. (Inherited from ContextWrapper) |
| PackageManager |
Return PackageManager instance to find global package information. (Inherited from ContextWrapper) |
| PackageName |
Return the name of this application's package. (Inherited from ContextWrapper) |
| PackageResourcePath |
Return the full path to this context's primary Android package. (Inherited from ContextWrapper) |
| Params |
Return the set of parameters which this Context was created with, if it
was created via |
| PeerReference |
Gets the JNI object reference for this Java peer. (Inherited from Object) |
| Resources |
Return a Resources instance for your application's package. (Inherited from ContextWrapper) |
| Theme |
Return the Theme object associated with this Context. (Inherited from ContextWrapper) |
| ThresholdClass | |
| ThresholdType | |
| Wallpaper | (Inherited from ContextWrapper) |
| WallpaperDesiredMinimumHeight | (Inherited from ContextWrapper) |
| WallpaperDesiredMinimumWidth | (Inherited from ContextWrapper) |
Methods
| Name | Description |
|---|---|
| AddConference(Conference) |
Adds a new conference call. |
| AddConferenceFromConnection(Conference, Connection) |
This is used to make a |
| AddExistingConnection(PhoneAccountHandle, Connection) |
Adds a connection created by the |
| AttachBaseContext(Context) |
Set the base context for this ContextWrapper. (Inherited from ContextWrapper) |
| BindIsolatedService(Intent, Context+BindServiceFlags, String, IExecutor, IServiceConnection) |
See bindIsolatedService(Intent,int,String,Executor,ServiceConnection) Call BindServiceFlags.of(long) to obtain a BindServiceFlags object. (Inherited from Context) |
| BindIsolatedService(Intent, Int32, String, IExecutor, IServiceConnection) |
Variation of |
| BindService(Intent, Bind, IExecutor, IServiceConnection) |
Same as |
| BindService(Intent, Context+BindServiceFlags, IExecutor, IServiceConnection) |
See bindService(Intent,int,Executor,ServiceConnection) Call BindServiceFlags.of(long) to obtain a BindServiceFlags object. (Inherited from Context) |
| BindService(Intent, IServiceConnection, Bind) |
Connect to an application service, creating it if needed. (Inherited from ContextWrapper) |
| BindService(Intent, IServiceConnection, Context+BindServiceFlags) |
See bindService(Intent,ServiceConnection,int) Call BindServiceFlags.of(long) to obtain a BindServiceFlags object. (Inherited from Context) |
| BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle) |
See bindServiceAsUser(Intent,ServiceConnection,int,UserHandle) Call BindServiceFlags.of(long) to obtain a BindServiceFlags object. (Inherited from Context) |
| BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle) |
Binds to a service in the given |
| CheckCallingOrSelfPermission(String) |
Determine whether the calling process of an IPC or you have been granted a particular permission. (Inherited from ContextWrapper) |
| CheckCallingOrSelfUriPermission(Uri, ActivityFlags) |
Determine whether the calling process of an IPC or you has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
| CheckCallingOrSelfUriPermissions(IList<Uri>, Int32) |
Determine whether the calling process of an IPC <em>or you</em> has been granted permission to access a list of URIs. (Inherited from Context) |
| CheckCallingPermission(String) |
Determine whether the calling process of an IPC you are handling has been granted a particular permission. (Inherited from ContextWrapper) |
| CheckCallingUriPermission(Uri, ActivityFlags) |
Determine whether the calling process and user ID has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
| CheckCallingUriPermissions(IList<Uri>, Int32) |
Determine whether the calling process and uid has been granted permission to access a list of URIs. (Inherited from Context) |
| CheckContentUriPermissionFull(Uri, Int32, Int32, ActivityFlags) |
Determine whether a particular process and uid has been granted permission to access a specific content URI. (Inherited from Context) |
| CheckPermission(String, Int32, Int32) |
Determine whether the given permission is allowed for a particular process and user ID running in the system. (Inherited from ContextWrapper) |
| CheckSelfPermission(String) |
Determine whether you have been granted a particular permission. (Inherited from ContextWrapper) |
| CheckUriPermission(Uri, Int32, Int32, ActivityFlags) |
Determine whether a particular process and user ID has been granted permission to access a specific URI. (Inherited from ContextWrapper) |
| CheckUriPermission(Uri, String, String, Int32, Int32, ActivityFlags) |
Check both a Uri and normal permission. (Inherited from ContextWrapper) |
| CheckUriPermissions(IList<Uri>, Int32, Int32, Int32) |
Determine whether a particular process and uid has been granted permission to access a list of URIs. (Inherited from Context) |
| ClearWallpaper() |
Obsolete.
(Inherited from ContextWrapper)
|
| Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
| ConferenceRemoteConnections(RemoteConnection, RemoteConnection) |
Indicates to the relevant |
| ConnectionServiceFocusReleased() |
Call to inform Telecom that your |
| Construct(JniObjectReference, JniObjectReferenceOptions) | (Inherited from JavaObject) |
| CreateAttributionContext(String) |
Return a new Context object for the current Context but attribute to a different tag. (Inherited from Context) |
| CreateConfigurationContext(Configuration) |
Return a new Context object for the current Context but whose resources are adjusted to match the given Configuration. (Inherited from ContextWrapper) |
| CreateContext(ContextParams) |
Creates a context with specific properties and behaviors. (Inherited from Context) |
| CreateContextForSplit(String) |
Return a new Context object for the given split name. The new Context has a ClassLoader and Resources object that can access the split's and all of its dependencies' code/resources. Each call to this method returns a new instance of a Context object; Context objects are not shared, however common state (ClassLoader, other Resources for the same split) may be so the Context itself can be fairly lightweight. (Inherited from ContextWrapper) |
| CreateDeviceContext(Int32) |
Returns a new |
| CreateDeviceProtectedStorageContext() |
Return a new Context object for the current Context but whose storage APIs are backed by device-protected storage. On devices with direct boot, data stored in this location is encrypted with a key tied to the physical device, and it can be accessed immediately after the device has booted successfully, both before and after the user has authenticated with their credentials (such as a lock pattern or PIN). Because device-protected data is available without user authentication, you should carefully limit the data you store using this Context. For example, storing sensitive authentication tokens or passwords in the device-protected area is strongly discouraged. If the underlying device does not have the ability to store device-protected and credential-protected data using different keys, then both storage areas will become available at the same time. They remain as two distinct storage locations on disk, and only the window of availability changes. Each call to this method returns a new instance of a Context object; Context objects are not shared, however common state (ClassLoader, other Resources for the same configuration) may be so the Context itself can be fairly lightweight. Returns Context (Inherited from ContextWrapper) |
| CreateDisplayContext(Display) |
Return a new Context object for the current Context but whose resources are adjusted to match the metrics of the given Display. (Inherited from ContextWrapper) |
| CreatePackageContext(String, PackageContextFlags) |
Return a new Context object for the given application name. (Inherited from ContextWrapper) |
| CreateRemoteIncomingConference(PhoneAccountHandle, ConnectionRequest) |
Ask some other |
| CreateRemoteIncomingConnection(PhoneAccountHandle, ConnectionRequest) |
Ask some other |
| CreateRemoteOutgoingConference(PhoneAccountHandle, ConnectionRequest) |
Ask some other |
| CreateRemoteOutgoingConnection(PhoneAccountHandle, ConnectionRequest) |
Ask some other |
| CreateWindowContext(Display, Int32, Bundle) |
Creates a |
| CreateWindowContext(Int32, Bundle) |
Creates a Context for a non-activity window. (Inherited from Context) |
| DatabaseList() |
Returns an array of strings naming the private databases associated with this Context's application package. (Inherited from ContextWrapper) |
| DeleteDatabase(String) |
Delete an existing private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
| DeleteFile(String) |
Delete the given private file associated with this Context's application package. (Inherited from ContextWrapper) |
| DeleteSharedPreferences(String) |
Delete an existing shared preferences file. (Inherited from ContextWrapper) |
| Dispose() |
Releases the resources held by this Java peer. (Inherited from Object) |
| Dispose(Boolean) |
Releases the resources held by this Java peer. (Inherited from Object) |
| DisposeUnlessReferenced() | (Inherited from JavaObject) |
| Dump(FileDescriptor, PrintWriter, String[]) |
Print the Service's state into the given stream. (Inherited from Service) |
| EnforceCallingOrSelfPermission(String, String) |
If neither you nor the calling process of an IPC you are handling has been granted a particular permission, throw a SecurityException. (Inherited from ContextWrapper) |
| EnforceCallingOrSelfUriPermission(Uri, ActivityFlags, String) |
If the calling process of an IPC or you has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
| EnforceCallingPermission(String, String) |
If the calling process of an IPC you are handling has not been granted a particular permission, throw a SecurityException. (Inherited from ContextWrapper) |
| EnforceCallingUriPermission(Uri, ActivityFlags, String) |
If the calling process and user ID has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
| EnforcePermission(String, Int32, Int32, String) |
If the given permission is not allowed for a particular process and user ID running in the system, throw a SecurityException. (Inherited from ContextWrapper) |
| EnforceUriPermission(Uri, Int32, Int32, ActivityFlags, String) |
If a particular process and user ID has not been granted permission to access a specific URI, throw SecurityException. (Inherited from ContextWrapper) |
| EnforceUriPermission(Uri, String, String, Int32, Int32, ActivityFlags, String) |
Enforce both a Uri and normal permission. (Inherited from ContextWrapper) |
| Equals(Object) | (Inherited from JavaObject) |
| Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
| FileList() |
Returns an array of strings naming the private files associated with this Context's application package. (Inherited from ContextWrapper) |
| GetColor(Int32) |
Returns a color associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
| GetColorStateList(Int32) |
Returns a color state list associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
| GetDatabasePath(String) |
Returns the absolute path on the filesystem where a database created with openOrCreateDatabase(String, int, CursorFactory) is stored. The returned path may change over time if the calling app is moved to an adopted storage device, so only relative paths should be persisted. (Inherited from ContextWrapper) |
| GetDir(String, FileCreationMode) |
Retrieve, creating if needed, a new directory in which the application can place its own custom data files. (Inherited from ContextWrapper) |
| GetDrawable(Int32) |
Returns a drawable object associated with a particular resource ID and styled for the current theme. (Inherited from Context) |
| GetExternalCacheDirs() |
Returns absolute paths to application-specific directories on all external storage devices where the application can place cache files it owns. (Inherited from ContextWrapper) |
| GetExternalFilesDir(String) |
Returns the absolute path to the directory on the primary external filesystem (that is somewhere on ExternalStorageDirectory) where the application can place persistent files it owns. (Inherited from ContextWrapper) |
| GetExternalFilesDirs(String) |
Returns absolute paths to application-specific directories on all external storage devices where the application can place persistent files it owns. (Inherited from ContextWrapper) |
| GetExternalMediaDirs() |
Obsolete.
Returns absolute paths to application-specific directories on all external storage devices where the application can place media files. (Inherited from ContextWrapper) |
| GetFileStreamPath(String) |
Returns the absolute path on the filesystem where a file created with OpenFileOutput(String, FileCreationMode) is stored. (Inherited from ContextWrapper) |
| GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
| GetObbDirs() |
Returns absolute paths to application-specific directories on all external storage devices where the application's OBB files (if there are any) can be found. (Inherited from ContextWrapper) |
| GetSharedPreferences(String, FileCreationMode) |
Retrieve and hold the contents of the preferences file 'name', returning a SharedPreferences through which you can retrieve and modify its values. (Inherited from ContextWrapper) |
| GetString(Int32, Object[]) |
Returns a localized string from the application's package's default string table. (Inherited from Context) |
| GetString(Int32) |
Returns a localized string from the application's package's default string table. (Inherited from Context) |
| GetSystemService(Class) |
Return the handle to a system-level service by class. (Inherited from Context) |
| GetSystemService(String) |
Return the handle to a system-level service by name. (Inherited from ContextWrapper) |
| GetSystemServiceName(Class) |
Gets the name of the system-level service that is represented by the specified class. (Inherited from ContextWrapper) |
| GetText(Int32) |
Return a localized, styled CharSequence from the application's package's default string table. (Inherited from Context) |
| GetTextFormatted(Int32) |
Return a localized, styled CharSequence from the application's package's default string table. (Inherited from Context) |
| GrantUriPermission(String, Uri, ActivityFlags) |
Grant permission to access a specific Uri to another package, regardless of whether that package has general permission to access the Uri's content provider. (Inherited from ContextWrapper) |
| JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
| MoveDatabaseFrom(Context, String) |
Move an existing database file from the given source storage context to this context. This is typically used to migrate data between storage locations after an upgrade, such as migrating to device protected storage. The database must be closed before being moved. (Inherited from ContextWrapper) |
| MoveSharedPreferencesFrom(Context, String) |
Move an existing shared preferences file from the given source storage context to this context. This is typically used to migrate data between storage locations after an upgrade, such as moving to device protected storage. (Inherited from ContextWrapper) |
| Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
| NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
| ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
| ObtainStyledAttributes(IAttributeSet, Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
| ObtainStyledAttributes(Int32, Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
| ObtainStyledAttributes(Int32[]) |
Retrieve styled attribute information in this Context's theme. (Inherited from Context) |
| OnBind(Intent) |
To be added |
| OnConference(Connection, Connection) |
Conference two specified connections. |
| OnConfigurationChanged(Configuration) |
Called by the system when the device configuration changes while your component is running. (Inherited from Service) |
| OnConnectionServiceFocusGained() |
Called when the |
| OnConnectionServiceFocusLost() |
Called when the |
| OnCreate() |
Called by the system when the service is first created. (Inherited from Service) |
| OnCreateConferenceComplete(Conference) |
Called by Telecom after the |
| OnCreateConnectionComplete(Connection) |
Called by Telecom after the |
| OnCreateIncomingConference(PhoneAccountHandle, ConnectionRequest) |
Create a |
| OnCreateIncomingConferenceFailed(PhoneAccountHandle, ConnectionRequest) |
Called by Telecom to inform the |
| OnCreateIncomingConnection(PhoneAccountHandle, ConnectionRequest) |
Create a |
| OnCreateIncomingConnectionFailed(PhoneAccountHandle, ConnectionRequest) |
Called by Telecom to inform the |
| OnCreateIncomingHandoverConnection(PhoneAccountHandle, ConnectionRequest) |
Called by Telecom to request that a |
| OnCreateOutgoingConference(PhoneAccountHandle, ConnectionRequest) |
Create a |
| OnCreateOutgoingConferenceFailed(PhoneAccountHandle, ConnectionRequest) |
Called by Telecom to inform the |
| OnCreateOutgoingConnection(PhoneAccountHandle, ConnectionRequest) |
Create a |
| OnCreateOutgoingConnectionFailed(PhoneAccountHandle, ConnectionRequest) |
Called by Telecom to inform the |
| OnCreateOutgoingHandoverConnection(PhoneAccountHandle, ConnectionRequest) |
Called by Telecom to request that a |
| OnDestroy() |
Called by the system to notify a Service that it is no longer used and is being removed. (Inherited from Service) |
| OnHandoverFailed(ConnectionRequest, HandoverFailureReason) |
Called by Telecom in response to a |
| OnLowMemory() |
This is called when the overall system is running low on memory, and actively running processes should trim their memory usage. (Inherited from Service) |
| OnRebind(Intent) |
Called when new clients have connected to the service, after it had previously been notified that all had disconnected in its onUnbind(Intent). (Inherited from Service) |
| OnRemoteConferenceAdded(RemoteConference) |
Indicates that a remote conference has been created for existing |
| OnRemoteExistingConnectionAdded(RemoteConnection) |
Called when an existing connection is added remotely. |
| OnStart(Intent, Int32) |
Obsolete.
This method was deprecated in API level 15. (Inherited from Service) |
| OnStartCommand(Intent, StartCommandFlags, Int32) |
Called by the system every time a client explicitly starts the service by calling Context.startService(Intent), providing the arguments it supplied and a unique integer token representing the start request. (Inherited from Service) |
| OnTaskRemoved(Intent) |
This is called if the service is currently running and the user has removed a task that comes from the service's application. (Inherited from Service) |
| OnTimeout(Int32, ForegroundService) |
Callback called when a particular foreground service type has timed out. (Inherited from Service) |
| OnTimeout(Int32) |
Callback called on timeout for ServiceInfo.FOREGROUND_SERVICE_TYPE_SHORT_SERVICE. (Inherited from Service) |
| OnTrimMemory(TrimMemory) |
Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process. (Inherited from Service) |
| OnUnbind(Intent) |
Called when all clients have disconnected from a particular interface published by the service. (Inherited from Service) |
| OpenFileInput(String) |
Open a private file associated with this Context's application package for reading. (Inherited from ContextWrapper) |
| OpenFileOutput(String, FileCreationMode) |
Open a private file associated with this Context's application package for writing. (Inherited from ContextWrapper) |
| OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory, IDatabaseErrorHandler) |
Open a new private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
| OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory) |
Open a new private SQLiteDatabase associated with this Context's application package. (Inherited from ContextWrapper) |
| PeekWallpaper() |
Obsolete.
(Inherited from ContextWrapper)
|
| RegisterComponentCallbacks(IComponentCallbacks) |
Add a new |
| RegisterDeviceIdChangeListener(IExecutor, IIntConsumer) |
Adds a new device ID changed listener to the |
| RegisterReceiver(BroadcastReceiver, IntentFilter, ActivityFlags) |
Obsolete.
Register to receive intent broadcasts, with the receiver optionally being exposed to Instant Apps. See registerReceiver(BroadcastReceiver,IntentFilter) for more information. By default Instant Apps cannot interact with receivers in other applications, this allows you to expose a receiver that Instant Apps can interact with. See BroadcastReceiver for more information on Intent broadcasts. As of Build.VERSION_CODES.UPSIDE_DOWN_CAKE , the system can place context-registered broadcasts in a queue while the app is in the cached state . When the app leaves the cached state, such as returning to the foreground, the system delivers any queued broadcasts. Multiple instances of certain broadcasts might be merged into one broadcast. As of Build.VERSION_CODES.ICE_CREAM_SANDWICH , receivers registered with this method will correctly respect the Intent.setPackage(String) specified for an Intent being broadcast. Prior to that, it would be ignored and delivered to all matching registered receivers. Be careful if using this for security. Parameters receiver BroadcastReceiver : This value may be null . (Inherited from ContextWrapper) |
| RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags) |
Register to receive intent broadcasts, with the receiver optionally being exposed to Instant Apps. See registerReceiver(BroadcastReceiver,IntentFilter) for more information. By default Instant Apps cannot interact with receivers in other applications, this allows you to expose a receiver that Instant Apps can interact with. See BroadcastReceiver for more information on Intent broadcasts. As of Build.VERSION_CODES.UPSIDE_DOWN_CAKE , the system can place context-registered broadcasts in a queue while the app is in the cached state . When the app leaves the cached state, such as returning to the foreground, the system delivers any queued broadcasts. Multiple instances of certain broadcasts might be merged into one broadcast. As of Build.VERSION_CODES.ICE_CREAM_SANDWICH , receivers registered with this method will correctly respect the Intent.setPackage(String) specified for an Intent being broadcast. Prior to that, it would be ignored and delivered to all matching registered receivers. Be careful if using this for security. Parameters receiver BroadcastReceiver : The BroadcastReceiver to handle the broadcast. This value may be null . (Inherited from Context) |
| RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ActivityFlags) |
Obsolete.
Register to receive intent broadcasts, to run in the context of scheduler . See registerReceiver(BroadcastReceiver,IntentFilter,int) and registerReceiver(BroadcastReceiver,IntentFilter,String,Handler) for more information. See BroadcastReceiver for more information on Intent broadcasts. As of Build.VERSION_CODES.UPSIDE_DOWN_CAKE , the system can place context-registered broadcasts in a queue while the app is in the cached state . When the app leaves the cached state, such as returning to the foreground, the system delivers any queued broadcasts. Multiple instances of certain broadcasts might be merged into one broadcast. As of Build.VERSION_CODES.ICE_CREAM_SANDWICH , receivers registered with this method will correctly respect the Intent.setPackage(String) specified for an Intent being broadcast. Prior to that, it would be ignored and delivered to all matching registered receivers. Be careful if using this for security. Parameters receiver BroadcastReceiver : This value may be null . (Inherited from ContextWrapper) |
| RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags) |
Register to receive intent broadcasts, to run in the context of scheduler . See registerReceiver(BroadcastReceiver,IntentFilter,int) and registerReceiver(BroadcastReceiver,IntentFilter,String,Handler) for more information. See BroadcastReceiver for more information on Intent broadcasts. As of Build.VERSION_CODES.UPSIDE_DOWN_CAKE , the system can place context-registered broadcasts in a queue while the app is in the cached state . When the app leaves the cached state, such as returning to the foreground, the system delivers any queued broadcasts. Multiple instances of certain broadcasts might be merged into one broadcast. As of Build.VERSION_CODES.ICE_CREAM_SANDWICH , receivers registered with this method will correctly respect the Intent.setPackage(String) specified for an Intent being broadcast. Prior to that, it would be ignored and delivered to all matching registered receivers. Be careful if using this for security. Parameters receiver BroadcastReceiver : The BroadcastReceiver to handle the broadcast. (Inherited from Context) |
| RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler) |
Register to receive intent broadcasts, to run in the context of <var>scheduler</var>. (Inherited from ContextWrapper) |
| RegisterReceiver(BroadcastReceiver, IntentFilter) |
Register a BroadcastReceiver to be run in the main activity thread. (Inherited from ContextWrapper) |
| RemoveStickyBroadcast(Intent) |
Obsolete.
(Inherited from ContextWrapper)
|
| RemoveStickyBroadcastAsUser(Intent, UserHandle) |
Obsolete.
(Inherited from ContextWrapper)
|
| RevokeSelfPermissionOnKill(String) |
Triggers the asynchronous revocation of a runtime permission. (Inherited from Context) |
| RevokeSelfPermissionsOnKill(ICollection<String>) |
Triggers the revocation of one or more permissions for the calling package. (Inherited from Context) |
| RevokeUriPermission(String, Uri, ActivityFlags) |
Remove permissions to access a particular content provider Uri that were previously added with grantUriPermission(String, Uri, int) for a specific target package. The given Uri will match all previously granted Uris that are the same or a sub-path of the given Uri. That is, revoking "content://foo/target" will revoke both "content://foo/target" and "content://foo/target/sub", but not "content://foo". It will not remove any prefix grants that exist at a higher level. Unlike revokeUriPermission(Uri,int) , this method will only revoke permissions that had been explicitly granted through grantUriPermission(String, Uri, int) and only for the package specified. Any matching grants that have happened through other mechanisms (clipboard, activity launching, service starting, etc) will not be removed. (Inherited from ContextWrapper) |
| RevokeUriPermission(Uri, ActivityFlags) |
Remove all permissions to access a particular content provider Uri that were previously added with M:Android.Content.Context.GrantUriPermission(System.String,Android.Net.Uri,Android.Net.Uri). (Inherited from ContextWrapper) |
| SendBroadcast(Intent, String, Bundle) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced. (Inherited from Context) |
| SendBroadcast(Intent, String) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced. (Inherited from ContextWrapper) |
| SendBroadcast(Intent) |
Broadcast the given intent to all interested BroadcastReceivers. (Inherited from ContextWrapper) |
| SendBroadcastAsUser(Intent, UserHandle, String) |
Version of SendBroadcast(Intent, String) that allows you to specify the user the broadcast will be sent to. (Inherited from ContextWrapper) |
| SendBroadcastAsUser(Intent, UserHandle) |
Version of SendBroadcast(Intent) that allows you to specify the user the broadcast will be sent to. (Inherited from ContextWrapper) |
| SendBroadcastWithMultiplePermissions(Intent, String[]) |
Broadcast the given intent to all interested BroadcastReceivers, allowing an array of required permissions to be enforced. (Inherited from Context) |
| SendOrderedBroadcast(Intent, Int32, String, String, BroadcastReceiver, Handler, String, Bundle, Bundle) |
Broadcasts an intent to interested receivers in order. (Inherited from ContextWrapper) |
| SendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of SendBroadcast(Intent) that allows you to receive data back from the broadcast. (Inherited from ContextWrapper) |
| SendOrderedBroadcast(Intent, String, Bundle, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of |
| SendOrderedBroadcast(Intent, String, Bundle) |
Broadcast the given intent to all interested BroadcastReceivers, delivering them one at a time to allow more preferred receivers to consume the broadcast before it is delivered to less preferred receivers. (Inherited from Context) |
| SendOrderedBroadcast(Intent, String, String, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of
|
| SendOrderedBroadcast(Intent, String) |
Broadcast the given intent to all interested BroadcastReceivers, delivering them one at a time to allow more preferred receivers to consume the broadcast before it is delivered to less preferred receivers. This call is asynchronous; it returns immediately, and you will continue executing while the receivers are run. See BroadcastReceiver for more information on Intent broadcasts. (Inherited from ContextWrapper) |
| SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle) |
Version of sendOrderedBroadcast(Intent,String,BroadcastReceiver,Handler,int,String,Bundle) that allows you to specify the user the broadcast will be sent to. This is not available to applications that are not pre-installed on the system image. See BroadcastReceiver for more information on Intent broadcasts. Requires android.Manifest.permission.INTERACT_ACROSS_USERS (Inherited from ContextWrapper) |
| SendStickyBroadcast(Intent, Bundle) |
Perform a |
| SendStickyBroadcast(Intent) |
Obsolete.
Perform a |
| SendStickyBroadcastAsUser(Intent, UserHandle) |
Obsolete.
(Inherited from ContextWrapper)
|
| SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle) |
Obsolete.
(Inherited from ContextWrapper)
|
| SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle) |
Obsolete.
(Inherited from ContextWrapper)
|
| SetForeground(Boolean) |
This member is deprecated. (Inherited from Service) |
| SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
| SetPeerReference(JniObjectReference, JniObjectReferenceOptions) | (Inherited from JavaObject) |
| SetTheme(Int32) |
Set the base theme for this context. (Inherited from ContextWrapper) |
| SetWallpaper(Bitmap) |
Obsolete.
(Inherited from ContextWrapper)
|
| SetWallpaper(Stream) |
Obsolete.
(Inherited from ContextWrapper)
|
| StartActivities(Intent[], Bundle) |
Launch multiple new activities. (Inherited from ContextWrapper) |
| StartActivities(Intent[]) |
Same as StartActivities(Intent[], Bundle) with no options specified. (Inherited from ContextWrapper) |
| StartActivity(Intent, Bundle) |
Launch a new activity. (Inherited from ContextWrapper) |
| StartActivity(Intent) |
Same as StartActivity(Intent, Bundle) with no options specified. (Inherited from ContextWrapper) |
| StartActivity(Type) |
Same as startActivity(Intent,Bundle) with no options specified. (Inherited from Context) |
| StartForeground(Int32, Notification, ForegroundService) |
An overloaded version of startForeground(int,Notification) with additional foregroundServiceType parameter. (Inherited from Service) |
| StartForeground(Int32, Notification) |
If your service is started (running through Context.startService(Intent)), then also make this service run in the foreground, supplying the ongoing notification to be shown to the user while in this state. (Inherited from Service) |
| StartForegroundService(Intent) |
Similar to startService(Intent) , but with an implicit promise that the Service will call startForeground(int, android.app.Notification) once it begins running. The service is given an amount of time comparable to the ANR interval to do this, otherwise the system will automatically crash the process, in which case an internal exception ForegroundServiceDidNotStartInTimeException is logged on logcat on devices running SDK Version Build.VERSION_CODES.S or later. On older Android versions, an internal exception RemoteServiceException is logged instead, with a corresponding message. Unlike the ordinary startService(Intent) , this method can be used at any time, regardless of whether the app hosting the service is in a foreground state. Note: Beginning with SDK Version Build.VERSION_CODES.S , apps targeting SDK Version Build.VERSION_CODES.S or higher are not allowed to start foreground services from the background. See Behavior changes: Apps targeting Android 12 for more details. (Inherited from ContextWrapper) |
| StartInstrumentation(ComponentName, String, Bundle) |
Start executing an Instrumentation class. (Inherited from ContextWrapper) |
| StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle) |
Like StartActivity(Intent, Bundle), but taking a IntentSender to start. (Inherited from ContextWrapper) |
| StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32) |
Same as startIntentSender(IntentSender,Intent,int,int,int,Bundle) with no options specified. (Inherited from ContextWrapper) |
| StartService(Intent) |
Request that a given application service be started. (Inherited from ContextWrapper) |
| StopForeground(Boolean) |
This method was deprecated in API level 33. (Inherited from Service) |
| StopForeground(StopForegroundFlags) |
Remove this service from foreground state, allowing it to be killed if more memory is needed. (Inherited from Service) |
| StopSelf() |
Stop the service, if it was previously started. (Inherited from Service) |
| StopSelf(Int32) |
Old version of stopSelfResult(int) that doesn't return a result. (Inherited from Service) |
| StopSelfResult(Int32) |
Stop the service if the most recent time it was started was startId. (Inherited from Service) |
| StopService(Intent) |
Request that a given application service be stopped. (Inherited from ContextWrapper) |
| ToArray<T>() |
Creates a managed array from this Java array wrapper. (Inherited from Object) |
| ToString() |
Returns a string representation of the object. (Inherited from Object) |
| UnbindService(IServiceConnection) |
Disconnect from an application service. (Inherited from ContextWrapper) |
| UnregisterComponentCallbacks(IComponentCallbacks) |
Remove a |
| UnregisterDeviceIdChangeListener(IIntConsumer) |
Removes a device ID changed listener from the Context. (Inherited from Context) |
| UnregisterFromRuntime() |
Unregisters this Java peer from the interop runtime. (Inherited from Object) |
| UnregisterReceiver(BroadcastReceiver) |
Unregister a previously registered BroadcastReceiver. (Inherited from ContextWrapper) |
| UpdateServiceGroup(IServiceConnection, Int32, Int32) |
For a service previously bound with |
| Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
| Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
| Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IJavaPeerable.Disposed() | (Inherited from JavaObject) |
| IJavaPeerable.Finalized() | (Inherited from JavaObject) |
| IJavaPeerable.JniObjectReferenceControlBlock | (Inherited from JavaObject) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from JavaObject) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from JavaObject) |
| IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from JavaObject) |
| IJavaPeerable.UnregisterFromRuntime() | (Inherited from Service) |
Extension Methods
| Name | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
Gets the JNI name of the type of the instance |
| JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
| JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
| JavaCast<TResult>(IJavaObject) | |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |